php commented within the console

0

I have the following test code:

<html>
<head></head>
<body>
<?php
echo 'teste';
?>
</body>
</html>

Should only show written test on screen, however while executing the page is blank. When opening the console I noticed that php was commented as I show below:

<!--?php
echo 'teste';
?-->

I use WampServer as the local server.

The reason for this doubt is this code:

                                                          

    <link rel="stylesheet" href="css/app.min.css">

    <meta name="description" content="Violate Responsive Admin Template">
    <meta name="keywords" content="Super Admin, Admin, Template, Bootstrap">

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><script>$(document).ready(function(){console.log("Entrou aqui");
          $("#checkMaster").click(function(){
            console.log("Botão Clicado");
          $('input:checkbox').prop('checked', this.checked);
         });
        console.log("Saiu Aqui");
    });
</script>

  </head>  
    <title>BettaDial Admin</title>

    <!-- CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/animate.min.css" rel="stylesheet">
    <link href="css/font-awesome.min.css" rel="stylesheet">
    <link href="css/form.css" rel="stylesheet">
    <link href="css/calendar.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href="css/icons.css" rel="stylesheet">
    <link href="css/generics.css" rel="stylesheet"> 


<body id="skin-blur-chrome">

    <header id="header" class="media">
        <a href="" id="menu-toggle"></a> 
        <a class="logo pull-left" href="index.php"><img src="img/betta.png" width="160px" height="30px"></a>

        <div class="media-body">
            <div class="media" id="top-menu">


               <!-- <div id="time" class="pull-right" align="">
                    <span id="hours"></span>
                    :
                    <span id="min"></span>
                    :
                    <span id="sec"></span>
                </div>
                -->
            </div>
        </div>
    </header>

    <div class="clearfix"></div>

    <section id="main" class="p-relative" role="main">

        <!-- Sidebar -->
        <aside id="sidebar">

            <!-- Sidbar Widgets -->
            <div class="side-widgets overflow">



                 <!-- Projects -->

                 <?Php
                    $query = "select classificacao, count(*) qtd from ivr_discagem  where data between CURRENT_DATE and CURRENT_DATE+1 group by classificacao";
                    $result = Populator::ConsultaDB( $query );
                    $totalclass=0;
                    $Caixa_Postal=0;
                    $Sinal_Interceptacao=0;
                    $Anuncio_Interceptacao=0;
                    $Anuncio_Desvio=0;
                    $Anuncio_Desconhecido=0;
                    $Portabilidade=0;
                    $Atendimento_Humano=0;
                    $Fax=0;
                    $Silencio=0;
                    $Falha_Discagem=0;

                    while($myrow = pg_fetch_assoc($result)) {
                        $totalclass=$totalclass+$myrow['qtd'];
                        if($myrow['classificacao']==0) {$Caixa_Postal=$myrow['qtd'];}
                        if($myrow['classificacao']==2) {$Sinal_Interceptacao=$myrow['qtd'];}
                        if($myrow['classificacao']==3) {$Anuncio_Interceptacao=$myrow['qtd'];}
                        if($myrow['classificacao']==4) {$Anuncio_Desvio=$myrow['qtd'];}
                        if($myrow['classificacao']==5) {$Anuncio_Desconhecido=$myrow['qtd'];}
                        if($myrow['classificacao']==6) {$Portabilidade=$myrow['qtd'];}
                        if($myrow['classificacao']==8) {$Atendimento_Humano=$myrow['qtd'];}
                        if($myrow['classificacao']==10) {$Fax=$myrow['qtd'];}
                        if($myrow['classificacao']==11) {$Silencio=$myrow['qtd'];}
                        if($myrow['classificacao']==12) {$Falha_Discagem=$myrow['qtd'];}
                    }
                ?>
                <div class="s-widget m-b-25">
                    <h2 class="tile-title">
                        Classificação
                    </h2>

                    <div class="s-widget-body">
                        <div class="side-border">
                            <small>Atendimento Humano</small>
                            <div class="progress progress-small">
                                 <a href="#" data-toggle="tooltip" title="" class="progress-bar tooltips progress-bar-success" style="width: <?php if($totalclass>0){echo $Atendimento_Humano/$totalclass*100;} ?>%;" data-original-title="<?php echo $Atendimento_Humano?>">
                                      <span class="sr-only"><?php echo $Atendimento_Humano; ?></span>
                                 </a>
                            </div>
                        </div>
                        <div class="side-border">
                            <small>Caixa Postal</small>
                            <div class="progress progress-small">
                                 <a href="#" data-toggle="tooltip" title="" class="progress-bar tooltips progress-bar-info" style="width: <?php if($totalclass>0){echo $Caixa_Postal/$totalclass*100;} ?>%;" data-original-title="<?php echo $Caixa_Postal;?>">
                                      <span class="sr-only"><?php echo $Caixa_Postal; ?></span>
                                 </a>
                            </div>
                        </div>
                        <div class="side-border">
                            <small>Sinal Interceptação</small>
                            <div class="progress progress-small">
                                 <a href="#" data-toggle="tooltip" title="" class="progress-bar tooltips progress-bar-warning" style="width: <?php if($totalclass>0){echo $Sinal_Interceptacao/$totalclass*100;} ?>%;" data-original-title="<?php echo $Sinal_Interceptacao; ?>">
                                      <span class="sr-only"><?php echo $Sinal_Interceptacao; ?></span>
                                 </a>
                            </div>
                        </div>
                        <div class="side-border">
                            <small>Anúncio Interceptação</small>
                            <div class="progress progress-small">
                                 <a href="#" data-toggle="tooltip" title="" class="progress-bar tooltips progress-bar-warning" style="width: <?php if($totalclass>0){echo $Anuncio_Interceptacao/$totalclass*100;} ?>%;" data-original-title="<?php echo $Anuncio_Interceptacao; ?>">
                                      <span class="sr-only"><?php echo $Anuncio_Interceptacao; ?></span>
                                 </a>
                            </div>
                        </div>
                        <div class="side-border">
                            <small>Anúncio Desvio</small>
                            <div class="progress progress-small">
                                 <a href="#" data-toggle="tooltip" title="" class="progress-bar tooltips progress-bar-warning" style="width: <?php if($totalclass>0){echo $Anuncio_Desvio/$totalclass*100;} ?>%;" data-original-title="<?php echo $Anuncio_Desvio; ?>%">
                                      <span class="sr-only"><?php echo $Anuncio_Desvio; ?></span>
                                 </a>
                            </div>
                        </div>
                        <div class="side-border">
                            <small>Anúncio Desconhecido</small>
                            <div class="progress progress-small">
                                 <a href="#" data-toggle="tooltip" title="" class="progress-bar tooltips progress-bar-warning" style="width: <?php if($totalclass>0){echo $Anuncio_Desconhecido/$totalclass*100;} ?>%;" data-original-title="<?php echo $Anuncio_Desconhecido; ?>">
                                      <span class="sr-only"><?php echo $Anuncio_Desconhecido; ?></span>
                                 </a>
                            </div>
                        </div>
                        <div class="side-border">
                            <small>Portabilidade</small>
                            <div class="progress progress-small">
                                 <a href="#" data-toggle="tooltip" title="" class="progress-bar tooltips progress-bar-warning" style="width: <?php if($totalclass>0){echo $Portabilidade/$totalclass*100;} ?>%;" data-original-title="<?php echo $Portabilidade; ?>">
                                      <span class="sr-only"><?php echo $Portabilidade; ?></span>
                                 </a>
                            </div>
                        </div>                          
                        <div class="side-border">
                            <small>Fax</small>
                            <div class="progress progress-small">
                                 <a href="#" data-toggle="tooltip" title="" class="progress-bar tooltips progress-bar-warning" style="width: <?php if($totalclass>0){echo $Fax/$totalclass*100;} ?>%;" data-original-title="<?php echo $Fax; ?>">
                                      <span class="sr-only"><?php echo $Fax; ?></span>
                                 </a>
                            </div>
                        </div>  
                        <div class="side-border">
                            <small>Silencio</small>
                            <div class="progress progress-small">
                                 <a href="#" data-toggle="tooltip" title="" class="progress-bar tooltips progress-bar-warning" style="width: <?php if($totalclass>0){echo $Silencio/$totalclass*100;} ?>%;" data-original-title="<?php echo $Silencio; ?>">
                                      <span class="sr-only"><?php echo $Silencio; ?></span>
                                 </a>
                            </div>
                        </div>
                        <div class="side-border">
                            <small>Falha Discagem</small>
                            <div class="progress progress-small">
                                 <a href="#" data-toggle="tooltip" title="" class="progress-bar tooltips progress-bar-danger" style="width: <?php if($totalclass>0){echo $Falha_Discagem/$totalclass*100;} ?>%;" data-original-title="<?php echo $Falha_Discagem; ?>">
                                      <span class="sr-only"><?php echo $Falha_Discagem; ?></span>
                                 </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Side Menu -->
            <ul class="list-unstyled side-menu">
                <li class="active">
                    <a class="sa-side-home" href="index.php">
                        <span class="menu-item">Dashboard</span>
                    </a>
                </li>



        <?php

            $verifica = sprintf("select * from bettaivr.public.ivr_users where perfil = 'c' and username = '%s' ",$logado);
            $resultado = Populator::ConsultaDB( $verifica );
             if(pg_affected_rows($resultado)>0){
                // Oculta a configuração do lider de equipe
              echo ' <!-- <li>
                    <a class="sa-side-table" href="config.php">
                        <span class="menu-item">Configuração</span>
                    </a>
                </li> -->
            <li>
               </li>
                <li>
                    <a class="sa-side-table" href="logout.php">
                        <span class="menu-item">Logout</span>
                    </a> 
                    </li>' ;  
             }else{
                // Acesso a configuração do Supervisor
            $verificaSuper = sprintf("select * from bettaivr.public.ivr_users where perfil = 'b' and username = '%s' "
                ,$logado);
            $resultadoSuper = Populator::ConsultaDB( $verificaSuper );
             if(pg_affected_rows($resultadoSuper)>0){
                echo '<li>
                    <a class="sa-side-config" href="configSupervisor.php">
                        <span class="menu-item">Configuração</span>
                    </a>
                </li>
                   <li>
                    <a class="sa-side-warning" href="warningview.php">
                        <span class="menu-item">Tela de Warning</span>
                    </a>
                </li>
                <li>
                    <a class="sa-side-table" href="logout.php">
                        <span class="menu-item">Logout</span>
                    </a> 
                    </li>
                ' ;
             }else{
                // Acesso a configuração do Administrador
                 echo '<li>
                    <a class="sa-side-config" href="config.php">
                        <span class="menu-item">Configuração</span>
                    </a>
                </li>
                <li>
                    <a class="sa-side-warning" href="warningview.php">
                        <span class="menu-item">Tela de Warning</span>
                    </a>
                </li>

                  <li class="dropdown">
                    <a class="sa-side-ui" href="">
                        <span class="menu-item">Configurações de Usuário</span>
                    </a>
                    <ul class="list-unstyled menu-item">
                        <li><a href="register.php">Criar Usuário</a></li>
                        <li><a href="edit.php">Editar Usuário</a></li>
                        </ul>
                </li>
                <li>
                    <a class="sa-side-table" href="logout.php">
                        <span class="menu-item">Logout</span>
                    </a> 
                    </li>' ;
             }
         }



        ?>


            </ul>

        </aside>

        <?Php
            /*$result = Populator::painel1();*/

            $query = "SELECT status, available, mailing, lastdial, calling, staffed, pacing FROM bettaivr.public.ivr_status where campanha = 1 limit 1";
            $result = Populator::ConsultaDB( $query );
            $canais = 0;
            $mailing = 0;
            $aglogados = 0;
            $agdisp = 0;
            while($myrow = pg_fetch_assoc($result)) {
                $canais = $myrow['calling'];
                $mailing = $myrow['mailing'];
                $agdisp = $myrow['available'];
                $aglogados = $myrow['staffed'];
            }

            $arrocupados = array( 0 => 0, 1 => 0,2 => 0,3 => 0,4 => 0,5 => 0,6 => 0,7 => 0,8 => 0,9 => 0,10 => 0,11 => 0,12 => 0 );             
            $arrmailing = array( 0 => 0, 1 => 0,2 => 0,3 => 0,4 => 0,5 => 0,6 => 0,7 => 0,8 => 0,9 => 0,10 => 0,11 => 0,12 => 0 );      
            $arravailable = array( 0 => 0, 1 => 0,2 => 0,3 => 0,4 => 0,5 => 0,6 => 0,7 => 0,8 => 0,9 => 0,10 => 0,11 => 0,12 => 0 );        
            $arrstaffed = array( 0 => 0, 1 => 0,2 => 0,3 => 0,4 => 0,5 => 0,6 => 0,7 => 0,8 => 0,9 => 0,10 => 0,11 => 0,12 => 0 );
            //$query = "SELECT to_char(atualizado,'HH24:mi') hora, round(avg(available)) available, round(avg(mailing)) mailing, round(avg(calling)) calling, round(avg(staffed)) staffed FROM bettaivr.public.ivr_status_history
            //          where atualizado between '2018/01/26'  and '2018/01/27' group by to_char(atualizado,'HH24:mi') order by to_char(atualizado,'HH24:mi') desc limit 13";

            $query = "SELECT to_char(atualizado,'HH24:mi') hora, round(avg(available)) available, round(avg(mailing)) mailing, round(avg(calling)) calling, round(avg(staffed)) staffed FROM bettaivr.public.ivr_status_history
                        where atualizado between CURRENT_DATE  and CURRENT_DATE+1 group by to_char(atualizado,'HH24:mi') order by to_char(atualizado,'HH24:mi') desc limit 13";

            $resultchart = Populator::ConsultaDB( $query );
            $i = pg_num_rows($resultchart) -1;
            //$i =0;
            while($myrow = pg_fetch_assoc($resultchart)) {
                $arrocupados[$i]= $myrow['calling'];
                $arrmailing[$i]= $myrow['mailing'];
                $arravailable[$i]= $myrow['available'];
                $arrstaffed[$i]= $myrow['staffed'];
                $i=$i-1;
            }

            $string_ocupados = implode("|", $arrocupados);
            $string_mailing = implode("|", $arrmailing);
            $string_available = implode("|", $arravailable);
            $string_staffed= implode("|", $arrstaffed);

            $query = "select to_char(data,'HH24') hora, count(*) dial from ivr_discagem where data between CURRENT_DATE  and CURRENT_DATE+1 group by to_char(data,'HH24') order by 1";
            $resultdialchart = Populator::ConsultaDB( $query );
            echo '<script language="javascript">';
            echo ' var $resultado_discagem = [';
            $y=0;
            $intlim=0;
            $totalparcial=0;
            while($myrow = pg_fetch_assoc($resultdialchart)) {
                if ($y!=0) { echo ',';}
                echo '[';
                echo $myrow['hora'];
                echo ',';
                echo $myrow['dial'];
                echo ']';
                $y = (int)$myrow['hora'];
                if ($myrow['dial'] > $intlim) { $intlim = $myrow['dial'];}
                $totalparcial = $totalparcial + $myrow['dial'];
            }
            //echo '[';
            //echo $y+1;
            //echo ',0]];';
            echo '];';
            echo 'var $limitegraf = ';
            echo $intlim + 10;
            echo ';';
            echo '</script>';

        ?>


        <script type="text/javascript"> var $string_ocupados = "<?php echo $string_ocupados; ?>"; var $resultado_ocupados = $string_ocupados.split("|"); </script>  
        <script type="text/javascript"> var $string_mailing = "<?php echo $string_mailing; ?>"; var $resultado_mailing = $string_mailing.split("|");</script>   
        <script type="text/javascript"> var $string_available = "<?php echo $string_available; ?>"; var $resultado_available = $string_available.split("|");</script>   
        <script type="text/javascript"> var $string_staffed = "<?php echo $string_staffed; ?>"; var $resultado_staffed = $string_staffed.split("|");</script>   



               <!-- Content -->
        <section id="content" class="container">
            <!-- Breadcrumb -->
          <section id="login">


        <div class="clearfix"></div>


        <!-- Register -->


        <form name="frm_warning" id="box-register" method="POST" action="controllerWarning.php">
            <h2 class="m-t-0 m-b-15">Warning</h2>

             <div class="card">
                <div class="card-body">


                    <div class="table-responsive">
                        <table id="data-table" class="table">
                            <thead>
                                <tr>
                                 <td></td>
                                 <td></td>
                                 <td></td>
                                 <td></td>

                                <td><p><input type="checkbox" id="checkMaster" name="checkMaster"> Selecionar Todos</p></td>

                                </tr>

                                <tr>
                                    <th>Nome</th>
                                    <th>Telefone</th>
                                    <th>Numero de tentativas</th>
                                    <th>Ultima Tentativa</th>
                                    <th>Zerar Tentativas?</th>
                                </tr>
                            </thead>
                            <tbody>


                                <?php 

                            /*    function inverteData($data){
                                    if(count(explode("/",$data)) > 1){
                                        return implode("-",array_reverse(explode("/",$data)));
                                    }elseif(count(explode("-",$data)) > 1){
                                    return implode("/",array_reverse(explode("-",$data)));
                                    }
                                }; */

                                    $query = sprintf("select * from ivr_contatos, ivr_campanha where ivr_contatos.campanha = ivr_campanha.id and ivr_contatos.status = 0 and tentativas >= 5" );
                                    $result = Populator::ConsultaDB($query);

                                    while ($resultado = pg_fetch_array($result) ) {
                                        $nome = $resultado['nome'];
                                        $telefone = $resultado['telefone'];
                                        $tentativa = $resultado['tentativas'];
                                        $lastAttempt = $resultado['atualizado'];
                                        $dataconvertida = date('d/m/Y H:i:s', strtotime($lastAttempt));
                                        $codigo = $resultado['codigo'];

                               echo '         

                                <tr>
                                    <td>'.$nome.'</td>
                                    <td>'.$telefone.'</td>
                                    <td align="center">'.$tentativa.'</td>
                                    <td>'.$dataconvertida.'</td>
                                    <td><input type="checkbox" class="marcar" id="check" value='.$codigo.' name="check[]"/></td>
                                </tr>
                                ';
                                    }
                                ?>


                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

            <input type="submit" value="Resubmit" class="btn btn-sm m-r-5" />

        </form>

        <!-- Forgot Password -->
    <!-- Javascript Libraries -->
    <!-- jQuery -->
    <script src="jquery-3.3.1.min.js"></script>  <!-- jQuery Library -->

    <!-- Bootstrap -->
    <script src="js/bootstrap.min.js"></script>

    <!--  Form Related -->
    <script src="js/icheck.js"></script> <!-- Custom Checkbox + Radio -->

    <!-- All JS functions -->
    <script src="js/functions.js"></script>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script></section></section><!--JavascriptLibraries--><!--jQuery--><scriptsrc="js/jquery.min.js"></script> <!-- jQuery Library -->
    <script src="js/jquery-ui.min.js"></script> <!-- jQuery UI -->
    <script src="js/jquery.easing.1.3.js"></script> <!-- jQuery Easing - Requirred for Lightbox + Pie Charts-->
     <script src="vendors/bower_components/jqTree/tree.jquery.js"></script>



    <!-- Bootstrap -->
    <script src="js/bootstrap.min.js"></script>

    <!-- Charts -->
    <script src="js/charts/jquery.flot.js"></script> <!-- Flot Main -->
    <script src="js/charts/jquery.flot.time.js"></script> <!-- Flot sub -->
    <script src="js/charts/jquery.flot.animator.min.js"></script> <!-- Flot sub -->
    <script src="js/charts/jquery.flot.resize.min.js"></script> <!-- Flot sub - for repaint when resizing the screen -->


      <!-- Vendors: Data tables -->
    <script src="vendors/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
    <script src="vendors/bower_components/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
    <script src="vendors/bower_components/datatables.net-buttons/js/buttons.print.min.js"></script>
    <script src="vendors/bower_components/jszip/dist/jszip.min.js"></script>
    <script src="vendors/bower_components/datatables.net-buttons/js/buttons.html5.min.js"></script>

    <!-- App functions and actions -->
    <script src="js/app.min.js"></script>

    <script src="js/sparkline.min.js"></script> <!-- Sparkline - Tiny charts -->
    <script src="js/easypiechart.js"></script> <!-- EasyPieChart - Animated Pie Charts -->
    <script src="js/charts.js"></script> <!-- All the above chart related functions -->

    <!-- Map -->
    <script src="js/maps/jvectormap.min.js"></script> <!-- jVectorMap main library -->
    <script src="js/maps/usa.js"></script> <!-- USA Map for jVectorMap -->

    <!--  Form Related -->
    <script src="js/icheck.js"></script> <!-- Custom Checkbox + Radio -->

    <!-- UX -->
    <script src="js/scroll.min.js"></script> <!-- Custom Scrollbar -->

    <!-- Other -->
    <script src="js/calendar.min.js"></script> <!-- Calendar -->
    <script src="js/feeds.min.js"></script> <!-- News Feeds -->


    <!-- All JS functions -->
    <script src="js/functions.js"></script>
</body>

In it I use PHP + HTML + CSS + Jquery with .php extension

However when I use the select all button it does not go into jquery as it should. in surveys say that because it is the client side will not have communication with the server side even being outside the tag.

    
asked by anonymous 26.04.2018 / 14:40

0 answers