�����JFIF��XX����������    $.' ",#(7),01444'9=82<.342  2!!22222222222222222222222222222222222222222222222222�����"����4���������������������������� ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������,�PG"Z_�4�˷����kjز�Z�,F+��_z�,�© �����zh6�٨�ic�fu������������������������������������#ډb���_�N��?�����������wQ���5-�~�I���8���������������������������������TK<5o�Iv-������������������k�_U_������������������������������~b�M��d��������Ӝ�U�Hh��?]��E�w��Q���k�{��_}qFW7HTՑ��Y��F�����?_�'ϔ��_�Ջt������������������������=||I �����6�έ"�����D���/[�k�9����Y�8������ds|\���Ҿp6�Ҵ���]��.����6���z<�v��@]�i%������������������������$j��~����g��J>��no����pM[me�i$[�����������s�o�ᘨ�˸ nɜG-�ĨU�ycP���3.DB�li�;���������������������hj���x����7Z^�N�h��������N3u{�:j�����x�힞��#M��&��jL P@��_���� P�������������������&��o8��������9������@Sz���6�t7#O�ߋ �����s}Yf�T������lmr����Z)'N��k�۞p�����w\�T���������������ȯ?�8`���O��i{wﭹW�[�r�� ��Q4F�׊������3m&L�=��h3�������z~��#����\�l :�F,j@�� ʱ�wQT����8�"kJO����6�֚l������������������}����R�>ډK���]��y����&����p�}b������;N�1�m�r$����|��7�>e�@���B�TM*-i�H��g�D�)� E�m�|�ؘbҗ�a���Ҿ����������������t4�����o���G��*oCN�rP���Q��@z,|?W[0���������:�n,j���WiE��W������$~/�hp\��?��{(�0���+�Y8rΟ�+����>S-S���������������VN;���}�s?.����� w��9��˟<���Mq4�Wv'������{)0�1mB����V����W[��������8�/<� �%���wT^�5���b��)iM� p�g�N�&ݝ������������VO~��q���u���9��� ����!��J27�����$����O-���! �:���%H��� ـ�������y�ΠM=t{!S�� �oK8�������t<����è��������:a��������[������ա�H���~��w��Qz`�p����o�^ ������Q��n����� �,uu�C��$ ^���,�������8�#��:�6��e�|~�����������!�3��3.�\0�����q��o�4`.|� ����y�Q�`~;�d�ׯ,��O�Zw�������`73�v�܋�<�����Ȏ�� ـ4k��5�K�a�u�=9Yd��$>x�A�&�� j0� ���vF��� Y���|�y��� ~�6�@c��1vOp��������Ig�����4��l�OD�����L����� R���c���j�_�uX�6��3?nk��Wy�f;^*B� ��@���~a�`��Eu�������+�����6�L��.ü>��}y���}_�O�6�͐�:�Yr���G�X��kG������l^w����������~㒶sy���Iu�!���� W ��X��N�7BV��O��!X�2����wvG�R�f�T#�����t�/?���%8�^�W�aT����G�cL�M���I��(J����1~�8�?aT ���]����AS�E��(��*E}� 2������#I/�׍qz��^t�̔���������b�Yz4x����t�){ OH�����+(E��A&�N�������XT��o��"�XC����'���)}�J�z�p� ����~5�}�^����+�6����w��c��Q�|�Lp�d�H��}�(�.|����k��c4^�����"�����Z?ȕ ��a<�������L�!0�39C� �Eu�����C�F�Ew�ç ;�n?�*o���B�8�bʝ���'#Rqf����M}7����]�������s2tcS{�\icTx;�\��7K���P������ʇ Z O-��~�������c>"��?��������P�����E��O�8��@�8��G��Q�g�a�Վ���󁶠��䧘��_%#r�>�����1�z�a���eb��qcP��ѵ��n���#L��� =��׀t� L�7�`�����V����A{�C:�g���e@�����w1 Xp�3�c3�ġ�������p��M"'-�@n4���fG���B3�DJ�8[Jo�ߐ���gK)ƛ��$���� �������8�3�����+���� �����6�ʻ���� ���S�kI�*KZlT _`�������?��K�����QK�d���������B`�s}�>���`������*�>��,*@J�d�oF*�����弝��O}�k��s��]��y�ߘ�������c1G�V���<=�7��7����6��q�PT��tXԀ�!9*4�4Tހ���3XΛex�46�������Y��D ����� ����BdemDa����\�_l,����G�/���֌7���Y�](�xTt^%�GE�����4�}bT����ڹ�����;��Y)���B�Q��u��>J/J ���⮶.�XԄ��j�ݳ������+E��d ���r�5�_D�����1 ���o�� �B�x�΢�#����<��W�����8���R6�@���g�M�.��� dr�D��>(otU��@�x=��~v���2� ӣ�d�oBd�����3�eO�6�㣷����������ݜ�6��6Y��Qz`����S��{���\P��~z m5{J/L��1������<�e�ͅPu���b�]�ϔ��������'�������f�b� Zpw��c`"��i���BD@:)ִ�:�]��h���v�E��w���T�l�������P����"Ju�}��وV ��J��G6��. J/�Qgl߭�e�����@�z�Zev2u����)]կ���������7x�������s�M�-<ɯ�c��r��v�����@��$�ޮ}lk���a����'����>x��O\�Z������Fu>������ck#��&:��`�$��ai�>2Δ����l���oF[h�������lE�ܺ�Π���k:)���`������� $[6�����9�����kOw�\|�����8}������ބ:��񶐕��������I�A1/���=�2[�,�!��.}gN#�u����b���� ~���������݊��}34q�����d�E��L��������c��$���"�[q�U�硬g^��%B ��z���r�p�������J�ru%v\h�����1Y�ne`������ǥ:g����pQM~�^��Xi� ��`S�:V2������9.�P���V������?B�k�� ��������AEvw%�_�9C�Q����wKekP�ؠ�\������;Io d�{ ߞo�c1eP�����\� `����E=���@K<�Y��������eڼ�J����w����{av�F�'�M�@��������������/J��+9p����|]���������Iw &`���8���&�M�hg���[�{�������Xj���%��Ӓ�������������������$��(�����ʹN�������<>�I���RY�����K2�NPlL�ɀ�)��&e��������B+ь����(������������������� � �JTx����_?EZ� }@���� 6�U���뙢ط�z��dWI��n` D����噥�[��uV��"�G&�����Ú����2�g�}&m���������������������?ċ���"����Om#�������������������������� ��{���������������������ON��"S�X���Ne��ysQ���@�������������Fn��Vg�����dX�~nj����������������������]J�<�K]:����FW���b�������62����������=��5f����JKw����bf�X������������������������55��~J �%^�������:�-�QIE��P��v�nZum� z � ~ə ���� ���ة����;�f��\v�������g�8�1��f2�������������������������4;�V���ǔ�)�������������������9���1\������������������������������c��v�/'Ƞ�w������������������$�4�R-��t����������������������������������� e�6�/�ġ �̕Ecy�J���u�B���<�W�ַ~�w[B1L۲�-JS΂�{���΃�������������������������������������������A��20�c#���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@���� 0!1@AP"#2Q`$3V�%45a6�FRUq����� ������^7ׅ,$n��������+��F�`��2X'��0vM��p�L=�������5��8������u�p~���.�`r�����\����O��,ư�0oS ��_�M�����l���4�kv\JSd���x���SW�<��Ae�IX����������$I���w�:S���y���›R��9�Q[���,�5�;�@]�%���u�@ *ro�lbI �� ��+���%m:�͇ZV�����u�̉����θau<�fc�.����{�4Ա� �Q����*�Sm��8\ujqs]{kN���)qO�y�_*dJ�b�7���yQqI&9�ԌK!�M}�R�;�������S�T���1���i[U�ɵz�]��U)V�S6���3$K{��ߊ<�(� E]Զ[ǼENg�����'�\?#)Dkf��J���o��v���'�%ƞ�&K�u��!��b�35LX�Ϸ��63$K�a�;�9>,R��W��3�3� d�JeTYE.Mϧ��-�o�j3+y��y^�c�������VO�9NV\nd�1 ��!͕_)a�v;����թ�M�lWR1��)El��P;��yوÏ�u 3�k�5Pr6<�⒲l�!˞*��u־�n�!�l:����UNW ��%��Chx8vL'��X�@��*��)���̮��ˍ��� ����D-M�+J�U�kvK����+�x8��cY������?�Ԡ��~3mo��|�u@[XeY�C�\Kp�x8�oC�C�&����N�~3-H���� ��MX�s�u<`���~"WL��$8ξ��3���a�)|:@�m�\���^�`�@ҷ)�5p+��6���p�%i)P M���ngc�����#0Aruz���RL+xSS?���ʮ}()#�t��mˇ!��0}}y����<�e� �-ή�Ԩ��X������ MF���ԙ~l L.3���}�V뽺�v������멬��Nl�)�2����^�Iq��a��M��qG��T�����c3#������3U�Ǎ���}��לS�|qa��ڃ�+���-��2�f����/��bz��ڐ�� �ݼ[2�ç����k�X�2�* �Z�d���J�G����M*9W���s{��w���T��x��y,�in�O�v��]���n����P�$��JB@=4�OTI�n��e�22a\����q�d���%�$��(���:���: /*�K[PR�fr\nڙdN���F�n�$�4��[�� U�zƶ����� �mʋ���,�ao�u 3�z� �x��Kn����\[��VFmbE;�_U��&V�Gg�]L�۪&#n%�$ɯ��dG���D�TI=�%+AB�Ru#��b4�1�»x�cs�YzڙJG��f��Il���d�eF'T� iA��T���uC�$����Y��H?����[!G`}���ͪ� �纤Hv\������j�Ex�K���!���OiƸ�Yj�+u-<���'q����uN�*�r\��+�]���<�wOZ.fp�ێ��,-*)V?j-kÊ#�`�r��dV����(�ݽBk�����G�ƛk�QmUڗe��Z���f}|����8�8��a���i��3'J�����~G_�^���d�8w������ R�`(�~�.��u���l�s+g�bv���W���lGc}��u���afE~1�Ue������Z�0�8�=e�� f@/�jqEKQQ�J���oN��J���W5~M>$6�Lt�;$ʳ{���^��6�{����v6���ķܰg�V�cnn �~z�x�«�,2�u�?cE+Ș�H؎�%�Za�)���X>uW�Tz�Nyo����s���FQƤ��$��*�&�LLXL)�1�" L��eO��ɟ�9=���:t��Z���c��Ž���Y?�ӭV�wv�~,Y��r�ۗ�|�y��GaF�����C�����.�+� ���v1���fήJ�����]�S��T��B��n5sW}y�$��~z�'�c ��8 ��� ,! �p��VN�S��N�N�q��y8z˱�A��4��*��'������2n<�s���^ǧ˭P�Jޮɏ�U�G�L�J�*#��<�V��t7�8����TĜ>��i}K%,���)[��z�21z ?�N�i�n1?T�I�R#��m-�����������������1����lA�`��fT5+��ܐ�c�q՝��ʐ��,���3�f2U�եmab��#ŠdQ�y>\��)�SLY����w#��.���ʑ�f��� ,"+�w�~�N�'�c�O�3F�������N<���)j��&��,-� �љ���֊�_�zS���TǦ����w�>��?�������n��U仆�V���e�����0���$�C�d���rP �m�׈e�Xm�Vu� �L��.�bֹ��� �[Դaզ���*��\y�8�Է:�Ez\�0�Kq�C b��̘��cө���Q��=0Y��s�N��S.����3.���O�o:���#���v7�[#߫ ��5�܎�L���Er4���9n��COWlG�^��0k�%<���ZB���aB_���������'=��{i�v�l�$�uC���mƎҝ{�c㱼�y]���W�i ��ߧc��m�H� m�"�"�����;Y�ߝ�Z�Ǔ�����:S#��|}�y�,/k�Ld� TA�(�AI$+I3��;Y*���Z��}|��ӧO��d�v��..#:n��f>�>���ȶI�TX��� 8��y����"d�R�|�)0���=���n4��6ⲑ�+��r<�O�܂~zh�z����7ܓ�HH�Ga롏���nCo�>������a ���~]���R���̲c?�6(�q�;5%� |�uj�~z8R�=X��I�V=�|{v�Gj\gc��q����z�؋%M�ߍ����1y��#��@f^���^�>N������#x#۹��6�Y~�?�dfPO��{��P�4��V��u1E1J �*|���%����JN��`eWu�zk M6���q t[�� ��g�G���v��WIG��u_ft����5�j�"�Y�:T��ɐ���*�;� e5���4����q$C��2d�}���� _S�L#m�Yp��O�.�C�;��c����Hi#֩%+) �Ӎ��ƲV���SYź��g |���tj��3�8���r|���V��1#;.SQ�A[���S������#���`n�+���$��$�I �P\[�@�s��(�ED�z���P��])8�G#��0B��[ى��X�II�q<��9�~[Z멜�Z�⊔IWU&A>�P~�#��dp<�?����7���c��'~���5 ��+$���lx@�M�dm��n<=e�dyX��?{�|Aef ,|n3�<~z�ƃ�uۧ�����P��Y,�ӥQ�*g�#먙R�\���;T��i,��[9Qi歉����c>]9�� ��"�c��P�� �Md?٥��If�ت�u��k��/����F��9�c*9��Ǎ:�ØF���z�n*�@|I�ށ9����N3{'��[�'ͬ�Ҳ4��#}��!�V� Fu��,�,mTIk���v C�7v���B�6k�T9��1�*l� '~��ƞF��lU��'�M ����][ΩũJ_�{�i�I�n��$����L�� j��O�dx�����kza۪��#�E��Cl����x˘�o�����V���ɞ�ljr��)�/,�߬h�L��#��^��L�ф�,íMƁe�̩�NB�L�����iL����q�}��(��q��6IçJ$�W�E$��:������=#����(�K�B����zђ <��K(�N�۫K�w��^O{!����)��H���>x�������lx�?>Պ�+�>�W���,Ly!_�D���Ō�l���Q�!�[ �S����J��1��Ɛ�Y}��b,+�Lo�x�ɓ)����=�y�oh�@�꥟/��I��ѭ=��P�y9��� �ۍYӘ�e+�p�Jnϱ?V\SO%�(�t� ���=?MR�[Ș�����d�/ ��n�l��B�7j� ��!�;ӥ�/�[-���A�>��dN�sLj ��,ɪv��=1c�.SQ�O3�U���ƀ�ܽ�E����������̻��9G�ϷD�7(�}��Ävӌ\��y�_0[w ���<΍>����a_��[0+�L��F.�޺��f�>oN�T����q;���y\��bՃ��y�jH�<|q-eɏ�_?_9+P���Hp$�����[ux�K w�Mw��N�ی'$Y2�=��q���KB��P��~�������Yul:�[<����F1�2�O���5=d����]Y�sw:���Ϯ���E��j,_Q��X��z`H1,#II ��d�wr��P˂@�ZJV����y$�\y�{}��^~���[:N����ߌ�U�������O��d�����ؾe��${p>G��3c���Ė�lʌ�� ת��[��`ϱ�-W����dg�I��ig2��� ��}s ��ؤ(%#sS@���~���3�X�nRG�~\jc3�v��ӍL��M[JB�T��s3}��j�Nʖ��W����;7���ç?=X�F=-�=����q�ߚ���#���='�c��7���ڑW�I(O+=:uxq�������������e2�zi+�kuG�R��������0�&e�n���iT^J����~\jy���p'dtG��s����O��3����9* �b#Ɋ�� p������[Bws�T�>d4�ۧs���nv�n���U���_�~,�v����ƜJ1��s�� �QIz���)�(lv8M���U=�;����56��G���s#�K���MP�=��LvyGd��}�VwWBF�'�à �?MH�U�g2�� ����!�p�7Q��j��ڴ����=��j�u��� Jn�A s���uM������e��Ɔ�Ҕ�!)�'��8Ϣ�ٔ���ޝ(��Vp���צ֖d=�IC�J�Ǡ{q������kԭ�߸���i��@K����u�|�p=..�*+����x�����z[Aqġ#s2a�Ɗ���RR�)*HRsi�~�a &f��M��P����-K�L@��Z��Xy�'x�{}��Zm+���:�)�) IJ�-i�u���� ���ܒH��'��L(7�y�GӜq���� j��� 6ߌg1�g�o���,kر���tY�?W,���p���e���f�OQS��!K�۟cҒA�|ս�j�>��=⬒��˧L[�� �߿2JaB~R��u�:��Q�] �0H~���]�7��Ƽ�I���(�}��cq '�ήET���q�?f�ab���ӥvr� �)o��-Q��_'����ᴎo��K������;��V���o��%���~OK ����*��b�f:���-ťIR��`B�5!RB@���ï�� �u �̯e\�_U�_������� g�ES��3��������QT��a�����x����U<~�c?�*�#]�MW,[8O�a�x��]�1bC|踤�P��lw5V%�)�{t�<��d��5���0i�XSU��m:��Z�┵�i�"��1�^B�-��P�hJ��&)O��*�D��c�W��vM��)����}���P��ܗ-q����\mmζZ-l@�}��a��E�6��F�@��&Sg@���ݚ�M����� ȹ 4����#p�\H����dYDo�H���"��\��..R�B�H�z_�/5˘����6��KhJR��P�mƶi�m���3��,#c�co��q�a)*P�t����R�m�k�7x�D�E�\Y�閣_X�<���~�)���c[[�BP����6�Yq���S��0����%_����;��Àv�~�| VS؇ ��'O0��F0��\���U�-�d@�����7�SJ*z��3n��y��P����O����������m�~�P�3|Y��ʉr#�C�<�G~�.,! ���bqx���h~0=��!ǫ�jy����l��O,�[B��~��|9��ٱ����Xly�#�i�B��g%�S��������tˋ���e���ې��\[d�t)��.+u�|1 ������#�~Oj����hS�%��i.�~X���I�H�m��0n���c�1uE�q��cF�RF�o���7� �O�ꮧ� ���ۛ{��ʛi5�rw?׌#Qn�TW��~?y$��m\�\o����%W� ?=>S�N@�� �Ʈ���R����N�)�r"C�:��:����� �����#��qb��Y�. �6[��2K����2u�Ǧ�HYR��Q�MV��� �G�$��Q+.>�����nNH��q�^��� ����q��mM��V��D�+�-�#*�U�̒ ���p욳��u:�������IB���m����PV@O���r[b= �� ��1U�E��_Nm�yKbN�O���U�}�the�`�|6֮P>�\2�P�V���I�D�i�P�O;�9�r�mAHG�W�S]��J*�_�G��+kP�2����Ka�Z���H�'K�x�W�MZ%�O�YD�Rc+o��?�q��Ghm��d�S�oh�\�D�|:W������UA�Qc yT�q��������~^�H��/��#p�CZ���T�I�1�ӏT����4��"�ČZ�����}��`w�#�*,ʹ�� ��0�i��課�Om�*�da��^gJ݅{���l�e9uF#T�ֲ��̲�ٞC"�q���ߍ ոޑ�o#�XZTp����@ o�8��(jd��xw�]�,f���`~��|,s��^����f�1���t��|��m�򸄭/ctr��5s��7�9Q�4�H1꠲BB@�l9@���C�����+�wp�xu�£Yc�9��?`@#�o�mH�s2��)�=��2�.�l����jg�9$�Y�S�%*L������R�Y������7Z���,*=�䷘$�������arm�o�ϰ���UW.|�r�uf����IGw�t����Zwo��~5 ��YյhO+=8fF�)�W�7�L9lM�̘·Y���֘YLf�큹�pRF���99.A �"wz��=E\Z���'a� 2��Ǚ�#;�'}�G���*��l��^"q��+2FQ� hj��kŦ��${���ޮ-�T�٭cf�|�3#~�RJ����t��$b�(R��(����r���dx� >U b�&9,>���%E\� Ά�e�$��'�q't��*�א���ެ�b��-|d���SB�O�O��$�R+�H�)�܎�K��1m`;�J�2�Y~9��O�g8=vqD`K[�F)k�[���1m޼c��n���]s�k�z$@��)!I �x՝"v��9=�ZA=`Ɠi �:�E��)`�7��vI��}d�YI�_ �o�:ob���o ���3Q��&D&�2=�� �Ά��;>�h����y.*ⅥS������Ӭ�+q&����j|UƧ�����}���J0��WW< ۋS�)jQR�j���Ư��rN)�Gű�4Ѷ(�S)Ǣ�8��i��W52���No˓� ۍ%�5brOn�L�;�n��\G����=�^U�dI���8$�&���h��'���+�(������cȁ߫k�l��S^���cƗjԌE�ꭔ��gF���Ȓ��@���}O���*;e�v�WV���YJ\�]X'5��ղ�k�F��b 6R�o՜m��i N�i�����>J����?��lPm�U��}>_Z&�KK��q�r��I�D�Չ~�q�3fL�:S�e>���E���-G���{L�6p�e,8��������QI��h��a�Xa��U�A'���ʂ���s�+טIjP�-��y�8ۈZ?J$��W�P� ��R�s�]��|�l(�ԓ��sƊi��o(��S0���Y� 8�T97.�����WiL��c�~�dxc�E|�2!�X�K�Ƙਫ਼�$((�6�~|d9u+�qd�^3�89��Y�6L�.I�����?���iI�q���9�)O/뚅����O���X��X�V��ZF[�یgQ�L��K1���RҖr@v�#��X�l��F���Нy�S�8�7�kF!A��sM���^rkp�jP�DyS$N���q���nxҍ!U�f�!eh�i�2�m����`�Y�I�9r�6� �TF���C}/�y�^���Η���5d�'��9A-��J��>{�_l+�`��A���[�'��յ�ϛ#w:݅�%��X�}�&�PSt�Q�"�-��\縵�/����$Ɨh�Xb�*�y��BS����;W�ջ_mc�����vt?2}1�;qS�d�d~u:2k5�2�R�~�z+|HE!)�Ǟl��7`��0�<�,�2*���Hl-��x�^����'_TV�gZA�'j� ^�2Ϊ��N7t�����?w�� �x1��f��Iz�C-Ȗ��K�^q�;���-W�DvT�7��8�Z�������� hK�(P:��Q- �8�n�Z���܃e貾�<�1�YT<�,�����"�6{�/ �?�͟��|1�:�#g��W�>$����d��J��d�B���=��jf[��%rE^��il:��B���x���Sּ�1հ��,�=��*�7 fcG��#q� �eh?��2�7�����,�!7x��6�n�LC�4x��},Geǝ�tC.��vS �F�43��zz\��;QYC,6����~;RYS/6���|2���5���v��T��i����������mlv��������&� �nRh^ejR�LG�f���? �ۉҬܦƩ��|��Ȱ����>3����!v��i�ʯ�>�v��オ�X3e���_1z�Kȗ\<������!�8���V��]��?b�k41�Re��T�q��mz��TiOʦ�Z��Xq���L������q"+���2ۨ��8}�&N7XU7Ap�d�X��~�׿��&4e�o�F��� �H�����O���č�c�� 懴�6���͉��+)��v;j��ݷ�� �UV�� i��� j���Y9GdÒJ1��詞�����V?h��l�����l�cGs�ځ�������y�Ac������\V3�? �� ܙg�>qH�S,�E�W�[�㺨�uch�⍸�O�}���a��>�q�6�n6�����N6�q��������N� ���! 1AQaq�0@����"2BRb�#Pr���3C`��Scst���$4D���%Td���� ?�����N����a��3��m���C���w��������xA�m�q�m����m������$����4n淿t'��C"w��zU=D�\R+w�p+Y�T�&�պ@��ƃ��3ޯ?�Aﶂ��aŘ���@-�����Q�=���9D��ռ�ѻ@��M�V��P��܅�G5�f�Y<�u=,EC)�<�Fy'�"�&�չ�X~f��l�KԆV��?�� �W�N����=(� �;���{�r����ٌ�Y���h{�١������jW����P���Tc�����X�K�r��}���w�R��%��?���E��m�� �Y�q|����\lEE4����r���}�lsI�Y������f�$�=�d�yO����p�����yBj8jU�o�/�S��?�U��*������ˍ�0�������u�q�m [�?f����a�� )Q�>����6#������� ?����0UQ����,IX���(6ڵ[�DI�MNލ�c&���υ�j\��X�R|,4��� j������T�hA�e��^���d���b<����n�� �즇�=!���3�^�`j�h�ȓr��jẕ�c�,ٞX����-����a�ﶔ���#�$��]w�O��Ӫ�1y%��L�Y<�wg#�ǝ�̗`�x�xa�t�w��»1���o7o5��>�m뭛C���Uƃߜ}�C���y1Xνm�F8�jI���]����H���ۺиE@I�i;r�8ӭ�����V�F�Շ| ��&?�3|x�B�MuS�Ge�=Ӕ�#BE5G������Y!z��_e��q�р/W>|-�Ci߇�t�1ޯќd�R3�u��g�=0 5��[?�#͏��q�cf���H��{ ?u�=?�?ǯ���}Z��z���hmΔ�BFTW�����<�q��(v� ��!��z���iW]*�J�V�z��gX֧A�q�&��/w���u�gYӘa���; �i=����g:��?2�dž6�ى�k�4�>�Pxs����}������G�9���3 ���)gG�R<>r h�$��'nc�h�P��Bj��J�ҧH� -��N1���N��?��~��}-q!=��_2hc�M��l�vY%UE�@|�v����M2�.Y[|y�"Eï��K�ZF,�ɯ?,q�?v�M 80jx�"�;�9vk�����+ ֧�� �ȺU��?�%�vcV��mA�6��Qg^M�����A}�3�nl� QRN�l8�kkn�'�����(��M�7m9و�q���%ޟ���*h$Zk"��$�9��: �?U8�Sl��,,|ɒ��xH(ѷ����Gn�/Q�4�P��G�%��Ա8�N��!� �&�7�;���eKM7�4��9R/%����l�c>�x;������>��C�:�����t��h?aKX�bhe�ᜋ^�$�Iհ �hr7%F$�E��Fd���t��5���+�(M6�t����Ü�UU|zW�=a�Ts�Tg������dqP�Q����b'�m���1{|Y����X�N��b �P~��F^F:����k6�"�j!�� �I�r�`��1&�-$�Bevk:y���#y�w��I0��x��=D�4��tU���P�ZH��ڠ底taP��6����b>�xa�����Q�#� WeF��ŮNj�p�J* mQ�N�����*I�-*�ȩ�F�g�3 �5��V�ʊ�ɮ�a��5F���O@{���NX��?����H�]3��1�Ri_u��������ѕ�� ����0��� F��~��:60�p�͈�S��qX#a�5>���`�o&+�<2�D����: �������ڝ�$�nP���*)�N�|y�Ej�F�5ټ�e���ihy�Z �>���k�bH�a�v��h�-#���!�Po=@k̆IEN��@��}Ll?j�O������߭�ʞ���Q|A07x���wt!xf���I2?Z��<ץ�T���cU�j��]���陎Ltl �}5�ϓ��$�,��O�mˊ�;�@O��jE��j(�ا,��LX���LO���Ц�90�O �.����a��nA���7������j4 ��W��_ٓ���zW�jcB������y՗+EM�)d���N�g6�y1_x��p�$Lv�:��9�"z��p���ʙ$��^��JԼ*�ϭ����o���=x�Lj�6�J��u82�A�H�3$�ٕ@�=Vv�]�'�qEz�;I˼��)��=��ɯ���x �/�W(V���p�����$ �m�������u�����񶤑Oqˎ�T����r��㠚x�sr�GC��byp�G��1ߠ�w e�8�$⿄����/�M{*}��W�]˷.�CK\�ުx���/$�WP�w���r� |i���&�}�{�X� �>��$-��l���?-z���g����lΆ���(F���h�vS*���b���߲ڡn,|)mrH[���a�3�ר�[1��3o_�U�3�TC�$��(�=�)0�kgP���� ��u�^=��4 �WYCҸ:��vQ�ר�X�à��tk�m,�t*��^�,�}D*�� �"(�I��9R����>`�`��[~Q]�#af��i6l��8���6�:,s�s�N6�j"�A4���IuQ��6E,�GnH��zS�HO�uk�5$�I�4��ؤ�Q9�@��C����wp��BGv[]�u�Ov����0I4���\��y�����Q�Ѹ��~>Z��8�T��a��q�ޣ;z��a���/��S��I:�ܫ_�|������>=Z����8:�S��U�I�J��"IY���8%b8���H��:�QO�6�;7�I�S��J��ҌAά3��>c���E+&jf$eC+�z�;��V����� �r���ʺ������my�e���aQ�f&��6�ND���.:��NT�vm�<- u���ǝ\MvZY�N�NT��-A�>jr!S��n�O 1�3�Ns�%�3D@���`������ܟ 1�^c<���� �a�ɽ�̲�Xë#�w�|y�cW�=�9I*H8�p�^(4���՗�k��arOcW�tO�\�ƍR��8����'�K���I�Q�����?5�>[�}��yU�ײ -h��=��% q�ThG�2�)���"ו3]�!kB��*p�FDl�A���,�eEi�H�f�Ps�����5�H:�Փ~�H�0Dت�D�I����h�F3�������c��2���E��9�H��5�zԑ�ʚ�i�X�=:m�xg�hd(�v����׊�9iS��O��d@0ڽ���:�p�5�h-��t�&���X�q�ӕ,��ie�|���7A�2���O%P��E��htj��Y1��w�Ѓ!����  ���� ࢽ��My�7�\�a�@�ţ�J ��4�Ȼ�F�@o�̒?4�wx��)��]�P��~�����u�����5�����7X ��9��^ܩ�U;Iꭆ 5 �������eK2�7(�{|��Y׎ �V��\"���Z�1� Z�����}��(�Ǝ"�1S���_�vE30>���p;� ΝD��%x�W�?W?v����o�^V�i�d��r[��/&>�~`�9Wh��y�;���R���� ;;ɮT��?����r$�g1�K����A��C��c��K��l:�'��3 c�ﳯ*"t8�~l��)���m��+U,z��`(��>yJ�?����h>��]��v��ЍG*�{`��;y]��I�T� ;c��NU�fo¾h���/$���|NS���1�S�"�H��V���T���4��uhǜ�]�v;���5�͠x��'C\�SBpl���h}�N����� A�Bx���%��ޭ�l��/����T��w�ʽ]D�=����K���ž�r㻠l4�S�O?=�k �M:� ��c�C�a�#ha���)�ѐxc�s���gP�iG���{+���x���Q���I= �� z��ԫ+ �8"�k�ñ�j=|����c ��y��CF��/���*9ж�h{ �?4�o� ��k�m�Q�N�x��;�Y��4膚�a�w?�6�>�e]�����Q�r�:����g�,i"�����ԩA��*M�<�G��b�if��l^M��5�� �Ҩ�{����6J��ZJ�����P�*�����Y���ݛu�_4�9�I8�7���������,^ToR���m4�H��?�N�S�ѕw��/S��甍�@�9H�S�T��t�ƻ���ʒU��*{Xs�@����f������֒Li�K{H�w^���������Ϥm�tq���s� ���ք��f:��o~s��g�r��ט� �S�ѱC�e]�x���a��) ���(b-$(�j>�7q�B?ӕ�F��hV25r[7 Y� }L�R��}����*sg+��x�r�2�U=�*'WS��ZDW]�WǞ�<��叓���{�$�9Ou4��y�90-�1�'*D`�c�^o?(�9��u���ݐ��'PI&� f�Jݮ�������:wS����jfP1F:X �H�9dԯ����˝[�_54 �}*;@�ܨ�� ð�yn�T���?�ןd�#���4rG�ͨ��H�1�|-#���Mr�S3��G�3�����)�.᧏3v�z֑��r����$G"�`j �1t��x0<Ɔ�Wh6�y�6��,œ�Ga��gA����y��b��)���h�D��ß�_�m��ü �gG;��e�v��ݝ�nQ� ��C����-�*��o���y�a��M��I�>�<���]obD��"�:���G�A��-\%LT�8���c�)��+y76���o�Q�#*{�(F�⽕�y����=���rW�\p���۩�c���A���^e6��K������ʐ�cVf5$�'->���ՉN"���F�"�UQ@�f��Gb~��#�&�M=��8�ט�JNu9��D��[̤�s�o�~������� G��9T�tW^g5y$b��Y'��س�Ǵ�=��U-2 #�MC�t(�i� �lj�@Q 5�̣i�*�O����s�x�K�f��}\��M{E�V�{�υ��Ƈ�����);�H����I��fe�Lȣr�2��>��W��I�Ȃ6������i��k�� �5�YOxȺ����>��Y�f5'��|��H+��98pj�n�.O�y�������jY��~��i�w'������l�;�s�2��Y��:'lg�ꥴ)o#'Sa�a�K��Z� �m��}�`169�n���"���x��I ��*+� }F<��cГ���F�P�������ֹ*�PqX�x۩��,� ��N�� �4<-����%����:��7����W���u�`����� $�?�I��&����o��o��`v�>��P��"��l���4��5'�Z�gE���8���?��[�X�7(��.Q�-��*���ތL@̲����v��.5���[��=�t\+�CNܛ��,g�SQnH����}*F�G16���&:�t��4ُ"A��̣��$�b �|����#rs��a�����T�� ]�<�j��B�S�('$�ɻ� �wP;�/�n��?�ݜ��x�F��yUn�~mL*-�������Xf�wd^�a�}��f�,=t�׵i�.2/wpN�Ep8�OР���•��R�FJ� 55TZ��T �ɭ�<��]��/�0�r�@�f��V��V����Nz�G��^���7hZi����k��3�,kN�e|�vg�1{9]_i��X5y7� 8e]�U����'�-2,���e"����]ot�I��Y_��n�(JҼ��1�O ]bXc���Nu�No��pS���Q_���_�?i�~�x h5d'�(qw52] ��'ޤ�q��o1�R!���`ywy�A4u���h<קy���\[~�4�\ X�Wt/� 6�����n�F�a8��f���z �3$�t(���q��q�x��^�XWeN'p<-v�!�{�(>ӽDP7��ո0�y)�e$ٕv�Ih'Q�EA�m*�H��RI��=:��� ���4牢) �%_iN�ݧ�l]� �Nt���G��H�L��� ɱ�g<���1V�,�J~�ٹ�"K��Q�� 9�HS�9�?@��k����r�;we݁�]I�!{ �@�G�[�"��`���J:�n]�{�cA�E����V��ʆ���#��U9�6����j�#Y�m\��q�e4h�B�7��C�������d<�?J����1g:ٳ���=Y���D�p�ц� ׈ǔ��1�]26؜oS�'��9�V�FVu�P�h�9�xc�oq�X��p�o�5��Ա5$�9W�V(�[Ak�aY錎qf;�'�[�|���b�6�Ck��)��#a#a˙��8���=äh�4��2��C��4tm^ �n'c����]GQ$[Wҿ��i���vN�{Fu ��1�gx��1┷���N�m��{j-,��x�� Ūm�ЧS�[�s���Gna���䑴�� x�p 8<������97�Q���ϴ�v�aϚG��Rt�Һ׈�f^\r��WH�JU�7Z���y)�vg=����n��4�_)y��D'y�6�]�c�5̪��\� �PF�k����&�c;��cq�$~T�7j ���nç]�<�g ":�to�t}�159�<�/�8������m�b�K#g'I'.W������6��I/��>v��\�MN��g���m�A�yQL�4u�Lj�j9��#44�t��l^�}L����n��R��!��t��±]��r��h6ٍ>�yҏ�N��fU�� ���� Fm@�8}�/u��jb9������he:A�y�ծw��GpΧh�5����l}�3p468��)U��d��c����;Us/�֔�YX�1�O2��uq�s��`hwg�r~�{ R��mhN��؎*q 42�*th��>�#���E����#��Hv�O����q�}������6�e��\�,Wk�#���X��b>��p}�դ��3���T5��†��6��[��@��P�y*n��|'f�֧>�lư΂�̺����SU�'*�q�p�_S�����M�� '��c�6������m�� ySʨ;M��r���Ƌ�m�Kxo,���Gm�P��A�G�:��i��w�9�}M(�^�V��$ǒ�ѽ�9���|���� �a����J�SQ�a���r�B;����}���ٻ֢�2�%U���c�#�g���N�a�ݕ�'�v�[�OY'��3L�3�;,p�]@�S��{ls��X�'���c�jw��k'a�.��}�}&�� �dP�*�bK=ɍ!����;3n�gΊU�ߴmt�'*{,=SzfD� A��ko~�G�aoq�_mi}#�m�������P�Xhύ�����mxǍ�΂���巿zf��Q���c���|kc�����?���W��Y�$���_Lv����l߶��c���`?����l�j�ݲˏ!V��6����U�Ђ(A���4y)H���p�Z_�x��>���e���R��$�/�`^'3qˏ�-&Q�=?��CFVR �D�fV�9��{�8g�������n�h�(P"��6�[�D���< E�����~0<@�`�G�6����Hг�cc�� �c�K.5��D��d�B���`?�XQ��2��ٿyqo&+�1^� DW�0�ꊩ���G�#��Q�nL3��c���������/��x ��1�1�[y�x�პCW��C�c�UĨ80�m�e�4.{�m��u���I=��f�����0QRls9���f���������9���~f�����Ǩ��a�"@�8���ȁ�Q����#c�ic������G��$���G���r/$W�(��W���V�"��m�7�[m�A�m����bo��D� j����۳� l���^�k�h׽����� ��#� iXn�v��eT�k�a�^Y�4�BN���ĕ���0������� !01@Q"2AaPq3BR�������?�����@4�Q�����T3,���㺠�W�[=JK�Ϟ���2�r^7��vc�:�9 �E�ߴ�w�S#d���Ix��u��:��Hp��9E!�� V 2;73|F��9Y���*ʬ�F��D����u&���y؟��^EA��A��(ɩ���^��GV:ݜDy�`��Jr29ܾ�㝉��[���E;Fzx��YG��U�e�Y�C���� ����v-tx����I�sם�Ę�q��Eb�+P\ :>�i�C'�;�����k|z�رn�y]�#ǿb��Q��������w�����(�r|ӹs��[�D��2v-%��@;�8<a���[\o[ϧw��I!��*0�krs)�[�J9^��ʜ��p1)� "��/_>��o��<1����A�E�y^�C��`�x1'ܣn�p��s`l���fQ��):�l����b>�Me�jH^?�kl3(�z:���1ŠK&?Q�~�{�ٺ�h�y���/�[��V�|6��}�KbX����mn[-��7�5q�94�������dm���c^���h� X��5��<�eޘ>G���-�}�دB�ޟ� ��|�rt�M��V+�]�c?�-#ڛ��^ǂ}���Lkr���O��u�>�-D�ry� D?:ޞ�U��ǜ�7�V��?瓮�"�#���r��չģVR;�n���/_� ؉v�ݶe5d�b9��/O��009�G���5n�W����JpA�*�r9�>�1��.[t���s�F���nQ� V 77R�]�ɫ8����_0<՜�IF�u(v��4��F�k�3��E)��N:��yڮe��P�`�1}�$WS��J�SQ�N�j��ٺ��޵�#l���ј(�5=��5�lǏmoW�v-�1����v,W�mn��߀$x�<����v�j(����c]��@#��1������Ǔ���o'��u+����;G�#�޸��v-lη��/(`i⣍Pm^����ԯ̾9Z��F��������n��1��� ��]�[��)�'�������:�֪�W��FC����� �B9،!?���]��V��A�Վ�M��b�w��G F>_DȬ0¤�#�QR�[V��kz���m�w�"��9ZG�7'[��=�Q����j8R?�zf�\a�=��O�U����*oB�A�|G���2�54 �p��.w7� �� ���&������ξxGHp� B%��$g�����t�Џ򤵍z���HN�u�Я�-�'4��0���;_���3������� !01"@AQa2Pq#3BR�������?����ʩca��en��^��8���<�u#��m*08r��y�N"�<�Ѳ0��@\�p��� �����Kv�D��J8�Fҽ� �f�Y��-m�ybX�NP����}�!*8t(�OqѢ��Q�wW�K��ZD��Δ^e��!� ��B�K��p~�����e*l}z#9ң�k���q#�Ft�o��S�R����-�w�!�S���Ӥß|M�l޶V��!eˈ�8Y���c�ЮM2��tk���� ������J�fS����Ö*i/2�����n]�k�\���|4yX�8��U�P.���Ы[���l��@"�t�<������5�lF���vU�����W��W��;�b�cД^6[#7@vU�xgZv��F�6��Q,K�v��� �+Ъ��n��Ǣ��Ft���8��0��c�@�!�Zq s�v�t�;#](B��-�nῃ~���3g������5�J�%���O������n�kB�ĺ�.r��+���#�N$?�q�/�s�6��p��a����a��J/��M�8��6�ܰ"�*������ɗud"\w���aT(����[��F��U՛����RT�b���n�*��6���O��SJ�.�ij<�v�MT��R\c��5l�sZB>F��<7�;EA��{��E���Ö��1U/�#��d1�a�n.1ě����0�ʾR�h��|�R��Ao�3�m3 ��%�� ���28Q�� ��y��φ���H�To�7�lW>����#i`�q���c����a��� �m,B�-j����݋�'mR1Ήt�>��V��p���s�0IbI�C.���1R�ea�����]H�6�����������4B>��o��](��$B���m�����a�!=���?�B� K�Ǿ+�Ծ"�n���K��*��+��[T#�{�E�J�S����Q�����s�5�:�U�\wĐ�f�3����܆&�)�����I���Ԇw��E T�lrTf6Q|R�h:��[K�� �z��c֧�G�C��%\��_�a��84��HcO�bi��ؖV��7H �)*ģK~Xhչ0��4?�0��� �E<���}3���#���u�?�� ��|g�S�6ꊤ�|�I#Hڛ� �ա��w�X��9��7���Ŀ%�SL��y6č��|�F�a 8���b���$�sק�h���b9RAu7�˨p�Č�_\*w��묦��F ����4D~�f����|(�"m���NK��i�S�>�$d7SlA��/�²����SL��|6N�}���S�˯���g��]6��; �#�.��<���q'Q�1|KQ$�����񛩶"�$r�b:���N8�w@��8$�� �AjfG|~�9F ���Y��ʺ��Bwؒ������M:I岎�G��`s�YV5����6��A �b:�W���G�q%l�����F��H���7�������Fsv7���k�� 403WebShell
403Webshell
Server IP : 172.67.166.40  /  Your IP : 104.23.197.202
Web Server : Apache
System : Linux tastesys.restaurant-online.biz 3.10.0-1160.144.1.el7.tuxcare.els4.x86_64 #1 SMP Tue Apr 7 08:40:40 UTC 2026 x86_64
User : restaura ( 1002)
PHP Version : 5.4.45
Disable Function : exec,passthru,shell_exec,system
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/restaura/public_html/roo/difiores-pizzeria-an/cmsadmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/restaura/public_html/roo/difiores-pizzeria-an/cmsadmin/editprefssub.php
<?php
//print_r($_POST);
if ($_SESSION['FirstName'] == "") {
	echo 'You are not authorized to view this page. <br><br>You may <a href="index.php"><font color="blue">log in here.</font></a>';
	exit;
}
 if($_SESSION['roladmin'] ==1){$roladmin=1;}
 if($_SESSION['masterAdmin']==1){$masteradmin=1;}
 if($_SESSION['admin']==1){$admin=1;}
//require_once ('mysql_connect.php');
$action          = $_GET["a"];
include ('includes/admin-config.php');

?>
<style type="text/css">
	.day{
		font-size: 15px;
	}
	#date_table th{
		font-size: 17px;
	}
</style>
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<?php
if ($action == "update") {
		$query = "UPDATE storePrefs SET ";
			//update specific fields depending on which section is being updated
			$update = $_REQUEST["section"];
			
			if($update=="general"){
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", title='" . mysql_real_escape_string($_POST['title']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " title='" . mysql_real_escape_string($_POST['title']) . "'";
				}

				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", address1='" . mysql_real_escape_string($_POST['address1']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " address1='" . mysql_real_escape_string($_POST['address1']) . "'";
				}
			
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", address2='" . mysql_real_escape_string($_POST['address2']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " address2='" . mysql_real_escape_string($_POST['address2']) . "'";
				}
				
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", city='" . mysql_real_escape_string($_POST['city']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " city='" . mysql_real_escape_string($_POST['city']) . "'";
				}
			
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", state='" . mysql_real_escape_string($_POST['state']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " state='" . mysql_real_escape_string($_POST['state']) . "'";
				}
			
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", zip='" . mysql_real_escape_string($_POST['zip']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " zip='" . mysql_real_escape_string($_POST['zip']) . "'";
				}
			
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", phone='" . mysql_real_escape_string($_POST['phone']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " phone='" . mysql_real_escape_string($_POST['phone']) . "'";
				}
				if(!empty($sv)) {  //sw clause exists, add to it
				$sv .= ", fax='" . mysql_real_escape_string($_POST['fax']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " fax='" . mysql_real_escape_string($_POST['fax']) . "'";
				}
						
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", webURL='" . mysql_real_escape_string($_POST['webURL']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " webURL='" . mysql_real_escape_string($_POST['webURL']) . "'";
				}

				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", mapURL='" . mysql_real_escape_string($_POST['mapURL']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " mapURL='" . mysql_real_escape_string($_POST['mapURL']) . "'";
				}
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", email='" . mysql_real_escape_string($_POST['email']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " email='" . mysql_real_escape_string($_POST['email']) . "'";
				}
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", analyticsID='" . mysql_real_escape_string($_POST['analyticsID']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " analyticsID='" . mysql_real_escape_string($_POST['analyticsID']) . "'";
				}
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", gtm_id='" . mysql_real_escape_string($_POST['gtm_id']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " gtm_id='" . mysql_real_escape_string($_POST['gtm_id']) . "'";
				}
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", directions='" . mysql_real_escape_string($_POST['directions']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " directions='" . mysql_real_escape_string($_POST['directions']) . "'";
				}
			} elseif($update=="social"){
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", fantools_email='" . mysql_real_escape_string($_POST['fantoolsid']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " fantools_email='" . mysql_real_escape_string($_POST['fantoolsid']) . "'";
				}
				
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", fantools_pwd='" . mysql_real_escape_string($_POST['fantoolspwd']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " fantools_pwd='" . mysql_real_escape_string($_POST['fantoolspwd']) . "'";
				}
			
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", facebook='" . mysql_real_escape_string($_POST['facebook']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " facebook='" . mysql_real_escape_string($_POST['facebook']) . "'";
				}
				
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", fbpage='" . mysql_real_escape_string($_POST['fbpage']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " fbpage='" . mysql_real_escape_string($_POST['fbpage']) . "'";
				}
				
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", twitter='" . mysql_real_escape_string($_POST['twitter']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " twitter='" . mysql_real_escape_string($_POST['twitter']) . "'";
				}
				
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", twitterid='" . mysql_real_escape_string($_POST['twitterid']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " twitterid='" . mysql_real_escape_string($_POST['twitterid']) . "'";
				}
				
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", google_plus='" . mysql_real_escape_string($_POST['google_plus']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " google_plus='" . mysql_real_escape_string($_POST['google_plus']) . "'";
				}
				
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", myspace='" . mysql_real_escape_string($_POST['myspace']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " myspace='" . mysql_real_escape_string($_POST['myspace']) . "'";
				}
			} elseif($update=="hours"){	
			//************************ This section updates any HOURS and timezone fields **************************************
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", hours1='" . mysql_real_escape_string($_POST['hours1']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " hours1='" . mysql_real_escape_string($_POST['hours1']) . "'";
				}
			
			
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", hours2='" . mysql_real_escape_string($_POST['hours2']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " hours2='" . mysql_real_escape_string($_POST['hours2']) . "'";
				}
			
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", hours3='" . mysql_real_escape_string($_POST['hours3']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " hours3='" . mysql_real_escape_string($_POST['hours3']) . "'";
				}
				
				if(!empty($_POST['timezone'])) { //only save timezone if it is selected
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", timeZone='" . mysql_real_escape_string($_POST['timezone']) . "'";
					} else { //sw clause does not exist, create it now
						$sv .= " timeZone='" . mysql_real_escape_string($_POST['timezone']) . "'";
					}
				}
				
				If (!empty($_POST['chkOpenSign'])){ //field is populated, need to update data
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", open_sign='1'";
					} else { //sw clause does not exist, create it now
						$sv .= " open_sign='1'";
					}
				} else {
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", open_sign='0'";
					} else { //sw clause does not exist, create it now
						$sv .= " open_sign='0'";
					}
				}
				
				
				If (!empty($_POST['chkDelSchedule'])){ //field is populated, need to update data
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", use_delivery_hours='1'";
					} else { //sw clause does not exist, create it now
						$sv .= " use_delivery_hours='1'";
					}
				} else {
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", use_delivery_hours='0'";
					} else { //sw clause does not exist, create it now
						$sv .= " use_delivery_hours='0'";
					}
				}
			} elseif($update=="ordering"){
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", orderURL='" . mysql_real_escape_string($_POST['orderURL']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " orderURL='" . mysql_real_escape_string($_POST['orderURL']) . "'";
				}
							if(!empty($sv)) {  //sw clause exists, add to it
				$sv .= ", salesTax='" . mysql_real_escape_string($_POST['salesTax']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " salesTax='" . mysql_real_escape_string($_POST['salesTax']) . "'";
				}
			
				If (!empty($_POST['chkDeltax'])){ //field is populated, need to update data
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", taxdelivery='1'";
					} else { //sw clause does not exist, create it now
						$sv .= " taxdelivery='1'";
					}
				} else {
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", taxdelivery='0'";
					} else { //sw clause does not exist, create it now
						$sv .= " taxdelivery='0'";
					}
				}
				If (!empty($_POST['chkDeliver'])){ //field is populated, need to update data
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", deliver='1'";
					} else { //sw clause does not exist, create it now
						$sv .= " deliver='1'";
					}
				} else {
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", deliver='0'";
					} else { //sw clause does not exist, create it now
						$sv .= " deliver='0'";
					}
				}
				If (!empty($_POST['chkHalfTopping'])){ //field is populated, need to update data
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", half_topping_prices='1'";
					} else { //sw clause does not exist, create it now
						$sv .= " half_topping_prices='1'";
					}
				} else {
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", half_topping_prices='0'";
					} else { //sw clause does not exist, create it now
						$sv .= " half_topping_prices='0'";
					}
				}
				If (!empty($_POST['chkDisableHalfToppings'])){ //field is populated, need to update data
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", disable_half_toppings='1'";
					} else { //sw clause does not exist, create it now
						$sv .= " disable_half_toppings='1'";
					}
				} else {
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", disable_half_toppings='0'";
					} else { //sw clause does not exist, create it now
						$sv .= " disable_half_toppings='0'";
					}
				}
				If (!empty($_POST['chkMultipleSauces'])){ //field is populated, need to update data
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", use_multiple_sauces='1'";
					} else { //sw clause does not exist, create it now
						$sv .= " use_multiple_sauces='1'";
					}
				} else {
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", use_multiple_sauces='0'";
					} else { //sw clause does not exist, create it now
						$sv .= " use_multiple_sauces='0'";
					}
				}
				If (!empty($_POST['chkMultipleCrusts'])){ //field is populated, need to update data
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", use_multiple_crusts='1'";
					} else { //sw clause does not exist, create it now
						$sv .= " use_multiple_crusts='1'";
					}
				} else {
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", use_multiple_crusts='0'";
					} else { //sw clause does not exist, create it now
						$sv .= " use_multiple_crusts='0'";
					}
				}
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", deliveryCharge='" . mysql_real_escape_string($_POST['deliveryCharge']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " deliveryCharge='" . mysql_real_escape_string($_POST['deliveryCharge']) . "'";
				}
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", minimum_order='" . mysql_real_escape_string($_POST['minimum_order']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " minimum_order='" . mysql_real_escape_string($_POST['minimum_order']) . "'";
				}
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", deltime='" . mysql_real_escape_string($_POST['deltime']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " deltime='" . mysql_real_escape_string($_POST['deltime']) . "'";
				}
				
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", preptime='" . mysql_real_escape_string($_POST['preptime']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " preptime='" . mysql_real_escape_string($_POST['preptime']) . "'";
				}
				If (!empty($_POST['chkChecks'])){ //field is populated, need to update data
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", acceptChecks='1'";
					} else { //sw clause does not exist, create it now
						$sv .= " acceptChecks='1'";
					}
				} else {
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", acceptChecks='0'";
					} else { //sw clause does not exist, create it now
						$sv .= " acceptChecks='0'";
					}
				}
				If (!empty($_POST['paypal_auth'])){ //field is populated, need to update data
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", paypal_auth='1'";
					} else { //sw clause does not exist, create it now
						$sv .= " paypal_auth='1'";
					}
				} else {
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", paypal_auth='0'";
					} else { //sw clause does not exist, create it now
						$sv .= " paypal_auth='0'";
					}
				}
				
				If (!empty($_POST['chkTipline'])){ //field is populated, need to update data
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", include_tipline='1'";
					} else { //sw clause does not exist, create it now
						$sv .= " include_tipline='1'";
					}
				} else {
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", include_tipline='0'";
					} else { //sw clause does not exist, create it now
						$sv .= " include_tipline='0'";
					}
				}
				
				if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", order_notice='" . mysql_real_escape_string($_POST['order_notice']) . "'";
					} else { //sw clause does not exist, create it now
						$sv .= " order_notice='" . mysql_real_escape_string($_POST['order_notice']) . "'";
				}
				if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", custom_order_confirmation='" . mysql_real_escape_string($_POST['order_conf']) . "'";
					} else { //sw clause does not exist, create it now
						$sv .= " custom_order_confirmation='" . mysql_real_escape_string($_POST['order_conf']) . "'";
				}
				
				if(($roladmin==1)||($masteradmin==1)){    //***********only allow updating these two fields if logged in as ROO administrator
					If (!empty($_POST['chkFaxOrders'])){ //field is populated, need to update data
							if(!empty($sv)) {  //sw clause exists, add to it
								$sv .= ", orderByFax='1'";
							} else { //sw clause does not exist, create it now
								$sv .= " orderByFax='1'";
							}
						} else {
							if(!empty($sv)) {  //sw clause exists, add to it
								$sv .= ", orderByFax='0'";
							} else { //sw clause does not exist, create it now
								$sv .= " orderByFax='0'";
							}
						}
						
						If (!empty($_POST['chkOnline'])){ //field is populated, need to update data
							if(!empty($sv)) {  //sw clause exists, add to it
								$sv .= ", orderOnline='1'";
							} else { //sw clause does not exist, create it now
								$sv .= " orderOnline='1'";
							}
						} elseif($masteradmin==1) {
							if(!empty($sv)) {  //sw clause exists, add to it
								$sv .= ", orderOnline='0'";
							} else { //sw clause does not exist, create it now
								$sv .= " orderOnline='0'";
							}
						}
						
				}  //****************END of if 'ROO Admin' loop
				
				if(($roladmin==1)||($masteradmin==1)||($admin==1)){
					If (!empty($_POST['chkSuspend'])){ //field is populated, need to update data
							if(!empty($sv)) {  //sw clause exists, add to it
								$sv .= ", suspend_ordering='1'";
							} else { //sw clause does not exist, create it now
								$sv .= " suspend_ordering='1'";
							}
						} else {
							if(!empty($sv)) {  //sw clause exists, add to it
								$sv .= ", suspend_ordering='0'";
							} else { //sw clause does not exist, create it now
								$sv .= " suspend_ordering='0'";
							}
						}
				} 
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", orderEmail1='" . mysql_real_escape_string($_POST['orderemail1']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " orderEmail1='" . mysql_real_escape_string($_POST['orderemail1']) . "'";
				}
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", orderEmail2='" . mysql_real_escape_string($_POST['orderemail2']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " orderEmail2='" . mysql_real_escape_string($_POST['orderemail2']) . "'";
				}
				/*
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", paypalid='" . $_POST['paypalid'] . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " paypalid='" . $_POST['paypalid'] . "'";
				}
				*/
			} elseif($update=="appearance"){
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", categoryColor='" . mysql_real_escape_string($_POST['catcolor']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " categoryColor='" . mysql_real_escape_string($_POST['catcolor']) . "'";
				}
				
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", categoryFontColor='" . mysql_real_escape_string($_POST['catfontcolor']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " categoryFontColor='" . mysql_real_escape_string($_POST['catfontcolor']) . "'";
				}
			} elseif($update=="lennox"){	//LENNOX
				
				if($_POST['lennox_api_key']){
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", lennox_api_key='" . mysql_real_escape_string($_POST['lennox_api_key']) . "'";
					} else { //sw clause does not exist, create it now
						$sv .= " lennox_api_key='" . mysql_real_escape_string($_POST['lennox_api_key']) . "'";
					}
				}
			
			} elseif($update=="linkpos"){	//LINKPOS
				if($_POST['linkpos_partner_name']){
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", linkpos_partner_name='" . mysql_real_escape_string($_POST['linkpos_partner_name']) . "'";
					} else { //sw clause does not exist, create it now
						$sv .= " linkpos_partner_name='" . mysql_real_escape_string($_POST['linkpos_partner_name']) . "'";
					}
				}
				if($_POST['linkpos_partner_pwd']){
					if(!empty($sv)) {  //sw clause exists, add to it
						$sv .= ", linkpos_partner_pwd='" . mysql_real_escape_string($_POST['linkpos_partner_pwd']) . "'";
					} else { //sw clause does not exist, create it now
						$sv .= " linkpos_partner_pwd='" . mysql_real_escape_string($_POST['linkpos_partner_pwd']) . "'";
					}
				}				
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", linkpos_store_name='" . mysql_real_escape_string($_POST['linkpos_store_name']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " linkpos_store_name='" . mysql_real_escape_string($_POST['linkpos_store_name']) . "'";
				}				
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", linkpos_store_pwd='" . mysql_real_escape_string($_POST['linkpos_store_pwd']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " linkpos_store_pwd='" . mysql_real_escape_string($_POST['linkpos_store_pwd']) . "'";
				}
				if(!empty($sv)) {  //sw clause exists, add to it
					$sv .= ", linkpos_company='" . mysql_real_escape_string($_POST['linkpos_company']) . "'";
				} else { //sw clause does not exist, create it now
					$sv .= " linkpos_company='" . mysql_real_escape_string($_POST['linkpos_company']) . "'";
				}
			}
			

			
			
			
	if ($sv !==""){
		$query .= $sv;
	}
	//echo $query .'<br>';	//for testing
	//query is created, now execute:
	if (!mysql_query($query)){
		//if errors, display query and error message
		echo $query;
		die('Error: ' . mysql_error());
	} else {
		//echo $query .'<br>';	//for testing
		echo "<div align=center><font color=red>Store preferences updated successfully. </font></div>";	/*now check online ordering status and hide or unhide mobile ordering button as needed, manage redirect url	*/		include('../orderonline.php');		if($orderonline=='1'){			if(empty($orderurl)){				$orderurl = "order-m.php";			}			$active=1;		} else {			$active=0;		}			$update = "update nav_slider_mobile set active='$active', button_url='$orderurl' where icon_image='mobile-order-icon.png'";			mysql_query($update);		
		if($_POST['address1']){
			$fullAddress = $_POST['address1']." ".$_POST['city']." ".$_POST['state']." ".$_POST['zip'];
			$your_location = getCoordinates($fullAddress);
			$coordinates = explode(',',$your_location);		
			$lQuery = "Update storePrefs set longitude='".$coordinates[1]."' , latitude='".$coordinates[0]."'";
			mysql_query($lQuery);
		}
	}		


}	//end of update query

	//Code to save manage-ordering menu item   
	if(isset($_POST['save-menu-time']))
	{
			//delete existing page setting		
		$delQuery = "DELETE from manage_ordering_menu";
		$delResult = mysql_query($delQuery);

		//insert code here
		if(!empty($_POST['menu'])){
		$i=0;
			foreach ($_POST['menu'] as $key => $value)
			{
				$menuName =  $value;
				$userId = $_SESSION['UserID'];
			 	$starttime = $_POST['start_time'][$i];
				$query = "INSERT INTO manage_ordering_menu (menu_name,start_time,user_id)
						  values('".$menuName."' , '".$starttime."' , '".$userId."')";
				mysql_query($query);
				$i++; 
			}
		}
	}
	if(isset($_POST['save-eod-time']))
	{
		
		$eod_hour=array();
		$eod_hour=$_POST['eod_hour'];

		$eod_min=array();
		$eod_min=$_POST['eod_min'];

		$eod_time=array();
		$eod_time=$_POST['eod_time'];

		$time_array=array();
		for($i=0;$i<count($eod_hour);$i++){
		   array_push($time_array,date("H:i:s", strtotime($eod_hour[$i].':'.$eod_min[$i].' '.$eod_time[$i])));
		}
		$time=implode('~',$time_array);
		
		$query = "Update storePrefs set eod_report_time='$time'";
		mysql_query($query);
	    $result = mysql_query($query);
}


$query = "SELECT * from storePrefs";
$rt=mysql_query($query);

echo '<div id="single-admin-button">
<ul>
<a href="index.php"><li>BACK TO HOME ADMIN</li></a>
</ul>
</div>';
##******************************************* BEGIN LOCATION & CONTACT INFO SECTION *****************************************##
echo '<div class="arrowlistmenu">';
echo "<h3 class='menuheader expandable'>LOCATION, CONTACT & GENERAL INFO</h3>";	
echo'<ul class="categoryitems">';

echo '<button id="save-button" class="popup other_location_btn " data-popup-id="1">Other locations</button>
<div class="toPopDiv location-item" id="popup_1"> 
                    <div class="close"></div>
                    <span class="ecs_tooltip">Esc to close <span class="arrow"></span></span>
                    <iframe class="menu-item-iframe edit" id="iframe-1" data-menu-id="1" src=""></iframe>
                </div> ' ;

echo "<table border=0 width='100%'><tr><td>";
	echo '<form action="' . $_SERVER['PHP_SELF'] . '?a=update&key=' . $nt[recordKey] . '" method="post">
	<input type="hidden" name="section" value="general">';
	while($nt=mysql_fetch_array($rt)){
		echo '<div id="table-wrapper"><table width="74%" valign="top"><tr><td width="35%">Site title (business name):</td><td> <input type="text" name="title" size="35" value="' . $nt[title] . '"></td><td width="4%"><img src="images/question.png" title="40 characters maximum."></td></tr>'; 
		echo '<tr><td>Street address: </td><td><input type="text" name="address1" size="35" value="' . $nt[address1] . '"></td><td> <img src="images/question.png" title="40 characters maximum."></td></tr>';  
		echo '<tr><td>Address line 2: </td><td><input type="text" name="address2" size="35" value="' . $nt[address2] . '"></td><td> <img src="images/question.png" title="40 characters maximum. (suite #, etc)"></td></tr>';
		echo '<tr><td>City: </td><td><input type="text" name="city" size="35" value="' . $nt[city] . '"></td><td> <img src="images/question.png" title="40 characters maximum."></td></tr>';  
		echo '<tr><td>State: </td><td><input type="text" name="state" size="35" value="' . $nt[state] . '"></td><td> <img src="images/question.png" title="Type the name of your state or the 2-digit abbreviation."></td></tr>';  
		echo '<tr><td>Zip: </td><td><input type="text" name="zip" size="35" value="' . $nt[zip] . '"></td><td> <img src="images/question.png" title="10 characters maximum."></td></tr>';  
		echo '<tr><td>Phone: </td><td><input type="text" name="phone" size="35" value="' . $nt[phone] . '"></td><td> <img src="images/question.png" title="15 characters maximum."></td></tr>';  
		echo '<tr><td>Fax: </td><td><input type="text" name="fax" size="35" value="' . $nt[fax] . '"></td><td> <img src="images/question.png" title="15 characters maximum."></td></tr>';  
		echo '<tr><td>Email: </td><td><input type="text" name="email" size="35" value="' . $nt[email] . '"></td><td> <img src="images/question.png" title="50 characters maximum."></td></tr>'; 
		echo '<tr><td>Website URL: </td><td><input type="text" name="webURL" size="35" value="' . $nt[webURL] . '"></td><td> <img src="images/question.png" title="This is the website address you want to show up on your website."></td></tr>';  
		echo '<tr><td valign="top">Map URL:</td><td><textarea name="mapURL" cols="38" rows="3">' . $nt[mapURL] . '</textarea><br><font color="red"><i>Leave blank to use default google map or paste in code to display a custom map.</i></font></td><td></td></tr>'; 
		echo '<tr><td>Google Analytics ID: </td><td><input type="text" name="analyticsID" size="35" value="' . $nt[analyticsID] . '"></td><td><img src="images/question.png" title="Enter your Google Analytics ID here. It should be a number formatted similar to: UA-1234567-7"></td></tr>';
		echo '<tr><td>Google Tag Mgr ID: </td><td><input type="text" name="gtm_id" size="35" value="' . $nt[gtm_id] . '"></td><td><img src="images/question.png" title="Enter your Google Tag Manager ID here. It should be a number formatted similar to: GTM-NRHFNFF"></td></tr>';
		echo '<tr><td valign="top">Directions:</td><td><textarea name="directions" cols="38" rows="3">' . $nt[directions] . '</textarea><br></td><td> <img src="images/question.png" title="Any directions entered here will show up on the contact page for visitors to see."></td></tr>'; 
		if(empty($nt[longitude]) || empty($nt[latitude]) )echo '<tr><td></td><td><font color=red>Unable to get coordinates, please verify your address.</font></td></tr>';
		echo '<tr><td>Longitude: </td><td><input type="text" size="35" value="';if(isset($nt[longitude])){echo $nt[longitude];} else{ echo '';} echo '"></td><td> <img src="images/question.png"  title="It will be update according to your Address" ></td></tr>';
		echo '<tr><td>Latitude.: </td><td><input type="text" size="35" value="';if(isset($nt[latitude])){echo $nt[latitude];} else{ echo '';} echo '"></td><td> <img src="images/question.png" title="It will be update according to your Address"></td></tr>';
	}

	echo '<tr><td></td><td><input id="save-button" type="submit" name="save" value="Save Changes"></td><td></td></tr></table></div></form></td></tr>';
echo "</table>";
echo "</ul>";

function getCoordinates($address)
{
	$api_key = "AIzaSyC9-Vj9I4wNwXzMyVRlWuzk5_2aECBPopE";	
	$address = str_replace(" ", "+", $address); // replace all the white space with "+" sign to match with google search pattern
	$url = "https://maps.google.com/maps/api/geocode/json?sensor=false&key=$api_key&address=$address";
	//echo $url;	
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	$response = curl_exec($ch);
	curl_close($ch);

	//$response = file_get_contents($url);
	$json = json_decode($response,TRUE); //generate array object from the response from the web
	return ($json['results'][0]['geometry']['location']['lat'].",".$json['results'][0]['geometry']['location']['lng']);
}
##******************************************* END LOCATION & CONTACT INFO SECTION *****************************************##

##******************************************* BEGIN HOURS AND TIMEZONE SECTION *****************************************##
$rt=mysql_query($query); //refresh recordset

echo "<h3 class='menuheader expandable'>HOURS AND TIMEZONE</h3>";	
echo'<ul class="categoryitems">';

echo "<table border=0 width='100%'><tr><td>";
	echo '<form action="' . $_SERVER['PHP_SELF'] . '?a=update&key=' . $nt[recordKey] . '" method="post">
	<input type="hidden" name="section" value="hours">';
	while($nt=mysql_fetch_array($rt)){
		echo '<div id="table-wrapper"><table width="74%" valign="top"><tr><td width="35%" valign="top">Displayed Hours:</td><td><textarea name="hours1" id="hours1" class="" cols="40" rows="4">' . $nt[hours1] . '</textarea></td><td valign=top align=left><img src="images/question.png" title="This is what will be displayed in the HOURS area on your live website."></td></tr>';  
		//use open sign
		echo '<tr><td>Show Open/Closed Sign:</td><td><input type="checkbox" name="chkOpenSign"';
		if(!empty($nt[open_sign])){
			echo 'checked=true';
		}
		echo '><td><img src="images/question.png" title="If selected, an OPEN or CLOSED sign will be displayed, based on the Ordering hours antered above."></td></tr>';
		if(!empty($nt[open_sign])){
			echo '<tr><td></td><td><b>Open Hours</b></td></tr>';
			//setup hours
			$qry = "select * from hours where delivery='0' order by day, start_time";
			$rtt=mysql_query($qry); //refresh recordset
			while($ntt=mysql_fetch_array($rtt)){
				 echo '<tr id="trHours'.$ntt['recordKey'].'"><td valign="bottom"><div align="right">';
				 $textDay = '';
				 if($ntt[day]=='0'){$textDay = "Sunday";}
				 if($ntt[day]=='1'){$textDay = "Monday";}
				 if($ntt[day]=='2'){$textDay = "Tuesday";}
				 if($ntt[day]=='3'){$textDay = "Wednesday";}
				 if($ntt[day]=='4'){$textDay = "Thursday";}
				 if($ntt[day]=='5'){$textDay = "Friday";}
				 if($ntt[day]=='6'){$textDay = "Saturday";}
				 echo $textDay;
				 echo'</div></td><td valign="bottom">';
				 echo"From: ";
				 $var = date('h:ia', strtotime($ntt[start_time]));
				 echo '<span id="fromTime'.$ntt['recordKey'].'">' . $var . '</span>';
				 echo" to: ";
				 $var = date('h:ia', strtotime($ntt[end_time]));
				 echo '<span id="toTime'.$ntt['recordKey'].'">' . $var . '</span>';
				 echo'&nbsp;&nbsp;<a class="edit_hours_modal'.$ntt['recordKey'].'_open" href="">Edit</a>&nbsp;&nbsp;<a href="javascript:removeHours('.$ntt['recordKey'].')">Remove</a></td>';

				 
				 echo '<div id="edit_hours_modal'.$ntt['recordKey'].'" class="popup_modal">';
				 echo '<a href="#" class="edit_hours_modal'.$ntt['recordKey'].'_close modal_close_button"><img src="/images/x-15.png" width="15" height="15" /></a>';
				 echo '<h3>Edit ' . $textDay . ' Hours</h3>';
				 echo '<br />';
				 echo '<label>From: </label>';
				 echo '<select id="fromHour'.$ntt['recordKey'].'">';
				 for($i = 1; $i < 13; $i++) {
				 	$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
				 	echo '<option';
				 	if($iDisplay == date('h', strtotime($ntt[start_time]))) echo ' selected';
				 	echo '>'.$iDisplay.'</option>';
				 }
				 echo '</select>';
				 echo ':';
				 echo '<select id="fromMinute'.$ntt['recordKey'].'">';
				 for($i = 0; $i < 60; $i++) {
				 	$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
				 	echo '<option';
				 	if($iDisplay == date('i', strtotime($ntt[start_time]))) echo ' selected';
				 	echo '>'.$iDisplay.'</option>';
				 }
				 echo '</select>';
				 echo '<select id="fromMeridiem'.$ntt['recordKey'].'">';
				 echo '<option value="am"';
				 if(date('a', strtotime($ntt[start_time])) == 'am') echo ' selected';
				 echo '>am</option>';
				 echo '<option value="pm"';
				 if(date('a', strtotime($ntt[start_time])) == 'pm') echo ' selected';
				 echo '>pm</option>';
				 echo '</select>';
				 echo '<br />';
				 echo '<br />';

				 echo '<label>To: </label>';
				 echo '<select id="toHour'.$ntt['recordKey'].'">';
				 for($i = 1; $i < 12; $i++) {
				 	$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
				 	echo '<option';
				 	if($iDisplay == date('h', strtotime($ntt[end_time]))) echo ' selected';
				 	echo '>'.$iDisplay.'</option>';
				 }
				 echo '</select>';
				 echo ':';
				 echo '<select id="toMinute'.$ntt['recordKey'].'">';
				 for($i = 0; $i < 60; $i++) {
				 	$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
				 	echo '<option';
				 	if($iDisplay == date('i', strtotime($ntt[end_time]))) echo ' selected';
				 	echo '>'.$iDisplay.'</option>';
				 }
				 echo '</select>';
				 echo '<select id="toMeridiem'.$ntt['recordKey'].'">';
				 echo '<option value="am"';
				 if(date('a', strtotime($ntt[end_time])) == 'am') echo ' selected';
				 echo '>am</option>';
				 echo '<option value="pm"';
				 if(date('a', strtotime($ntt[end_time])) == 'pm') echo ' selected';
				 echo '>pm</option>';
				 echo '</select>';

				 echo '<br />';
				 echo '<button id="save-button" class="edit_hours_modal'.$ntt['recordKey'].'_close" type="button" onclick="updateHours(\''.$ntt['recordKey'].'\')">Save</button>';

				 echo '</div>'; // end modal div
				 echo '<script>';
				 echo '$(document).ready(function() { ';
				 echo "	$('#edit_hours_modal".$ntt['recordKey']."').popup();";
				 echo '});';
				 echo '</script>';

				 echo '</tr>';
			}

			echo '<tr><td></td><td><a href="" class="add_hours_modal_open" onclick="updateAddHoursType(\'open\')">Add Hours</a><br></td></tr>';
			echo '<input id="addHoursType" type="hidden" name="addHoursType" value="0" />';

			// add hours modal
			echo '<div id="add_hours_modal" class="popup_modal">';
			echo '<a href="#" class="add_hours_modal_close modal_close_button"><img src="/images/x-15.png" width="15" height="15" /></a>';
			echo '<h3>Add Hours</h3>';
			echo '<br />';

			echo '<label>Day: </label>';
			echo '<select id="addDay">';
			echo '<option value="0">Sunday</option>';
			echo '<option value="1">Monday</option>';
			echo '<option value="2">Tuesday</option>';
			echo '<option value="3">Wednesday</option>';
			echo '<option value="4">Thursday</option>';
			echo '<option value="5">Friday</option>';
			echo '<option value="6">Saturday</option>';
			echo '</select>';
			echo '<br />';
			echo '<br />';

			echo '<label>From: </label>';
			echo '<select id="addFromHour">';
			for($i = 1; $i < 13; $i++) {
				$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
				echo '<option>'.$iDisplay.'</option>';
			}
			echo '</select>';
			echo ':';
			echo '<select id="addFromMinute">';
			for($i = 0; $i < 60; $i++) {
				$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
				echo '<option>'.$iDisplay.'</option>';
			}
			echo '</select>';
			echo '<select id="addFromMeridiem">';
			echo '<option value="am">am</option>';
			echo '<option value="pm">pm</option>';
			echo '</select>';
			echo '<br />';
			echo '<br />';

			echo '<label>To: </label>';
			echo '<select id="addToHour">';
			for($i = 1; $i < 13; $i++) {
				$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
				echo '<option>'.$iDisplay.'</option>';
			}
			echo '</select>';
			echo ':';
			echo '<select id="addToMinute">';
			for($i = 0; $i < 60; $i++) {
				$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
				echo '<option>'.$iDisplay.'</option>';
			}
			echo '</select>';
			echo '<select id="addToMeridiem">';
			echo '<option value="am">am</option>';
			echo '<option value="pm">pm</option>';
			echo '</select>';

			echo '<br />';
			echo '<br />';
			echo '<button id="save-button" class="add_hours_modal_close" type="button" onclick="addHours()">Save</button>';
			echo '</div>'; // end add_hours_modal

			echo '<script>';
			echo '$(document).ready(function() { ';
			echo "	$('#add_hours_modal').popup();";
			echo '});';
			echo '</script>';
		}
		if($restaurant_pkg=='1'){
			//use delivery hours
			echo '<tr><td>Use Delivery Schedule:</td><td><input type="checkbox" name="chkDelSchedule"';
			if(!empty($nt[use_delivery_hours])){
				echo 'checked=true';
			}
			echo '><td><img src="images/question.png" title="If selected, delivery will only be available during the hours you setup below. Otherwise delivery hours will be based on store open hours."></td></tr>';
			//setup delivery hours
			if(!empty($nt[use_delivery_hours])){
				echo '<tr><td></td><td><b>Delivery Hours</b></td></tr>';
				//setup hours
				$qry = "select * from hours where delivery='1' order by day, start_time";
				$rtt=mysql_query($qry); //refresh recordset
				while($ntt=mysql_fetch_array($rtt)){
					 echo '<tr id="trHours'.$ntt['recordKey'].'"><td valign="bottom"><div align="right">';
					 $textDay = '';
					 if($ntt[day]=='0'){$textDay = "Sunday";}
					 if($ntt[day]=='1'){$textDay = "Monday";}
					 if($ntt[day]=='2'){$textDay = "Tuesday";}
					 if($ntt[day]=='3'){$textDay = "Wednesday";}
					 if($ntt[day]=='4'){$textDay = "Thursday";}
					 if($ntt[day]=='5'){$textDay = "Friday";}
					 if($ntt[day]=='6'){$textDay = "Saturday";}
					 echo $textDay;
					 echo'</div></td><td valign="bottom">';
					 echo"From: ";
					 $var = date('h:ia', strtotime($ntt[start_time]));
					 echo '<span id="fromTime'.$ntt['recordKey'].'">' . $var . '</span>';
					 echo" to: ";
					 $var = date('h:ia', strtotime($ntt[end_time]));
					 echo '<span id="toTime'.$ntt['recordKey'].'">' . $var . '</span>';
					 echo'&nbsp;&nbsp;<a class="edit_hours_modal'.$ntt['recordKey'].'_open" href="">Edit</a>&nbsp;&nbsp;<a href="javascript:removeHours('.$ntt['recordKey'].')">Remove</a></td>';

					 
					 echo '<div id="edit_hours_modal'.$ntt['recordKey'].'" class="popup_modal">';
					 echo '<a href="#" class="edit_hours_modal'.$ntt['recordKey'].'_close modal_close_button"><img src="/images/x-15.png" width="15" height="15" /></a>';
					 echo '<h3>Edit ' . $textDay . ' Hours</h3>';
					 echo '<br />';
					 echo '<label>From: </label>';
					 echo '<select id="fromHour'.$ntt['recordKey'].'">';
					 for($i = 1; $i < 13; $i++) {
						$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
						echo '<option';
						if($iDisplay == date('h', strtotime($ntt[start_time]))) echo ' selected';
						echo '>'.$iDisplay.'</option>';
					 }
					 echo '</select>';
					 echo ':';
					 echo '<select id="fromMinute'.$ntt['recordKey'].'">';
					 for($i = 0; $i < 60; $i++) {
						$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
						echo '<option';
						if($iDisplay == date('i', strtotime($ntt[start_time]))) echo ' selected';
						echo '>'.$iDisplay.'</option>';
					 }
					 echo '</select>';
					 echo '<select id="fromMeridiem'.$ntt['recordKey'].'">';
					 echo '<option value="am"';
					 if(date('a', strtotime($ntt[start_time])) == 'am') echo ' selected';
					 echo '>am</option>';
					 echo '<option value="pm"';
					 if(date('a', strtotime($ntt[start_time])) == 'pm') echo ' selected';
					 echo '>pm</option>';
					 echo '</select>';
					 echo '<br />';
					 echo '<br />';

					 echo '<label>To: </label>';
					 echo '<select id="toHour'.$ntt['recordKey'].'">';
					 for($i = 1; $i < 12; $i++) {
						$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
						echo '<option';
						if($iDisplay == date('h', strtotime($ntt[end_time]))) echo ' selected';
						echo '>'.$iDisplay.'</option>';
					 }
					 echo '</select>';
					 echo ':';
					 echo '<select id="toMinute'.$ntt['recordKey'].'">';
					 for($i = 0; $i < 60; $i++) {
						$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
						echo '<option';
						if($iDisplay == date('i', strtotime($ntt[end_time]))) echo ' selected';
						echo '>'.$iDisplay.'</option>';
					 }
					 echo '</select>';
					 echo '<select id="toMeridiem'.$ntt['recordKey'].'">';
					 echo '<option value="am"';
					 if(date('a', strtotime($ntt[end_time])) == 'am') echo ' selected';
					 echo '>am</option>';
					 echo '<option value="pm"';
					 if(date('a', strtotime($ntt[end_time])) == 'pm') echo ' selected';
					 echo '>pm</option>';
					 echo '</select>';

					 echo '<br />';
					 echo '<button id="save-button" class="edit_hours_modal'.$ntt['recordKey'].'_close" type="button" onclick="updateHours(\''.$ntt['recordKey'].'\')">Save</button>';

					 echo '</div>'; // end modal div
					 echo '<script>';
					 echo '$(document).ready(function() { ';
					 echo "	$('#edit_hours_modal".$ntt['recordKey']."').popup();";
					 echo '});';
					 echo '</script>';

					 echo '</tr>';
				}
				echo '<tr><td></td><td><a href="" class="add_hours_modal_open" onclick="updateAddHoursType(\'delivery\')">Add Hours</a><br></td></tr>';
			}
		}
		echo '<tr><td>Time Zone: </td><td>';  
		//******************populate time zone list
		echo '<select name="timezone" width="40">';
		echo '<option value=\"NULL\">Select Time Zone</option>\n';
		echo '<option value="America/Puerto_Rico"'; if ($nt[timeZone]=="America/Puerto_Rico"){echo ' selected="selected"';} echo '>America/Puerto Rico (AST)</option>';
		echo '<option value="America/New_York"'; if ($nt[timeZone]=="America/New_York"){echo ' selected="selected"';} echo '>America/New York (EDT)</option>';
		echo '<option value="America/Chicago"'; if ($nt[timeZone]=="America/Chicago"){echo ' selected="selected"';} echo '>America/Chicago (CDT)</option>';
		echo '<option value="America/Boise"'; if ($nt[timeZone]=="America/Boise"){echo ' selected="selected"';} echo '>America/Boise (MDT)</option>';
		echo '<option value="America/Phoenix"'; if ($nt[timeZone]=="America/Phoenix"){echo ' selected="selected"';} echo '>America/Phoenix (MST)</option>';
		echo '<option value="America/Los_Angeles"'; if ($nt[timeZone]=="America/Los_Angeles"){echo ' selected="selected"';} echo '>America/Los Angeles (PDT)</option>';
		echo '<option value="America/Juneau"'; if ($nt[timeZone]=="America/Juneau"){echo ' selected="selected"';} echo '>America/Juneau (AKDT)</option>';
		echo '<option value="Pacific/Honolulu"'; if ($nt[timeZone]=="America/Pacific/Honolulu"){echo ' selected="selected"';} echo '>Pacific/Honolulu (HST)</option>';
		echo '<option value="Pacific/Guam"'; if ($nt[timeZone]=="Pacific/Guam"){echo ' selected="selected"';} echo '>Pacific/Guam (ChST)</option>';
		echo '<option value="Pacific/Samoa"'; if ($nt[timeZone]=="Pacific/Samoa"){echo ' selected="selected"';} echo '>Pacific/Samoa (SST)</option>';
		echo '<option value="Pacific/Wake"'; if ($nt[timeZone]=="Pacific/Wake"){echo ' selected="selected"';} echo '>Pacific/Wake (WAKT)</option>';
		echo '</select>
		<td><img src="images/question.png" title="Select a time zone to allow orders only at the correct times for your time zone."></td><td></td></tr>';
		date_default_timezone_set($nt[timeZone]);
		 echo '<tr><td colspan="2"><font color="red" size=1>Current time: ' . date('h:i:s A') . '</font></td><td></td></tr>';
	}

	echo '<tr><td></td><td><input id="save-button" type="submit" name="save" value="Save Changes"></td><td></td></tr></table><br /></div></form>';
echo "</td></tr></table>";
echo "</ul>";
##******************************************* END HOURS AND TIMEZONE SECTION *****************************************##

##******************************************* BEGIN ONLINE ORDERING SECTION *****************************************##
if($restaurant_pkg=='1'){
	$rt=mysql_query($query); //refresh recordset

	echo "<h3 class='menuheader expandable'>ONLINE ORDERING</h3>";	
	echo'<ul class="categoryitems">';

	echo "<table border=0 width='100%'><tr><td>";
		echo '<form action="' . $_SERVER['PHP_SELF'] . '?a=update&key=' . $nt[recordKey] . '" method="post">
		<input type="hidden" name="section" value="ordering">';
		while($nt=mysql_fetch_array($rt)){
			echo '<div id="table-wrapper"><table width="74%" valign="top"><tr><td width="35%" valign="top">Sales tax: </td><td><input type="text" name="salesTax" size="10" value="' . $nt[salesTax] . '"></td><td><img src="images/question.png" title=""></td></tr>
			<tr><td colspan="2"><font color="red"><i>Enter in decimal format. (ex: 7.5% should be entered as .075</i></font></td><td></td></tr>';  
			echo '<tr><td>Delivery charge: </td><td><input type="text" name="deliveryCharge" size="10" value="' . $nt[deliveryCharge] . '"></td><td><img src="images/question.png" title="Any delivery charge will be added to online orders that select the delivery option."></td></tr>';  
			echo '<tr><td>Minimum order: </td><td><input type="text" name="minimum_order" size="10" value="' . $nt[minimum_order] . '"></td><td><img src="images/question.png" title="Minimum order (dollar amount) accepted for online ordering."></td></tr>';  
			
			echo '<tr><td>Prep time: </td><td><input type="text" name="preptime" size="28" value="' . $nt[preptime] . '"></td><td><img src="images/question.png" title="This is what the customer will see on their order as the expected preparation time."></td></tr>
			<tr><td colspan="2"><font color="red"><i>Time it usually takes to have order ready for pickup.</i></font></td><td></td></tr>';
			echo '<tr><td>Delivery time: </td><td><input type="text" name="deltime" size="28" value="' . $nt[deltime] . '"></td><td><img src="images/question.png" title="This is what the customer will see on their order as the expected delivery time."></td></tr>
			<tr><td colspan="2"><font color="red"><i>Time it usually takes for delivery.</i></font></td><td></td></tr>';
			echo '<tr><td>3rd party ordering URL: </td><td><input type="text" name="orderURL" size="28" value="' . $nt[orderURL] . '"></td><td><img src="images/question.png" title="This is the address of a 3rd party online ordering site. (Leave off the http at the beginning.)"></td></tr>
			<tr><td colspan="2"><font color="red"><i>If you use another ordering solution, insert the link here.</i></font></td></tr>';
			echo '<tr><td>Manage ordering menu: </td><td><img id="order_menu_gear" src="images/gear-icon.png"></td><td><img src="images/question.png" title="Select which menu will be available for online ordering based on the time of day."></td></tr>';
			
			
			echo '<tr><td>Delivery available: </td><td><input type="checkbox" name="chkDeliver"';
			if(!empty($nt[deliver])){
				echo 'checked=true';
			}
			echo '><td><img src="images/question.png" title="Check this box to allow delivery to customers."></td></tr>';
			
			echo '<tr><td>Half topping prices: </td><td><input type="checkbox" name="chkHalfTopping"';
			if(!empty($nt[half_topping_prices])){
				echo 'checked=true';
			}
			echo '><td><img src="images/question.png" title="Check this box to charge half prices for half-pizza toppings."></td></tr>';

			echo '<tr><td>Disable half toppings: </td><td><input type="checkbox" name="chkDisableHalfToppings"';
			if(!empty($nt[disable_half_toppings])){
				echo 'checked=true';
			}
			echo '><td><img src="images/question.png" title="Check this box to disable adding half-pizza toppings."></td></tr>';
						
			echo '<tr><td>Use multiple crusts: </td><td><input type="checkbox" name="chkMultipleCrusts"';
			if(!empty($nt[use_multiple_crusts])){
				echo 'checked=true';
			}
			echo '><td><img src="images/question.png" title="Check this box to enable multiple crust options for pizza categories."></td></tr>';
			
			echo '<tr><td>Use multiple sauces: </td><td><input type="checkbox" name="chkMultipleSauces"';
			if(!empty($nt[use_multiple_sauces])){
				echo 'checked=true';
			}
			echo '><td><img src="images/question.png" title="Check this box to enable multiple sauce options for pizza categories."></td></tr>';
			
			echo '<tr><td>Delivery taxable: </td><td><input type="checkbox" name="chkDeltax"';
			if(!empty($nt[taxdelivery])){
				echo 'checked=true';
			}
			echo '><td><img src="images/question.png" title="Check this box to apply sales tax to delivery charges."></td></tr>';
			echo '<tr><td>Accept checks:</td><td> <input type="checkbox" name="chkChecks"';
			if(!empty($nt[acceptChecks])){
				echo 'checked=true';
			} 
			echo '><td><img src="images/question.png" title="Check this box to let customers know that you accept checks."></td></tr>';  
			echo '<td>Online ordering:</td><td> <input type="checkbox" name="chkOnline"';
			if(!empty($nt[orderOnline])){
				echo 'checked="true" ';
			} 
			if ($masteradmin !==1){echo ' disabled="disabled"';}
			echo '> <font color="red"><i>(requires subscription)</i></font><td><img src="images/question.png" title="This shows whether or not you subscribe to the online ordering service."></td></tr>';
			if($nt[orderOnline]==1){	//only show orderind specific fields if online ordering is activated
				echo '<td>Suspend ordering:</td><td> <input type="checkbox" name="chkSuspend"';
				if($nt[suspend_ordering]==1){
					echo 'checked="true" ';
				} 
				if (($roladmin !==1)&&($masteradmin !==1)&&($admin !==1)){echo ' disabled="disabled"';}
				echo '> <font color="red"></font><td><img src="images/question.png" title="This temporarily disables the online ordering service."></td></tr>';
				echo '<tr><td>Order Email #1:</td><td><input type="text" name="orderemail1" size="28" value="' . $nt[orderEmail1] . '"></td><td><img src="images/question.png" title="This is the store email address that online customer orders will be delivered to. 50 characters maximum."></td></tr>';
				echo '<tr><td>Order Email #2:</td><td><input type="text" name="orderemail2" size="28" value="' . $nt[orderEmail2] . '"></td><td><img src="images/question.png" title="This is the 2nd store email address that online customer orders will be delivered to. 50 characters maximum."></td></tr>';
				echo '<tr><td colspan="2"><font color="red"><i>These are the email accounts that will receive customer orders. You may also use text email addresses to receive via text message.</i></font>';
				echo '<tr><td valign="top">Order Notice:</td><td><textarea name="order_notice" cols=34 rows=3>' . $nt[order_notice] . '</textarea></td><td><img src="images/question.png" title="This is a notice displayed at the top of each online ordering page. 100 characters maximum."></td></tr>';
				echo '<tr><td valign="top">Custom confirmation message:</td><td><textarea name="order_conf" cols=34 rows=4>' . $nt[custom_order_confirmation] . '</textarea></td><td><img src="images/question.png" title="This is a custom confirmation displayed on screen after a succesfully placed order. 200 characters maximum."></td></tr>';
				echo '<tr><td>Include tip field:</td><td><input type="checkbox" name="chkTipline"';
				if(!empty($nt[include_tipline])){
					echo 'checked="true" ';
				} 
				//if ($roladmin !==1){echo ' disabled="disabled"';}
				echo '></td><td><img src="images/question.png" title="This determines whether or not you will inlude a place for customer to enter a tip while ordering."></td></tr>';
				echo '<tr><td>Faxed orders:</td><td><input type="checkbox" name="chkFaxOrders"';

				
				if(!empty($nt[orderByFax])){
					echo 'checked="true" ';
				}
				if ($roladmin !==1){echo ' disabled="disabled"';}
				echo '><font color="red"><i>(requires subscription)</i></font></td><td><img src="images/question.png" title="This shows whether or not you subscribe to the online order-to-fax service."></td></tr>';
				echo '<tr><td>EOD report time:</td><td><img id="eod_report_time" src="images/gear-icon.png">
				</td></tr>';
				//save here temporarily - not sure if will be needed here...
				//echo 'PayPal ID: <input type="text" name="paypalid" size="30" value="' . $nt[paypalid] . '"><img src="images/question.png" title="Enter your PayPal ID here. This will be the email address you have registered to your PayPal account.">';
				//echo 'Use PayPal Auth: <input type="checkbox" name="paypal_auth"';
				//if(!empty($nt[paypal_auth])){
				//	echo 'checked=true';
				//} 
				//echo '><img src="images/question.png" title="This option places authorizations when customers check out via paypal, instead of collecting final payment. This allows you to add up to 15% tip before capturing.">';  
				//echo '<font color="red"><i>If using PayPal, this should be your PayPal email address. If no PayPal ID is entered, customer payment info will be transmitted directly to you with the order, to be processed manually.</i></font>';

			}
		}

	echo '<tr><td></td><td><input id="save-button" type="submit" name="save" value="Save Changes"></td></tr></td></tr></table></form>';
	echo "</table>";
	echo "</ul>";
			/*$menuSelect = array();
			$menuSelectquery = "SELECT recordKey, categoryName, orderNum, headerImg from menuCategory WHERE active ='1' AND categoryName <> 'Options' AND categoryName <> 'Pizza Crust' AND categoryName <> 'Pizza Sauce' AND categoryName <> 'Pizza Toppings' AND categoryName <> 'Fixings' Order By orderNum";
			$menuSelectResult = mysql_query($menuSelectquery);
			while($menuData=mysql_fetch_array($menuSelectResult)){	
					$menuSelect[$menuData['recordKey']] = $menuData['categoryName'];
			}*/

			$menuSelect = array();
			$menuSelectquery = "SELECT * from menu_master ORDER BY menu_name";
			$menuSelectResult = mysql_query($menuSelectquery);
			while($menuData=mysql_fetch_array($menuSelectResult)){	
				if($menuData['menu_name']!='Timed menu rotation'){
					$menuSelect[$menuData['recordkey']] = $menuData['menu_name'];
				}
			}
			echo '<div id="timeSettingPopup" class="toPopDiv">
					<div id="close_btn"></div>
					<div class="close close_Popup"></div>
					<div id="popup_content">
						<form action="'. $_SERVER['PHP_SELF'].'" method="POST" >
						<input type="hidden" value="'.$globalMenuId.'" name="menu_id">
						<input type="hidden" value="'.$globalPageId.'" name="page_id">
							<table border="0" id="time-table" cellpadding=15 cellspacing=0 style="text-align:center">
								';
								$query2 = "SELECT * FROM `manage_ordering_menu` where user_id = '".$_SESSION['UserID']."' ORDER BY id";
								$result = mysql_query($query2);
								if(mysql_num_rows($result)>0){
											echo '<tr>
													<th>Menu To Display</th>
													<th>Start Time</th>	
													<th> </th>			
												</tr>';
									 $idCount=1;
									 while($data=mysql_fetch_array($result)){
										echo '<tr>
											<td>
												<select name="menu[]">';
												foreach ($menuSelect as $key => $value) {
													$selected='';
													if($data[menu_name] == $key){ $selected='selected="selected"';}
													echo "<option ".$selected." value='".$key."'>".$value."</option>";
												}												
											echo '</select>
											</td>
											<td>
												<input  size="6" type="text" class="timepicker" value="'.$data[start_time].'" name="start_time[]" onkeypress="return false;" />
											</td>
											<td>
											 <img onclick="$(this).parents(\'tr\').remove(); return false;" class="removeField" src="../images/remove-icon.png">
											</td>
										</tr>';
										$idCount++;
									}
								}else{
								echo '<tr>
									<th>Menu To Display</th>
									<th>Start Time</th>
								</tr>
								<tr>
									<td>
										<select name="menu[]">';

										foreach ($menuSelect as $key => $value) {
											echo "<option value='".$key."'>".$value."</option>";
										}
								echo '</select>
									</td>
									<td>
										<input size="6" type="text" class="timepicker" name="start_time[]" onkeypress="return false;"/>		
									</td>
								</tr>';
							}
							echo '</table>
							<input type="submit" class="save_time_btn" value="SAVE" name="save-menu-time">
						</form>
						<button id="add_more_btn">+ ADD MORE</button>
					</div>
				  </div>';

	?>
	<?php 
						$query = "SELECT eod_report_time from storePrefs";
						$rt=mysql_query($query);
						while($nt=mysql_fetch_array($rt)){
							$time=$nt['eod_report_time'];
						}
						$time_array=explode('~',$time);
						$new_time_array=array();
						foreach($time_array as $time){
							array_push($new_time_array, date('h:i:s a', strtotime($time)));
						}
						$new_time_array1=array();
					    foreach($new_time_array as $new_time_array){
					    	array_push($new_time_array1, explode(':', $new_time_array));
						}
						
						//print_r($new_time_array1);
						?>
								
	
                <div id="eodReportPopup" class="toPopDiv">
					<div></div>
					<div class="close close_Popup" id="close_btn_eod"></div>
					<div id="popup_content">
						<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" >

						   <table border="0" id="time-table" cellpadding=15 cellspacing=0 style="text-align:center" id="date_table">
							
								<tr>
									<th>Day of the week</th>
									<th>Select hours</th>
									<th>Select minute</th>
									<th>Select meridian</th>
								</tr>
								<tr>
									<td>
										<label><h3 class="day">Sunday:</h3></label>
									</td>
									<td>
										<select name="eod_hour[]">
										<?php
										for($i = 1; $i < 13; $i++) {
											$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
											?>	<option value="<?php echo $iDisplay; ?>"
											<?php
											if($new_time_array1[0][0]==$iDisplay)
											{
												echo 'selected';
											}
											?>><?php echo $iDisplay; ?></option>
										<?php 
									    }
									    ?>
										</select>
										
									</td>
									<td>
										<select name="eod_min[]">
										<?php
										for($i = 0; $i < 60; $i++) {
											$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
											?>	<option value="<?php echo $iDisplay; ?>"
											<?php
											if($new_time_array1[0][1]==$iDisplay)
											{
												echo 'selected';
											}
											?>><?php echo $iDisplay; ?></option>
										<?php 
									    }
									    ?>
										</select>
										
									</td>
									<td>
										<select name="eod_time[]">
										<option value="am"
										<?php
										$meridian=explode(' ', $new_time_array1[0][2]);
											if($meridian[1]=="am")
											{
												echo 'selected';
											}
										?>>AM</option>
										<option value="pm"
										<?php
											if($meridian[1]=="pm")
											{
												echo 'selected';
											}
										?>>PM</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>
										<label><h3 class="day">Monday:</h3></label>
									</td>
									<td>
										<select name="eod_hour[]">
										<?php
										for($i = 1; $i < 13; $i++) {
											$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
											?>	<option value="<?php echo $iDisplay; ?>"
											<?php
											if($new_time_array1[1][0]==$iDisplay)
											{
												echo 'selected';
											}
											?>><?php echo $iDisplay; ?></option>
										<?php 
									    }
									    ?>
										</select>
										
									</td>
									<td>
										<select name="eod_min[]">
										<?php
										for($i = 0; $i < 60; $i++) {
											$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
											?>	<option value="<?php echo $iDisplay; ?>"
											<?php
											if($new_time_array1[1][1]==$iDisplay)
											{
												echo 'selected';
											}
											?>><?php echo $iDisplay; ?></option>
										<?php 
									    }
									    ?>
										</select>
										
									</td>
									<td>
										<select name="eod_time[]">
										<option value="am"
										<?php
										$meridian=explode(' ', $new_time_array1[1][2]);
											if($meridian[1]=="am")
											{
												echo 'selected';
											}
										?>>AM</option>
										<option value="pm"
										<?php
											if($meridian[1]=="pm")
											{
												echo 'selected';
											}
										?>>PM</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>
										<label><h3 class="day">Tuesday:</h3></label>
									</td>
									<td>
										<select name="eod_hour[]">
										<?php
										for($i = 1; $i < 13; $i++) {
											$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
											?>	<option value="<?php echo $iDisplay; ?>"
											<?php
											if($new_time_array1[2][0]==$iDisplay)
											{
												echo 'selected';
											}
											?>><?php echo $iDisplay; ?></option>
										<?php 
									    }
									    ?>
										</select>
										
									</td>
									<td>
										<select name="eod_min[]">
										<?php
										for($i = 0; $i < 60; $i++) {
											$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
											?>	<option value="<?php echo $iDisplay; ?>"
											<?php
											if($new_time_array1[2][1]==$iDisplay)
											{
												echo 'selected';
											}
											?>><?php echo $iDisplay; ?></option>
										<?php 
									    }
									    ?>
										</select>
										
									</td>
									<td>
										<select name="eod_time[]">
										<option value="am"
										<?php
										$meridian=explode(' ', $new_time_array1[2][2]);
											if($meridian[1]=="am")
											{
												echo 'selected';
											}
										?>>AM</option>
										<option value="pm"
										<?php
											if($meridian[1]=="pm")
											{
												echo 'selected';
											}
										?>>PM</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>
										<label><h3 class="day">Wednesday:</h3></label>
									</td>
									<td>
										<select name="eod_hour[]">
										<?php
										for($i = 1; $i < 13; $i++) {
											$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
											?>	<option value="<?php echo $iDisplay; ?>"
											<?php
											if($new_time_array1[3][0]==$iDisplay)
											{
												echo 'selected';
											}
											?>><?php echo $iDisplay; ?></option>
										<?php 
									    }
									    ?>
										</select>
										
									</td>
									<td>
										<select name="eod_min[]">
										<?php
										for($i = 0; $i < 60; $i++) {
											$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
											?>	<option value="<?php echo $iDisplay; ?>"
											<?php
											if($new_time_array1[3][1]==$iDisplay)
											{
												echo 'selected';
											}
											?>><?php echo $iDisplay; ?></option>
										<?php 
									    }
									    ?>
										</select>
										
									</td>
									<td>
										<select name="eod_time[]">
										<option value="am"
										<?php
										$meridian=explode(' ', $new_time_array1[3][2]);
											if($meridian[1]=="am")
											{
												echo 'selected';
											}
										?>>AM</option>
										<option value="pm"
										<?php
											if($meridian[1]=="pm")
											{
												echo 'selected';
											}
										?>>PM</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>
										<label><h3 class="day">Thrusday:</h3></label>
									</td>
									<td>
										<select name="eod_hour[]">
										<?php
										for($i = 1; $i < 13; $i++) {
											$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
											?>	<option value="<?php echo $iDisplay; ?>"
											<?php
											if($new_time_array1[4][0]==$iDisplay)
											{
												echo 'selected';
											}
											?>><?php echo $iDisplay; ?></option>
										<?php 
									    }
									    ?>
										</select>
										
									</td>
									<td>
										<select name="eod_min[]">
										<?php
										for($i = 0; $i < 60; $i++) {
											$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
											?>	<option value="<?php echo $iDisplay; ?>"
											<?php
											if($new_time_array1[4][1]==$iDisplay)
											{
												echo 'selected';
											}
											?>><?php echo $iDisplay; ?></option>
										<?php 
									    }
									    ?>
										</select>
										
									</td>
									<td>
										<select name="eod_time[]">
										<option value="am"
										<?php
										$meridian=explode(' ', $new_time_array1[4][2]);
											if($meridian[1]=="am")
											{
												echo 'selected';
											}
										?>>AM</option>
										<option value="pm"
										<?php
											if($meridian[1]=="pm")
											{
												echo 'selected';
											}
										?>>PM</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>
										<label><h3 class="day">Friday:</h3></label>
									</td>
									<td>
										<select name="eod_hour[]">
										<?php
										for($i = 1; $i < 13; $i++) {
											$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
											?>	<option value="<?php echo $iDisplay; ?>"
											<?php
											if($new_time_array1[5][0]==$iDisplay)
											{
												echo 'selected';
											}
											?>><?php echo $iDisplay; ?></option>
										<?php 
									    }
									    ?>
										</select>
										
									</td>
									<td>
										<select name="eod_min[]">
										<?php
										for($i = 0; $i < 60; $i++) {
											$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
											?>	<option value="<?php echo $iDisplay; ?>"
											<?php
											if($new_time_array1[5][1]==$iDisplay)
											{
												echo 'selected';
											}
											?>><?php echo $iDisplay; ?></option>
										<?php 
									    }
									    ?>
										</select>
										
									</td>
									<td>
										<select name="eod_time[]">
										<option value="am"
										<?php
										$meridian=explode(' ', $new_time_array1[5][2]);
											if($meridian[1]=="am")
											{
												echo 'selected';
											}
										?>>AM</option>
										<option value="pm"
										<?php
											if($meridian[1]=="pm")
											{
												echo 'selected';
											}
										?>>PM</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>
										<label><h3 class="day">Saturday:</h3></label>
									</td>
									<td>
										<select name="eod_hour[]">
										<?php
										for($i = 1; $i < 13; $i++) {
											$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
											?>	<option value="<?php echo $iDisplay; ?>"
											<?php
											if($new_time_array1[6][0]==$iDisplay)
											{
												echo 'selected';
											}
											?>><?php echo $iDisplay; ?></option>
										<?php 
									    }
									    ?>
										</select>
										
									</td>
									<td>
										<select name="eod_min[]">
										<?php
										for($i = 0; $i < 60; $i++) {
											$iDisplay = str_pad($i, 2, '0', STR_PAD_LEFT);
											?>	<option value="<?php echo $iDisplay; ?>"
											<?php
											if($new_time_array1[6][1]==$iDisplay)
											{
												echo 'selected';
											}
											?>><?php echo $iDisplay; ?></option>
										<?php 
									    }
									    ?>
										</select>
										
									</td>
									<td>
										<select name="eod_time[]">
										<option value="am"
										<?php
										$meridian=explode(' ', $new_time_array1[6][2]);
											if($meridian[1]=="am")
											{
												echo 'selected';
											}
										?>>AM</option>
										<option value="pm"
										<?php
											if($meridian[1]=="pm")
											{
												echo 'selected';
											}
										?>>PM</option>
										</select>
									</td>
								</tr>
							
							</table>
							<input type="submit" class="save_time_btn" value="SAVE" name="save-eod-time">
						</form>
					</div>
			</div>
<?php
}

##******************************************* END ONLINE ORDERING SECTION *****************************************##
/*
##******************************************* BEGIN SOCIAL NETWORKING SECTION *****************************************##
$rt=mysql_query($query); //refresh recordset

echo "<h3 class='menuheader expandable'>SOCIAL NETWORKING</h3>";	
echo'<ul class="categoryitems">';

echo "<table border=0 width='100%'><tr><td>";
	echo '<form action="' . $_SERVER['PHP_SELF'] . '?a=update&key=' . $nt[recordKey] . '" method="post">
	<input type="hidden" name="section" value="social">';
	while($nt=mysql_fetch_array($rt)){
		echo '<div id="table-wrapper"><table width="74%" valign="top"><tr><td width="35%" valign="top">Facebook:</td><td><input type="text" name="facebook" size="30" value="' . $nt[facebook] . '"></td><td><img src="images/question.png" title="Paste in the link to your Facebook page and this will allow visitors to access your Facebook page directly through your website."></td></tr>';  
		echo '<td>Facebook Page ID:</td><td><input type="text" name="fbpage" size="30" value="' . $nt[fbpage] . '"></td><td><img src="images/question.png" title="Paste in the page ID for your Facebook business page. This is usually a 15 digit string of numbers that can be seen in the address bar when you sit your Facebook page. This will allow you to publish coupons from your ROO website directly to your Facebook Page."></td></tr>';  
		echo '<td>Twitter:</td><td><input type="text" name="twitter" size="30" value="' . $nt[twitter] . '"></td><td><img src="images/question.png" title="Paste in the link to your Twitter account and this will allow your visitors to go to your Twitter page directly through your website."></td></tr>';  
		echo '<td>Twitter ID:</td><td><input type="text" name="twitterid" size="30" value="' . $nt[twitterid] . '"></td><td><img src="images/question.png" title="Paste in the ID for your Twitter account. This will allow you to publish coupons from your ROO website directly to your Twitter account."></td></tr>';  
		echo '<td>Google+:</td><td><input type="text" name="google_plus" size="30" value="' . $nt[google_plus] . '"></td><td><img src="images/question.png" title="Paste in the URL for your Google+ account. This will put a Google+ button on your website."></td></tr>';  
		echo '<td>MySpace:</td><td><input type="text" name="myspace" size="30" value="' . $nt[myspace] . '"></td><td><img src="images/question.png" title="Paste in the link to your MySpace page and this will allow your visitors to visit your MySpace page directly through your website."></td></tr>';  
		if($fantools_subscribed==1){
			echo '<td>FanTools User ID:</td><td><input type="text" name="fantoolsid" size="30" value="' . $nt[fantools_email] . '"></td><td><img src="images/question.png" title="This is the email address you use to log into your FanTools account."></td></tr>';  
			echo '<td>FanTools Password:</td><td><input type="text" name="fantoolspwd" size="30" value="' . $nt[fantools_pwd] . '"></td><td><img src="images/question.png" title="This is the password you use to log into your FanTools account."></td></tr>';  
		}
	}

	echo '<tr><td></td><td><input id="save-button" type="submit" name="save" value="Save Changes"></td></tr></td></tr></table></form>';
echo "</table>";
echo "</ul>";
##******************************************* END SOCIAL NETWORKING SECTION *****************************************##
*/
##******************************************* BEGIN APPEARANCE SECTION *****************************************##
if($restaurant_pkg=='1'){
	$rt=mysql_query($query); //refresh recordset

	echo "<h3 class='menuheader expandable'>MENU APPEARANCE OPTIONS</h3>";	
	echo'<ul class="categoryitems">';

	echo "<table border=0 width='100%'><tr><td>";
		echo '<form action="' . $_SERVER['PHP_SELF'] . '?a=update&key=' . $nt[recordKey] . '" method="post">
		<input type="hidden" name="section" value="appearance">';
		while($nt=mysql_fetch_array($rt)){
			echo '<div id="table-wrapper"><table width="74%" valign="top"><tr><td width="35%" valign="top">Menu Bar Color:</td><td><input type="text" name="catcolor" class="color" size="30" value="' . $nt[categoryColor] . '"></td><td><img src="images/question.png" title="The category headers on the menu will have this color background. You may enter a color name or a 6-character HTML color code. "></td></tr>'; 
			echo '<td>Menu Font Color:</td><td><input type="text" name="catfontcolor" class="color" size="30" value="' . $nt[categoryFontColor] . '"></td><td><img src="images/question.png" title="The category headers on the menu will have this color text. You may enter a color name or a 6-character HTML color code. "></td></tr>'; 

		}

		echo '<tr><td></td><td><input id="save-button" type="submit" name="save" value="Save Changes"></td></tr></td></tr></table></form>';
	echo "</table>";
	echo "</ul>";
}
##******************************************* END APPEARANCE SECTION *****************************************##

##******************************************* BEGIN LINKPOS SECTION *****************************************##
if($restaurant_pkg=='1'){
	if($linkpos_enabled=='1'){
		if(($roladmin==1)||($masteradmin==1)){
			$rt=mysql_query($query); //refresh recordset
		
			echo "<h3 class='menuheader expandable'>LinkPOS Settings</h3>";	
			echo'<ul class="categoryitems">';
		
			echo "<table border=0 width='100%'><tr><td>";
				echo '<form action="' . $_SERVER['PHP_SELF'] . '?a=update&key=' . $nt[recordKey] . '" method="post">
				<input type="hidden" name="section" value="linkpos">';
				while($nt=mysql_fetch_array($rt)){
					echo '<div id="table-wrapper"><table width="74%" valign="top">';
					if($masteradmin==1){
						echo '<tr><td width="35%" valign="top">Partner:</td><td><input type="text" name="linkpos_partner_name" size="30" value="' . $nt[linkpos_partner_name] . '"></td><td><img src="images/question.png" title="Menuetta"></td></tr>'; 
						echo '<tr><td width="35%" valign="top">Partner Password:</td><td><input type="text" name="linkpos_partner_pwd" size="30" value="' . $nt[linkpos_partner_pwd] . '"></td><td><img src="images/question.png" title="0987"></td></tr>'; 
					}
					echo '<tr><td width="35%" valign="top">Company:</td><td><input type="text" name="linkpos_company" size="30" value="' . $nt[linkpos_company] . '"></td><td><img src="images/question.png" title="This is the company, or parent company if multiple stores in chain."></td></tr>'; 
					echo '<tr><td width="35%" valign="top">Store Name:</td><td><input type="text" name="linkpos_store_name" size="30" value="' . $nt[linkpos_store_name] . '"></td><td><img src="images/question.png" title="Store name for this specific store, not the parent company."></td></tr>'; 
					echo '<tr><td width="35%" valign="top">Store Password:</td><td><input type="text" name="linkpos_store_pwd" size="30" value="' . $nt[linkpos_store_pwd] . '"></td><td><img src="images/question.png" title="LinkPOS password for this specific store."></td></tr>'; 
				}
		
				echo '<tr><td></td><td><input id="save-button" type="submit" name="save" value="Save Changes"></td></tr></td></tr></table></form>';
			echo "</table>";
			echo "</ul>";
		}
	}
}
##******************************************* END LINKPOS SECTION *****************************************##

##******************************************* BEGIN HVAC SECTION *****************************************##
if($hvac_pkg=='1'){
	//if($lennox_enabled=='1'){
		if(($roladmin==1)||($masteradmin==1)){
			$rt=mysql_query($query); //refresh recordset
		
			echo "<h3 class='menuheader expandable'>Lennox Settings</h3>";	
			echo'<ul class="categoryitems">';
		
			echo "<table border=0 width='100%'><tr><td>";
				echo '<form action="' . $_SERVER['PHP_SELF'] . '?a=update&key=' . $nt[recordKey] . '" method="post">
				<input type="hidden" name="section" value="lennox">';
				while($nt=mysql_fetch_array($rt)){
					echo '<div id="table-wrapper"><table width="74%" valign="top">';
					if($masteradmin==1){
						echo '<tr><td width="35%" valign="top">Lennox API key:</td><td><input type="text" name="lennox_api_key" size="30" value="' . $nt[lennox_api_key] . '"></td><td><img src="images/question.png" title="Menuetta"></td></tr>'; 
						
					}
					
				}
		
				echo '<tr><td></td><td><input id="save-button" type="submit" name="save" value="Save Changes"></td></tr></td></tr></table></form>';
			echo "</table>";
			echo "</ul>";
		}
	//}
}
##******************************************* END HVAC SECTION *****************************************##

echo"</div>";	




?>

<script type="text/javascript" src="includes/tinyaccordion/script.js"></script>

<script type="text/javascript">

//Code for order menu display time setting
$('#order_menu_gear').click(function() {
			$('#timeSettingPopup').fadeIn( "slow", function() {
			});
		});
$('#eod_report_time').click(function() {
			$('#eodReportPopup').fadeIn( "slow", function() {
			});
});
$('#close_btn_eod').click(function() {
	
			$('#eodReportPopup').hide();
});

$('input.timepicker').timepicker({ 'showDuration': true, 'step': 15, 'timeFormat': 'H:i' });

		$('#close_btn').click(function() {
			$('#timeSettingPopup').hide();
		});

		$('#add_more_btn').click(function() { 
		var rowCount = $('#time-table tr').length;
		var x = rowCount-1;
		var endHour = $( "#end-h-box_"+x+" option:selected" ).val();
		var endMin = $( "#end-m-box_"+x+" option:selected" ).val();
		var endMod = $( "#end-mod option:selected" ).val();
		var i=0;
		var html = "<tr><td><select name='menu[]'>";
			<?php
				foreach ($menuSelect as $key => $value) { ?>
			html +="<option value='<?php echo $key; ?>' ><?php echo $value; ?></option>";
			<?php } ?>
			html +="</td><td><input size='6' type='text' class='timepicker' name='start_time[]' onkeypress='return false;' /></td><td><img onclick='$(this).parent().parent().remove(); return false;' class='removeField' src='../images/remove-icon.png'></td></tr>";
	$('#time-table').append(html);
		$('input.timepicker').timepicker({ 'showDuration': true, 'step': 15, 'timeFormat': 'H:i' });
	});


//////////////

//code to open jquery popup for other location
 $('.popup.other_location_btn').click(function() {
 	$('toPopDiv menu-item').show();
        var popupId = $(this).data('popup-id');
        $('#iframe-'+popupId).attr('src', 'editprefsiframe.php?a=list_location&key='+popupId);
    });


var parentAccordion=new TINY.accordion.slider("parentAccordion");
parentAccordion.init("acc","h3",1,-1);

var nestedAccordion=new TINY.accordion.slider("nestedAccordion");
nestedAccordion.init("nested","h3",1,-1,"acc-selected");

var nestedAccordion2=new TINY.accordion.slider("nestedAccordion2");
nestedAccordion2.init("nested2","h3",1,-1,"acc-selected");


//var parentAccordion=new TINY.accordion.slider("parentAccordion");
//parentAccordion.init("acc","h3",0);

//var nestedAccordion=new TINY.accordion.slider("nestedAccordion");
//nestedAccordion.init("nested","h3",1,-1,"acc-selected");
//nestedAccordion.init("nested","h3",1,-1,"acc-selected");
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit