forked from SimplesIP/pabx-app
48 changed files with 834 additions and 3046 deletions
@ -1,214 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
||||
<html> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> |
||||
<link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css" media="screen" title="no title" charset="ISO-8859-1" /> |
||||
<script type="text/javascript" src="js/jquery-1.4.js"></script> |
||||
<script type="text/javascript" src="js/jquery.blockUI.js?v2.29"></script> |
||||
<script src="js/jquery.min.js" type="text/javascript"></script> |
||||
<script src="js/jquery.validationEngine.js" type="text/javascript"></script> |
||||
<script src="js/jquery.validationEngine-en.js" type="text/javascript"></script> |
||||
|
||||
|
||||
<script> |
||||
$(document).ready(function() { |
||||
$("#form1").validationEngine({ |
||||
sucess : function(){ document.form1.submit();}, |
||||
failure : function() {} |
||||
}) |
||||
}); |
||||
</script> |
||||
<link href="css/forms.css" rel="stylesheet" type="text/css"> |
||||
<style type="text/css"> |
||||
<!-- |
||||
body { |
||||
background-color: #EAEAEA; |
||||
} |
||||
--> |
||||
</style></head> |
||||
<body> |
||||
|
||||
<? |
||||
|
||||
include('funcoes.php'); |
||||
include('padroes.php'); |
||||
|
||||
$acao= $_GET["acao"]; |
||||
|
||||
|
||||
if($acao=='salva'){ |
||||
$parkext =trim($_POST["parkext"]); |
||||
$parkpos = trim($_POST["parkpos"]); |
||||
$parkingtime = trim($_POST["parkingtime"]); |
||||
$findslot =trim($_POST["findslot"]); |
||||
$courtesytone = trim($_POST["courtesytone"]); |
||||
$parkedplay = trim($_POST["parkedplay"]); |
||||
$adsipark = trim($_POST["adsipark"]); |
||||
$findslot = trim($_POST["findslot"]); |
||||
$parkedmusicclass= trim($_POST["parkedmusicclass"]); |
||||
$transferdigittimeout = trim($_POST["transferdigittimeout"]); |
||||
$xfersound = trim($_POST["xfersound"]); |
||||
$xferfailsound = trim($_POST["xferfailsound"]); |
||||
$pickupexten = trim($_POST["pickupexten"]); |
||||
$featuredigittimeout = trim($_POST["featuredigittimeout"]); |
||||
$atxfernoanswertimeout = trim($_POST["atxfernoanswertimeout"]); |
||||
$context = trim($_POST["context"]); |
||||
|
||||
//REALIZA BACKUP BO BANCO |
||||
backup($dbcon,'pbx_features_general','U','','update','FEATURE_GENERAL'); |
||||
|
||||
$query = "UPDATE pbx_features_general |
||||
SET |
||||
parkext='$parkext',parkpos='$parkpos', parkingtime='$parkingtime',findslot='$findslot', |
||||
courtesytone='$courtesytone', parkedplay = '$parkedplay',adsipark = '$adsipark',parkedmusicclass='$parkedmusicclass' ,xfersound = '$xfersound',xferfailsound= '$xferfailsound', pickupexten='$pickupexten',featuredigittimeout='$featuredigittimeout', |
||||
atxfernoanswertimeout='$atxfernoanswertimeout',context='$context',transferdigittimeout=$transferdigittimeout"; |
||||
// $result = pg_query($dbcon, $query); |
||||
|
||||
pg_query($dbcon,$query);//gera arquivos e executa o reload dos dados no asterisk |
||||
gera_arquivos($dbcon,'FEATURE_GENERAL'); |
||||
|
||||
?> |
||||
<script>//fecha a janela presa no meio do sistema |
||||
fecha_popup();</script> |
||||
|
||||
<? |
||||
} |
||||
$query = "SELECT * FROM pbx_features_general"; |
||||
$result = pg_query($dbcon, $query); |
||||
while($dados = pg_fetch_array($result)){ |
||||
?> |
||||
<form name="form1" method="post" action="Fgeneral.php?acao=salva" id="form1"> |
||||
<table width="475" border="1" align="center" cellpadding="0" cellspacing="0" class="tabela"> |
||||
<tr class="cabecalho"> |
||||
<td background="img/button03.gif"><div align="center">CONFIGURAÇÃO GLOBAL DE ESTACIONAMENTO E TRANSFERENCIA</div></td> |
||||
</tr> |
||||
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA" class="labels"> |
||||
<td><table width="100%" border="0" cellspacing="0" cellpadding="0"> |
||||
<tr> |
||||
<td><fieldset> |
||||
<legend class="labels">Suporte a ADSI:</legend> |
||||
<input name="adsipark" type="radio" value="yes" <?php if ($dados["adsipark"]=='yes'){ echo "checked";}?> /> |
||||
SIM |
||||
<input name="adsipark" type="radio" value="no" <?php if ($dados["adsipark"]=='no'){ echo "checked";}?> /> |
||||
NÃO |
||||
</fieldset></td> |
||||
<td><fieldset> |
||||
<legend class="labels"><span class="style9">Estacionamento:</span></legend> |
||||
<input name="parkext" type="text" class="validate[optional,custom[onlyNumber],length[0,100]] caixas" id="parkext" value="<?php echo $dados['parkext']; ?>" size="20" maxlength="10" /> |
||||
</fieldset></td> |
||||
<td><fieldset> |
||||
<legend class="labels"><span class="style9">Faixa de Estacionamento:</span></legend> |
||||
<input name="parkpos" type="text" class="validate[optional,length[0,100]] caixas" id="parkpos" value="<?php echo $dados['parkpos']; ?>" size="20" maxlength="10" /> |
||||
</fieldset></td> |
||||
</tr> |
||||
</table></td> |
||||
</tr> |
||||
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA" class="labels"> |
||||
<td><table width="100%" border="0" cellspacing="0" cellpadding="0"> |
||||
<tr> |
||||
<td><fieldset> |
||||
<legend class="labels"><span class="style9">Timeout Estacionamento:</span></legend> |
||||
<input name="parkingtime" type="text" class="validate[optional,custom[onlyNumber],length[0,100]] caixas" id="parkingtime" value="<?php echo $dados['parkingtime']; ?>" size="20" maxlength="10" /> |
||||
</fieldset></td> |
||||
<td><fieldset> |
||||
<legend class="labels"><span class="style9">Anuncia Estacionamento:</span></legend> |
||||
<input name="courtesytone" type="text" class="caixas" id="courtesytone" value="<?php echo $dados['courtesytone']; ?>" size="20" maxlength="10" /> |
||||
</fieldset></td> |
||||
<td><fieldset> |
||||
<legend class="labels"><span class="style9">Reproduzir Anuncio:</span></legend> |
||||
<select name="parkedplay" class="caixas"> |
||||
<option value="parked" <?php if ($dados['parkedplay']=='parked') { echo "selected";}?>>Parked</option> |
||||
<option value="caller" <?php if ($dados['parkedplay']=='caller') { echo "selected";}?>>Caller</option> |
||||
<option value="both" <?php if ($dados['parkedplay']=='both') { echo "selected";}?>>Both</option> |
||||
</select> |
||||
</fieldset></td> |
||||
</tr> |
||||
</table></td> |
||||
</tr> |
||||
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA" class="labels"> |
||||
<td><table width="100%" border="0" cellspacing="0" cellpadding="0"> |
||||
<tr> |
||||
<td><fieldset> |
||||
<legend class="labels">Avançar Faixa:</legend> |
||||
<input name="findslot" type="radio" value="next" <?php if ($dados["findslot"]=='next'){ echo "checked";}?> /> |
||||
Avançar |
||||
<input name="findslot" type="radio" value="first" <?php if ($dados["findslot"]=='first'){ echo "checked";}?> /> |
||||
Primeiro |
||||
Livre |
||||
</fieldset></td> |
||||
<td><fieldset> |
||||
<legend class="labels"><span class="style9">Musica em espera:</span></legend> |
||||
<select name="parkedmusicclass" class="caixas" id="parkedmusicclass"> |
||||
<option value="">---------</option> |
||||
<?php |
||||
$query2 = "SELECT * FROM pbx_musichold_grupos order by id asc"; |
||||
$result2 = pg_query($dbcon, $query2); |
||||
while($dados2 = pg_fetch_array($result2)){ |
||||
?> |
||||
<option value="<?php echo $dados2['nome'];?>" <?php if (trim($dados['parkedmusicclass'])==trim($dados2['nome'])){ echo "selected";} ?>><?php echo $dados2['nome'];?></option> |
||||
<?php }?> |
||||
</select> |
||||
</fieldset></td> |
||||
<td><fieldset> |
||||
<legend class="labels"><span class="style9"> Timeout Transferência:</span></legend> |
||||
<input name="atxfernoanswertimeout" type="text" class="validate[optional,custom[onlyNumber],length[0,100]] caixas" id="atxfernoanswertimeout2" value="<?php echo $dados['atxfernoanswertimeout']; ?>" size="20" maxlength="10" /> |
||||
|
||||
</fieldset></td> |
||||
</tr> |
||||
</table></td> |
||||
</tr> |
||||
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA" class="labels"> |
||||
<td><table width="100%" border="0" cellspacing="0" cellpadding="0"> |
||||
<tr> |
||||
<td><fieldset> |
||||
<legend class="labels"><span class="style9">Anuncia Transferencia:</span></legend> |
||||
<input name="xfersound" type="text" class="caixas" id="xfersound" value="<?php echo $dados['xfersound']; ?>" size="20" maxlength="10" /> |
||||
</fieldset></td> |
||||
<td><fieldset> |
||||
<legend class="labels"><span class="style9">Anuncia Falha da Transferencia:</span></legend> |
||||
<input name="xferfailsound" type="text" class="caixas" id="xferfailsound" value="<?php echo $dados['xferfailsound']; ?>" size="20" maxlength="10" /> |
||||
</fieldset></td> |
||||
<td><fieldset> |
||||
<legend class="labels">Contexto:</legend> |
||||
<select name="context" class="caixas"> |
||||
<option value="parkedcalls">estacionado</option> |
||||
<?php |
||||
$query2 = "SELECT * FROM pbx_contextos order by id asc"; |
||||
$result2 = pg_query($dbcon, $query2); |
||||
while($dados2 = pg_fetch_array($result2)){ |
||||
?> |
||||
<option value="<?php echo $dados2['nome'];?>" <?php if (trim($dados['context'])==$dados2['nome']){ echo "selected";} ?>><?php echo $dados2['nome'];?></option> |
||||
<?php }?> |
||||
</select> |
||||
</fieldset></td> |
||||
</tr> |
||||
</table></td> |
||||
</tr> |
||||
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA" class="labels"> |
||||
<td><table width="100%" border="0" cellspacing="0" cellpadding="0"> |
||||
<tr> |
||||
<td width="50%"><fieldset> |
||||
<legend class="labels"><span class="style9">Tempo para ativar a transferencia:</span></legend> |
||||
<input name="featuredigittimeout" type="text" class="validate[optional,custom[onlyNumber],length[0,100]] caixas" id="featuredigittimeout" value="<?php echo $dados['featuredigittimeout']; ?>" size="20" maxlength="10" /> |
||||
|
||||
</fieldset></td> |
||||
<td width="50%"><fieldset> |
||||
<legend class="labels"><span class="style9">Tempo de discagem para transferencia:</span></legend> |
||||
<input name="transferdigittimeout" type="text" class="validate[optional,custom[onlyNumber],length[0,100]] caixas" id="transferdigittimeout" value="<?php echo $dados['transferdigittimeout']; ?>" size="20" maxlength="10" /> |
||||
|
||||
</fieldset></td> |
||||
</tr> |
||||
</table></td> |
||||
</tr> |
||||
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA"> |
||||
<td> |
||||
<div align="center"> <span class="style1"> |
||||
<input name="Submit2" type="button" class="labels" onclick="fecha_popup();" value="Fechar"> |
||||
</span> |
||||
<input name="Submit" type="submit" class="labels" value="Salvar"> |
||||
</div></td> |
||||
</tr> |
||||
</table> |
||||
</form> |
||||
<?php }?> |
@ -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. |
||||
|
||||
<one line to give the library's name and a brief idea of what it does.> |
||||
Copyright (C) <year> <name of author> |
||||
|
||||
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. |
||||
|
||||
<signature of Ty Coon>, 1 April 1990 |
||||
Ty Coon, President of Vice |
||||
|
||||
That's all there is to it! |
||||
|
||||
|
@ -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: |
||||
|
||||
<?php |
||||
require("class.phpmailer.php"); |
||||
|
||||
$mail = new PHPMailer(); |
||||
|
||||
$mail->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 <b>in bold!</b>"; |
||||
$mail->AltBody = "This is the body in plain text for non-HTML mail clients"; |
||||
|
||||
if(!$mail->Send()) |
||||
{ |
||||
echo "Message could not be sent. <p>"; |
||||
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 |
@ -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 |
@ -1,11 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
||||
"http://www.w3.org/TR/html4/loose.dtd"> |
||||
<html> |
||||
<head> |
||||
<title>Untitled Document</title> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
||||
</head> |
||||
|
||||
<body> |
||||
</body> |
||||
</html> |
@ -1,11 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
||||
"http://www.w3.org/TR/html4/loose.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
||||
<title>New Web Project</title> |
||||
</head> |
||||
<body> |
||||
<h1>New Web Project Page</h1> |
||||
</body> |
||||
</html> |
@ -1,32 +0,0 @@
|
||||
<html> |
||||
<head> |
||||
<title>Administração Asterisk</title> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
||||
<!--Fireworks MX 2004 Dreamweaver MX 2004 target. Created Thu Nov 26 17:34:28 GMT-0300 (Hora oficial do Brasil) 2009--> |
||||
|
||||
</head> |
||||
<body bgcolor="#dddddd"> |
||||
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<!-- fwtable fwsrc="Untitled-1.png" fwbase="index.gif" fwstyle="Dreamweaver" fwdocid = "2027375799" fwnested="0" --> |
||||
<tr> |
||||
<td><img src="images/spacer.gif" width="95" height="1" border="0" alt=""></td> |
||||
<td><img src="images/spacer.gif" width="117" height="1" border="0" alt=""></td> |
||||
<td><img src="images/spacer.gif" width="117" height="1" border="0" alt=""></td> |
||||
<td><img src="images/spacer.gif" width="451" height="1" border="0" alt=""></td> |
||||
<td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td colspan="4" rowspan="2"><?php include ('menu.php');?></td> |
||||
<td><img src="images/spacer.gif" width="1" height="77" border="0" alt=""></td> |
||||
</tr> |
||||
<tr> |
||||
<td><img src="images/spacer.gif" width="1" height="58" border="0" alt=""></td> |
||||
</tr> |
||||
<tr> |
||||
<td colspan="4" rowspan="2"><BR><?php include ('monitor_geral.php');?> </td> |
||||
<td><img src="images/spacer.gif" width="1" height="292" border="0" alt=""></td> |
||||
</tr> |
||||
</table> |
||||
</body> |
||||
</html> |
@ -1,66 +0,0 @@
|
||||
#!/usr/bin/php5 -q |
||||
|
||||
<? |
||||
|
||||
function connect_db() { |
||||
|
||||
$conexao = pg_connect("dbname=desenvolvimento port=5432 host=192.168.80.95 user=contacte password=ctepgSQL"); |
||||
|
||||
if (!$conexao) { |
||||
exit; |
||||
} |
||||
} |
||||
|
||||
|
||||
$timeout = 50; |
||||
$socket = fsockopen("127.0.0.1","5038", $errno, $errstr, $timeout); |
||||
|
||||
fwrite($socket, "action: login".chr(13).chr(10)); |
||||
fwrite($socket, "username: manager".chr(13).chr(10)); |
||||
fwrite($socket, "secret: sugamanager".chr(13).chr(10).chr(13).chr(10)); |
||||
// $actionid=rand(000000000,9999999999); |
||||
// fwrite($socket, "actionid: ".$actionid."\r\n\r\n"); |
||||
$gr=true; |
||||
$x=0; |
||||
$evento=''; |
||||
while (true){ |
||||
$bufer = fgets($socket); |
||||
if (trim($bufer)!=''){ |
||||
//print_r($bufer."<br>"); |
||||
$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."<br>"; |
||||
} |
||||
}} |
||||
//print_r($bufer."<br>"); |
||||
flush(); |
||||
} |
||||
fclose($socket); |
||||
?> |
@ -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 |
@ -1,983 +0,0 @@
|
||||
<?php |
||||
include('funcoes.php'); |
||||
include('padroes.php'); |
||||
|
||||
$arq=$caminho_producao."sip.conf"; |
||||
$abre=fopen($arq, "r"); |
||||
$acao= $_GET["acao"]; |
||||
$lines = file($arq); |
||||
|
||||
if(isset($_POST["disallow"])){ |
||||
$disallow = $_POST["disallow"]; |
||||
$disallow2=""; |
||||
|
||||
if(isset($disallow)) |
||||
{ |
||||
foreach($disallow as $dis) |
||||
{ |
||||
$g++; |
||||
$disallow2.=$dis; |
||||
if ((count($disallow)>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)){?> |
||||
<style type="text/css"> |
||||
<!-- |
||||
.style11 { |
||||
font-size: 12px; |
||||
font-family: Verdana, Arial, Helvetica, sans-serif; |
||||
font-weight: bold; |
||||
color: #FFFFFF; |
||||
} |
||||
.style13 {color: #FFFFFF; font-size: 12px; font-style: italic; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; } |
||||
--> |
||||
</style> |
||||
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0"> |
||||
<!-- fwtable fwsrc="Untitled-1.png" fwbase="index.gif" fwstyle="Dreamweaver" fwdocid = "2027375799" fwnested="0" --> |
||||
<tr> |
||||
<td><img src="images/spacer.gif" width="95" height="1" border="0" alt=""></td> |
||||
<td><img src="images/spacer.gif" width="117" height="1" border="0" alt=""></td> |
||||
<td><img src="images/spacer.gif" width="117" height="1" border="0" alt=""></td> |
||||
<td><img src="images/spacer.gif" width="451" height="1" border="0" alt=""></td> |
||||
<td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td> |
||||
</tr> |
||||
<tr> |
||||
<td colspan="4" rowspan="2"><?php include ('menu.php');?></td> |
||||
<td><img src="images/spacer.gif" width="1" height="77" border="0" alt=""></td> |
||||
</tr> |
||||
<tr> |
||||
<td><img src="images/spacer.gif" width="1" height="58" border="0" alt=""></td> |
||||
</tr> |
||||
<tr> |
||||
<td colspan="4" align="center" valign="top" bordercolor="#FFFFFF"><form name="form1" method="post" action=""> |
||||
<br> |
||||
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#990000" class="grid"> |
||||
<tr> |
||||
<td colspan="4" align="center" class="cabecalho">CONFIGURAÇÃO GLOBAL DO SIP</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="12%" bordercolor="#DDDDDD" class="labels"><div align="right">Desabilitado:</div></td> |
||||
<td width="37%" bordercolor="#DDDDDD"> |
||||
<?php |
||||
if (strpos($dados["disallow"],"gsm")!==false) { |
||||
$disallow1 = 'checked'; |
||||
} |
||||
if (strpos($dados["disallow"],"g726aal2")!==false) { |
||||
$disallow2 = 'checked'; |
||||
} |
||||
if (strpos($dados["disallow"],"g726")!==false) { |
||||
$disallow3 = 'checked'; |
||||
} |
||||
if (strpos($dados["disallow"],"g729")!==false) { |
||||
$disallow4 = 'checked'; |
||||
} |
||||
if (strpos($dados["disallow"],"ilbc")!==false) { |
||||
$disallow5 = 'checked'; |
||||
} |
||||
if (strpos($dados["disallow"],"ulaw")!==false) { |
||||
$disallow6 = 'checked'; |
||||
} |
||||
if (strpos($dados["disallow"],"alaw")!==false) { |
||||
$disallow7 = 'checked'; |
||||
} |
||||
if (strpos($dados["disallow"],"all")!==false) { |
||||
$disallow8 = 'checked'; |
||||
} ?> |
||||
<span class="labels"> |
||||
<input name="disallow[]" type="checkbox" id="disallow[]2" value="g726aal2" <?php if (strpos($dados["disallow"],"gsm")!==false) { echo "checked";} ?> > |
||||
gsm |
||||
<input name="disallow[]" type="checkbox" id="disallow[]2" value="g726" <?php if (strpos($dados["disallow"],"g726")!==false) { echo "checked";} ?>> |
||||
g726 |
||||
<input name="disallow[]" type="checkbox" id="disallow[]2" value="g729" <?php if (strpos($dados["disallow"],"g729")!==false) { echo "checked";} ?>> |
||||
g729 |
||||
<input name="disallow[]" type="checkbox" id="disallow[]2" value="ilbc" <?php if (strpos($dados["disallow"],"ilbc")!==false) { echo "checked";} ?>> |
||||
ilbc |
||||
<input name="disallow[]" type="checkbox" id="disallow[]2" value="ulaw" <?php if (strpos($dados["disallow"],"ulaw")!==false) { echo "checked";} ?>> |
||||
ulaw |
||||
<input name="disallow[]" type="checkbox" id="disallow[]2" value="alaw" <?php if (strpos($dados["disallow"],"alaw")!==false) { echo "checked";} ?>> |
||||
alaw |
||||
<input name="disallow[]" type="checkbox" id="disallow[]2" value="all" <?php if (strpos($dados["disallow"],"all")!==false) { echo "checked";} ?>> |
||||
all </span></td> |
||||
<td width="16%" bordercolor="#DDDDDD" class="labels"><div align="right">Habilitado:</div></td> |
||||
<td width="35%" bordercolor="#DDDDDD" class="labels"> |
||||
<input name="allow[]" type="checkbox" id="disallow[]2" value="g726aal2" <?php if (strpos($dados["allow"],"gsm")!==false) { echo "checked";} ?> > |
||||
gsm |
||||
<input name="allow[]" type="checkbox" id="disallow[]2" value="g726" <?php if (strpos($dados["allow"],"g726")!==false) { echo "checked";} ?>> |
||||
g726 |
||||
<input name="allow[]" type="checkbox" id="disallow[]2" value="g729" <?php if (strpos($dados["allow"],"g729")!==false) { echo "checked";} ?>> |
||||
g729 |
||||
<input name="allow[]" type="checkbox" id="disallow[]2" value="ilbc" <?php if (strpos($dados["allow"],"ilbc")!==false) { echo "checked";} ?>> |
||||
ilbc |
||||
<input name="allow[]" type="checkbox" id="disallow[]2" value="ulaw" <?php if (strpos($dados["allow"],"ulaw")!==false) { echo "checked";} ?>> |
||||
ulaw |
||||
<input name="allow[]" type="checkbox" id="disallow[]2" value="alaw" <?php if (strpos($dados["allow"],"alaw")!==false) { echo "checked";} ?>> |
||||
alaw |
||||
<input name="allow[]" type="checkbox" id="disallow[]2" value="all" <?php if (strpos($dados["allow"],"all")!==false) { echo "checked";} ?>> |
||||
all </td> |
||||
</tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">Identificador:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="callerid" type="text" class="textbox" id="callerid" value="<?php echo $dados["callerid"]; ?>" size="10" maxlength="20"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">ACEITA CONVIDADOS:</div></td> |
||||
<td bordercolor="#DDDDDD"> |
||||
<?php |
||||
switch (trim($dados["allowguest"])){ |
||||
case 'yes': $allowguest1 = 'checked'; |
||||
break; |
||||
case 'no': $allowguest2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<span class="labels"> |
||||
<input name="allowguest" type="radio" value="yes" <?php echo $allowguest1 ;?>> |
||||
SIM |
||||
<input name="allowguest" type="radio" value="no" <?php echo $allowguest2 ;?>> |
||||
NÃO</span></td> |
||||
</tr><tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">Context:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="context" type="text" class="textbox" id="context" value="<?php echo $dados["context"]?>" size="10" maxlength="20"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">realm:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="realm" type="text" class="textbox" id="realm" value="<?php echo $dados["realm"]?>" size="10" maxlength="20"></td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">allowoverlap:</div></td> |
||||
<td bordercolor="#DDDDDD"> |
||||
<?php |
||||
switch (trim($dados["allowoverlap"])){ |
||||
case 'yes': $allowoverlap1 = 'checked'; |
||||
break; |
||||
case 'no': $allowoverlap2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<span class="labels"> |
||||
<input name="allowoverlap" type="radio" value="yes" <?php echo $allowoverlap1; ?>> |
||||
SIM |
||||
<input name="allowoverlap" type="radio" value="no" <?php echo $allowoverlap2; ?>> |
||||
NÃO </span></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">allowtransfer:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<? |
||||
switch (trim($dados["allowtransfer"])){ |
||||
case 'yes': $allowtransfer1 = 'checked'; |
||||
break; |
||||
case 'no': $allowtransfer2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="allowtransfer" type="radio" value="yes" <?php echo $allowtransfer1; ?>> |
||||
SIM |
||||
<input name="allowtransfer" type="radio" value="no"<?php echo $allowtransfer2; ?>> |
||||
NÃO </td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">BIND ADDR:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="bindaddr" type="text" class="textbox" id="bindaddr" value="<?php echo $dados["bindaddr"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">BIND PORT:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="bindport" type="text" class="textbox" id="bindport" value="<?php echo $dados["bindport"];?>"></td> |
||||
</tr> |
||||
<tr class="labels"> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">srvlookup:</div></td> |
||||
<td bordercolor="#DDDDDD"> |
||||
<? |
||||
switch (trim($dados["srvlookup"])){ |
||||
case 'yes': $srvlookup1 = 'checked'; |
||||
break; |
||||
case 'no': $srvlookup2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="srvlookup" type="radio" value="yes" <?php echo $srvlookup1;?>> |
||||
SIM |
||||
<input name="srvlookup" type="radio" value="no"<?php echo $srvlookup2;?>> |
||||
NÃO</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">pedantic:</div></td> |
||||
<td bordercolor="#DDDDDD"> |
||||
<? |
||||
switch (trim($dados["pedantic"])){ |
||||
case 'yes': $pedantic1 = 'checked'; |
||||
break; |
||||
case 'no': $pedantic2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="pedantic" type="radio" value="yes" <?php echo $pedantic1;?>> |
||||
SIM |
||||
<input name="pedantic" type="radio" value="no" <?php echo $pedantic2;?>> |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">tos_sip:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="tos_sip" type="text" class="textbox" id="tos_sip" value="<?php echo $dados["tos_sip"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">tos_audio:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="tos_audio" type="text" class="textbox" id="tos_audio" value="<?php echo $dados["tos_audio"];?>"></td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">tos_video:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="tos_video" type="text" class="textbox" id="tos_video" value="<?php echo $dados["tos_video"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">maxexpiry:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="maxexpiry" type="text" class="textbox" id="maxexpiry" value="<?php echo $dados["maxexpiry"];?>"></td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">minexpiry:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="minexpiry" type="text" class="textbox" id="minexpiry" value="<?php echo $dados["minexpiry"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">defaultexpiry:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="defaultexpiry" type="text" class="textbox" id="defaultexpiry" value="<?php echo $dados["defaultexpiry"];?>"></td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">t1min:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="t1min" type="text" class="textbox" id="t1min" value="<?php echo $dados["t1min"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right"><span class="style5">notifymimetype : </span></div></td> |
||||
<td bordercolor="#DDDDDD"><input name="notifymimetype" type="text" class="textbox" id="notifymimetype" value="<?php echo $dados["notifymimetype"];?>"></td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">checkmwi:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="checkmwi" type="text" class="textbox" id="checkmwi" value="<?php echo $dados["checkmwi"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">buggymwi:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<? |
||||
switch (trim($dados["buggymwi"])){ |
||||
case 'yes': $buggymwi1 = 'checked'; |
||||
break; |
||||
case 'no': $buggymwi2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="buggymwi" type="radio" value="yes" '.$buggymwi1.'> |
||||
SIM |
||||
<input name="buggymwi" type="radio" value="no" '.$buggymwi2.'> |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">vmexten:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="vmexten" type="text" class="textbox" id="vmexten" value="<?php echo $dados["vmexten"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">mohinterpret:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="mohinterpret" type="text" class="textbox" id="mohinterpret" value="<?php echo $dados["mohinterpret"];?>"></td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">mohsuggest:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="mohsuggest" type="text" class="textbox" id="mohsuggest" value="<?php echo $dados["mohsuggest"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">language:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="language" type="text" class="textbox" id="language" value="<?php echo $dados["language"];?>"></td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">relaxdtmf:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["relaxdtmf"])){ |
||||
case 'yes': $relaxdtmf1 = 'checked'; |
||||
break; |
||||
case 'no': $relaxdtmf2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="relaxdtmf" type="radio" value="yes" <?php echo $relaxdtmf1; ?>> |
||||
SIM |
||||
<input name="relaxdtmf" type="radio" value="no" <?php echo $relaxdtmf2; ?>> |
||||
NÃO</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">trustrpid:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["trustrpid"])){ |
||||
case 'yes': $trustrpid1 = 'checked'; |
||||
break; |
||||
case 'no': $trustrpid2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="trustrpid" type="radio" value="yes" <?php echo $trustrpid1; ?>> |
||||
SIM |
||||
<input name="trustrpid" type="radio" value="no" <?php echo $trustrpid2;?>> |
||||
NÃO</TD> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">sendrpid:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<? |
||||
switch (trim($dados["sendrpid"])){ |
||||
case 'yes': $sendrpid1 = 'checked'; |
||||
break; |
||||
case 'no': $sendrpid2 = 'checked'; |
||||
break; |
||||
}?> |
||||
<input name="sendrpid" type="radio" value="yes" <?php echo $sendrpid1; ?>> |
||||
SIM |
||||
<input name="sendrpid" type="radio" value="no" <?php echo $sendrpid2 ;?>> |
||||
NÃO</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">progressinband:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["progressinband"])){ |
||||
case 'yes': $progressinband1 = 'checked'; |
||||
break; |
||||
case 'no': $progressinband2 = 'checked'; |
||||
break; |
||||
case 'never': $progressinband3 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="progressinband" type="radio" value="yes" <?php echo $progressinband1;?>> |
||||
SIM |
||||
<input name="progressinband" type="radio" value="no" <?php echo $progressinband2; ?>> |
||||
NÃO |
||||
<input name="progressinband" type="radio" value="never" <?php echo $progressinband3; ?>> |
||||
NUNCA</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">useragent:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="useragent" type="text" class="textbox" id="useragent" value="<?php echo $dados["useragent"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">promiscredir:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["promiscredir"])){ |
||||
case 'yes': $promiscredir1 = 'checked'; |
||||
break; |
||||
case 'no': $promiscredir2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="promiscredir" type="radio" value="yes" <?php echo $promiscredir1;?>> |
||||
SIM |
||||
<input name="promiscredir" type="radio" value="no" <?php echo $promiscredir2;?>> |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">dtmfmode:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="dtmfmode" type="text" class="textbox" id="dtmfmode" value="<?php echo $dados["dtmfmode"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">videosupport:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["videosupport"])){ |
||||
case 'yes': $videosupport1 = 'checked'; |
||||
break; |
||||
case 'no': $videosupport2 = 'checked'; |
||||
break; |
||||
}?> |
||||
<input name="videosupport" type="radio" value="yes" <?php echo $videosupport1;?>> |
||||
SIM |
||||
<input name="videosupport" type="radio" value="no" <?php echo $videosupport2;?>> |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">maxcallbitrate:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="maxcallbitrate" type="text" class="textbox" id="maxcallbitrate" value="<?php echo $dados["maxcallbitrate"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">alwaysauthreject:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<? |
||||
switch (trim($dados["alwaysauthreject"])){ |
||||
case 'yes': $alwaysauthreject1 = 'checked'; |
||||
break; |
||||
case 'no': $alwaysauthreject2 = 'checked'; |
||||
break; |
||||
}?> |
||||
<input name="alwaysauthreject" type="radio" value="yes" <?php echo $alwaysauthreject1;?>> |
||||
SIM |
||||
<input name="alwaysauthreject" type="radio" value="no" <?php echo $alwaysauthreject2;?> > |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">g726nonstandard:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["g726nonstandard"])){ |
||||
case 'yes': $g726nonstandard1 = 'checked'; |
||||
break; |
||||
case 'no': $g726nonstandard2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="g726nonstandard" type="radio" value="yes" '.$g726nonstandard1.'> |
||||
SIM |
||||
<input name="g726nonstandard" type="radio" value="no" '.$g726nonstandard2.'> |
||||
NÃO</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">matchexterniplocally:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["matchexterniplocally"])){ |
||||
case 'yes': $matchexterniplocally1 = 'checked'; |
||||
break; |
||||
case 'no': $matchexterniplocally2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="matchexterniplocally" type="radio" value="yes" <?php echo $matchexterniplocally1 ;?> > |
||||
SIM |
||||
<input name="matchexterniplocally" type="radio" value="no" <?php echo $matchexterniplocally2; ?> > |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">regcontext:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="regcontext" type="text" class="textbox" id="regcontext" value="<?php echo $dados["regcontext"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">rtptimeout:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="rtptimeout" type="text" class="textbox" id="rtptimeout" value="<?php echo $dados["rtptimeout"];?>"></td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">rtpholdtimeout:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="rtpholdtimeout" type="text" class="textbox" id="rtpholdtimeout" value="<?php echo $dados["rtpholdtimeout"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">rtpkeepalive:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="rtpkeepalive" type="text" class="textbox" id="rtpkeepalive" value="<?php echo $dados["rtpkeepalive"];?>"></td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">DEBUG:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["sipdebug"])){ |
||||
case 'yes': $sipdebug1 = 'checked'; |
||||
break; |
||||
case 'no': $sipdebug2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="sipdebug" type="radio" value="yes" <?php echo $sipdebug1; ?>> |
||||
SIM |
||||
<input name="sipdebug" type="radio" value="no" <?php echo $sipdebug2;?>> |
||||
NÃO</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">recordhistory:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["recordhistory"])){ |
||||
case 'yes': $recordhistory1 = 'checked'; |
||||
break; |
||||
case 'no': $recordhistory2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="recordhistory" type="radio" value="yes" <?php echo $recordhistory1;?>> |
||||
SIM |
||||
<input name="recordhistory" type="radio" value="no" <?php echo $recordhistory2;?>> |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">dumphistory:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["dumphistory"])){ |
||||
case 'yes': $dumphistory1 = 'checked'; |
||||
break; |
||||
case 'no': $dumphistory2 = 'checked'; |
||||
break; |
||||
}?> |
||||
<input name="dumphistory" type="radio" value="yes" <?php echo $dumphistory1;?>> |
||||
SIM |
||||
<input name="dumphistory" type="radio" value="no" <?php echo $dumphistory2;?>> |
||||
NÃO</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">allowsubscribe:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["allowsubscribe"])){ |
||||
case 'yes': $allowsubscribe1 = 'checked'; |
||||
break; |
||||
case 'no': $allowsubscribe2 = 'checked'; |
||||
break; |
||||
} ?> |
||||
<input name="allowsubscribe" type="radio" value="yes" <?php echo $allowsubscribe1;?>> |
||||
SIM |
||||
<input name="allowsubscribe" type="radio" value="no" <?php echo $allowsubscribe2;?>> |
||||
SIM</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">subscribecontext:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="subscribecontext" type="text" class="textbox" id="subscribecontext" value="<?php echo $dados["subscribecontext"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">notifyringing:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["notifyringing"])){ |
||||
case 'yes': $notifyringing1 = 'checked'; |
||||
break; |
||||
case 'no': $notifyringing2 = 'checked'; |
||||
break; |
||||
}?> |
||||
<input name="notifyringing" type="radio" value="yes" <?php echo $notifyringing1;?>> |
||||
SIM |
||||
<input name="notifyringing" type="radio" value="no" <?php echo $notifyringing2;?>> |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">notifyhold;</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["notifyhold"])){ |
||||
case 'yes': $notifyhold1 = 'checked'; |
||||
break; |
||||
case 'no': $notifyhold2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="notifyhold" type="radio" value="yes" <?php echo $notifyhold1;?>> |
||||
SIM |
||||
<input name="notifyhold" type="radio" value="no" <?php echo $notifyhold2;?>> |
||||
NÃO</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">limitonpeers:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["limitonpeers"])){ |
||||
case 'yes': $limitonpeers1 = 'checked'; |
||||
break; |
||||
case 'no': $limitonpeers2 = 'checked'; |
||||
break; |
||||
}?> |
||||
<input name="limitonpeers" type="radio" value="yes" <?php echo $limitonpeers1;?>> |
||||
SIM |
||||
<input name="limitonpeers" type="radio" value="no" <?php echo $limitonpeers2;?>> |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">t38pt_udptl:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["t38pt_udptl"])){ |
||||
case 'yes': $t38pt_udptl1 = 'checked'; |
||||
break; |
||||
case 'no': $t38pt_udptl2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="t38pt_udptl" type="radio" value="yes" <?php echo $t38pt_udptl1; ?>> |
||||
SIM |
||||
<input name="t38pt_udptl" type="radio" value="no" <?php echo $t38pt_udptl2; ?>> |
||||
NÃO</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">externip:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="externip" type="text" class="textbox" id="externip" value=<?php echo $dados["externip"];?>></td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">externhost:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="externhost" type="text" class="textbox" id="externhost" value="<?php echo $dados["externhost"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">externrefresh:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="externrefresh" type="text" class="textbox" id="externrefresh" value="<?php echo $dados["externrefresh"];?>"></td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">localnet:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="localnet" type="text" class="textbox" id="localnet" value="<?php echo $dados["localnet"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">nat:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["nat"])){ |
||||
case 'yes': $nat1 = 'checked'; |
||||
break; |
||||
case 'no': $nat2 = 'checked'; |
||||
break; |
||||
case 'never': $nat3 = 'checked'; |
||||
break; |
||||
case 'route': $nat4 = 'checked'; |
||||
break; |
||||
}?> |
||||
<input name="nat" type="radio" value="yes" <?php echo $nat1; ?>> |
||||
SIM |
||||
<input name="nat" type="radio" value="no" <?php echo $nat2;?>> |
||||
NÃO |
||||
<input name="nat" type="radio" value="never" <?php echo $nat3;?>> |
||||
NUNCA |
||||
<input name="nat" type="radio" value="route" <?php echo $nat4;?>> |
||||
ROTA</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">canreinvite:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<? |
||||
switch (trim($dados["canreinvite"])){ |
||||
case 'yes': $canreinvite1 = 'checked'; |
||||
break; |
||||
case 'no': $canreinvite2 = 'checked'; |
||||
break; |
||||
case 'nonat': $canreinvite3 = 'checked'; |
||||
break; |
||||
case 'update': $canreinvite4 = 'checked'; |
||||
break; |
||||
} ?> |
||||
<input name="canreinvite" type="radio" value="yes" <?php echo $canreinvite1;?>> |
||||
SIM |
||||
<input name="canreinvite" type="radio" value="no" <?php echo $canreinvite2;?>> |
||||
NÃO |
||||
<input name="canreinvite" type="radio" value="nonat" <?php echo $canreinvite3;?>> |
||||
SEM NAT |
||||
<input name="canreinvite" type="radio" value="update" <?php echo $canreinvite4;?> > |
||||
UPDATE</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">directrtpsetup:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<? |
||||
switch (trim($dados["directrtpsetup"])){ |
||||
case 'yes': $directrtpsetup1 = 'checked'; |
||||
break; |
||||
case 'no': $directrtpsetup2 = 'checked'; |
||||
break; |
||||
} ?> |
||||
<input name="directrtpsetup" type="radio" value="yes" <?php echo $directrtpsetup1;?>> |
||||
SIM |
||||
<input name="directrtpsetup" type="radio" value="no" <?php echo $directrtpsetup2;?>> |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">rtcachefriends:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<? |
||||
switch (trim($dados["rtcachefriends"])){ |
||||
case 'yes': $rtcachefriends1 = 'checked'; |
||||
break; |
||||
case 'no': $rtcachefriends2 = 'checked'; |
||||
break; |
||||
} ?> |
||||
<input name="rtcachefriends" type="radio" value="yes" <?php echo $rtcachefriends1;?>> |
||||
SIM |
||||
<input name="rtcachefriends" type="radio" value="no" <?php echo $rtcachefriends2;?>> |
||||
NÃO</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">rtsavesysname:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["rtsavesysname"])){ |
||||
case 'yes': $rtsavesysname1 = 'checked'; |
||||
break; |
||||
case 'no': $rtsavesysname2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="rtsavesysname" type="radio" value="yes" <?php echo $rtsavesysname1;?>> |
||||
SIM |
||||
<input name="rtsavesysname" type="radio" value="no" <?php echo $rtsavesysname2;?>> |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">rtupdate:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["rtupdate"])){ |
||||
case 'yes': $rtupdate1 = 'checked'; |
||||
break; |
||||
case 'no': $rtupdate2 = 'checked'; |
||||
break; |
||||
} ?> |
||||
<input name="rtupdate" type="radio" value="yes" <?php echo $rtupdate1;?>> |
||||
SIM |
||||
<input name="rtupdate" type="radio" value="no" <?php echo $rtupdate2;?>> |
||||
NÃO</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">rtautoclear:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["rtautoclear"])){ |
||||
case 'yes': $rtautoclear1 = 'checked'; |
||||
break; |
||||
case 'no': $rtautoclear2 = 'checked'; |
||||
break; |
||||
} ?> |
||||
<input name="rtautoclear" type="radio" value="yes" <?php echo $rtautoclear1;?>> |
||||
SIM |
||||
<input name="rtautoclear" type="radio" value="no" <?php echo $rtautoclear2;?>> |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">ignoreregexpire:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<? |
||||
switch (trim($dados["ignoreregexpire"])){ |
||||
case 'yes': $ignoreregexpire1 = 'checked'; |
||||
break; |
||||
case 'no': $ignoreregexpire2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="ignoreregexpire" type="radio" value="yes" <?php echo $ignoreregexpire1;?>> |
||||
SIM |
||||
<input name="ignoreregexpire" type="radio" value="no" <?php echo $ignoreregexpire2;?>> |
||||
NÃO</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">Dominio:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="domain" type="text" class="textbox" id="domain" value="<?php echo $dados["domain"];?>"></td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">autodomain:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<? |
||||
switch (trim($dados["autodomain"])){ |
||||
case 'yes': $autodomain1 = 'checked'; |
||||
break; |
||||
case 'no': $autodomain2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="autodomain" type="radio" value="yes" <?php echo $autodomain1;?>> |
||||
SIM |
||||
<input name="autodomain" type="radio" value="no" <?php echo $autodomain2;?>> |
||||
NÃO</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">allowexternaldomains:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<? |
||||
switch (trim($dados["allowexternaldomains"])){ |
||||
case 'yes': $allowexternaldomains1 = 'checked'; |
||||
break; |
||||
case 'no': $allowexternaldomains2 = 'checked'; |
||||
break; |
||||
} ?> |
||||
<input name="allowexternaldomains" type="radio" value="yes" <?php echo $allowexternaldomains1;?>> |
||||
SIM |
||||
<input name="allowexternaldomains" type="radio" value="no" <?php echo $allowexternaldomains2;?>> |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">fromdomain:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="fromdomain" type="text" class="textbox" id="fromdomain" value="<?php echo $dados["fromdomain"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">jbenable:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["jbenable"])){ |
||||
case 'yes': $jbenable1 = 'checked'; |
||||
break; |
||||
case 'no': $jbenable2 = 'checked'; |
||||
break; |
||||
} ?> |
||||
<input name="jbenable" type="radio" value="yes" <?php echo $jbenable1;?>> |
||||
SIM |
||||
<input name="jbenable" type="radio" value="no" <?php echo $jbenable2;?>> |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">jbforce:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["jbforce"])){ |
||||
case 'yes': $jbforce1 = 'checked'; |
||||
break; |
||||
case 'no': $jbforce2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="jbforce" type="radio" value="yes" <?php echo $jbforce1;?>> |
||||
SIM |
||||
<input name="jbforce" type="radio" value="no" <?php echo $jbforce2;?>> |
||||
NÃO</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">jbmaxsize:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="jbmaxsize" type="text" class="textbox" id="jbmaxsize" value="<?php echo $dados["jbmaxsize"];?>"></td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">jbresyncthreshold:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="jbresyncthreshold" type="text" class="textbox" id="jbresyncthreshold" value="<?php echo $dados["jbresyncthreshold"];?>"></td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">jbimpl:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<?php |
||||
switch (trim($dados["jbimpl"])){ |
||||
case 'fixed': $jbimpl1 = 'checked'; |
||||
break; |
||||
case 'adaptive': $jbimpl2 = 'checked'; |
||||
break; |
||||
} ?> |
||||
<input name="jbimpl" type="radio" value="fixed" <?php echo $jbimpl1;?>> |
||||
SIM |
||||
<input name="jbimpl" type="radio" value="adaptive" <?php echo $jbimpl2;?>> |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">jblog:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<? |
||||
|
||||
switch (trim($dados["jblog"])){ |
||||
case 'yes': $jblog1 = 'checked'; |
||||
break; |
||||
case 'no': $jblog2 = 'checked'; |
||||
break; |
||||
} |
||||
?> |
||||
<input name="jblog" type="radio" value="yes" <?php echo $jblog1;?>> |
||||
SIM |
||||
<input name="jblog" type="radio" value="no" <?php echo $jblog2;?>> |
||||
NÃO</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">auth:</div></td> |
||||
<td bordercolor="#DDDDDD"><input name="auth" type="text" class="textbox" id="auth" value="<?php echo $dados["auth"];?>"></td> |
||||
</tr> |
||||
<tr> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">usereqphone:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<? |
||||
switch (trim($dados["userqphone"])){ |
||||
case 'yes': $userqphone1 = 'checked'; |
||||
break; |
||||
case 'no': $userqphone2 = 'checked'; |
||||
break; |
||||
} ?> |
||||
<input name="userqphone" type="radio" value="yes" <?php echo $userqphone1;?>> |
||||
SIM |
||||
<input name="userqphone" type="radio" value="no" <?php echo $userqphone2;?>> |
||||
NÃO</td> |
||||
<td bordercolor="#DDDDDD" class="labels"><div align="right">compactheaders:</div></td> |
||||
<td bordercolor="#DDDDDD" class="labels"> |
||||
<? |
||||
switch (trim($dados["compactheaders"])){ |
||||
case 'yes': $compactheaders1 = 'checked'; |
||||
break; |
||||
case 'no': $compactheaders2 = 'checked'; |
||||
break; |
||||
} ?> |
||||
<input name="compactheaders" type="radio" value="yes" <?php echo $compactheaders1;?>> |
||||
SIM |
||||
<input name="compactheaders" type="radio" value="no" <?php echo $compactheaders2;?>> |
||||
NÃO</td> |
||||
</tr> |
||||
<tr> |
||||
<td colspan="4" bordercolor="#DDDDDD"><div align="center"> |
||||
<input name="Submit" type="button" class="textbox" onclick="MM_goToURL('ramais.php');" value="Voltar"> |
||||
<input name="Submit" type="submit" class="textbox" value="Salvar"> |
||||
</div></td> |
||||
</tr> |
||||
</table> |
||||
</form> <br> |
||||
|
||||
</td> |
||||
<td><img src="images/spacer.gif" width="1" height="292" border="0" alt=""></td> |
||||
</tr> |
||||
</table> |
||||
<?php } ?> |
||||
</body> |
||||
</html> |
@ -1,11 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
||||
"http://www.w3.org/TR/html4/loose.dtd"> |
||||
<html> |
||||
<head> |
||||
<title>Untitled Document</title> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
||||
</head> |
||||
|
||||
<body> |
||||
</body> |
||||
</html> |
Binary file not shown.
@ -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'; |
@ -0,0 +1,600 @@
|
||||
<?php |
||||
|
||||
include_once 'util/relatoriosBase.php'; |
||||
|
||||
class RelChamadasGeral extends Relatorios { |
||||
|
||||
private $__agente; |
||||
private $__tipoLigacao; |
||||
private $__classificacao; |
||||
private $__pesquisa; |
||||
private $__filtro; |
||||
|
||||
public function __construct($idProg, $dbcon, $incDac) { |
||||
parent::__construct($idProg, $dbcon, $incDac); |
||||
$this->__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 = '<a href="index.php?idProg=%s&media=%s&tipoRelatorio=%s"><img src="imgSite/%s" alt="Clique aqui para imprimir!" width="24" height="24" border="0"></a>'; |
||||
$prtHtml = "<a href=\"javaScript:NovaJanela('index.php?idProg=%s&media=%s&tipoRelatorio=%s', '%s', '720', '700', 'scrollbars=YES');\"><img src=\"imgSite/%s\" alt=\"Clique aqui para imprimir!\" width=\"24\" height=\"24\" border=\"0\"></a>"; |
||||
$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 = '<table border="0" cellspacing="1" cellpadding="1">'; |
||||
/* |
||||
* Rotulos. |
||||
*/ |
||||
$filtro .= '<tr>'; |
||||
$filtro .= '<td>Data Inicial</td>'; |
||||
$filtro .= '<td>Data Final </td>'; |
||||
if ($this->GetIncDac()){ |
||||
$filtro .= '<td>Fila</td>'; |
||||
} |
||||
$filtro .= '<td align="center" valign="middle">Agente</td>'; |
||||
$filtro .= '<td align="center" valign="middle">Filtro</td>'; |
||||
|
||||
$class = $this->__classificacao ? "checked" : ''; |
||||
$pesq = $this->__pesquisa ? "checked" : ''; |
||||
|
||||
$filtro .= sprintf('<td>' |
||||
. '<table>' |
||||
. '<tr><td>' |
||||
. '<div class="geral">' |
||||
. '<input name="classificacao" id="tipoLigacao" type="checkbox" size="15" class="clean" %s value="classificacao"/> Classificação  ' |
||||
. '<input name="pesquisa" id="tipoLigacao" type="checkbox" size="15" class="clean" %s value="pesquisa"/> Pesquisa  ' |
||||
. '</div>' |
||||
. '</td></tr>' |
||||
. '</table></td>', $class, $pesq); |
||||
$filtro .= '</tr>'; |
||||
|
||||
/* |
||||
* Valores. |
||||
*/ |
||||
$filtro .= '<tr>'; |
||||
$filtro .= '<td><input name="dataIni" id="dataIni" type="text" size="15" maxlength="10" value="%s" onkeyup="formataData(this)" title="dd/mm/aaaa"></td>'; |
||||
$filtro .= '<td><input name="dataFim" id="dataFim" type="text" size="15" maxlength="10" value="%s" onkeyup="formataData(this)" title="dd/mm/aaaa"></td>'; |
||||
if ($this->GetIncDac()){ |
||||
$filtro .= sprintf('<td>%s</td>', $dacs); |
||||
} |
||||
$filtro .= "<td>$agentes</td>"; |
||||
$filtro .= sprintf('<td><input name="filtro" id="filtro" type="text" size="24" placeholder="Protocolo/Telefone/Ramal" value="%s" /></td>', $this->__filtro); |
||||
|
||||
$entrada = $this->__tipoLigacao == 2 ? "checked" : ""; |
||||
$saida = $this->__tipoLigacao == 3 ? "checked" : ""; |
||||
$ambos = $this->__tipoLigacao == 0 ? "checked" : ""; |
||||
|
||||
$filtro .= sprintf('<td>' |
||||
. '<table><tr><td><div class="geral">' |
||||
. '<input name="tipoLigacao" id="tipoLigacao" type="radio" size="15" class="clean" %s value="2"/>Entrada  ' |
||||
. '<input name="tipoLigacao" id="tipoLigacao" type="radio" size="15" class="clean" %s value="3"/>Saída  ' |
||||
. '<input name="tipoLigacao" id="tipoLigacao" type="radio" size="15" class="clean" %s value="0"/>Ambos' |
||||
. '</div></td></tr></table>' |
||||
. '</td>', $entrada, $saida, $ambos); |
||||
$filtro .= '<td><input type="submit" name="btConsulta" id="btConsulta" value="Consultar"></td>'; |
||||
$filtro .= '<td>%s</td>'; |
||||
$filtro .= '</tr>'; |
||||
$filtro .= '</table>'; |
||||
|
||||
/* |
||||
* 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[] = '<table width="100%" cellpadding="2" class="grid">'; |
||||
|
||||
/* |
||||
* Monta a linha de cabecalio. |
||||
*/ |
||||
$linha = '<tr>'; |
||||
foreach ($dadosCabecalio as $key => $value) { |
||||
$linha .= sprintf("<th %s>%s</th>", $value, $key); |
||||
} |
||||
$linha .= "</tr>"; |
||||
$dataRel[] = $linha; |
||||
|
||||
/* |
||||
* Verifica se retornou dados |
||||
*/ |
||||
if (!IsPostBack() || !count($this->GetData()[0])) { |
||||
$dataRel[] = sprintf("<tr><td align=\"center\" colspan=\"%s\">%s</td></tr></table>", 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 = "<tr>"; |
||||
foreach ($dadosField as $key => $value) { |
||||
$linha .= sprintf("<td %s>%s</td>", $value, $row["$key"]); |
||||
} |
||||
$linha .= "</tr>"; |
||||
$dataRel[] = $linha; |
||||
} |
||||
/* |
||||
* Linha de totalizacao. |
||||
*/ |
||||
$linha = '<tr><th align="left">Total</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>'; |
||||
$dataRel[] = sprintf($linha, ''); |
||||
|
||||
/* |
||||
* Fecha relatorio. |
||||
*/ |
||||
$dataRel[] = '</table>'; |
||||
$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 = "<select name=\"listaAgente\" id=\"listaAgente\" size=\"1\">"; |
||||
$agentes .= "<option value=\"0\" $sel>Todos</option>"; |
||||
|
||||
$query = sprintf("SELECT apelido AS nome |
||||
FROM pbx_usuarios u |
||||
WHERE EXISTS(SELECT '' FROM pbx_eventos_agentes WHERE matricula = u.matricula |
||||
AND CAST(login as date) >= '%s' |
||||
AND CAST(login as date) <= '%s')", $this->___dac, FormatDtMssql($this->___dataIni), FormatDtMssql($this->___dataFim)); |
||||
|
||||
|
||||
$result = pg_query($query); |
||||
if($result){ |
||||
while ($dados = pg_fetch_row($result)) { |
||||
if ($codSel == $dados[0]) { |
||||
$sel = "selected"; |
||||
$i = 1; |
||||
} else { |
||||
$sel = ""; |
||||
} |
||||
$agentes .= "<option value=\"$dados[0]\" $sel>$dados[0]</option>"; |
||||
} |
||||
} |
||||
$agentes .= "</select>"; |
||||
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(); |
||||
?> |
Loading…
Reference in new issue