From fec03d15d1440a181038e504e854e72db1dbb8ee Mon Sep 17 00:00:00 2001 From: Lucas Awade Date: Mon, 11 Sep 2023 12:20:57 +0000 Subject: [PATCH] =?UTF-8?q?corre=C3=A7=C3=B5es=20e=20atualiza=C3=A7=C3=B5e?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/Fgeneral.php_OLD | 214 ---- admin/LICENSE | 504 --------- admin/README | 174 ---- admin/WS_FTP.LOG | 3 - admin/cadRamais.php | 3 +- admin/extensions.new | 1 - admin/index.htm | 11 - admin/index.html | 11 - admin/index.php2 | 32 - admin/lgpl.txt | 505 --------- admin/monitorChamadas.php | 4 +- admin/musicas.php | 2 +- admin/phptelnet.php.save | 66 -- admin/play.m3u | 0 admin/readme.txt | 23 - admin/rgeneral.php2 | 983 ------------------ admin/untitled.htm | 11 - agente/agenteChamadasAbandon.php | 6 +- agente/agentert.php | 57 +- .../scripts/integracao/abdAgi.php | 112 +- audio_old.php | Bin 19362 -> 0 bytes .../ServicosChamadas/servicosChamadas.php | 12 + .../classificaAtendimento.php | 14 +- ...ca~b8e6413 (Adicionar 'cadastros_licenca') | 0 cadastros/motivosPausa/motivosPausaDelete.php | 4 +- cadastros/pesquisa/pesquisaDacs.php | 12 +- cadastros/pesquisa/pesquisaFuncoes.php | 4 +- cadastros/pesquisa/pesquisaRelAgente.php | 132 +-- cadastros/pesquisa/pesquisaRelAudio.php | 47 +- include/configBd.php | 4 +- include/util/display_errors.php | 2 +- include/util/funcoesApl.php | 33 +- include/util/funcoesInternas.php | 6 +- projeto/base/sql/versao-1.8.1.sql | 3 + recuperarsenha.php | 5 + relatorios/custom/relChamadaGeral.php | 600 +++++++++++ .../chamadasSaintes/saintesCentroCusto.php | 32 +- scriptApl/functions15.js | 7 + scriptApl/supervisorchat.js | 163 +-- scriptApl/utils.js | 2 +- seguranca/grupos/grupoInsert.php | 4 +- seguranca/trocaSenha.php | 2 +- templates/agendaRamais/depto/deptoRamais.htm | 6 +- .../agendaRamais/depto/deptoRamaisInsert.html | 11 +- .../ServicosChamadas/servicosChamadas.tpl | 26 +- .../classificaAtendimento/classificaItem.tpl | 21 +- templates/configSuper.tpl | 2 +- templates/master.tpl | 4 - 48 files changed, 834 insertions(+), 3046 deletions(-) delete mode 100644 admin/Fgeneral.php_OLD delete mode 100644 admin/LICENSE delete mode 100644 admin/README delete mode 100644 admin/WS_FTP.LOG delete mode 100644 admin/extensions.new delete mode 100644 admin/index.htm delete mode 100644 admin/index.html delete mode 100644 admin/index.php2 delete mode 100644 admin/lgpl.txt delete mode 100644 admin/phptelnet.php.save delete mode 100644 admin/play.m3u delete mode 100644 admin/readme.txt delete mode 100644 admin/rgeneral.php2 delete mode 100644 admin/untitled.htm delete mode 100644 audio_old.php delete mode 100644 cadastros/licenca~b8e6413 (Adicionar 'cadastros_licenca') create mode 100644 projeto/base/sql/versao-1.8.1.sql create mode 100644 relatorios/custom/relChamadaGeral.php diff --git a/admin/Fgeneral.php_OLD b/admin/Fgeneral.php_OLD deleted file mode 100644 index 9fb645a..0000000 --- a/admin/Fgeneral.php_OLD +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
CONFIGURAÇÃO GLOBAL DE ESTACIONAMENTO E TRANSFERENCIA
- - - - - -
- Suporte a ADSI: - /> -SIM - /> -NÃO -
- Estacionamento: - -
- Faixa de Estacionamento: - -
- - - - - -
- Timeout Estacionamento: - -
- Anuncia Estacionamento: - -
- Reproduzir Anuncio: - -
- - - - - -
- Avançar Faixa: - /> - Avançar - /> - Primeiro - Livre -
- Musica em espera: - -
- Timeout Transferência: - - -
- - - - - -
- Anuncia Transferencia: - -
- Anuncia Falha da Transferencia: - -
- Contexto: - -
- - - - -
- Tempo para ativar a transferencia: - - -
- Tempo de discagem para transferencia: - - -
-
- - - -
-
- diff --git a/admin/LICENSE b/admin/LICENSE deleted file mode 100644 index 03851a3..0000000 --- a/admin/LICENSE +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/admin/README b/admin/README deleted file mode 100644 index ad988dc..0000000 --- a/admin/README +++ /dev/null @@ -1,174 +0,0 @@ -/******************************************************************* -* The http://phpmailer.codeworxtech.com/ website now carries a few * -* advertisements through the Google Adsense network. Please visit * -* the advertiser sites and help us offset some of our costs. * -* Thanks .... * -********************************************************************/ - -PHPMailer -Full Featured Email Transfer Class for PHP -========================================== - -Version 2.0.4 (April 02, 2009) - -This is the last version to support PHP4. We've made the move to PHP5 and -all of our efforts now are into PHPMailer for PHP5/6. - -Version 2.0.3 (November 08, 2008) - -PHP4 continues to be a major platform for developers. We are responding -to the emails received to continue development for PHP4 with this -release. - -We have removed the /phpdoc from the downloads. All documentation is now on -the http://phpmailer.codeworxtech.com website. - -For all other changes and notes, please see the changelog. - -Donations are accepted at PayPal with our id "paypal@worxteam.com". - -Version 2.2 (July 15 2008) - -- see the changelog. - -Version 2.0.2 (June 04 2008) - -With this release, we are announcing that the development of PHPMailer for PHP5 -will be our focus from this date on. We have implemented all the enhancements -and fixes from the sourceforge.net Tracker. - -** NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS. - IF YOU CAN HELP WITH LANGUAGES OTHER THAN ENGLISH AND SPANISH, IT WOULD BE - APPRECIATED. - -We have now added S/MIME functionality (ability to digitally sign emails). -BIG THANKS TO "sergiocambra" for posting this patch back in November 2007. -The "Signed Emails" functionality adds the Sign method to pass the private key -filename and the password to read it, and then email will be sent with -content-type multipart/signed and with the digital signature attached. - -We have also included more example files to show the use of "sendmail", "mail()", -"smtp", and "gmail". - -We are also looking for more programmers to join the volunteer development team. -If you have an interest in this, please let us know. - -Enjoy! - -** NOTE: - -As of November 2007, PHPMailer has a new project team headed by industry -veteran Andy Prevost (codeworxtech). The first release in more than two -years will focus on fixes, adding ease-of-use enhancements, provide -basic compatibility with PHP4 and PHP5 using PHP5 backwards compatibility -features. A new release is planned before year-end 2007 that will provide -full compatiblity with PHP4 and PHP5, as well as more bug fixes. - -We are looking for project developers to assist in restoring PHPMailer to -its leadership position. Our goals are to simplify use of PHPMailer, provide -good documentation and examples, and retain backward compatibility to level -1.7.3 standards. - -If you are interested in helping out, visit http://sourceforge.net/projects/phpmailer -and indicate your interest. - -** - -http://phpmailer.sourceforge.net/ - -This software is licenced under the LGPL. Please read LICENSE for information on the -software availability and distribution. - -Class Features: -- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs -- Redundant SMTP servers -- Multipart/alternative emails for mail clients that do not read HTML email -- Support for 8bit, base64, binary, and quoted-printable encoding -- Uses the same methods as the very popular AspEmail active server (COM) component -- SMTP authentication -- Native language support -- Word wrap, and more! - -Why you might need it: - -Many PHP developers utilize email in their code. The only PHP function -that supports this is the mail() function. However, it does not expose -any of the popular features that many email clients use nowadays like -HTML-based emails and attachments. There are two proprietary -development tools out there that have all the functionality built into -easy to use classes: AspEmail(tm) and AspMail. Both of these -programs are COM components only available on Windows. They are also a -little pricey for smaller projects. - -Since I do Linux development I’ve missed these tools for my PHP coding. -So I built a version myself that implements the same methods (object -calls) that the Windows-based components do. It is open source and the -LGPL license allows you to place the class in your proprietary PHP -projects. - - -Installation: - -Copy class.phpmailer.php into your php.ini include_path. If you are -using the SMTP mailer then place class.smtp.php in your path as well. -In the language directory you will find several files like -phpmailer.lang-en.php. If you look right before the .php extension -that there are two letters. These represent the language type of the -translation file. For instance "en" is the English file and "br" is -the Portuguese file. Chose the file that best fits with your language -and place it in the PHP include path. If your language is English -then you have nothing more to do. If it is a different language then -you must point PHPMailer to the correct translation. To do this, call -the PHPMailer SetLanguage method like so: - -// To load the Portuguese version -$mail->SetLanguage("br", "/optional/path/to/language/directory/"); - -That's it. You should now be ready to use PHPMailer! - - -A Simple Example: - -IsSMTP(); // set mailer to use SMTP -$mail->Host = "smtp1.example.com;smtp2.example.com"; // specify main and backup server -$mail->SMTPAuth = true; // turn on SMTP authentication -$mail->Username = "jswan"; // SMTP username -$mail->Password = "secret"; // SMTP password - -$mail->From = "from@example.com"; -$mail->FromName = "Mailer"; -$mail->AddAddress("josh@example.net", "Josh Adams"); -$mail->AddAddress("ellen@example.com"); // name is optional -$mail->AddReplyTo("info@example.com", "Information"); - -$mail->WordWrap = 50; // set word wrap to 50 characters -$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments -$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name -$mail->IsHTML(true); // set email format to HTML - -$mail->Subject = "Here is the subject"; -$mail->Body = "This is the HTML message body in bold!"; -$mail->AltBody = "This is the body in plain text for non-HTML mail clients"; - -if(!$mail->Send()) -{ - echo "Message could not be sent.

"; - echo "Mailer Error: " . $mail->ErrorInfo; - exit; -} - -echo "Message has been sent"; -?> - -CHANGELOG - -See ChangeLog.txt - -Download: http://sourceforge.net/project/showfiles.php?group_id=26031 - -Andy Prevost diff --git a/admin/WS_FTP.LOG b/admin/WS_FTP.LOG deleted file mode 100644 index 086b0c4..0000000 --- a/admin/WS_FTP.LOG +++ /dev/null @@ -1,3 +0,0 @@ -110.04.22 19:12 B C:\xampp\htdocs\desenvolvimento\admin\admin.php --> 192.168.80.96 /uploads admin.php -110.04.22 19:12 B C:\xampp\htdocs\desenvolvimento\admin\admin.php --> 192.168.80.96 /uploads admin.php -110.04.22 19:12 B C:\xampp\htdocs\desenvolvimento\admin\admin.php --> 192.168.80.96 /uploads admin.php diff --git a/admin/cadRamais.php b/admin/cadRamais.php index 5fbfd82..aa05e16 100644 --- a/admin/cadRamais.php +++ b/admin/cadRamais.php @@ -356,12 +356,11 @@ if ($_GET['ajax'] == 1) { * Descomentar para cloud compartilhado. * */ - if ($result && RESTRINGE_AUDIO_CRIA_RAMAL) { + if ($result) { $query = "insert into pbx_grupo_audio_ramal select '$nome2', gp_id from pbx_grupo a where gp_status = 1 and not exists(select '' from pbx_grupo_audio_ramal where gp_id = a.gp_id and nome = '$nome2');"; $result = pg_query($dbcon, $query); } - if (!$result) { $z++; $msg .= 'Erro ao incluir ramal ' . $nome2 . '!' . '\n'; diff --git a/admin/extensions.new b/admin/extensions.new deleted file mode 100644 index ea0f271..0000000 --- a/admin/extensions.new +++ /dev/null @@ -1 +0,0 @@ -[ura-] diff --git a/admin/index.htm b/admin/index.htm deleted file mode 100644 index 919b8ed..0000000 --- a/admin/index.htm +++ /dev/null @@ -1,11 +0,0 @@ - - - - Untitled Document - - - - - - diff --git a/admin/index.html b/admin/index.html deleted file mode 100644 index 9f4de51..0000000 --- a/admin/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - New Web Project - - -

New Web Project Page

- - diff --git a/admin/index.php2 b/admin/index.php2 deleted file mode 100644 index 50267da..0000000 --- a/admin/index.php2 +++ /dev/null @@ -1,32 +0,0 @@ - - -Administração Asterisk - - - - - - - - - - - - - - - - - - - - - - - - - - -

- - diff --git a/admin/lgpl.txt b/admin/lgpl.txt deleted file mode 100644 index e1504da..0000000 --- a/admin/lgpl.txt +++ /dev/null @@ -1,505 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - - diff --git a/admin/monitorChamadas.php b/admin/monitorChamadas.php index 60947e9..06a5279 100644 --- a/admin/monitorChamadas.php +++ b/admin/monitorChamadas.php @@ -1,5 +1,7 @@ - + diff --git a/admin/phptelnet.php.save b/admin/phptelnet.php.save deleted file mode 100644 index 537875f..0000000 --- a/admin/phptelnet.php.save +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/php5 -q - -"); - $tmp=split(": ",$bufer); - $campo=($tmp[0]); - $valor=trim($tmp[1]); - if (($valor!='Cdr')) { - if ($campo=='Event'){ - connect_db(); - $evento=trim($valor); - $query = "INSERT INTO pbx_monitor_evento (EVENTO) VALUES ('".strtolower($valor)."')"; - pg_query($query); - $query = "SELECT ID FROM pbx_monitor_evento order by id desc limit 1"; - $result = pg_query($query); - - while($dados = pg_fetch_array($result)){ - $id = $dados['id']; - } - pg_close(); - } else if ($id>0){ - connect_db(); - if ((strtolower($campo)!='cause-txt') && (strtolower($campo)!='cid-callingpres') ){ - $query = "update pbx_monitor_evento set ".strtolower($campo)."='$valor' where id=$id"; - } else if (strtolower($campo)=='cid-callingpres'){ - $query = "update pbx_monitor_evento set \"cid-callingpres\"='$valor' where id=$id"; - }else { - $query = "update pbx_monitor_evento set \"cause-txt\"='$valor' where id=$id"; - } - pg_query($query); - pg_close(); - } - if ( ($campo=='Uniqueid') or (($campo=='Cause-txt')&&($evento=='Hangup')) or (($campo=='PeerStatus')&&($evento=='PeerStatus')) or (($campo=='HoldTime')&&($evento=='QueueCallerAbandon')) or (($campo=='DestUniqueID')&&($evento=='Dial')) or (($campo=='Newcallerid')&&($evento=='CID-CallingPres')) or (($campo=='CallerID2')&&($evento=='Link')) or (($campo=='CallerID2')&&($evento=='Unlink'))){ - //echo $campo .'->'. $valor."
"; - } - }} - //print_r($bufer."
"); - flush(); - } - fclose($socket); -?> diff --git a/admin/play.m3u b/admin/play.m3u deleted file mode 100644 index e69de29..0000000 diff --git a/admin/readme.txt b/admin/readme.txt deleted file mode 100644 index 0180132..0000000 --- a/admin/readme.txt +++ /dev/null @@ -1,23 +0,0 @@ -Licence: Creative Commons -http://creativecommons.org/ - - - -ENGLISH: - - -- backlinks in the footer and author singature cannot be removed -- templates may be distributed in only a non-modified form - - -CZECH: - -- podmínkou dalšího užití je ponechání zpìtných odkazù a oznaèení autora v patièèce webu -- šablonu je možné dálì šíøit, ale jen v pùvodní podobì -- kromì tìchto podmínek s ní mùžete vyvádìt psí kusy :-) - - - -Author: -Breezy New Media -http://www.breezy.cz \ No newline at end of file diff --git a/admin/rgeneral.php2 b/admin/rgeneral.php2 deleted file mode 100644 index 9fa4a85..0000000 --- a/admin/rgeneral.php2 +++ /dev/null @@ -1,983 +0,0 @@ -1)and(count($disallow)>$g)){ - $disallow2.=','; - } - } -} - - $allow = $_POST["allow"]; - $allow2=""; - $g=0; - - if(isset($allow)) - { - foreach($allow as $al) - { - $g++; - $allow2.=$al; - if ((count($allow)>1)and(count($allow)>$g)){ - $allow2.=','; - } - } -} - - $context= trim($_POST["context"]); - $callerid= trim($_POST["callerid"]); - $allowguest= trim($_POST["allowguest"]); - $allowoverlap= trim($_POST["allowoverlap"]); - $allowtransfer= trim($_POST["allowtransfer"]); - $realm= trim($_POST["realm"]); - $bindport= trim($_POST["bindport"]); - $bindaddr= trim($_POST["bindaddr"]); - $srvlookup= trim($_POST["srvlookup"]); - $pedantic = trim($_POST["pedantic"]); - $tos_sip= trim($_POST["tos_sip"]); - $tos_audio= trim($_POST["tos_audio"]); - $tos_video= trim($_POST["tos_video"]); - $maxexpiry= trim($_POST["maxexpiry"]); - $minexpiry= trim($_POST["minexpiry"]); - $defaultexpiry = trim($_POST["defaultexpiry"]); - $t1min= trim($_POST["t1min"]); - $notifymimetype= trim($_POST["notifymimetype"]); - $checkmwi= trim($_POST["checkmwi"]); - $buggymwi= trim($_POST["buggymwi"]); - $vmexten= trim($_POST["vmexten"]); - $mohinterpret = trim($_POST["mohinterpret"]); - $mohsuggest= trim($_POST["mohsuggest"]); - $language= trim($_POST["language"]); - $relaxdtmf= trim($_POST["relaxdtmf"]); - $trustrpid= trim($_POST["trustrpid"]); - $sendrpid= trim($_POST["sendrpid"]); - $progressinband= trim($_POST["progressinband"]); - $useragent= trim($_POST["useragent"]); - $promiscredir= trim($_POST["promiscredir"]); - $userqphone= trim($_POST["userqphone"]); - $dtmfmode= trim($_POST["dtmfmode"]); - $compactheaders= trim($_POST["compactheaders"]); - $videosupport= trim($_POST["videosupport"]); - $maxcallbitrate= trim($_POST["maxcallbitrate"]); - $alwaysauthreject= trim($_POST["alwaysauthreject"]); - $g726nonstandard= trim($_POST["g726nonstandard"]); - $matchexterniplocally= trim($_POST["matchexterniplocally"]); - $regcontext= trim($_POST["regcontext"]); - $rtptimeout= trim($_POST["rtptimeout"]); - $rtpholdtimeout= trim($_POST["rtpholdtimeout"]); - $rtpkeepalive= trim($_POST["rtpkeepalive"]); - $sipdebug= trim($_POST["sipdebug"]); - $recordhistory= trim($_POST["recordhistory"]); - $dumphistory= trim($_POST["dumphistory"]); - $allowsubscribe = trim($_POST["allowsubscribe"]); - $subscribecontext= trim($_POST["subscribecontext"]); - $notifyringing= trim($_POST["notifyringing"]); - $notifyhold= trim($_POST["notifyhold"]); - $limitonpeers= trim($_POST["limitonpeers"]); - $t38pt_udptl= trim($_POST["t38pt_udptl"]); - $externip= trim($_POST["externip"]); - $externhost= trim($_POST["externhost"]); - $externrefresh= trim($_POST["externrefresh"]); - $localnet= trim($_POST["localnet"]); - $nat= trim($_POST["nat"]); - $canreinvite= trim($_POST["canreinvite"]); - $directrtpsetup= trim($_POST["directrtpsetup"]); - $rtcachefriends= trim($_POST["rtcachefriends"]); - $rtsavesysname= trim($_POST["rtsavesysname"]); - $rtupdate= trim($_POST["rtupdate"]); - $rtautoclear = trim($_POST["rtautoclear"]); - $ignoreregexpire= trim($_POST["ignoreregexpire"]); - $domain= trim($_POST["domain"]); - $autodomain= trim($_POST["autodomain"]); - $allowexternaldomains = trim($_POST["allowexternaldomains"]); - $fromdomain= trim($_POST["fromdomain"]); - $jbenable= trim($_POST["jbenable"]); - $jbforce= trim($_POST["jbforce"]); - $jbmaxsize= trim($_POST["jbmaxsize"]); - $jbresyncthreshold= trim($_POST["jbresyncthreshold"]); - $jbimpl= trim($_POST["jbimpl"]); - $jblog= trim($_POST["jblog"]); - $auth= trim($_POST["auth"]); - - $query = "UPDATE pbx_sip_general - SET disallow='$disallow2', allow='$allow2', context='$context', callerid='$callerid', allowguest='$allowguest', - allowoverlap='$allowoverlap', allowtransfer='$allowtransfer', realm='$realm', bindport='$bindport', bindaddr='$bindaddr', - srvlookup='$srvlookup', pedantic='$pedantic', tos_sip='$tos_sip', tos_audio='$tos_audio', tos_video='$tos_video', - maxexpiry='$maxexpiry', minexpiry='$minexpiry', defaultexpiry='$defaultexpiry', t1min='$t1min', notifymimetype='$notifymimetype', - checkmwi='$checkmwi', buggymwi='$buggymwi', vmexten='$vmexten', mohinterpret='$mohinterpret', mohsuggest='$mohsuggest', - language='$language', relaxdtmf='$relaxdtmf', trustrpid='$trustrpid', sendrpid='$sendrpid', progressinband='$progressinband', - useragent='$useragent', promiscredir='$promiscredir', userqphone='$userqphone', dtmfmode='$dtmfmode', compactheaders='$compactheaders', - videosupport='$videosupport', maxcallbitrate='$maxcallbitrate', alwaysauthreject='$alwaysauthreject', g726nonstandard='$g726nonstandard', - matchexterniplocally='$matchexterniplocally', regcontext='$regcontext', rtptimeout='$rtptimeout', rtpholdtimeout='$rtpholdtimeout', - rtpkeepalive='$rtpkeepalive', sipdebug='$sipdebug', recordhistory='$recordhistory', dumphistory='$dumphistory', allowsubscribe='$allowsubscribe', - subscribecontext='$subscribecontext', notifyringing='$notifyringing', notifyhold='$notifyhold', limitonpeers='$limitonpeers', - t38pt_udptl='$t38pt_udptl', externip='$externip', externhost='$externhost', externrefresh='$externrefresh', localnet='$localnet', - nat='$nat', canreinvite='$canreinvite', directrtpsetup='$directrtpsetup', rtcachefriends='$rtcachefriends', rtsavesysname='$rtsavesysname', - rtupdate='$rtupdate', rtautoclear='$rtautoclear', ignoreregexpire='$ignoreregexpire', domain='$domain', autodomain='$autodomain', - allowexternaldomains='$allowexternaldomains', fromdomain='$fromdomain', jbenable='$jbenable', jbforce='$jbforce', - jbmaxsize='$jbmaxsize', jbresyncthreshold='$jbresyncthreshold', jbimpl='$jbimpl', jblog='$jblog', auth='$auth'"; -// $result = pg_query($dbcon, $query); - - pg_query($dbcon,$query); - -//faz o backup do arquivo -$ano= date("Y"); -$mes=date("m"); -$dia=date("d"); -$hora=date("G"); -$min=date("i"); - -$arq2 = $caminho_back.$ano.$mes.$dia.$hora.$min."_sip.conf"; - -$lines = file($arq); - -$escreve = fopen($arq2, 'w'); -for ($i = 0; $i < sizeof($lines); $i++){ -fwrite($escreve,$lines[$i]); -} -fclose($escreve); -//fim do backup - -//grava o arquivo novo - - -$escreve = fopen($arq, 'w'); -fwrite($escreve,"[general]".chr(13).chr(10)); - - $query = "SELECT * FROM pbx_sip_general"; - $result = pg_query($dbcon, $query); - while($dados = pg_fetch_array($result)){ - $x++; - for ($i=1; pg_num_fields($result)>$i;$i++){ - if (trim($dados[pg_field_name($result,$i)])!=''){ - fwrite($escreve,pg_field_name($result,$i).'='.$dados[pg_field_name($result,$i)].chr(13).chr(10)); - }} - } - fwrite($escreve,"#include sip_adicional.conf"); -fclose($escreve); -CommandAsterisk($dbcon,'SIP'); -header('ramais.php'); -} - - - $query = "SELECT * FROM pbx_sip_general"; - $result = pg_query($dbcon, $query); - while($dados = pg_fetch_array($result)){?> - -
- - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CONFIGURAÇÃO GLOBAL DO SIP
Desabilitado:
- - - > - gsm - > - g726 - > - g729 - > - ilbc - > - ulaw - > - alaw - > - all
Habilitado:
- > - gsm - > - g726 - > - g729 - > - ilbc - > - ulaw - > - alaw - > - all
Identificador:
" size="10" maxlength="20">
ACEITA CONVIDADOS:
- - - > - SIM - > - NÃO
Context:
" size="10" maxlength="20">
realm:
" size="10" maxlength="20">
allowoverlap:
- - - > - SIM - > - NÃO
allowtransfer:
- - > - SIM - > - NÃO
BIND ADDR:
">
BIND PORT:
">
srvlookup:
- - > - SIM - > - NÃO
pedantic:
- - > - SIM - > - NÃO
tos_sip:
">
tos_audio:
">
tos_video:
">
maxexpiry:
">
minexpiry:
">
defaultexpiry:
">
t1min:
">
notifymimetype :
">
checkmwi:
">
buggymwi:
- - - SIM - - NÃO
vmexten:
">
mohinterpret:
">
mohsuggest:
">
language:
">
relaxdtmf:
- - > - SIM - > - NÃO
trustrpid:
- - > - SIM - > - NÃO
sendrpid:
- - > - SIM - > - NÃO
progressinband:
- - > - SIM - > - NÃO - > - NUNCA
useragent:
">
promiscredir:
- - > - SIM - > - NÃO
dtmfmode:
">
videosupport:
- - > - SIM - > - NÃO
maxcallbitrate:
">
alwaysauthreject:
- - > - SIM - > - NÃO
g726nonstandard:
- - - SIM - - NÃO
matchexterniplocally:
- - > - SIM - > - NÃO
regcontext:
">
rtptimeout:
">
rtpholdtimeout:
">
rtpkeepalive:
">
DEBUG:
- - > - SIM - > - NÃO
recordhistory:
- - > - SIM - > - NÃO
dumphistory:
- - > - SIM - > - NÃO
allowsubscribe:
- - > - SIM - > - SIM
subscribecontext:
">
notifyringing:
- - > - SIM - > - NÃO
notifyhold;
- - > - SIM - > - NÃO
limitonpeers:
- - > - SIM - > - NÃO
t38pt_udptl:
- - > - SIM - > - NÃO
externip:
>
externhost:
">
externrefresh:
">
localnet:
">
nat:
- - > - SIM - > - NÃO - > - NUNCA - > - ROTA
canreinvite:
- - > - SIM - > - NÃO - > - SEM NAT - > - UPDATE
directrtpsetup:
- - > - SIM - > - NÃO
rtcachefriends:
- - > - SIM - > - NÃO
rtsavesysname:
- - > - SIM - > - NÃO
rtupdate:
- - > - SIM - > - NÃO
rtautoclear:
- - > - SIM - > - NÃO
ignoreregexpire:
- - > - SIM - > - NÃO
Dominio:
">
autodomain:
- - > - SIM - > - NÃO
allowexternaldomains:
- - > - SIM - > - NÃO
fromdomain:
">
jbenable:
- - > - SIM - > - NÃO
jbforce:
- - > - SIM - > - NÃO
jbmaxsize:
">
jbresyncthreshold:
">
jbimpl:
- - > - SIM - > - NÃO
jblog:
- - > - SIM - > - NÃO
auth:
">
usereqphone:
- - > - SIM - > - NÃO
compactheaders:
- - > - SIM - > - NÃO
- - -
-

- -
- - - \ No newline at end of file diff --git a/admin/untitled.htm b/admin/untitled.htm deleted file mode 100644 index 919b8ed..0000000 --- a/admin/untitled.htm +++ /dev/null @@ -1,11 +0,0 @@ - - - - Untitled Document - - - - - - diff --git a/agente/agenteChamadasAbandon.php b/agente/agenteChamadasAbandon.php index bb5c695..e4a46d1 100644 --- a/agente/agenteChamadasAbandon.php +++ b/agente/agenteChamadasAbandon.php @@ -62,23 +62,21 @@ $query = "select b.fila, c.data_bilhete as data, a.abdsr_numero as origem, count group by b.fila, c.data_bilhete, a.abdsr_numero, serv_id order by 2;"; -//if(IsAdmin()){ echo $query; } $result = pg_query($dbcon, $query); $numrow = 0; $linhas = ""; -$duracaoTotal = ''; +$duracaoTotal = 0; while ($row = pg_fetch_array($result)) { $origem = ocultarTelefone($row["origem"]); $discar = RemoveDddPadrao($row["origem"]); $discar = Encrypt($discar); $servico = $row['servico'] ? $row['servico'] : '-'; $acao = "\"Retornar"; - //$linkRamal = "$acao"; $linkRamal = sprintf("%s", $discar, $acao); if ($tipo == "agente") $linkRamal = ($classiCham <> 0 ) ? $linkRamal : "\"Chamada"; $linhas .= sprintf($linha, FormataDBDataHora($row["data"]), FormataDBDataHora($row["ult_abandono"]), ocultarTelefone($row["origem"]), $row["qtde"], SecondToStrTime($row["tempo"]), $servico, $linkRamal); - $duracaoTotal += $row["tempo"]; + $duracaoTotal += (int) $row["tempo"]; $numrow++; } diff --git a/agente/agentert.php b/agente/agentert.php index 59e8565..1e13bf3 100644 --- a/agente/agentert.php +++ b/agente/agentert.php @@ -379,6 +379,12 @@ if (!IsAjax()) { $dadosMonitor["pausa_motivo_ausente"] = 0; $dadosMonitor["dac_padrao"] = $_SESSION["SS_ultimo_dac_agente"] ? $_SESSION["SS_ultimo_dac_agente"] : $_SESSION[SS_DAC_PADRAO_ID]; + if($_SESSION['SS_IS_LOGGED'] == true && $_SESSION[SS_STATUS_AGENTE] == "OFF"){ + unset($_SESSION['SS_IS_LOGGED']); + echo 'ERROR@@Você foi desconectado do sistema, verifique sua internet ou navegador! Entre em contato com seu supervisor.'; + RegistraLogAgente("LogoffError", "Usuário foi desconectado inesperadamente, por queda da internet ou problema do navegador. [ Matricula : ". GetMatricula() . " ]" , 'ErrorLogoff'); + exit; + } /* * O agente deslogou ou foi desconectado. */ @@ -388,9 +394,11 @@ if (!IsAjax()) { $dadosMonitor["matricula"] = GetMatricula(); $dadosMonitor["abandonadasRet"] = '0'; $dadosMonitor["status_agente"] = "OFF"; + $_SESSION['SS_IS_LOGGED'] == false; $dadosMonitor = array_merge($dadosMonitor, $dadosDiscador); echo FormataDadosRt($dadosMonitor); } else { + $_SESSION['SS_IS_LOGGED'] = true; $oldStatus = $_SESSION[SS_STATUS_AGENTE]; DadosAtualiza($dbcon); $chamadaValida = trim($dadosMonitor["uniqueid2"]); @@ -402,8 +410,9 @@ if (!IsAjax()) { $dadosMonitor["linkaudio"] = "..."; } - if ($statusServer) + if ($statusServer){ $dadosMonitor["tempo_logado"] = sprintf('%s', $dadosMonitor["tempo_logado"]); + } $dadosMonitor["dac_logado"] = $_SESSION[SS_DAC_DESCRICAO]; $_SESSION[SS_STATUS_AGENTE] = $dadosMonitor["status_agente"] ? $dadosMonitor["status_agente"] : "OFF"; @@ -425,17 +434,9 @@ if (!IsAjax()) { $dadosMonitor['clienteoperacao'] = sprintf("\"Ir", $clienteOperacao); } - // - // ALERTA CLASSIFICACAO: INICIO - // - - // - // ALERTA CLASSIFICACAO: INICIO - // /* * Controla alerta sonoro para agente quando o chamado não é classificado. */ - $exigeClass = $dadosMonitor["chamada_classificado_exige"]; $naoClass = $dadosMonitor["chamada_classificado"]; $startAlert = ($statusAtual == 'LIVRE'); @@ -445,14 +446,12 @@ if (!IsAjax()) { SetAlertAgente(false); } - if ($chamadaValida && $exigeClass && !$naoClass && $startAlert && !GetAlertAgente()) { SetAlertAgente(true); SetAlertTempo(time()); } $alertTEmpo = GetAlertTempo(); - $alerta = (GetAlertTempo() !== false) && ((time() - GetAlertTempo())) > GetTempoAlertClas(); if (!$naoClass && GetAlertAgente() && $alerta && $startAlert) { GetUrl(AST_ALERTA_AGENTE); @@ -460,32 +459,6 @@ if (!IsAjax()) { SetAlertTempo(false); } - /* - * Controla alerta sonoro para agente quando o chamado não é classificado. - - $exigeClass = $dadosMonitor["chamada_classificado_exige"]; - $statusLivre = ($statusAtual == 'LIVRE'); - if ($chamadaValida && (GetAlertOcupado() === false) && ($statusAtual == 'OCUPADO')) { - SetAlertOcupado(true); - SetAlertAgente(false); - SetAlertTempo(false); - } - $naoClass = $dadosMonitor["chamada_classificado"]; - - - if ($chamadaValida && $exigeClass && $statusLivre && !$naoClass && !GetAlertAgente() && GetAlertOcupado()) { - SetAlertAgente(true); - SetAlertTempo(time()); - } - - - $alerta = (GetAlertTempo() !== false) && ((time() - GetAlertTempo())) > GetTempoAlertClas(); - if ($chamadaValida && $statusLivre && GetAlertAgente() && !$naoClass && $alerta && GetAlertOcupado()) { - GetUrl(AST_ALERTA_AGENTE); - SetAlertAgente(false); - SetAlertTempo(false); - } - */ if (($_SESSION[SS_STATUS_AGENTE] != 'OCUPADO') && ($_SESSION[SS_STATUS_AGENTE] != 'ORIGINANDO')) { $dadosMonitor["duracao"] = '00:00:00'; } @@ -536,7 +509,6 @@ if (!IsAjax()) { } $dadosMonitor["abandonadasRet"] = RetornaAbandon($dbcon, $dadosMonitor["dac_logado"], GetRamalMonitorar(RAMAL_MONITOR_AGENTE), "", "", $dadosMonitor["abandonadasRet"]); - /* * $dispIntegracao -> Indica que dados obtidos de uma integração seriam mostrados no campo do discador. */ @@ -573,14 +545,11 @@ if (!IsAjax()) { $dadosMonitor['tme'] = '0'; $dadosMonitor['vendido'] = !UseModVendas() ? '0' : GetVendasAgente($dac, $matricula); - echo FormataDadosRt($dadosMonitor); - //if($dadosMonitor["tempo_atualiza"] >= 30){ UpdateLogoffRt($dbcon); } UpdateLogoffRt($dbcon); } - } - else { + } else { /* * Tratamento de ações invocadas pelo agente. */ @@ -1580,6 +1549,7 @@ function ConnectaAgenteRt($db, $dac, $tpAtend) { $_SESSION["SS_CK_DISPO"] = 1; $_SESSION["SS_ultimo_dac_agente"] = $dac; $_SESSION['SSClassificaPendente'] = 0; + $_SESSION['SS_IS_LOGGED'] = true; return true; } catch (Exception $ex) { //APRESENTA POPUP COM A MENSAGEM DE ERRO @@ -1679,7 +1649,7 @@ function DesConectaAgenteRt($db, $type = '') { if (!$result) { GeraExcept("não foi possível finalizar o registro de logoff do agente!"); } - + $_SESSION['SS_IS_LOGGED'] = false; SetMsgAgente("Agente desconectado com sucesso!"); AgenteDesconectRt(); return true; @@ -1772,6 +1742,7 @@ function UpdateLogoffRt($db) { and id_dac = $dac and login = (select max(login) from pbx_eventos_agentes where matricula = '$matricula' and id_dac = $dac)"; pg_query($db, $query); + /** ERRO AO ATUALIZAR AGENTE **/ } function UpdatePausaRt($db) { diff --git a/asterisk/var_lib_asterisk/scripts/integracao/abdAgi.php b/asterisk/var_lib_asterisk/scripts/integracao/abdAgi.php index 373c242..1da5278 100755 --- a/asterisk/var_lib_asterisk/scripts/integracao/abdAgi.php +++ b/asterisk/var_lib_asterisk/scripts/integracao/abdAgi.php @@ -149,7 +149,6 @@ try { $numero = NormalizaNumero($arg3); MonitoraAbdAgi($conAbd, $uid, $dac, $arg3, $arg4, $direcao, $evento, $atendidaFila); - GravaLogGlobal('Inicio'); /** * CAPTURA CODIGOS DE PARAMETROS DE CHAMADA. @@ -209,10 +208,7 @@ try { * Marca o inicio da execucao do script. * GravaLog(sprintf(": %s\n", $ ,date('Y-m-d H:i:s')), $pathLog); */ - GravaLogGlobal('Inicio Registra Abandon'); - - //if ((!$chamadaAtendida) && (($direcao == 'I') || ($direcao == 'E'))) { if ((!$chamadaAtendida) && ($direcao == 'E')) { /* * Inicio do tratamento para chamadas abandonadas. @@ -232,7 +228,6 @@ try { RaiseExcept("Erro ao obter informacoes sobre a fila.", true); } $infoFila = pg_fetch_array($result, null, PGSQL_ASSOC); - GravaLogGlobal('Informacoes da Fila'); /* * Inserindo informacoes sobre a chamada e a fila no momento do abandono. */ @@ -241,12 +236,10 @@ try { . "values(%s,%s,%s,%s,%s,%s,%s,%s)"; $query = sprintf($query, QuotedStr($uid), QuotedStr($dac), QuotedStr($numero), QuotedStr(($infoFila['logado'] ? $infoFila['logado'] : '0')), QuotedStr(($infoFila['pausa'] ? $infoFila['pausa'] : '0')), QuotedStr(($infoFila['ocupado'] ? $infoFila['ocupado'] : '0')), QuotedStr(($infoFila['indisponivel'] ? $infoFila['indisponivel'] : '0')), QuotedStr(($infoFila['nao_classificado']) ? $infoFila['nao_classificado'] : '0')); - $result = pg_query($conAbd, $query); if (!$result) { RaiseExcept("Erro ao gravar informacoes sobre a chamada.", true); } - GravaLogGlobal('Insere Abandonadas'); } else { GravaLog(sprintf("[ PROCESS ]\n", 'Nao foi possivel encontrar o numero passado pela central', date('Y-m-d H:i:s')), $pathLog); } @@ -271,7 +264,7 @@ try { if (!$result) { RaiseExcept("Erro ao obter informacoes sobre os agentes.", true); } - GravaLogGlobal('Informacoes Agentes'); + /* /var/lib/asterisk/scripts/integracao/abdAgi.php,1531320618.20,FINANCEIRO,4002, * Inserindo informacoes sobre os agentes no momento da chamada. */ @@ -285,7 +278,6 @@ try { if (!pg_query($conAbd, $query)) { RaiseExcept("Erro ao gravar informacoes sobre os agentes no momento da chamada.", true); } - GravaLogGlobal('Informacoes Agentes Logados'); } } else { /* Sem agente logado na fila */ @@ -295,7 +287,6 @@ try { if (!pg_query($conAbd, $query)) { RaiseExcept("Erro ao gravar informacoes sobre os agentes no momento da chamada.", true); } - GravaLogGlobal('Sem agente'); } } else if ($chamadaAtendida) { /* @@ -317,7 +308,6 @@ try { $res = pg_query($conAbd, $query); - GravaLogGlobal('Informacoes de retorno'); if (!$res) { RaiseExcept("Erro ao consultar informacoes sobre a chamada abandonada", true); } @@ -342,7 +332,6 @@ try { if (!$result) { RaiseExcept("Erro ao atualizar informacoes sobre a chamada abandonada", true); } - GravaLogGlobal('Atualiza retorno'); /* * Atualiza chamdas anteriores para o mesmo numero marcando como retornada */ @@ -360,7 +349,6 @@ try { if (!$result) { RaiseExcept("Erro ao atualizar informacoes sobre a chamada abandonada anteriores a atual", true); } - GravaLogGlobal('Atauliza status retorno'); } } if (!pg_query($conAbd, 'commit')) { @@ -375,7 +363,6 @@ try { * Grava erros gerados durante a execucao. */ GravaLog(sprintf("Erro:%s File: %s Line: %s \ncmd: %s\n %s\n", $ex->getMessage(), $ex->getFile(), $ex->getLine(), $query, date('Y-m-d H:i:s')), $pathLog); - GravaLogGlobal('Capltura erro'); } /* * ************************************************************************* * *************** FIM TRATAMENTO ABANDONADAS NA FILA *********************** @@ -384,7 +371,6 @@ try { /* * Marca o fim da execucao do script. */ -GravaLogGlobal('Fim Execucao'); pg_close($conAbd); @@ -394,60 +380,6 @@ pg_close($conAbd); $conn = pg_connect($str); $inTran = false; -/* - * Cria um controle para retorno de chamadas abandonadas, - * as chamadas vão sendo inseridas na tabela e removidas - * conformem forem sendo retornadas pelos agentes da fila - * aonde foram abandonadas. - - -- Table: pbx_abandonadas_semretorno - -- DROP TABLE pbx_abandonadas_semretorno; - - CREATE TABLE pbx_abandonadas_semretorno - ( - abdsr_uniqueid character varying(32) not null primary key, - abdsr_data date NOT NULL default now()::date, - abdsr_fila character varying(64), - abdsr_numero character varying(32) NOT NULL, - abdsr_data_hora_inicio timestamp without time zone NOT NULL default now(), - abdsr_data_hora_retorno timestamp without time zone, - abdsr_data_retorno date, - abdsr_ramal character varying(32), - abdsr_agente character varying(32), - abdsr_agt_logado int, - abdsr_agt_pausa int, - abdsr_agt_ocupado int, - abdsr_agt_indisponivel int, - abdsr_agt_nao_classificado int, - abdsr_uniqueid_ret character varying(32) - ); - -- Index: "idxPbxAbdsrDataNumero" - -- DROP INDEX "idxPbxAbdsrDataNumero"; - CREATE INDEX "idxPbxAbdsrDataNumero" - ON pbx_abandonadas_semretorno - USING btree - (abdsr_data, abdsr_fila, abdsr_numero); - - CREATE INDEX "idxPbxAbdsrUid" - ON pbx_abandonadas_semretorno - USING btree - (abdsr_uniqueid); - - -- DROP TABLE pbx_abandonadas_status; - CREATE TABLE pbx_abandonadas_status - ( - uniqueid character varying(32) not null, - matricula character varying(16) not null, - id_evt_agt int, - status varchar(32), - ramal varchar(32), - disponivel int, - classificado int, - constraint "pkPbxAbandonadasStatus" primary key(uniqueid, matricula) - ); - * - */ - /* * Função Chamada Ramal da API. @@ -455,46 +387,6 @@ $inTran = false; include_once '/var/lib/asterisk/scripts/integracao/constServerIntegra.php'; include_once '/var/lib/asterisk/scripts/integracao/localDataBase.php'; -$scrpt = $argv[0]; -$UNIQUEID = $arg1; - -$userfield = $agi->get_variable('MONITOR_FILENAME', true); -$userfield = trim($userfield) ? $userfield : 'AUDIO.WAV'; - -$path = '/var/log/asterisk/encerra_chamada_satelitenorte.log'; -$query = sprintf("select a.chdr_id from pbx_chamada_ramal a where a.uniqueid = '%s' and a.chdr_fim is null", $UNIQUEID); -$result = pg_query($conn, $query); - - -if (pg_num_rows($result)) { - GravaLog($query . "\n AUDIO: " . $userfield . "\n", $path); - $dados = pg_fetch_array($result, null, PGSQL_ASSOC); - $chdr_id = $dados['chdr_id']; - $audio = str_ireplace('.WAV', '.MP3', $userfield); - - $token = '026d3a4b331078aa09d096d11e495215'; - $parametros = array('method' => 'terminachamada', 'audio' => $audio, 'id_chamada' => $UNIQUEID, 'token' => $token, 'login' => 'admin', 'senha' => 'SiP1029384756', 'tipoRetorno' => 'JSON'); - //$parametros = array('audio' => $audio, 'id_chamada' => $UNIQUEID, 'token' => $token); - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, "http://satelitenorte.xpro.me/gestaodeleads/terminachamada"); - //curl_setopt($ch, CURLOPT_URL, "http://127.0.0.1/aplicativo/integracao/index.php"); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_TIMEOUT, 10); - curl_setopt($ch, CURLOPT_POSTFIELDS, $parametros); - $content = trim(curl_exec($ch)); - curl_close($ch); - $retorno = json_decode($content, true); - - $log = sprintf("Status: %s Msg: %s", $retorno["status"], $retorno["mensagem"]); - $query = sprintf("update pbx_chamada_ramal set chdr_fim = now(), chdr_log = %s where chdr_id = '%s'", QuotedStr($log), $chdr_id); - GravaLog($query . "\n", $path); - $result = pg_query($conn, $query); - if (!$result) { - GravaLog($query . "\n", $path); - } -} - $integra = $agi->get_variable('INTEGRA-SAIDA', true); if ($integra == 'SAIDA') { @@ -569,7 +461,6 @@ if ($agi->get_variable('MEMBERINTERFACE', true) || $evento == 'ABANDON') { } else { include($nomeMetodo); } - exit; } } @@ -580,7 +471,6 @@ function GetVarFila() { foreach ($varFila as $varName) { $vars[$varName] = AgiGetVariable($varName); } - return $vars; } diff --git a/audio_old.php b/audio_old.php deleted file mode 100644 index 1f954fc41f27559b6669bcacaf68a725ee3675f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19362 zcmaib1y~&0vNaAl@L|DqaDuzLL$KiPgS)%CySoQ>3mV+r9fDhM3-Cj7&%N)y{CQ`- zFx|8FuBx?G)voR|0~fEgvGren@u>kV4LJW|q+?~`{ELP^DM^5=qJX5h zAb^mXmR6Zjkd{_RLFm^66Ac|e!B*GO&cxot%2L;ymR4ArkcaEd==EKgUx&fc^pryW*0nh-T=K|p32Z+fDi*OSf+uK`n(9$|NInlVj2Bp!rvY@rLwK8zf zx3{A;dP6|?6U|RBT(tZ=0Nqz;_QpVfEzrin#P-#l?f*vjFOf|w?d)~U&0kko*}l58 z2HKjt0Q9Xa4NZ(3UhQbOXk}lSGxCU7+5U8>{5Mz!JD}|=JH|J5KeJ{5d{y{$jjsJK zT0d6;Z5@HOe<$=mZeJtV+5+|MUt`%@y1U#u{5!>x7D?`vZZ~M(n8nH{x#&A04A1(R<;&z1{MG-!(XUgIqI3e zetw%bGI0d{oPBetC?^SUv2pI}eagROmH)pGz9E)|y)KTRxwzswD+oGi_)bPfKc^3MvgdZY0sGVm9` zpJn-%e%_q@k6!lE(#qCI*V4rGC$V3e(Y|%uxAyzii~o9U>YRT8olWe? zKXCq~t!=DpZm<2?>#SefrS01gFVA0p!7|X%G10LyFwilAK(R10Gtq%S(K9nL(Z7D8 zXJcmtalZd6ive!dLo-~X-(lCmX*xUbJTQ0@hW=urFb+=Ky4daLMIsliPKZ(+)$zaHZ{$pFuGt&arLU!O=bO0{Te>?l7&w|SWNATP zjYUlUc(~H3YowrlY%b50l|$|-K+5cQL$dN6QLZrO^}0_v*`sa$ezc6vd)X5=Zo>8a zSimnc_w8t?fKoZr{Zw_FYr4}5=SrfR%VZ(<>rCeS=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cd{zE@L6RPrQWB>8TZm5E3pUlR1YUM`oqV@t+wjX7&y6tTfj zdSDE~YkEp7LVu#5kbbK{yd}$k?CiYNZO4+4M;ne7;vy5LFEkWGbRE%o${B_Me5RF3 zZpgJUqHkaWxkqOX%WJXRCrJ3mkl9jke(|MXBMWz@OM(6S%Url+D}V{YV(fdu<&=m@ z$s1{N@fg2YrM^?BF%0l_5dFl%jjmMXrFdbYq<1MyMRB^7?>EbNz2&ujV0>l8GR1uPaS{dd?bY!rPuB3c&RheeW+#@!5)z;1@>r9j|C zySWM}=f8fGm#d=Nrvd}6;IYvVDJ@i#+GSX%C|_qm%Ib6pJPQ6f+7QjFr4+VOkFfn> zRqH>lA3Ttn-}b=6VAY6X`Kp8}U>|It#ptg}M+B08VYZz7{syZNI=dIEqi3$%lRzC6 ztoVSZ=c=OwHO;#f2sbf+7-<5YfEI9k!rNHB6u zl8S+9VgS;*MpbAC13nNmWK8c5YTF=AH=37fS&y_r=MTzNlJ>c6pkkLPS>0vvSOcxh z7deoj(vdEzzmd|srE^(0z6?li_x}HQg!Ff#&VwR?tgy>b-Q>7eLKDSc~IHB9+kggV4!A78eL~LQ(cSe zS9Wx9-|=vD2Nv}!SDc+Eh+f|fIdHYt3~y6@;cCCYdp(`rrsRA*eg5}oP4~}{e@z@d zUEGz>L{%Pszbk=%JzV|zbaPi?`TFT~&h7Ho#OsK3R3%4Czp{gyyW(rS@||-assign("totalReg", $totalReg); $smarty->assign("pgn", $_REQUEST["pgn"]); $smarty->assign("bloco", $_REQUEST["bloco"]); $smarty->assign("pg", $_REQUEST["pg"]); +$smarty->assign('filtroStatus', $filtroStatus); GetTemplate($smarty, $tpl); diff --git a/cadastros/classificaAtendimento/classificaAtendimento.php b/cadastros/classificaAtendimento/classificaAtendimento.php index bed9118..48dbd84 100644 --- a/cadastros/classificaAtendimento/classificaAtendimento.php +++ b/cadastros/classificaAtendimento/classificaAtendimento.php @@ -12,7 +12,7 @@ $filtroNovo = !isset($_REQUEST["pgn"]) ? '' : sprintf("¶mPesquisa%s&pgn=%s&b $recontaPag = ($acao == 'inseri') || (GetFormAcao() == FORM_DELETE) || isset($_POST['pesquisa']); $imgNovo = ""; $imgClass = "$imgNovo Nova Classificação"; - +$filtroStatus = isset($_POST['status']) ? $_POST['status'] : 'A'; if (!IsAjax()) { @@ -28,6 +28,15 @@ if (!IsAjax()) { $linhaDados = ""; $codDetalhe = 0; + switch($filtroStatus){ + case 'A': + $compl .= "AND clas_status = '1'"; + break; + case 'I': + $compl .= "AND clas_status = '0'"; + break; + } + $query = "select clas_id as id, clas_descricao as desc, clas_status as status from pbx_classifica_atendimento a where 1=1 $compl order by 2"; $params = "¶mPesquisa=$filtro"; $links = PaginaDados($idProg, $query, $params, $regPagina, $offSet, $pagMostra, true); @@ -77,7 +86,7 @@ if (IsAjax()) { $query = "select clit_id as id, clas_id, clit_descricao as desc, clit_status as status from pbx_classifica_item - where clas_id = '$codItem'"; + where clas_id = '$codItem' "; $imgItem = ""; $imgItem = "$imgItem Novo Item"; @@ -115,6 +124,7 @@ if (IsAjax()) { $smarty->assign("bloco", $_REQUEST["bloco"]); $smarty->assign("pg", $_REQUEST["pg"]); $smarty->assign("desc", $desc); + $smarty->assign('filtroStatus', $filtroStatus); GetTemplate($smarty, 'cadastros/classificaAtendimento/classificaItem.tpl'); } ?> diff --git a/cadastros/licenca~b8e6413 (Adicionar 'cadastros_licenca') b/cadastros/licenca~b8e6413 (Adicionar 'cadastros_licenca') deleted file mode 100644 index e69de29..0000000 diff --git a/cadastros/motivosPausa/motivosPausaDelete.php b/cadastros/motivosPausa/motivosPausaDelete.php index 970fbc9..95c222b 100644 --- a/cadastros/motivosPausa/motivosPausaDelete.php +++ b/cadastros/motivosPausa/motivosPausaDelete.php @@ -36,7 +36,9 @@ if ($result) { echo "ERRO; Não é possível excluir este registro! Erro: " . pg_last_error(); } } else { - echo "ERRO; Não é possível excluir este registro, o mesmo já foi utilizada na movimentação!"; + echo "ERRO; Não é possível excluir o registro, o mesmo está sendo utilizado para auditorias! O registro será desativado."; + $query = "update pbx_motivos_pausas set flag = '0' where id = $id"; + $result = pg_query($dbcon, $query); } } ?> diff --git a/cadastros/pesquisa/pesquisaDacs.php b/cadastros/pesquisa/pesquisaDacs.php index 9e05d54..606b332 100644 --- a/cadastros/pesquisa/pesquisaDacs.php +++ b/cadastros/pesquisa/pesquisaDacs.php @@ -7,7 +7,7 @@ $plDescricao = $_REQUEST["pl_descricao"]; if (isset($_POST["btIncDac"])) { $dacs = $_POST["dacs"]; - pg_query($dbcon, 'begin'); + @pg_query($dbcon, 'begin'); foreach ($dacs as $idDac) { $query = "insert into pbx_pesquisa_liberacao_dacs(pl_id, id_dac ) select '$plId', '$idDac' @@ -18,16 +18,16 @@ if (isset($_POST["btIncDac"])) { } if ($result) { - pg_query($dbcon, 'commit'); + @pg_query($dbcon, 'commit'); $msg = "Operação realizada com sucesso!"; } else { - pg_query($dbcon, 'rollback'); + @pg_query($dbcon, 'rollback'); $erroDb = pg_last_error($dbcon); $msg = "A operação não pode realizada!" . ($erroDb ? (" Erro: " . $erroDb) : "") . ""; } } else if (isset($_POST["btRmDac"])) { $dacs = $_POST["dacsInc"]; - pg_query($dbcon, 'begin'); + @pg_query($dbcon, 'begin'); foreach ($dacs as $idDac) { $query = "delete from pbx_pesquisa_liberacao_dacs where id_dac = '$idDac' and pl_id = '$plId' "; $result = pg_query($dbcon, $query); @@ -39,10 +39,10 @@ if (isset($_POST["btIncDac"])) { } if ($result) { - pg_query($dbcon, 'commit'); + @pg_query($dbcon, 'commit'); $msg = "Operação realizada com sucesso!"; } else { - pg_query($dbcon, 'rollback'); + @pg_query($dbcon, 'rollback'); $erroDb = pg_last_error($dbcon); $msg = "A operação não pode realizada!" . ($erroDb ? (" Erro: " . $erroDb) : "") . ""; } diff --git a/cadastros/pesquisa/pesquisaFuncoes.php b/cadastros/pesquisa/pesquisaFuncoes.php index 8f40b07..44c8390 100644 --- a/cadastros/pesquisa/pesquisaFuncoes.php +++ b/cadastros/pesquisa/pesquisaFuncoes.php @@ -66,7 +66,7 @@ function GetPesquisaDac($db, $idDac) { return $ret; } -function GetPesquisaAgente($db, $plId, $matricula, $idDac, $dtIni, $dtFim, $incTodos = false) { +function GetPesquisaAgente($db, $plId, $matricula, $idDac, $dtIni, $dtFim, $incTodos) { $ret = ""; $sel = ""; $dataIni = soNumero($dtIni) == "" ? "null" : "'$dtIni'"; @@ -87,7 +87,7 @@ function GetPesquisaAgente($db, $plId, $matricula, $idDac, $dtIni, $dtFim, $incT $result = pg_query($db, $query); //if(IsAdmin())echo $query; - if (!$plId) + if (!$id) $sel = "selected=\"selected\""; if ($incTodos) { $ret = ""; diff --git a/cadastros/pesquisa/pesquisaRelAgente.php b/cadastros/pesquisa/pesquisaRelAgente.php index 8b45143..2be6888 100644 --- a/cadastros/pesquisa/pesquisaRelAgente.php +++ b/cadastros/pesquisa/pesquisaRelAgente.php @@ -1,4 +1,5 @@ ___dac = isset($_POST["listaDacs"]) ? $_POST["listaDacs"] : 0; $this->___lstPesquisa = isset($_POST["lstPesquisa"]) ? $_POST["lstPesquisa"] : '0| | | |0| '; $this->___matricula = isset($_POST["matricula"]) ? $_POST["matricula"] : 0; - $this->___servico = isset($_POST["listaServico"]) ? $_POST["listaServico"] : 0; - } - - function ___ValidaForm() { - parent::___ValidaForm(); - if (!IsPostBack()) { - return; - } - if (!$this->___lstPesquisa) { - GeraExcept('Informe uma Pesquisa!'); - } } function ___FiltrosRelatorio() { @@ -89,7 +76,6 @@ $filtro .= 'Pesquisa'; if ($this->GetIncDac()) $filtro .= 'Fila'; - $filtro .= GetUsoServico() ? 'Serviço' : ''; $filtro .= 'Agente'; $filtro .= 'Data Inicial'; $filtro .= 'Data Final '; @@ -103,10 +89,7 @@ $filtro .= ""; if ($this->GetIncDac()) $filtro .= sprintf('%s', $dacs); - if (GetUsoServico()) { - $filtro .= sprintf('%s', GetIdentRota(false, $this->___servico)); - } - $filtro .= " "; + $filtro .= " "; $filtro .= ''; $filtro .= ''; $filtro .= ''; @@ -134,39 +117,24 @@ $plDescricao = $this->___plDescricao; $datas = $this->___datas; $matricula = $this->___matricula; - $srv = $this->___servico; - $mostraColunaServicos = GetUsoServico() == RELATORIO_SERVICOS_HABILITA; - GetDadosPesq($dbcon, $this->___lstPesquisa, $plId, $plDescricao, $ppId, $ppNome, $datas); $query = "SELECT pq_display, pq_questao, (select count(*) - from pbx_pesquisa_movimento a \n"; - - if (GetUsoServico()) { - $query .= " left join pbx_servicos_registra c on c.uniqueid = a.uniqueid \n"; - } - - $query .= " where pl_id = $plId + from pbx_pesquisa_movimento + where pl_id = $plId and pp_id = a.pp_id and pq_id = a.pq_id - and id_dac = $dac \n"; - - if (GetUsoServico() && $srv) { - $query .= " AND c.serv_id = '{$srv}' \n"; - } - - $matricula ? $query .= "and user_reg = '$matricula' \n" : ''; - - $query .= "and pm_data >= '$dataIni' - and pm_data <= '$dataFim') - as num_resp,pq_id - from pbx_pesquisa_questoes a, pbx_pesquisa_liberacao b - where b.pp_id = a.pp_id - and b.pl_id = '$plId' - and pq_status = 1 order by 1"; - + and id_dac = $dac + and user_reg = '$matricula' + and pm_data >= '$dataIni' + and pm_data <= '$dataFim') + as num_resp,pq_id + from pbx_pesquisa_questoes a, pbx_pesquisa_liberacao b + where b.pp_id = a.pp_id + and b.pl_id = '$plId' + and pq_status = 1 order by 1"; $result = $this->___GetQuery($query); $row = pg_fetch_all($result); $this->SetData($row ? $row : array()); @@ -178,23 +146,12 @@ and pl_id = $plId and b.pq_id = a.pq_id and b.id_dac = $dac + and b.user_reg = '$matricula' and b.pm_data >= '$dataIni' - and b.pm_data <= '$dataFim' \n"; - $matricula ? $sql .= " and b.user_reg = '$matricula' \n" : ''; - - if (GetUsoServico()) { - $sql .= " left join pbx_servicos_registra c on c.uniqueid = b.uniqueid "; - } - - $sql .= " where a.pq_id = {$dataPsq['pq_id']} "; - - if (GetUsoServico() && $srv) { - $sql .= " AND c.serv_id = '{$srv}' \n"; - } - - $sql .= " group by a.po_id, a.po_tecla, a.po_opcao - order by 2"; - + and b.pm_data <= '$dataFim' + where a.pq_id = {$dataPsq['pq_id']} + group by a.po_id, a.po_tecla, a.po_opcao + order by 2"; $res = $this->___GetQuery($sql); $rows = pg_fetch_all($res); $this->SetData($rows ? $rows : array()); @@ -208,22 +165,12 @@ INNER JOIN pbx_eventos_dacs b ON a.uniqueid = b.uid2 LEFT JOIN pbx_pesquisa_regitra c ON a.uniqueid = c.uniqueid LEFT JOIN pbx_usuarios d ON d.matricula = SUBSTRING(b.agente, 7, 4) - LEFT JOIN pbx_queues_grupos e ON e.nome = b.fila"; - if (GetUsoServico()) { - $query_status .= " LEFT JOIN pbx_servicos_registra s ON s.uniqueid = a.uniqueid "; - } - - $query_status .= " WHERE calldate::DATE >= '{$dataIni}' AND calldate::DATE <= '{$dataFim}' - AND b.evento IN('COMPLETEAGENT','COMPLETECALLER', 'TRANSFER','COMPLETEAGENTRAMAL','COMPLETECALLERRAMAL', 'COMPLETACALLER', 'COMPLETAAGENT') - AND e.id = {$dac} \n"; - - if (GetUsoServico() && $srv) { - $query_status .= " AND s.serv_id = '{$srv}' \n"; - } - - $matricula ? $query_status .= "and d.matricula = '$matricula' \n" : ''; - - $query_status .= "GROUP BY fila, d.matricula, apelido"; + INNER JOIN pbx_queues_grupos e ON e.nome = b.fila + WHERE calldate::DATE >= '{$dataIni}' AND calldate::DATE <= '{$dataFim}' + AND b.evento IN('COMPLETEAGENT','COMPLETECALLER', 'TRANSFER','COMPLETEAGENTRAMAL','COMPLETECALLERRAMAL', 'COMPLETACALLER', 'COMPLETAAGENT') + AND e.id = {$dac} + AND d.matricula = '{$matricula}' + GROUP BY fila, d.matricula, apelido"; $res = $this->___GetQuery($query_status); $rows = pg_fetch_all($res); @@ -261,16 +208,18 @@ $linha[] = $value; } - $dataRel[] = GenerateCsvFromArray($linha); - + $dataRel[] = $linha; + //$row['po_opcao'] = RemoveAcentos($row['po_opcao']); // Formata linha de dados. + foreach ($this->GetData()[$x] as $dataPsq) { $linha = array(); foreach ($dadosField as $key) { + if ($key == 'po_opcao') { $linha[] = RemoveAcentos($dataPsq["$key"]); } else if ($key == 'por_resp') { - $dataPsq['por_resp'] = $dataPsq["num_resp"] ?? number_format(($dataPsq["num_resp"] / $somaResp) * 100.0, 2, ',', '.') . '%'; + $dataPsq['por_resp'] = number_format(($dataPsq["num_resp"] / $somaResp) * 100.0, 2, ',', '.') . '%'; $linha[] = $dataPsq['por_resp']; } else { $linha[] = $dataPsq["$key"]; @@ -279,7 +228,7 @@ $dataRel[] = GenerateCsvFromArray($linha); unset($linha); } - $dataRel[] = GenerateCsvFromArray(array('Total', '', 'Resp.: ' . $somaResp, $somaResp ?? number_format(($somaResp / $somaResp) * 100.0, 2, ',', '.') . '%')); + $dataRel[] = GenerateCsvFromArray(array('Total', '', 'Resp.: ' . $somaResp, number_format(($somaResp / $somaResp) * 100.0, 2, ',', '.') . '%')); $x++; } @@ -351,15 +300,17 @@ } $dataRel[] = $linha; - + //$row['po_opcao'] = RemoveAcentos($row['po_opcao']); // Formata linha de dados. + foreach ($this->GetData()[$x] as $dataPsq) { $linha = array('DADOS'); foreach ($dadosField as $key) { + if ($key == 'po_opcao') { $linha[] = RemoveAcentos($dataPsq["$key"]); } else if ($key == 'por_resp') { - $dataPsq['por_resp'] = $dataPsq["num_resp"] ?? number_format(($dataPsq["num_resp"] / $somaResp) * 100.0, 2, ',', '.') . '%'; + $dataPsq['por_resp'] = number_format(($dataPsq["num_resp"] / $somaResp) * 100.0, 2, ',', '.') . '%'; $linha[] = $dataPsq['por_resp']; } else { $linha[] = $dataPsq["$key"]; @@ -369,7 +320,7 @@ $dataRel[] = $linha; unset($linha); } - $dataRel[] = array('LABEL', 'Total', '', 'Resp.: ' . $somaResp, $somaResp ?? number_format(($somaResp / $somaResp) * 100.0, 2, ',', '.') . '%'); + $dataRel[] = array('LABEL', 'Total', '', 'Resp.: ' . $somaResp, number_format(($somaResp / $somaResp) * 100.0, 2, ',', '.') . '%'); $x++; } @@ -435,7 +386,6 @@ //print_r($this->GetData()); $x = 1; $somaResp = 0; - $linhas = ''; /* * Linhas de dados. @@ -444,6 +394,7 @@ //Monta a Questão da Pergunta da pesquisa. $linhas .= sprintf("%s", $row['pq_questao']); + $linhas .= ""; foreach ($dadosCabecalio as $key => $value) { $linhas .= sprintf("%s", $value, $key); @@ -458,14 +409,14 @@ $linhas .= ""; foreach ($dadosField as $k => $value) { if ($k == 'por_resp') { - $linhas .= sprintf("%s%%", $value, $dataPesquisa["num_resp"] ?? number_format(($dataPesquisa["num_resp"] / $somaResp) * 100.0, 2, ',', '.')); + $linhas .= sprintf("%s%%", $value, number_format(($dataPesquisa["num_resp"] / $somaResp) * 100.0, 2, ',', '.')); } else { $linhas .= sprintf("%s", $value, $dataPesquisa["$k"]); } } $linhas .= ""; } - $linhas .= sprintf("Total$somaResp%s", $somaResp ?? number_format(($somaResp / $somaResp) * 100.0, 2, ',', '.') . '%'); + $linhas .= sprintf("Total$somaResp%s", number_format(($somaResp / $somaResp) * 100.0, 2, ',', '.') . '%'); $x++; @@ -541,10 +492,10 @@ $dataQst[$z]['po_opcao'] = $data['po_opcao']; $dataQst[$z]['num_resp'] = $data['num_resp']; $dataQst[$z]['po_tecla'] = $data['po_tecla']; - $dataQst[$z]['por_resp'] = $data["num_resp"] ?? number_format(($data["num_resp"] / $somaTotalQtd) * 100.0, 2, ',', '.') . '%'; + $dataQst[$z]['por_resp'] = number_format(($data["num_resp"] / $somaTotalQtd) * 100.0, 2, ',', '.') . '%'; $z++; } - $totalizador = array('Total: ', $row['pq_questao'], 'Resp.: ' . $somaTotalQtd, $somaTotalQtd ?? number_format(($somaTotalQtd / $somaTotalQtd) * 100.0, 2, ',', '.') . '%'); + $totalizador = array('Total: ', $row['pq_questao'], 'Resp.: ' . $somaTotalQtd, number_format(($somaTotalQtd / $somaTotalQtd) * 100.0, 2, ',', '.') . '%'); $tables[] = array($dadosCabecalio, $dadosField, $dataQst, $widthHeader, $totalizador, 0); $x++; unset($dataQst); @@ -621,4 +572,5 @@ } $relPesquisaAgt = new RelPesquisaAgente($idProg, $dbcon, 1); - $relPesquisaAgt->ExecutaRelatorio(); \ No newline at end of file + $relPesquisaAgt->ExecutaRelatorio(); + \ No newline at end of file diff --git a/cadastros/pesquisa/pesquisaRelAudio.php b/cadastros/pesquisa/pesquisaRelAudio.php index 653b510..9c80f93 100644 --- a/cadastros/pesquisa/pesquisaRelAudio.php +++ b/cadastros/pesquisa/pesquisaRelAudio.php @@ -1,4 +1,5 @@ ___protocolo = isset($_POST['protocolo']) ? $_POST['protocolo'] : ''; $this->___matricula = isset($_POST["matricula"]) ? $_POST["matricula"] : 0; $this->___opcResposta = isset($_POST["lstOpcoes"]) ? $_POST["lstOpcoes"] : -1; - $this->___servico = isset($_POST["listaServico"]) ? $_POST["listaServico"] : 0; $this->___GetRelAudio(); } @@ -102,10 +101,9 @@ $filtro .= ""; if ($this->GetIncDac()) $filtro .= 'Fila'; - $filtro .= GetUsoServico() ? 'Serviço' : ''; - $filtro .= 'Agente '; $filtro .= 'Data Inicial'; $filtro .= 'Data Final '; + $filtro .= 'Agente '; $filtro .= 'Protocolo'; $filtro .= ' '; $filtro .= ''; @@ -116,12 +114,9 @@ $filtro .= ''; if ($this->GetIncDac()) $filtro .= sprintf('%s', $dacs); - if (GetUsoServico()) { - $filtro .= sprintf('%s', GetIdentRota(false, $this->___servico)); - } - $filtro .= ""; $filtro .= ''; $filtro .= ''; + $filtro .= ""; $filtro .= ""; $filtro .= ''; $filtro .= '%s'; @@ -149,8 +144,6 @@ $datas = $this->___datas; $protocolo = $this->___protocolo; $matricula = $this->___matricula; - $srv = $this->___servico; - $mostraColunaServicos = GetUsoServico() == RELATORIO_SERVICOS_HABILITA; GetDadosPesq($dbcon, $this->___lstPesquisa, $plId, $plDescricao, $ppId, $ppNome, $datas); @@ -164,20 +157,14 @@ LEFT JOIN pbx_protocolo_reg d ON d.uniqueid = a.uniqueid INNER JOIN pbx_pesquisa e ON e.pp_id = a.pp_id INNER JOIN pbx_dacs f ON f.id = a.id_dac - INNER JOIN pbx_pesquisa_opcoes g ON g.pp_id = a.pp_id AND g.po_id = a.po_id\n"; - - if (GetUsoServico()) { - $query .= " LEFT JOIN pbx_servicos_registra s ON s.uniqueid = a.uniqueid \n"; - } - - $query .= " + INNER JOIN pbx_pesquisa_opcoes g ON g.pp_id = a.pp_id AND g.po_id = a.po_id WHERE b.lastapp <> 'Transferred Call' AND COALESCE(b.userfield, '') <> '' AND duration > 0 AND evento IN ('COMPLETEAGENT','COMPLETECALLER', 'TRANSFER','COMPLETEAGENTRAMAL','COMPLETECALLERRAMAL', 'COMPLETACALLER', 'COMPLETAAGENT') "; if (!$protocolo) { - $query .= "AND a.id_dac = '$dac' + $query .= "AND a.id_dac = '$dac' AND a.pp_id = '$ppId' AND a.pm_data >= '$dataIni' AND a.pm_data <= '$dataFim' "; @@ -195,18 +182,15 @@ $query .= "AND d.protocolo = '$protocolo' "; } - if (GetUsoServico() && $srv) { - $query .= " AND s.serv_id = '{$srv}' \n"; - } - $query .= " ORDER BY c.nome, a.pm_data"; - + $result = $this->___GetQuery($query); $row = pg_fetch_all($result); $this->SetData($row ? $row : array()); } protected function ___PreparaCsv() { + global $dbcon; $dataRel = array(); $filtro = $this->___FiltrosRelatorio(); @@ -229,6 +213,8 @@ * Linhas de dados. */ foreach ($this->GetData()[0] as $row) { +; + $dac = GetDacDesc($dbcon, $this->___dac); $downloadAudio = VerificaPerfilAcesso($dbcon, GetIdProgFromNomeArq('downloadAudio.php')); $acessoAudio = GetAcessoAudio($dac); @@ -238,8 +224,7 @@ } else { $msgAudio = sprintf("[ %s ]", RemoveAcentos($row['userfield'])); } - - $row['src'] = ocultarTelefone($row['src']); + $row['agente'] = RemoveAcentos($row['agente']); $row['pm_data'] = date('d/m/Y', strtotime($row['pm_data'])); $row['protocolo'] = $row['protocolo'] ? $row['protocolo'] : ' ---- '; @@ -261,6 +246,10 @@ $dataRel = array(); $filtro = $this->___FiltrosRelatorio(); + /* + * Inicia o relatório. + */ + /* * Cria os filtros */ @@ -309,7 +298,6 @@ $msgAudio = sprintf("[ %s ]", RemoveAcentos($row['userfield'])); } - $row['src'] = ocultarTelefone($row['src']); $row['agente'] = RemoveAcentos($row['agente']); $row['pm_data'] = date('d/m/Y', strtotime($row['pm_data'])); $row['protocolo'] = $row['protocolo'] ? $row['protocolo'] : ' ---- '; @@ -327,6 +315,7 @@ } protected function ___PreparaGrid() { + global $dbcon, $infoDispositivo; $dataRel = array(); @@ -375,9 +364,10 @@ */ $total = 0; foreach ($this->GetData()[0] as $row) { - $row['src'] = ocultarTelefone($row['src']); + $row['pm_data'] = date('d/m/Y', strtotime($row['pm_data'])); $row['protocolo'] = $row['protocolo'] ? $row['protocolo'] : ' ---- '; + $dac = GetDacDesc($dbcon, $this->___dac); $downloadAudio = VerificaPerfilAcesso($dbcon, GetIdProgFromNomeArq('downloadAudio.php')); $acessoAudio = GetAcessoAudio($dac); @@ -454,6 +444,7 @@ $widthHeader = array(15, 37, 37, 10, 15, 45); foreach ($dados as $row) { + $dac = GetDacDesc($dbcon, $this->___dac); $downloadAudio = VerificaPerfilAcesso($dbcon, GetIdProgFromNomeArq('downloadAudio.php')); $acessoAudio = GetAcessoAudio($dac); @@ -466,7 +457,7 @@ $dataQst[$z]['pm_data'] = date('d/m/Y', strtotime($row['pm_data'])); $dataQst[$z]['agente'] = $row['agente']; - $dataQst[$z]['src'] = ocultarTelefone($row['src']); + $dataQst[$z]['src'] = $row['src']; $dataQst[$z]['protocolo'] = $row['protocolo'] ? $row['protocolo'] : ' ---- '; $dataQst[$z]['po_opcao'] = $row['po_opcao']; $dataQst[$z]['userfield'] = $msgAudio; diff --git a/include/configBd.php b/include/configBd.php index 905f9ba..25beebf 100755 --- a/include/configBd.php +++ b/include/configBd.php @@ -1,9 +1,9 @@ $value) { - if (!in_array($value[0], $permissions) && ($value[0] != '112')) { - unset($menuUsuario[$key]); + if(!IsAdmin()){ + $permissions = existLicense($conn); + foreach ($menuUsuario as $key => $value) { + if (!in_array($value[0], $permissions) && ($value[0] != '112')) { + unset($menuUsuario[$key]); + } } } @@ -650,7 +650,7 @@ function GetIdSysAdmin($dbcon) { } function __GetLoginFromId($id) { - if ($id < 0) { + if ($id && $id < 0) { $gpId = abs($id); $query = "select gp_nome from pbx_grupo where gp_id = '$gpId'"; } else { @@ -1135,6 +1135,7 @@ function GetDispProgSel($idProg) { $dispProgSel[356] = 'SimplesChat'; $dispProgSel[358] = 'Dashboard'; $dispProgSel[365] = 'Recebidas Agente/Serviços'; + $dispProgSel[366] = 'Relatório Chamadas Geral'; $dispProgSel[10001] = "Cadastro de Agentes PBX"; $dispProgSel[10002] = "Cadastro de Filas"; @@ -1916,7 +1917,7 @@ function SetModuAtendimentoDefault() { } function GetVersao() { - return "1.7.11.12"; + return "1.8.1"; } function GetEncType($upload) { diff --git a/include/util/funcoesInternas.php b/include/util/funcoesInternas.php index 5664b60..9400a95 100755 --- a/include/util/funcoesInternas.php +++ b/include/util/funcoesInternas.php @@ -159,7 +159,7 @@ $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_ $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(153,'relatorios/callcenter/metas/metricasAnualImp.php',152,0,1)"; $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(154,'relatorios/callcenter/geral/relClassificacaoMensal.php',154,0,0)"; $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(155,'relatorios/callcenter/geral/relClassificacaoMensalImp.php',154,0,1)"; -$funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(156,'agente/agentert.php',156,0,0)"; +//$funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(156,'agente/agentert.php',156,0,0)"; $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(157,'agente/monitorAgente.php',-1,9,1)"; $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(158,'agente/monitorAgente.php',-1,9,1)"; $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(159,'relatorios/pbx/chamadasSaintes/totalizadorCentroCusto.php',159,0,0)"; @@ -253,7 +253,7 @@ $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_ $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(281,'seguranca/grupos/grupoRevendas.php',23,0,0)"; $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(282,'vendas/funilVendasDetalhes.php',280,0,0)"; $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(283,'vendas/rejeitadosVendas.php',6,0,0)"; -$funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(284,'agente/agenteMesa.php',284,0,0)"; +//$funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(284,'agente/agenteMesa.php',284,0,0)"; $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(285,'vendas/grupoVendas.php',285,0,0)"; $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(286,'vendas/grupoVendasCad.php',285,0,0)"; $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(287,'vendas/grupoVendasEmpresas.php',285,0,0)"; @@ -334,6 +334,8 @@ $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_ $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(362,'seguranca/licencaUsuarioFixo.php',21,0,0)"; $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(363,'agente/complementoCampanha.php',14,0,0)"; $funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(364,'admLgpd.php',364,0,0)"; +$funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(365,'downloadRel.php',365,0,0)"; +$funcosInternas[] = "insert into pbx_funcoes_internas(id_prog, arquivo, id_prog_pai, status, exit)values(366,'relatorios/custom/relChamadaGeral.php',366,0,0)"; diff --git a/projeto/base/sql/versao-1.8.1.sql b/projeto/base/sql/versao-1.8.1.sql new file mode 100644 index 0000000..4c45b65 --- /dev/null +++ b/projeto/base/sql/versao-1.8.1.sql @@ -0,0 +1,3 @@ +-- Correcao dados tipo preco +update pbx_tarifa_tipo_preco set ttp_descricao = 'Móvel Local' where ttp_id = 'vc3'; +update pbx_tarifa_tipo_preco set ttp_descricao = 'Móvel Interurbano' where ttp_id = 'vc4'; \ No newline at end of file diff --git a/recuperarsenha.php b/recuperarsenha.php index 017a94c..29161a8 100644 --- a/recuperarsenha.php +++ b/recuperarsenha.php @@ -15,6 +15,11 @@ } $account = verificaEmail($dbcon, $email); + + if(!$account){ + throw new Exception("O email informado não foi encontrado!"); + } + $token = md5($account['id'] . $account['matricula'] . time()); $_SESSION['SSREcoveryPassword'] = ['token' => $token, 'id' => $account['id'], 'login' => $account['apelido']]; diff --git a/relatorios/custom/relChamadaGeral.php b/relatorios/custom/relChamadaGeral.php new file mode 100644 index 0000000..df98dc6 --- /dev/null +++ b/relatorios/custom/relChamadaGeral.php @@ -0,0 +1,600 @@ +__agente = isset($_POST["listaAgente"]) ? $_POST["listaAgente"] : ''; + $this->__tipoLigacao = isset($_POST["tipoLigacao"]) ? $_POST["tipoLigacao"] : 0; + $this->__filtro = isset($_POST["filtro"]) ? $_POST["filtro"] : ''; + $this->__classificacao = isset($_POST["classificacao"]) ? $_POST["classificacao"] : ''; + $this->__pesquisa = isset($_POST["pesquisa"]) ? $_POST["pesquisa"] : ''; + } + + function ___FiltrosRelatorio() { + + if ($this->___media != MEDIA_PRINT_GRID) { + /* + * Recupera os filtros da sessão do usuário. + */ + list($this->___dac, $this->___dataIni, $this->___dataFim, $this->___tipoRelatorio, $this->___agente, $this->__classificacao, $this->__pesquisa) = $_SESSION["SSstorageFiltros"]; + + if ($this->___media == MEDIA_PRINT_HTML) { + $fila = $this->GetIncDac() ? 'Fila: ' . GetDacDesc($this->GetDbCon(), $this->GetIdProg() . ' ') : ''; + return sprintf("%sData Inicial: %s Data Final: %s Tipo: %s", $fila, $this->___dataIni, $this->___dataFim, ($this->___tipoRelatorio ? 'Analítico' : 'Sintético')); + } + + $fltCsv = array(); + if ($this->GetIncDac()) { + $fltCsv[] = 'Fila:' . GetDacDesc($this->GetDbCon(), $this->___dac); + } + $fltCsv[] = "Data Inicial:" . $this->___dataIni; + $fltCsv[] = "Data Final:" . $this->___dataFim; + $fltCsv[] = "Data Emissao:" . date('d/m/Y H:i:s'); + $fltCsv[] = "Emitido Por:" . GetLogin(); + return $fltCsv; + } + + if ($this->GetIncDac()) { + $dacs = GetDac($this->GetDbCon(), $this->___dac, "", 0, 1, 0, 0, 1); + } + + $agentes = $this->getAgentes(); + + $lkPrint = ""; + if ($this->___dataCount) { + $prt = 'Clique aqui para imprimir!'; + $prtHtml = "\"Clique"; + $lkPrint .= sprintf($prtHtml, $this->GetidProg(), MEDIA_PRINT_HTML, $this->___tipoRelatorio, substr(LimpaString(GetDispProgSel($this->GetIdProg())), 0, 20), 'print.gif'); + $lkPrint .= sprintf($prt, $this->GetidProg(), MEDIA_PRINT_EXCEL, $this->___tipoRelatorio, 'prt-xls.png'); + $lkPrint .= sprintf($prt, $this->GetidProg(), MEDIA_PRINT_PDF, $this->___tipoRelatorio, 'prt-pdf.png'); + $lkPrint .= sprintf($prt, $this->GetidProg(), MEDIA_PRINT_CSV, $this->___tipoRelatorio, 'prt-csv.png'); + } + + $tipoRel = !$this->___tipoRelatorio ? '' : 'checked="checked"'; + /* + * Personalise esta funcao se necessitar de outras opcoes de filtro. + */ + $filtro = ''; + /* + * Rotulos. + */ + $filtro .= ''; + $filtro .= ''; + $filtro .= ''; + if ($this->GetIncDac()){ + $filtro .= ''; + } + $filtro .= ''; + $filtro .= ''; + + $class = $this->__classificacao ? "checked" : ''; + $pesq = $this->__pesquisa ? "checked" : ''; + + $filtro .= sprintf('', $class, $pesq); + $filtro .= ''; + + /* + * Valores. + */ + $filtro .= ''; + $filtro .= ''; + $filtro .= ''; + if ($this->GetIncDac()){ + $filtro .= sprintf('', $dacs); + } + $filtro .= ""; + $filtro .= sprintf('', $this->__filtro); + + $entrada = $this->__tipoLigacao == 2 ? "checked" : ""; + $saida = $this->__tipoLigacao == 3 ? "checked" : ""; + $ambos = $this->__tipoLigacao == 0 ? "checked" : ""; + + $filtro .= sprintf('', $entrada, $saida, $ambos); + $filtro .= ''; + $filtro .= ''; + $filtro .= ''; + $filtro .= '
Data InicialData Final FilaAgenteFiltro' + . '' + . '' + . '
' + . '
' + . ' Classificação  ' + . ' Pesquisa  ' + . '
' + . '
%s$agentes' + . '
' + . 'Entrada  ' + . 'Saída  ' + . 'Ambos' + . '
' + . '
%s
'; + + /* + * Guarda os filtros passados para recuperar na emissão dos relatóios para impressão. + */ + $_SESSION["SSstorageFiltros"] = array($this->___dac, $this->___dataIni, $this->___dataFim, $this->___tipoRelatorio, $this->___agente, $this->__classificacao, $this->__pesquisa); + + return sprintf($filtro, $this->___dataIni, $this->___dataFim, $lkPrint); + } + + protected function ___GetDadosDb() { + $dataIni = FormatDtMssql($this->___dataIni); + $dataFim = FormatDtMssql($this->___dataFim); + + $classificacao = $this->__classificacao ? "LEFT JOIN (SELECT id_bilhetes, STRING_AGG(remove_acentos(clas_descricao || ' -> ' || clit_descricao) , '; ' ORDER BY cr.clas_id) AS classificacao + FROM pbx_classifica_reg cr + INNER JOIN pbx_classifica_atendimento ca ON cr.clas_id = ca.clas_id + INNER JOIN pbx_classifica_item ci ON cr.clit_id = ci.clit_id + WHERE data_reg::DATE >= '$dataIni' AND data_reg::DATE <= '$dataFim' + GROUP BY id_bilhetes) AS class ON class.id_bilhetes = a.uniqueid": ''; + + $pesquisa = $this->__pesquisa ? "LEFT JOIN (SELECT a.uniqueid, STRING_AGG(remove_acentos(pq_questao || ' -> ' || po_opcao) , '; ' ORDER BY po_display) AS pesquisa + FROM pbx_pesquisa_movimento a + INNER JOIN pbx_pesquisa_questoes b ON b.pp_id = a.pp_id AND b.pq_id = a.pq_id + INNER JOIN pbx_pesquisa_opcoes c ON c.pp_id = b.pp_id AND c.pq_id = b.pq_id AND c.po_id = a.po_id + INNER JOIN pbx_pesquisa_regitra d ON d.uniqueid = a.uniqueid + INNER JOIN pbx_pesquisa e ON e.pp_id = a.pp_id + WHERE a.data_reg::DATE >= '$dataIni' AND a.data_reg::DATE <= '$dataFim' + GROUP BY a.uniqueid) AS pesq ON pesq.uniqueid = a.uniqueid" : ''; + + + $columnPesq = $this->__pesquisa ? "pesquisa," : ""; + $columnClass = $this->__classificacao ? "classificacao," : ""; + + $query = "SELECT calldate, protocolo, src, dst, tplg_descricao, + CASE WHEN(ed.evento = 'ABANDON')THEN strtoint(ed.param3) ELSE a.billsec END AS tempo_atendimento, + userfield, fila, apelido, evento, $columnClass $columnPesq + REPLACE(SUBSTRING(retorno_cliente, POSITION('||' in retorno_cliente), 99999), '||', '') AS dados_cliente, + CASE WHEN (abdsr_agente IS NOT NULL) THEN 'RETORNADA' ELSE '-' END AS retorno_abd + FROM pbx_bilhetes a + LEFT JOIN pbx_eventos_dacs ed ON a.uniqueid = ed.uid2 AND evento IN ('COMPLETAAGENT','COMPLETACALLERRAMAL','COMPLETACALLER','COMPLETECALLERRAMAL','COMPLETEAGENT','COMPLETEAGENTRAMAL','COMPLETECALLER','ABANDON') + LEFT JOIN pbx_usuarios us ON us.matricula = substring(ed.agente,7,4) + LEFT JOIN pbx_protocolo_reg pr ON pr.uniqueid = a.uniqueid + LEFT JOIN pbx_tipo_ligacao tp ON tp.tplg_codigo = a.tipo_chamada + $classificacao + $pesquisa + LEFT JOIN pbx_abandonadas_semretorno asr ON asr.abdsr_uniqueid = a.uniqueid + LEFT JOIN pbx_integracao_reg ir ON ir.reg_uniqueid = a.uniqueid + LEFT JOIN pbx_queues_grupos qg ON qg.nome = ed.fila + WHERE calldate::DATE >= '$dataIni' AND calldate::DATE <= '$dataFim' + AND a.lastapp NOT IN ('Transferred Call','Playback','BackGround', 'AppDial2', 'Goto') "; + + if($this->__filtro){ + $query .= "AND ((src LIKE '%{$this->__filtro}%') OR (dst LIKE '%{$this->__filtro}%') OR (protocolo::VARCHAR LIKE '%{$this->__filtro}%')) "; + } + + if($this->___dac){ + $query .= "AND qg.id = {$this->___dac} "; + } + + if($this->__tipoLigacao){ + $query .= "AND tplg_tipo = {$this->__tipoLigacao} "; + } + + $query .= "ORDER BY a.uniqueid"; + + $result = $this->___GetQuery($query); + $row = pg_fetch_all($result); + $this->SetData($row ? $row : array()); + } + + protected function ___PreparaCsv() { + $dataRel = array(); + $filtro = $this->___FiltrosRelatorio(); + + /* + * Inicia o relatório. + */ + $dataRel[] = GenerateCsvFromArray($filtro); + + $dadosCabecalio = array( + 'Data Hora', + 'Tipo', + 'Protocolo', + 'Origem', + 'Destino', + 'Duração', + 'Fila', + 'Agente', + 'Status', + 'Retornada ABD.', + ); + + $this->__classificacao ? $dadosCabecalio[] = 'Classificação' : ''; + $this->__pesquisa ? $dadosCabecalio[] = 'Pesquisa' : ''; + + $dadosField = array( + 'calldate', + 'tplg_descricao', + 'protocolo', + 'src', + 'dst', + 'tempo_atendimento', + 'fila', + 'apelido', + 'evento', + 'retorno_abd' + ); + + $this->__classificacao ? $dadosField[] = 'classificacao' : ''; + $this->__pesquisa ? $dadosField[] = 'pesquisa' : ''; + + /* + * Monta a linha de cabecalio. + */ + $dataRel[] = GenerateCsvFromArray($dadosCabecalio); + + /* + * Linhas de dados. + */ + foreach ($this->GetData()[0] as $row) { + $row['calldate'] = date('d/m/Y H:i:s', strtotime($row['calldate'])); + $row['tempo_atendimento'] = SecondToStrTime($row["tempo_atendimento"]); + $row['retorno_abd'] = $row["retorno_abd"] ? $row["retorno_abd"] : '-'; + $row['evento'] = $this->__statusEventos($row['evento']); + + $row['protocolo'] = $row['protocolo'] ? $row['protocolo'] : '-'; + $row['apelido'] = $row['apelido'] ? $row['apelido'] : '-'; + $row['classificacao'] = $row['classificacao'] ? RemoveAcentos($row['classificacao']) : '-'; + $row['pesquisa'] = $row['pesquisa'] ? RemoveAcentos($row['pesquisa']) : '-'; + // Formata linha de dados. + $linha = array(); + foreach ($dadosField as $value) { + $linha[] = $row["$value"]; + } + + $dataRel[] = GenerateCsvFromArray($linha); + } + $dataRel[] = GenerateCsvFromArray(array('Total', '')); + + $this->___dataRel[] = $dataRel; + } + + protected function ___PreparaExcel() { + $dataRel = array(); + $filtro = $this->___FiltrosRelatorio(); + + /* + * Inicia o relatório. + */ + + /* + * Cria os filtros + */ + $linha = array('LABEL'); + foreach ($filtro as $values) { + list($label, $value) = explode(":", $values); + $linha[] = $label; + } + $dataRel[] = $linha; + + $linha = array('DADOS'); + foreach ($filtro as $values) { + list($label, $value) = explode(":", $values); + $linha[] = $value; + } + + $dataRel[] = $linha; + + $dadosCabecalio = array( + 'Data Hora', + 'Tipo', + 'Protocolo', + 'Origem', + 'Destino', + 'Duracao', + 'Fila', + 'Agente', + 'Status', + 'Retornada ABD.', + ); + + $this->__classificacao ? $dadosCabecalio[] = 'Classificacao' : ''; + $this->__pesquisa ? $dadosCabecalio[] = 'Pesquisa' : ''; + + $dadosField = array( + 'calldate', + 'tplg_descricao', + 'protocolo', + 'src', + 'dst', + 'tempo_atendimento', + 'fila', + 'apelido', + 'evento', + 'retorno_abd' + ); + + $this->__classificacao ? $dadosField[] = 'classificacao' : ''; + $this->__pesquisa ? $dadosField[] = 'pesquisa' : ''; + + /* + * Monta a linha de cabecalio. + */ + $linha = array('LABEL'); + foreach ($dadosCabecalio as $value) { + $linha[] = $value; + } + $dataRel[] = $linha; + + /* + * Linhas de dados. + */ + foreach ($this->GetData()[0] as $row) { + $row['calldate'] = date('d/m/Y H:i:s', strtotime($row['calldate'])); + $row['tempo_atendimento'] = SecondToStrTime($row["tempo_atendimento"]); + $row['retorno_abd'] = $row["retorno_abd"] ? $row["retorno_abd"] : '-'; + $row['evento'] = $this->__statusEventos($row['evento']); + + $row['protocolo'] = $row['protocolo'] ? $row['protocolo'] : '-'; + $row['apelido'] = $row['apelido'] ? $row['apelido'] : '-'; + $row['classificacao'] = $row['classificacao'] ? RemoveAcentos($row['classificacao']) : '-'; + $row['pesquisa'] = $row['pesquisa'] ? RemoveAcentos($row['pesquisa']) : '-'; + // Formata linha de dados. + $linha = array('DADOS'); + foreach ($dadosField as $key) { + $linha[] = $row["$key"]; + } + + $dataRel[] = $linha; + } + + $dataRel[] = array('LABEL', 'Total'); + + $this->___dataRel[] = $dataRel; + } + + protected function ___PreparaGrid() { + $dataRel = array(); + + $dadosCabecalio = array( + 'Data Hora' => 'align="center"', + 'Tipo' => 'align="center"', + 'Protocolo' => 'align="center"', + 'Origem' => 'align="center"', + 'Destino' => 'align="center"', + 'Duração' => 'align="center"', + 'Fila' => 'align="center"', + 'Agente' => 'align="center"', + 'Status' => 'align="center"', + 'Retornada ABD.' => 'align="center"', + ); + + $this->__classificacao ? $dadosCabecalio['Classificação'] = 'align="center"' : ''; + $this->__pesquisa ? $dadosCabecalio['Pesquisa'] = 'align="center"' : ''; + + $dadosField = array( + 'calldate' => 'align="center"', + 'tplg_descricao' => 'align="center"', + 'protocolo' => 'align="center"', + 'src' => 'align="center"', + 'dst' => 'align="center"', + 'tempo_atendimento' => 'align="center"', + 'fila' => 'align="center"', + 'apelido' => 'align="center"', + 'evento' => 'align="center"', + 'retorno_abd' => 'align="center"' + ); + + $this->__classificacao ? $dadosField['classificacao'] = 'align="center"' : ''; + $this->__pesquisa ? $dadosField['pesquisa'] = 'align="center"' : ''; + /* + * Inicia o relatório. + */ + $dataRel[] = ''; + + /* + * Monta a linha de cabecalio. + */ + $linha = ''; + foreach ($dadosCabecalio as $key => $value) { + $linha .= sprintf("", $value, $key); + } + $linha .= ""; + $dataRel[] = $linha; + + /* + * Verifica se retornou dados + */ + if (!IsPostBack() || !count($this->GetData()[0])) { + $dataRel[] = sprintf("
%s
%s
", count($dadosCabecalio), (!IsPostBack() ? 'Informe os parametros e clique em consultar!' : 'Nenhum registro encontado!')); + $this->___dataRel[] = $dataRel; + return; + } + + /* + * Linhas de dados. + */ + foreach ($this->GetData()[0] as $row) { + $row['calldate'] = date('d/m/Y H:i:s', strtotime($row['calldate'])); + $row['tempo_atendimento'] = SecondToStrTime($row["tempo_atendimento"]); + $row['retorno_abd'] = $row["retorno_abd"] ? $row["retorno_abd"] : '-'; + $row['evento'] = $this->__statusEventos($row['evento']); + + $row['protocolo'] = $row['protocolo'] ? $row['protocolo'] : '-'; + $row['apelido'] = $row['apelido'] ? $row['apelido'] : '-'; + $row['classificacao'] = $row['classificacao'] ? $row['classificacao'] : '-'; + $row['pesquisa'] = $row['pesquisa'] ? $row['pesquisa'] : '-'; + // Formata linha de dados. + $linha = ""; + foreach ($dadosField as $key => $value) { + $linha .= sprintf("%s", $value, $row["$key"]); + } + $linha .= ""; + $dataRel[] = $linha; + } + /* + * Linha de totalizacao. + */ + $linha = 'Total%s%s%s%s%s%s%s'; + $dataRel[] = sprintf($linha, ''); + + /* + * Fecha relatorio. + */ + $dataRel[] = ''; + $this->___dataRel[] = $dataRel; + } + + protected function ___PreparaHtml() { + + } + + protected function ___PreparaPdf() { + list($this->___dac, $this->___dataIni, $this->___dataFim, $this->___tipoRelatorio, $this->___agente, $this->__classificacao, $this->__pesquisa) = $_SESSION["SSstorageFiltros"]; + $this->settype("L"); + /** + * TABELA DADOS PRINCIPAIS + */ + $dadosCabecalio = array( + 'Data Hora' => 'C', + 'Tipo' => 'C', + 'Protocolo' => 'C', + 'Origem' => 'C', + 'Destino' => 'C', + 'Duração' => 'C', + 'Fila' => 'C', + 'Agente' => 'C', + 'Status' => 'C', + 'Retornada ABD.' => 'C', + ); + + $this->__classificacao ? $dadosCabecalio['Classificação'] = 'C' : ''; + $this->__pesquisa ? $dadosCabecalio['Pesquisa'] = 'C' : ''; + + $dadosField = array( + 'calldate' => 'C', + 'tplg_descricao' => 'C', + 'protocolo' => 'C', + 'src' => 'C', + 'dst' => 'C', + 'tempo_atendimento' => 'C', + 'fila' => 'C', + 'apelido' => 'C', + 'evento' => 'C', + 'retorno_abd' => 'C' + ); + + $this->__classificacao ? $dadosField['classificacao'] = 'C' : ''; + $this->__pesquisa ? $dadosField['pesquisa'] = 'C' : ''; + + $dados = $this->GetData()[0]; + $x = 0; + foreach ($dados as $row) { + $dados[$x]['calldate'] = date('d/m/Y H:i:s', strtotime($row['calldate'])); + $dados[$x]['tempo_atendimento'] = SecondToStrTime($row["tempo_atendimento"]); + $dados[$x]['retorno_abd'] = $row["retorno_abd"] ? $row["retorno_abd"] : '-'; + $dados[$x]['evento'] = $this->__statusEventos($row['evento']); + + $dados[$x]['protocolo'] = $row['protocolo'] ? $row['protocolo'] : '-'; + $dados[$x]['apelido'] = $row['apelido'] ? $row['apelido'] : '-'; + $dados[$x]['classificacao'] = $row['classificacao'] ? $row['classificacao'] : '-'; + $dados[$x]['pesquisa'] = $row['pesquisa'] ? $row['pesquisa'] : '-'; + $x++; + } + + $widthHeader = array(25, 28, 17, 17, 17, 17, 23, 18, 35, 20); + $this->__classificacao ? $widthHeader[] = 30 : ''; + $this->__pesquisa ? $widthHeader[] = 30 : ''; + $totalizador = array('Total' , ''); + //Monta o array para passar para o prepara; Necessário passar 6 parametros + $table1 = array($dadosCabecalio, $dadosField, $dados, $widthHeader, $totalizador, 1); + + $this->___dataRel = array($table1); + } + + protected function getAgentes() { + $sel = $this->__agente ? '' : 'selected'; + $agentes = ""; + return $agentes; + } + + public function __statusEventos($status){ + // 'COMPLETECALLER', 'COMPLETEAGENTRAMAL' + $eventos = [ + 'COMPLETAAGENT' => "ATENDIDA - DESL. AGENTE", + 'COMPLETACALLERRAMAL' => "ATENDIDA - DESL. CLIENTE", + 'COMPLETACALLER' => "ATENDIDA - DESL. CLIENTE", + 'COMPLETECALLERRAMAL' => "ATENDIDA - DESL. CLIENTE", + 'COMPLETEAGENT' => "ATENDIDA - DESL. AGENTE", + 'COMPLETEAGENTRAMAL' => "ATENDIDA - DESL. AGENTE", + 'COMPLETECALLER' => "ATENDIDA - DESL. CLIENTE", + 'ABANDON' => "ABANDONADA", + 'TRANSFER' => "TRANSFERIDA", + 'BUSY' => "OCUPADA", + ]; + + return $eventos[$status]; + } + + public function ExecutaRelatorio() { + global $jsStartup, $jsJQuery, $smarty; + try { + /* + * Use esta função para validar dados do formulário. + */ + $this->___ValidaForm(); + + /* + * Recupera os dados do banco. + */ + $this->___ConteudoRelatorio(); + + /* + * Imprime relatório de acordo com a media passada. + */ + $conteudoRelatorio = $this->___ImprimeRelatorio(); + } catch (Exception $exc) { + $this->SetMsg($exc->getMessage()); + $jsStartup[] = sprintf("alert('%s');", $this->GetMsg()); + $this->___GravaLog(); + } + + /* + * Inclua os scripts necessários aqui. + */ + $jsJQuery[] = "\$('#dataIni').keypress(function(){formataDataHora(this);}) "; + $jsJQuery[] = "\$('#dataFim').keypress(function(){formataDataHora(this);}) "; + + $smarty->assign('filtros', $this->___FiltrosRelatorio()); + $smarty->assign('conteudo', $conteudoRelatorio); + $smarty->assign('msg', $this->GetMsg()); + GetTemplate($smarty, 'relatoriosGrid.tpl'); + } + + } + + $relChamadasGeral = new RelChamadasGeral($idProg, $dbcon, 1); + $relChamadasGeral->ExecutaRelatorio(); +?> diff --git a/relatorios/pbx/chamadasSaintes/saintesCentroCusto.php b/relatorios/pbx/chamadasSaintes/saintesCentroCusto.php index 32c0e50..0870cb8 100644 --- a/relatorios/pbx/chamadasSaintes/saintesCentroCusto.php +++ b/relatorios/pbx/chamadasSaintes/saintesCentroCusto.php @@ -29,7 +29,7 @@ GeraExcept('Informe uma empresa!'); } if (!$this->___tempoDuracao) { - GeraExcept('Informe um tempo de duração!'); + GeraExcept('Informe um tempo de duração!'); } } @@ -37,7 +37,7 @@ global $dbcon; if ($this->___media != MEDIA_PRINT_GRID) { /* - * Recupera os filtros da sess�o do usu�rio. + * Recupera os filtros da sess�o do usu�rio. */ list($this->___dataIni, $this->___dataFim, $this->___listaDptos, $this->___listaEmpresa, $this->___tempoDuracao) = $_SESSION["SSstorageFiltros"]; @@ -64,7 +64,7 @@ } /* - * Personalise esta função se necessitar de outras opções de filtro. + * Personalise esta função se necessitar de outras opções de filtro. */ $filtro = ''; /* @@ -76,7 +76,7 @@ $filtro .= ''; $filtro .= ''; $filtro .= ''; - $filtro .= ''; + $filtro .= ''; $filtro .= ''; $filtro .= ''; @@ -100,7 +100,7 @@ $filtro .= '
Data Final Empresa Depto. DuraçãoDuração 
'; /* - * Guarda os filtros passados para recuperar na emiss�o dos relat?ios para impress�o. + * Guarda os filtros passados para recuperar na emissao dos relatoios para impressao. */ $_SESSION["SSstorageFiltros"] = array($this->___dataIni, $this->___dataFim); @@ -179,7 +179,7 @@ $somaQuantidade = 0; /* - * Inicia o relat�rio. + * Inicia o relat�rio. */ foreach ($this->GetData()[0] as $row) { $somaTempo += $row["duracao"]; @@ -211,7 +211,7 @@ $filtro = $this->___FiltrosRelatorio(); /* - * Inicia o relatório. + * Inicia o relatório. */ /* @@ -278,10 +278,10 @@ $dataAgrup = array(); - $dadosCabecalio = array('Ramal' => 'align="center"', 'Destino' => 'align="center"', 'Conta' => 'align="left"', 'Usuário' => 'align="left"', 'Data/Hora' => 'align="center"', 'Duração' => 'align="center"'); + $dadosCabecalio = array('Ramal' => 'align="center"', 'Destino' => 'align="center"', 'Conta' => 'align="left"', 'Usuário' => 'align="left"', 'Data/Hora' => 'align="center"', 'Duração' => 'align="center"'); $dadosField = array('src' => 'align="center"', 'dst' => 'align="center"', 'matricula' => 'align="left"', 'apelido' => 'align="left"', 'data' => 'align="center"', 'duracao' => 'align="center"'); /* - * Inicia o relat�rio. + * Inicia o relat�rio. */ $dataRel[] = ''; @@ -365,9 +365,9 @@ 'Ramal' => 'C', 'Destino' => 'C', 'Conta' => 'L', - 'Usuário' => 'L', + 'Usuário' => 'L', 'Data/Hora' => 'C', - 'Duração' => 'C' + 'Duração' => 'C' ); $dataHeader = array( 'src' => 'C', @@ -378,9 +378,9 @@ 'duracao' => 'C' ); $widthHeader = array(20, 30, 35, 35, 35, 35); - $totaliza = array('Total', '','', "Registros: " . $somaQtd, '', "Duração: " . SecondToStrTime($somaTempo)); + $totaliza = array('Total', '','', "Registros: " . $somaQtd, '', "Duração: " . SecondToStrTime($somaTempo)); - //Monta o array para passar para o prepara; Necessário passar 6 parametros + //Monta o array para passar para o prepara; Necessário passar 6 parametros $table1 = array($header, $dataHeader, $dados, $widthHeader, $totaliza, 0); $this->___dataRel = array($table1); @@ -390,7 +390,7 @@ global $jsStartup, $jsJQuery, $smarty; try { /* - * Use esta fun��o para validar dados do formul�rio. + * Use esta fun��o para validar dados do formul�rio. */ $this->___ValidaForm(); @@ -400,7 +400,7 @@ $this->___ConteudoRelatorio(); /* - * Imprime relat�rio de acordo com a media passada. + * Imprime relat�rio de acordo com a media passada. */ $conteudoRelatorio = $this->___ImprimeRelatorio(); } catch (Exception $exc) { @@ -410,7 +410,7 @@ } /* - * Inclua os scripts necess�rios aqui. + * Inclua os scripts necess�rios aqui. */ $jsJQuery[] = "\$('#dataIni').keypress(function(){formataDataHora(this);}) "; $jsJQuery[] = "\$('#dataFim').keypress(function(){formataDataHora(this);}) "; diff --git a/scriptApl/functions15.js b/scriptApl/functions15.js index 2c5e9f6..02c23a3 100644 --- a/scriptApl/functions15.js +++ b/scriptApl/functions15.js @@ -249,11 +249,18 @@ function GetDadosAgenteRt() if (GetStatusAjax()) { //Dados retornados em uma string + var listaSuper = $.trim(ajax.responseText); var tb = listaSuper.split('@'); var dadosAgente = new Object(); var checaLogoff = $.trim(tb[0].substr(0, 5).toUpperCase()); var chanellTransf = ''; + + var error = listaSuper.split('@@'); + if(error[0].toUpperCase() == 'ERROR'){ + alert(error[1]) + $('#msg_sis').text(error[1]) + } //document.getElementById('msg_sis').innerHTML = 'Status Logoff: ' + checaLogoff + ' Lista: ' + listaSuper + ' array: ' + tb[0]; if (checaLogoff == 'CLOSE') { diff --git a/scriptApl/supervisorchat.js b/scriptApl/supervisorchat.js index 1611b92..103938e 100644 --- a/scriptApl/supervisorchat.js +++ b/scriptApl/supervisorchat.js @@ -27,148 +27,6 @@ const desconectMesa = async () => { }) } -const finalizarAtendimento = (uniqueid, matricula) => { - $.ajax({ - url: localStorage.getItem('chatserverapi') + '/integracao/media/api/agente/finalizarAtendimento', - type: "POST", - data: JSON.stringify({ - matricula, - uniqueid - }), - success: function (res) { - if (res.status == "success") { - console.log(res) - } - } - }); -} - -const atendimentoAgente = (matricula) => { - - $.ajax({ - url: localStorage.getItem('chatserverapi') + '/integracao/media/api/agente/listarAtendimentoAgente', - type: "POST", - data: JSON.stringify({ - matricula - }), - success: function (res) { - if (res.status == "success") { - const atOn = [] - res.data.forEach((el) => { - let id_unique = el.uniqueid.replace('.', `\\.`) - if (el.evento == 'START' && $("#" + id_unique).length == 0) { - let tipo = el.direcao == 'E' ? 'Entrada' : 'Saída'; - let plataforma = el.context.charAt(0).toUpperCase() + el.context.slice(1); - let dataParse = new Date(el.data_reg).toLocaleString() - const tempo = timeDiffCalc(new Date(el.data_reg), new Date()) - - $('#tableChatAgente tbody').append(` - - - - - - - - - `); - } else if ($("#" + id_unique).length > 0) { - $("#" + id_unique + "_tempo").text(timeDiffCalc(new Date(el.data_reg), new Date())) - } - - if (el.evento == 'START') { - atOn.push(el.uniqueid); - } - }) - - const ids = [] - $("#tableChatAgente tbody").find("tr").each(function () { - ids.push(this.id); - }); - - ids.forEach((el) => { - if (atOn.indexOf(el) < 0) { - $("#" + el.replace('.', `\\.`)).remove() - } - }) - } - } - }); - - setTimeout(() => { - atendimentoAgente(matricula) - }, 1200); -} - -const atualizaStatusAgente = (matricula) => { - $.ajax({ - url: localStorage.getItem('chatserverapi') + '/integracao/media/api/agente/statusAgente', - type: "POST", - data: JSON.stringify({ - matricula - }), - success: function (res) { - if (res.status == "success") { - $('#status_agente').text(() => { - if ($(this).text() != res.data.status) { - return res.data.status - } - }) - - $('#pausa_agente').text(() => { - if ($(this).text() != res.data.motivo_pausa) { - return res.data.motivo_pausa ? res.data.motivo_pausa : '-' - } - }) - - $('#atendimento_agente').text(() => { - if ($(this).text() != res.data.numero_atendimento) { - return res.data.numero_atendimento - } - }) - } - } - }); - - setTimeout(() => { - atualizaStatusAgente(matricula) - }, 3000); -} - -const finalizarAgente = (matricula) => { - $.ajax({ - url: localStorage.getItem('chatserverapi') + '/integracao/media/api/agente/sair', - type: "POST", - data: JSON.stringify({ - matricula - }), - success: function (res) { - if (res.status == "success") { - alert('Agente foi desconectado') - } - } - }); -} - -const sairPausa = (matricula) => { - $.ajax({ - url: localStorage.getItem('chatserverapi') + '/integracao/media/api/agente/sairPausa', - type: "POST", - data: JSON.stringify({ - matricula - }), - success: function (res) { - if (res.status == "success") { - alert('Agente removido de pausa!') - } - } - }); -} - const criarGrid = (data) => { let cont = 0 let line = '' @@ -184,6 +42,11 @@ const criarGrid = (data) => { } cdata++ }) + + if(cont <= 4){ + rline += `${line}` + } + $('#dadosContato').append(rline); } @@ -201,7 +64,7 @@ const HangupCall = (id) => { const AtualizaChamdas = () => { - if(localStorage.getItem('monitorRamaisStatus') != 'OK'){ + if(!localStorage.getItem('monitorRamaisStatus')){ return } @@ -212,7 +75,6 @@ const AtualizaChamdas = () => { if (res) { let lrow = [] let crow = 0 - let status Object.keys(res).forEach((el) => { if (res[el].Status == localStorage.getItem('monitorRamaisStatus') || res[el].Status.indexOf(localStorage.getItem('monitorRamaisStatus')) >= 0) { let direct = '' @@ -229,12 +91,12 @@ const AtualizaChamdas = () => { status = ` INATIVO` } - let tbl = `
${el.profile_name}${el.cliente_id}${plataforma}${dataParse}${tempo}${tipo}${el.protocolo} - - Finalizar atendimento - -
` - if (res[el].CallChannel) { - /** ATIVACAO DO HUNGUP NA TELA DA MESA **/ - //tbl += `` - } - tbl += `
` + // let tbl = `` + // if (res[el].CallChannel) { + // /** ATIVACAO DO HUNGUP NA TELA DA MESA **/ + // tbl += `` + // } + // tbl += `
` lrow.push({ ramal: res[el].ObjectName, @@ -243,7 +105,6 @@ const AtualizaChamdas = () => {

${res[el].Duration} - ${direct}

${status}

${res[el].Status}

- ${tbl} `}) crow++ } diff --git a/scriptApl/utils.js b/scriptApl/utils.js index bd4254c..0c4c986 100644 --- a/scriptApl/utils.js +++ b/scriptApl/utils.js @@ -581,7 +581,7 @@ function limpaEspaco(campo) { function DeletaUser(id, params) { - if (confirm('Esta ação irá excluir o usuário! Deseja continuar?')) + if (confirm('Esta ação irá desabilitar o usuário! Deseja continuar?')) { window.location.href = 'index.php?idProg=21&idDelete=' + id + params; } diff --git a/seguranca/grupos/grupoInsert.php b/seguranca/grupos/grupoInsert.php index 419e8d8..2f95598 100644 --- a/seguranca/grupos/grupoInsert.php +++ b/seguranca/grupos/grupoInsert.php @@ -24,8 +24,8 @@ if ($formAction == FORM_NEW) { $msgUser = "alert('O nome do grupo é campo de preenchimento obrigatório!');"; } else { //string para inserção do registro - $query = "insert into pbx_grupo(gp_nome, gp_status, gp_user) - values(%s, %s, %s)"; + $query = "insert into pbx_grupo(gp_nome, gp_status, gp_user, gp_system) + values(%s, %s, %s, '0')"; GetGpValues(); diff --git a/seguranca/trocaSenha.php b/seguranca/trocaSenha.php index 41dafbd..a3047ea 100644 --- a/seguranca/trocaSenha.php +++ b/seguranca/trocaSenha.php @@ -55,7 +55,7 @@ if (!isset($_POST["senhaAtu"])) { $jsStartup[] = "alert('Não foi possível alterar a senha');"; $jsStartup[] = $setFocus; //registra o login corrente para registrar log de erros do usuario - $siteError->SetLogin(GetLogin()); + //$siteError->SetLogin(GetLogin()); } else { // if(!$siteError->GetNumError()) $jsStartup[] = "alert('Usuário/Senha inválidos ou já foi utilizada recentemente!');"; diff --git a/templates/agendaRamais/depto/deptoRamais.htm b/templates/agendaRamais/depto/deptoRamais.htm index 4195574..6f4eff3 100644 --- a/templates/agendaRamais/depto/deptoRamais.htm +++ b/templates/agendaRamais/depto/deptoRamais.htm @@ -33,9 +33,11 @@ {$linhas} -
{$links}{$pagMostra}/{$totalReg}
+ + + -
{$links}{$pagMostra}/{$totalReg}
+ diff --git a/templates/agendaRamais/depto/deptoRamaisInsert.html b/templates/agendaRamais/depto/deptoRamaisInsert.html index eff963c..7c71f20 100644 --- a/templates/agendaRamais/depto/deptoRamaisInsert.html +++ b/templates/agendaRamais/depto/deptoRamaisInsert.html @@ -1,11 +1,14 @@ {capture name="display"} - +
- + - + @@ -14,7 +17,7 @@ - +
Cadastro de Departamento + + Cadastro de Departamento +
Nome:Nome:
{$mes}{$mes}
{/capture} \ No newline at end of file diff --git a/templates/cadastros/ServicosChamadas/servicosChamadas.tpl b/templates/cadastros/ServicosChamadas/servicosChamadas.tpl index 613c252..e0adc4e 100644 --- a/templates/cadastros/ServicosChamadas/servicosChamadas.tpl +++ b/templates/cadastros/ServicosChamadas/servicosChamadas.tpl @@ -3,27 +3,37 @@ - +
+ -
- +
- + + - - +
Palavra ChavePalavra ChaveFiltro Status
+ - - {$imgNovo} + +
+ Ativa + Desativada + Todos +
+
+
+ {$imgNovo} +
+ diff --git a/templates/cadastros/classificaAtendimento/classificaItem.tpl b/templates/cadastros/classificaAtendimento/classificaItem.tpl index b1b8d1b..fb50b6d 100644 --- a/templates/cadastros/classificaAtendimento/classificaItem.tpl +++ b/templates/cadastros/classificaAtendimento/classificaItem.tpl @@ -4,27 +4,36 @@ -
Serviços
+
+ -
- +
- +
Palavra Chave
- - {$imgClass} + +
+ Ativa + Desativada + Todos +
+
+
+ {$imgClass} +
+ diff --git a/templates/configSuper.tpl b/templates/configSuper.tpl index 75a5b21..191e8e4 100644 --- a/templates/configSuper.tpl +++ b/templates/configSuper.tpl @@ -42,7 +42,7 @@ - +
 
Aviso LGPD no MonitoramntoAviso LGPD no Monitoramento diff --git a/templates/master.tpl b/templates/master.tpl index e3d3adc..fc66e45 100644 --- a/templates/master.tpl +++ b/templates/master.tpl @@ -9,10 +9,6 @@ {if $scriptPage}{$scriptPage}{/if} {if $scriptBlok}{$scriptBlok}{/if} {$cssBlock} - - - -