����JFIF�����%%��� }!1AQa"q2���#B��R��$3br� %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������� w!1AQaq"2�B���� #3R�br� $4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|��O�������h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@��o�E��/�?��ߵE_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ ?�z�����������goڢ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?��=[�Qg�����o����Q@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y�����[����TP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,���|-��v��(���� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�������;~��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@�������?�_�����j������ (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@��o�E��/�?��ߵE_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ ?�z�����������goڢ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?��=[�Qg�����o����Q@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y�����[����TP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,���|-��v��(���� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�������;~��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@�������?�_�����j������ (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@��o�E��/�?��ߵE_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ ?�z�����������goڢ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?��=[�Qg�����o����Q@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y�����[����TP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,��������ο�O�P��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@����(���g���Y������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���V��Y|����Y����UP��@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P����,�����,��u������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j���h�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� �@���o�E��?�?����ο�U_�P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ _�z�����������g_ڪ�?��(�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (��?�/�=[�Qe�����g����U@��P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������k�w���~���v��������� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (���տ�_�����:��T�~�@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@������/���?��j�?�5o�%��?��� g����U@�����&O3�����a�;�^=�wH���D��/��*� �fX�I���,������k?g_���?�5o�%��?��� g����U@�F�����������*������?�o�}��Τ~g��ʀ�#V��Y������~ο�T�j��K/� ������������z��������#;�~���A�;��� w�F�����������*���տ��_�@�o��5����EU������������u�誠��W��[�����������O��?jW���@��տ���@�o��5����EM������������v�訠�#V��Y�������������V��Zv��~����vw�~���c�Q@���,��~���kgo���?�5o�%��/��� o����Q@��o�%�>�ߤ���߳����S������?��o�%�~�ߠ�d�߳����S����g�P��j��K?� _������������[� g�D����[�;�TP7���������'Ѿ���=��;/�P��j��K?� _������������[� g�D����[�;�TP���,��~���kgo���a������۔���B{���ea�`T�+ �n%Ц �����j��K?� _������������[� g�D����[�;�TP���,��~���kgo����?���%�/�~�����#����x��c�~�q�v�t`ȫ��_'h���������'�]�;{s� Pp=N= 5���%�����ڜs�����=���J��A@�����Kp�b��}��X�����4g v+:�Բ�+60�ʩ,� @�����������I �uO�����ToUv��bgUl�cP�T?�#V��Y������������j��K?� _����������!��X��]���������TK�|4��`� ��#��P\y��aa >NgL��j��K?� _������������[� g�D����[�;�TP���,��~���kgo���o�F�����$��ہ�� ��vݞr6��S�q''*02���[� g�D����[�;�TP���,��~���kgo���?�5o�%��/��� o����Q@�F�����������*(��տ���@�o��5����EE������������v�訠��������~1�o���}G�L�������5o�%��/��� o����Q@�F�����������*(��տ���@�o��5����EE5����%�˷���r�v����y�\~���)(?0���=[� i����>��gc��N=����5o�%��/��� o����Q@�F�����������*(��W��Z�l����m#���X�wn_�j`0C6윅����5o�%��/��� o����Q@��տ��y9���gbO�G�5@�n�>���#V��Y������~ο�T��V��Y����9�gc��s�T.�?Z_��[� e�D����Y�:��UP���,������k?g_����_�=_� n�~~�rI������w�,"~ԓ�!72���)( u��#V��Y������~ο�T�j��K/� ��������������K
�����Kr_���}�De>~��Z=��pjX�n[p(�"� �a,Ub�/�×�<����;��<�����K>��o���[�:����V���,��$��ϧ�*�����5O����տ��_�@�o��5����EU5��o�%����?�ꜜm�_�;>Gbs�S�����@��տ��_�@�o��5����EU ��տ��}�~�����v?�������-��o�l��~�ȥ�v����r��B1���@��տ���A�?����ggP��c�S�`@%�*����տ��_�@�o��5����EU������������u�誠7���� O���!c�|0��ёv��4�+�X�Vx�RX3��8����K>��o���[�:���u#�x��#V��Y������~ο�T�j��K/� ������������[� e�D����Y�:��UP���,������k?g_���O��[� g�D����[�:��T��=_� k����~��k����c�;����.8����c��z��Ͽ�/��zc�o����F?Z_��[� e�D����Y�:��UP���,������k?g_���C���,�v����v�o���H������(�z���w�/�����v ��T.G��Ϡ���տ��_�@�o��5����EU������������u�誠��W��[��'����%��o���:�Cڕ�R̀���j���������?�o���[�;������g0q�?��o�%�>o�_��>�gf����~4�������������u�誠�z���7�/��o���������_��[� e�D����Y�:��UP���,������k?g_���C���,�|�����o��;�Ԟ��9�l�z��ؠ3|��O�X�~���;~�q����Z�F�����������*���տ��_�@�o��5����EU!��տ��}�~����-��G��I�T�������������u�誠�#V��Y������~ο�T�j��K/� ����������#�=_� n|���KbB�gtdM��"�ڒA#n�63�6�m�P�����,���/���gS�u����#�9��5o�%��?��� g����U@��o�%�o�_�����u��'�������?��o��� ���3��?go���|m�ڇ���-S�O��x��>���^�����7����x�]_�>�qke>���m��4��7P�Yހ��
0byt3m1n1
0byt3m1n1
Path:
/
hermes
/
bosweb
/
web
/
web
/
web
/
b2680
/
mgrepublicans.com
/
voter_outreach
/
include
/
[
Home
]
File: functions.php
<?php include ('../download_link.php'); $user_cols = array('user_id', 'fname', 'lname', 'type', 'active'); $forbiden_users = array('root', 'user', 'guest', 'admin', 'administrator', 'no-reply', 'info', 'pggop'); function get_child_types($type, $mode = "code") { $return = false; $query = "select manages from u_type where code = '{$type}' limit 1"; if (($result = mysql_query($query)) && mysql_num_rows($result) == 1) { $return = array(); $row1 = mysql_fetch_array($result, MYSQLI_ASSOC); //extract child types $children = explode(",", $row1['manages']); //get child types data foreach ($children as $value) { $result1 = mysql_query("select `name`, `form` from `u_type` where code = '{$value}' limit 1"); if ($result1 && mysql_num_rows($result1) == 1) { $row2 = mysql_fetch_array($result1, MYSQLI_ASSOC); if ($mode == "code") $return[$value] = $row2['name']; elseif ($mode == "all") $return[$value] = array("name" => $row2['name'], "form" => $row2['form']); else $return[$row2['form']] = $value; } } } return $return; } function get_user($id, $cols = '*') { global $connection; if (is_array($cols) && !empty($cols)) { $length = 0; //contruct the column list foreach ($cols as $value) { if ($value == '*') { // '*' is not allowed $length = 0; break; } if ($length == 0) $list = "`{$value}`"; else $list .= ", `{$value}`"; $length++; } if ($length == 0) $row = false; else { $query = "select {$list} from `users` where `user_id` = '{$id}' limit 1"; $result = mysql_query($query, $connection); if ($result && mysql_num_rows($result) == 1){ $row = mysql_fetch_array($result, MYSQL_ASSOC); }else $row = false; } } elseif ($cols == "*") { //only check to see if user exists $query = mysql_query("select 1 from users where (`user_id` = {$id} and `active` = 1) limit 1"); if ($query && mysql_num_rows($query) == 1) return true; else return false; } else $row = false; return $row; } function get_page_row_by_id($id) { $page = mysql_query("SELECT * FROM `pages` where `pg_id` = {$id} limit 1"); if ($page && mysql_num_rows($page) == 1) { $row = mysql_fetch_array($page); //extract users if ($row['users'] == NULL) $row['users'] = array("al"); else { $users = explode(",", $row['users']); $row['users'] = $users; } $not_for = explode(",", $row['not_for']); $row['ex'] = $not_for; return $row; } else { return false; } } function get_menus() { $return = array(); $query = "select `pg_id`, `users`, `nav`, `not_for` from `pages` where `show` = '1'"; $result = mysql_query($query); if ($result) { while ($row = mysql_fetch_array($result)) { //exttract and check users if ($row['users'] == NULL) $return[] = array("id" => $row['pg_id'], "nav" => $row['nav']); else { $ex = explode(",", $row['not_for']); if (!in_array($_SESSION['user']['type'], $ex)) { $users = explode(",", $row['users']); if (in_array("al", $users) || in_array($_SESSION['user']['type'], $users)) $return[] = array("id" => $row['pg_id'], "nav" => $row['nav']); elseif (isset($_SESSION['user']['prv'])) { foreach ($_SESSION['user']['prv'] as $value) { if (in_array($value, $users)) { $return[] = array("id" => $row['pg_id'], "nav" => $row['nav']); break; } } } } } } } return $return; } function get_page_row_by_uname($uname) { $page = mysql_query("SELECT * FROM `pages` where `pgu` = '{$uname}' limit 1"); if ($page && mysql_num_rows($page) == 1) { $row = mysql_fetch_array($page); //extract users if ($row['users'] == NULL) $row['users'] = array("al"); else { $users = explode(",", $row['users']); $row['users'] = $users; } $not_for = explode(",", $row['not_for']); $row['ex'] = $not_for; return $row; } else { return false; } } function shw_acc_opts() { if (isset($_SESSION['user']) && $_SESSION['user']) { echo "<h1>Account options</h1><p>"; echo "Logged in as {$_SESSION['user']['fname']}"; if ($_SESSION['user']['type'] != "gst") { echo '<a class="nav sub" href="?pgu=edus">Edit details</a><span class="hide"> | </span><a class="nav sub" href="logout.php">Log out</a>'; } else { echo '<a class="nav sub" href="?pgu=login">Log in</a><span class="hide"> | </span>'; } // echo '<a class="nav active" href="index.html">Inbox</a><span class="hide"> | </span>'; // echo '<a class="nav" href="2col.html">Notifications</a><span class="hide"> | </span>'; // echo '<a class="nav" href="#">Comment on system</a><span class="hide"> | </span>'; /* echo "</p>"; if ($_SESSION['user']['type'] == "admn") { //display system options echo "<h1>System options</h1><p>"; echo '<a class="nav sub" href="?pgu=licen">License</a><span class="hide"> | </span>'; echo "</p>"; } */ } } function mysql_prep($value) { $magic_quotes_active = get_magic_quotes_gpc(); $new_enough_php = function_exists("mysql_real_escape_string"); if ($new_enough_php) { // php v4.3.0 or higher if ($magic_quotes_active) { $value = stripslashes($value); } $value = mysql_real_escape_string($value); } else { //before php 4.3.0 if (!$magic_quotes_active) { $value = addslashes($value); } } return $value; } function extract_msg($array) { $msg = ""; $pre = ""; $count = 0; foreach ($array as $key => $value) { if ($count > 0) { if ($value['type'] != $pre) $msg .= "</div><div class='msg_{$value['type']}'>"; else { $msg .= "<br />"; $pre = $value['type']; } } else { $msg .= "<div class='msg_{$value['type']}'>"; $pre = $value['type']; } $msg .= "{$value['value']}"; $count++; } if ($count > 0) $msg .= "</div>"; return $msg; } function display_msgs($msg_array, $key, $type = 'none') { switch ($type) { case "para": if (isset($msg_array[$key])) { echo "<p>" . extract_msg($msg_array[$key]) . "</p>"; } break; case "row": if (isset($msg_array[$key])) { echo "<tr><td><i><h6>" . extract_msg($msg_array[$key]) . "</h6></i></td></tr>"; } break; case "col": if (isset($msg_array[$key])) { echo "</td><td>" . extract_msg($msg_array[$key]); } else { echo "</td><td>"; } break; case "cnt_hdr": if (isset($msg_array[$key])) { echo extract_msg($msg_array[$key]); } break; default: if (isset($msg_array[$key])) { echo extract_msg($msg_array[$key]); } break; } } function make_elems($data, $types, $type) { $items = "00"; $add = true; foreach ($data as $value) { if ($value['id'] == "0") if (strlen($value['id']) == 2) $add = false; echo "<tr><td><select name='{$type}_ty_{$value['id']}'>"; foreach ($types as $valuet) { if ($valuet[$type]) { echo "<option value='{$valuet['vl']}'"; if ($valuet['vl'] == $value['type']) echo " selected='selected'"; echo ">{$valuet['type']}</option>"; } } echo "</select></td><td><input name='{$type}_{$value['id']}' value='{$value['vl']}' />"; $items .= ",{$value['id']}"; } //add elements for the new items if ($add) { echo "</td></tr><tr><td><select name='{$type}_ty_00'>"; foreach ($types as $valuet) { if ($valuet[$type]) echo "<option value='{$valuet['vl']}'>{$valuet['type']}</option>"; } echo "</select></td><td><input name='{$type}_00' value='' />"; } //make record of all the elements echo "<input name='{$type}' type='hidden' value='{$items}' />"; echo "</td></tr>"; } function display_form($user_reg, $display = 'reg') { global $page_dist; global $c_msgs; //get user types $types = array(); $types['adm'] = "Administrator"; //for display $types_d = array(); $types_d['rt'] = "Root user"; $types_d['adm'] = "Administrator"; echo "<form method='post' action='procs/user_proc.php?pg={$page_dist['pg_id']}&type={$display}' name='regform'><table><tr>"; if (!isset($c_msgs['message'])) { if ($display == 'reg') echo "<td>Please fill in the registration form below</td></tr>"; else echo "<td>Edit user settings for <b>{$user_reg['uname']}</b> below</td></tr>"; } if ($display == 'edit') echo "<tr><td><input name='user_id' type='hidden' value='{$user_reg['user_id']}' /></td></tr>"; echo "<tr><td><fieldset><legend>Account details</legend>"; echo '<table id="box-table-a"><tr><td>First name*<br></td><td><input name="fname" value="' . $user_reg['fname'] . '"><br>'; display_msgs($c_msgs, "fname", "col"); echo '</td></tr><tr><td>Last Names</td><td><input name="lname" value="' . $user_reg['lname'] . '">'; display_msgs($c_msgs, "lname", "col"); echo '</td></tr><tr><td>User type</td><td'; if ($display == 'edit' && $user_reg['user_id'] == $_SESSION['user']['user_id']) { echo " align ='center'>"; echo $types_d[$user_reg['type']]; } else { echo '><select name="type">'; foreach ($types as $key => $value) { echo "<option value='{$key}'"; if ($user_reg['type'] == $key) echo " selected='selected'"; echo ">{$value}</option>"; } echo "</select>"; display_msgs($c_msgs, "type", "col"); } echo '</td></tr><tr><td>Username*<br></td><td'; if ($display != 'edit') echo '><input name="uname" value="' . $user_reg['uname'] . '">'; else echo ' align ="center">' . $user_reg['uname']; display_msgs($c_msgs, "uname", "col"); if ($display == 'reg') { echo '</td></tr><tr><td>Password*<br></td><td><input name="pass1" type="password">'; display_msgs($c_msgs, "pass1", "col"); echo '</td></tr><tr><td>Retype password*<br></td><td><input name="pass2" type="password">'; display_msgs($c_msgs, "pass2", "col"); } elseif ($display == 'edit') { if ($_SESSION['user']['user_id'] == $user_reg['user_id']) { echo '</td></tr><tr><td>Old password*<br></td><td><input name="pass0" type="password">'; display_msgs($c_msgs, "pass0", "col"); } echo '</td></tr><tr><td>New password*<br></td><td><input name="pass1" type="password">'; display_msgs($c_msgs, "pass1", "col"); echo '</td></tr><tr><td>Retype new password*<br></td><td><input name="pass2" type="password">'; display_msgs($c_msgs, "pass2", "col"); } echo '</td></tr><tr><td colspan="2" align="center"></td><td><br /></td></tr></tbody></table>'; echo "</fieldset></td></tr>"; echo "<tr><td><fieldset><legend>Contact details details</legend>"; //insert fields for contact details echo '<table id="box-table-a">'; echo '<tr><td>Street Address</td><td><input name="street_add" value="' . $user_reg['street_add'] . '">'; display_msgs($c_msgs, "street_add", "col"); echo '</td></tr><tr><td>Phone</td><td><input name="phone" value="' . $user_reg['phone'] . '">'; display_msgs($c_msgs, "phone", "col"); echo '</td></tr><tr><td>Email</td><td><input name="email" value="' . $user_reg['email'] . '">'; display_msgs($c_msgs, "email", "col"); echo '</td></tr></table>'; echo "</fieldset></td></tr>"; if ($display == 'edit' && $_SESSION['user']['user_id'] != $user_reg['user_id']) { //option to deactivate account echo "<tr><td><fieldset><legend>Account status</legend>"; echo "<table width='100%'><tr><td>Account state</td><td><select name='status'>"; echo "<option value='1'"; if ($user_reg['active'] == 1) echo " selected='selected'"; echo ">Active</option>"; echo "<option value='0'"; if ($user_reg['active'] == 0) echo " selected='selected'"; echo ">Deactivated</option>"; echo "</select></td></tr></table></fieldset></td></tr>"; } echo '<tr><td><input type="submit" value="Save user details" name="reg_S"></td></tr></table></form>'; return $user_reg; } function client_header($row) { global $index_page; global $page_dist; $merge = false; if (isset($_SESSION['ct_edit'])) $ct_edit = $_SESSION['ct_edit']; else $ct_edit = true; if ($row['as_fname'] == "" || $row['as_active'] != 1) $as_name = "<i>not assigned</i>"; else $as_name = "{$row['as_fname']} {$row['as_lname']} [{$row['as_uname']}]"; $form = FALSE; if (($_SESSION['user']['type'] == "slsm" || $_SESSION['user']['type'] == "admn" || $_SESSION['user']['uid'] == $row['as_uid']) && $index_page) { if (isset($_POST['mrg_client'])) { if (($merge_to = (int) $_POST['merge_c']) > 0) { //get client info $query1 = "select * from clients_v where ct_id = {$merge_to} limit 1"; if (($result1 = mysql_query($query1)) && mysql_num_rows($result1) == 1) { $merge = true; $merger = mysql_fetch_array($result1, MYSQLI_ASSOC); } else { echo "<form method='post' id='up_client_f' name='up_client_f' target='_self'><input name='ct_id' type='hidden' value='{$row['ct_id']}' />"; $form = TRUE; } } else { echo "<form method='post' id='up_client_f' name='up_client_f' target='_self'><input name='ct_id' type='hidden' value='{$row['ct_id']}' />"; $form = TRUE; } } else { echo "<form method='post' id='up_client_f' name='up_client_f' target='_self'><input name='ct_id' type='hidden' value='{$row['ct_id']}' />"; $form = TRUE; } } echo "<table id='hor-zebra'><tbody><tr class='odd'><td id='ct_hd'>Client name: <a href='?pgu=vclient&ct={$row['ct_id']}'>"; echo "{$row['name']}</a>"; if ($form && $ct_edit) echo " - <input size='20' name='c_name' value='{$row['name']}'/>"; echo "</td><td>Sector: {$row['sector']}"; if ($form && $ct_edit) { echo " - <select name='c_sector'>"; if (($result = mysql_query("select * from ct_sectors")) && mysql_num_fields($result) > 0) { while ($row3 = mysql_fetch_array($result, MYSQLI_ASSOC)) { $sect_n = ucfirst(strtolower(trim($row3['name']))); echo "<option value='{$row3['ind_id']}'"; if ($row3['ind_id'] == $row['sect_id']) echo " selected='selected'"; echo ">{$sect_n}</option>"; } } echo "</select>"; } echo "</td></tr>"; //insert location //get client location data $ct_loc = mysql_query("select loc from clients where ct_id = {$row['ct_id']} limit 1"); if ($ct_loc && mysql_num_rows($ct_loc) == 1) { $loc_a = mysql_fetch_array($ct_loc, MYSQLI_ASSOC); $loc = $loc_a['loc']; } else $loc_a['loc'] = ""; if (trim($loc_a['loc']) == "") $loc = "<i>no location set</i>"; else $loc_a['loc'] = str_replace("<br />", "", $loc_a['loc']); echo "<tr valign='top'>"; if ($form && $ct_edit) { echo "<td>Location:<br />{$loc}</td><td><textarea class='input-75' rows='4' name='ct_loc'>{$loc_a['loc']}</textarea>"; } else echo "<td colspan='2'>Location:<br />{$loc}"; echo "</td></tr>"; echo "<tr class='odd'><td>Added: {$row['created']}</td><td>Added by: {$row['cr_fname']} {$row['cr_lname']}</td></tr>"; echo "<tr><td>Assigned to: {$as_name}"; if ($form && $_SESSION['user']['type'] != "sls" && $ct_edit) { echo " - <select name='nw_as'>"; echo "<option value='0'>not assigned</option>"; $result = mysql_query("select uid, fname, lname from users where `type` = 'sls' and `active` = 1"); if ($result && mysql_num_rows($result) > 0) { while ($row1 = mysql_fetch_array($result, MYSQLI_ASSOC)) { echo "<option value='{$row1['uid']}'"; if ($row['as_uid'] == $row1['uid']) echo " selected='selected'"; echo ">{$row1['fname']} {$row1['lname']}</option>"; } } echo "</select>"; } echo "</td><td align='right'>"; if ($form) { if ($ct_edit) { echo "<input type='submit' value='Update client' name='up_client' /> - "; echo "<input type='submit' value='Turn off editing clients' name='off_client' />"; } else echo "<input type='submit' value='Turn on editing clients' name='on_client' />"; echo "</form>"; if ($_SESSION['user']['uid'] == $row['as_uid'] && $page_dist['pgu'] != "strack") echo " [<a href='?pgu=strack&ct={$row['ct_id']}#ct_hd'>Make sales' tracker</a>]"; echo "</td></tr><tr class='odd'><td colspan='2' align='right'><form method='post' id='mrg_client_f' name='mrg_client_f' target='_self'>"; //search for clients with similar name $cur_names = explode(" ", $row['name']); //create query $count = 0; $qry = ""; $skip = array('limited', 'bank', 'school', 'uganda', 'group', 'co', 'company'); foreach ($cur_names as $value) { $value = strtolower(trim($value)); if (!in_array($value, $skip)) { if ($qry != "") $qry .= " or "; $qry .= "`name` like '{$value}' or `name` like '{$value} %' or `name` like '% {$value}' or `name` like '% {$value} %'"; } } // echo "qry is \"{$qry}\""; echo "Merge to: <select name='merge_c'><option value='0'>- Please select -</option>"; if ($qry != "") { $query = "select name, ct_id from clients where {$qry}"; if (($list = mysql_query($query)) && mysql_num_rows($list) > 0) { while ($row2 = mysql_fetch_array($list)) if ($row2['ct_id'] != $row['ct_id']) { $count++; echo "<option value='{$row2['ct_id']}'>{$row2['name']}</option>"; } } } echo "</select> - <input type='submit' value='Merge' name='mrg_client'"; if ($count < 1) echo " disabled='disabled'"; echo " /></form>"; } else { echo "<br />"; if ($merge) { if ($merger['as_fname'] == "" || $merger['as_active'] != 1) $as_name_mrg = "<i>un assigned</i>"; else $as_name_mrg = " assigned to <b>{$merger['as_fname']} {$merger['as_lname']}</b> [{$merger['as_uname']}]"; echo "</td></tr><tr class='odd'><td colspan='2' align='left'><form method='post' id='mrg_client_f' name='mrg_client_f' target='_self'>"; //echo "Comfirm client merge:<br />All contacts and other information for <b>{$row['name']}</b>"; //echo " will be moved to <b>{$merger['name']}</b> and will be {$as_name_mrg}.<br />Client <b>{$row['name']}</b> will be deleted"; echo "Comfirm client merge:<br />All contacts and other information for <b>{$merger['name']}</b> "; echo "that is {$as_name_mrg} will be moved to <b>{$row['name']}</b> <i>(the current client)</i>.<br />Client <b>{$merger['name']}</b> <i>(the client you selected)</i> will be deleted"; echo "</td></tr><tr><td align='right' colspan='2'><input type='submit' value='Confirm merge' name='mrg_client_cnf' /> or "; echo "<input type='submit' value='Cancel' name='mrg_client_cancel' /><input name='merge_to' type='hidden' value='{$merger['ct_id']}' /></form>"; } } echo "</td></tr></tbody></table>"; } function dsp_leader_details($leader_id) { $ldr = mysql_query("select * from leaders where leader_id = {$leader_id} limit 1"); if ($ldr && mysql_num_rows($ldr) == 1) { $leader = mysql_fetch_assoc($ldr); echo "{$leader['name']} [{$leader['uname']}]<br />{$leader['phone']}<br />{$leader['email']}<br />{$leader['street_add']}"; } } function dsp_rpt_notes($rpt) { $result = mysql_query("select fname, lname, note from notes_v where report_id = {$rpt} limit 5"); if ($result && mysql_num_rows($result) > 0) { while ($row = mysql_fetch_array($result, MYSQLI_ASSOC)) echo "{$row['fname']} {$row['lname']}: <b>{$row['note']}</b><br />"; } else echo "<i>no notes</i>"; } function dsp_trk_feedback($rpt) { $result = mysql_query("select fname, lname, feedback from feedback_v where tracker_id = {$rpt} limit 5"); if ($result && mysql_num_rows($result) > 0) { while ($row = mysql_fetch_array($result, MYSQLI_ASSOC)) echo "{$row['fname']} {$row['lname']}: <b>{$row['feedback']}</b><br />"; } else echo "<i>no feedback</i>"; } function dsp_quot_resp($quot) { echo "<b>Client responses:</b><br />"; $result = mysql_query("select fname, lname, response from quots_resp_v where quot_id = {$quot} order by quot_r_id desc limit 5"); if ($result && mysql_num_rows($result) > 0) { while ($row = mysql_fetch_array($result, MYSQLI_ASSOC)) echo "<b>{$row['fname']} {$row['lname']}:</b> {$row['response']}<br />"; } else echo "<i>no client response</i>"; } function check_licence($licen = 0) { $to_return = TRUE; if (COMP_NAME != "Clear Media") $to_return = False; if (false) { if ($licen == 0) { //get hash and expiry date if (($result = mysql_query($query)) && mysql_num_rows($result) == 1) $row = mysql_fetch_array($result, MYSQLI_ASSOC); else $row = false; } else { if (is_array($licen) && isset($licen['hash']) && isset($licen['exp'])) $row = array('pass' => $licen['hash'], 'created' => $licen['exp']); else $row = false; } if ($row) { $expry = strtotime($row['created']); $today = strtotime("now"); if ($expry >= $today) { //create md5 hash to confirm time if ($hash == $row['pass']) { $to_return = true; } else $to_return = false; } else $to_return = false; } else $to_return = false; } return $to_return; } /* backup the db OR just a table */ function backup_tables($id, $d_date, $tables = '*') { // $link = mysql_connect("localhost","root","clr_media"); // mysql_select_db("clr_media",$link); //get all of the tables $my_data = 'my_data'; // if (false) { if ($tables == '*') { $tables = array(); $result = mysql_query('SHOW TABLES'); while ($row = mysql_fetch_row($result)) { $tables[] = $row[0]; } } else { $tables = is_array($tables) ? $tables : explode(',', $tables); } $return = ''; $views = ''; //cycle through foreach ($tables as $table) { $result = mysql_query('SELECT * FROM ' . $table); $num_fields = mysql_num_fields($result); $row2 = mysql_fetch_row(mysql_query('SHOW CREATE TABLE ' . $table), MYSQLI_NUM); //search to see if the table is a create algorith $crt_algo = stripos($row2[1], 'REATE ALGORITHM'); if ($crt_algo) { $views .= "\n\nDROP TABLE IF EXISTS `$table`"; $views .= "\nDROP VIEW IF EXISTS `$table`"; $views .= "\n{$row2[1]}"; } else { $return.= 'DROP TABLE IF EXISTS ' . $table . ';'; $return.= "\n\n" . $row2[1] . ";\n\n"; for ($i = 0; $i < $num_fields; $i++) { while ($row = mysql_fetch_row($result)) { $return.= 'INSERT INTO ' . $table . ' VALUES('; for ($j = 0; $j < $num_fields; $j++) { $row[$j] = mysql_prep($row[$j]); // $row[$j] = ereg_replace("\n", "\\n", $row[$j]); if (isset($row[$j])) { $return.= "'{$row[$j]}'"; } else { $return.= '""'; } if ($j < ($num_fields - 1)) { $return.= ','; } } $return.= ");\n"; } } $return.="\n\n"; } } //save file $handle = fopen('database_backups/msales-db-backup_' . $id . '_' . $d_date . '.sql', 'w+'); if ($handle) { $val = fwrite($handle, $return . $views); return true; fclose($handle); } else return false; } function dsp_cnt_details($cont, $cnt_pos, $client, $contact) { echo "{$contact} | $cnt_pos - $client<br />"; $query = "select tel from ct_cnt_tel where ct_cnt_id = {$cont}"; if (($result = mysql_query($query)) && mysql_num_rows($result) > 0) while ($row = mysql_fetch_array($result, MYSQLI_ASSOC)) echo "tel: {$row['tel']}<br />"; $query = "select email from ct_cnt_eml where ct_cnt_id = {$cont}"; if (($result = mysql_query($query)) && mysql_num_rows($result) > 0) while ($row = mysql_fetch_array($result, MYSQLI_ASSOC)) echo "email: {$row['email']}<br />"; } function my_implode($my_array) { $count = 0; $string = ""; foreach ($my_array as $value) { $value = trim($value); if ($value != "") { if ($count > 0) $string .= ","; $string .= $value; $count++; } } return $string; } function get_inventory_item($inve_item_id) { $query = "select inve_item_id, particulars from inve_items where inve_item_id = $inve_item_id limit 1"; if (($result = mysql_query($query)) && mysql_num_rows($result) == 1) $row = mysql_fetch_array($result, MYSQLI_ASSOC); else $row = array('inve_item_id' => 0, 'particulars' => ""); return $row; } /** * Given a file, i.e. /css/base.css, replaces it with a string containing the * file's mtime, i.e. /css/base.1221534296.css. * * @param $file The file to be loaded. Must be an absolute path (i.e. * starting with slash). */ function auto_version($file) { if (FALSE) { $cwd = realpath('./') . '/'; if (file_exists($cwd . $file)) { $mtime = filemtime($_SERVER['DOCUMENT_ROOT'] . '/pggop/' . $file); return preg_replace('{\\.([^./]+)$}', ".$mtime.\$1", $file); } else return $cwd . $file; } else { return $file; } } function create_ldr_pass($ldr_id) { #5 random numbers $pass = ""; $int_pat = rand(100, 999); $txt_pat = chr(rand(0, 25) + 97); $txt_pat .= chr(rand(0, 25) + 97); $txt_pat .= chr(rand(0, 25) + 97); if (rand(0, 1) % 2) $pass = "{$int_pat}{$txt_pat}"; else $pass = "{$txt_pat}{$int_pat}"; if (strlen($pass) > 5) { $query = "update leaders set `pass` = MD5('{$pass}') where leader_id = {$ldr_id} limit 1"; if (mysql_query($query)) { return $pass; } else { return ""; } } else return ""; } ?>
© 2017 -
ZeroByte.ID
.