success: function ajax call function from another javascript

1
function paginacao_tabela_clientes_status(idpessoa){
  $.ajax
        ({
            type: 'POST',
            dataType: 'json',
            url: BASE_URL + '/clients/tabela_clientes_pedido_entregue',
            data: {idpessoa: idpessoa},
            success: function (msg)
            {
                var aoColumns = [{"data": "nomedesc"},
                    {"data": "id_pedido"},
                    {"data": "ped_representante"},
                    {"data": "num_sofa"},
                    {"data": "qtde"},
                    {"data": "totalpedido", render: $.fn.dataTable.render.number('.', ',', 2, 'R$ ')}];
                datatable('#table_pedido_entregue', msg, aoColumns);
            }});

url ajax clientsController.php function

    public function tabela_clientes_pedido_entregue() {
    $idpessoa = addslashes($_POST['idpessoa']);
    $cli = new Clients;
    $cli->tabela_clientes_pedido_entregue($idpessoa);
}

Clients.php model function

 function tabela_clientes_pedido_entregue($idpessoa) {
    $sql = $this->db->prepare("SELECT 
    'pedido'.'id' AS 'id_pedido',
    pedido.ped_representante,
    itempedido.num_sofa as num_sofa,
    itempedido.nomedesc as nomedesc,
    concat(itempedido.qtde_entregue,'/', itempedido.qtde_solicitada)as qtde,
     SUM(itempedido.qtde_entregue * 'itempedido'.'vlr_unitario')  AS 'totalpedido'      
    FROM 'pedido'
    JOIN 'pessoa' ON ('pedido'.'idcliente' = 'pessoa'.'id')
JOIN 'itempedido' ON (pedido.id = 'itempedido'.'idpedido')
    WHERE ((itempedido.qtde_solicitada - itempedido.qtde_entregue)= 0
    or (itempedido.qtde_solicitada - itempedido.qtde_entregue)< itempedido.qtde_solicitada )
    and pedido.idcliente = :idpessoa
    group by pedido.id, pedido.ped_representante,itempedido.num_sofa");
    $sql->bindValue(":idpessoa", $idpessoa);
    $sql->execute();
    $json = array();
    while ($row = $sql->fetch(PDO::FETCH_ASSOC)) {
        $json[] = $row;
    }
    echo json_encode($json);
}

Here is a function in javascript that is not calling the error_data_tables.js when calling

function datatable(tabela, json, data) {
$(tabela).dataTable(
        {
            "aaData": json,
            "aoColumns": data,
            "language": {
                "sEmptyTable": "Nenhum registro encontrado",
                "sInfo": "Mostrando de _START_ até _END_ de _TOTAL_ registros",
                "sInfoEmpty": "Mostrando 0 até 0 de 0 registros",
                "sInfoFiltered": "(Filtrados de _MAX_ registros)",
                "sInfoPostFix": "",
                "sInfoThousands": ".",
                "sLengthMenu": "_MENU_  Resultados por Página",
                "sLoadingRecords": "Carregando...",
                "sProcessing": "Processando...",
                "sZeroRecords": "Nenhum registro encontrado",
                "sSearch": "Pesquisar",
                "oPaginate": {
                    "sNext": "Próximo",
                    "sPrevious": "Anterior",
                    "sFirst": "Primeiro",
                    "sLast": "Último"
                },
                "oAria": {
                    "sSortAscending": ": Ordenar colunas de forma ascendente",
                    "sSortDescending": ": Ordenar colunas de forma descendente"
                }
            }
        }
);};

On the local server it recognizes normal put the links

<script type="text/javascript" src="<?php echo BASE_URL; ?>/assets/js/chama_dataTables.js"></script>

<script type="text/javascript" src="<?php echo BASE_URL; ?>/assets/js/paginacao_tabela_clientes_status.js"></script>

in home, but on the web server it recognizes the normal paging_table_status.js file, so I call the function     datatable ('# request_table_table', msg, aoColumns); but the server does not recognize, it appears in error

  


Fatal error : Class 'assetsController' not found in / home / marciavarais / public_html / core / core   .php on line 39
  the server will read it as if it were view

This view view it opens from view clients in _blank

<h1><center>Status</center></h1>
<h2>Cliente: <?php echo $client_info[0]['id'] ?> - <?php echo     $client_info[0]['nomedesc'] ?> </h2>
<script type="text/javascript">
var BASE_URL = "<?php echo BASE_URL; ?>";
window.onload = function () {
paginacao_tabela_clientes_status(<?php echo $client_info[0]['id']; ?>);
};
</script>
<div class="tabarea">
<div id="id_form_0" class="tabitemdespesa activetab">Pedidos</div>
<div id="id_form_1" class="tabitemdespesa ">Carga</div>
<div id="id_form_2" class="tabitemdespesa">Conta a Receber ( em  Desenvolvimento)</div>
</div>
<div class="tabcontent">
<div class="tabbody" style="display:block">
    <h3><center>Pedidos entregue</center></h3>
    <table cellspacing="0" border="0" width="100%"   id="table_pedido_entregue"  class="display">
        <thead>  
            <tr>
                <th width="40%" class="select-filter">Descrição  Produto</th>
                <th width="10%"class="select-filter">Nº pedido</th>
                <th width="10%"class="select-filter">Nº ped. repres.</th>
                <th width="10%" class="select-filter">Num_Sofa</th>
                <th width="10%"class="select-filter">Quantidade</th>
                <th width="30%"class="select-filter">Valor Total</th>
            </tr>
        </thead>
        <tbody>

        </tbody>
    </table>
    </div>
    </div>
    <link href="<?php echo BASE_URL; ?>/assets/css/cliente_status.css" rel="stylesheet" />

    <script type="text/javascript" src="<?php echo BASE_URL; ?>/assets/js/jquery-1.12.4.js"></script>

    <link rel="stylesheet" href="<?php echo BASE_URL; ?>/assets/DataTables/datatables.min.css"/>

    <script type="text/javascript" src="<?php echo BASE_URL; ?>/assets/DataTables/datatables.min.js"></script>

    <script type="text/javascript" src="<?php echo BASE_URL; ?>/assets/js/chama_dataTables.js"></script>

    <script type="text/javascript" src="<?php echo BASE_URL; ?>/assets/js/paginacao_tabela_clientes_status.js"></script>

.htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
#RewriteRule ^(.*)$ /baseflex/index.php?q=$1 [QSA,L]

# php -- BEGIN cPanel-generated handler, do not edit
# Este domínio herda o pacote “PHP”.
# php -- END cPanel-generated handler, do not edit

logs_erros_php

[01-Oct-2017 01:35:46 America/Sao_Paulo] PHP Fatal error:  Uncaught Error: Class 'assetsController' not found in /home/marciavarais/public_html/core/core.php:39
Stack trace:
#0 /home/marciavarais/public_html/index.php(44): core->run()
#1 {main}
thrown in /home/marciavarais/public_html/core/core.php on line 39

depends on which code only has php na view request ajax vo put the top Does anyone know what it can be?

    
asked by anonymous 30.09.2017 / 08:17

0 answers