<tr> <th>ID</th> <th>Result</th> <th>SMS ID</th> <th>Sms Inserted</th> <th>Nome</th> <th>Sms State</th> <th>Sms Date</th> <th>Sms Contact</th> <th>Sms Text</th> </tr> </tfoot>--> <tbody> <?php $table = smsGetByFiltro("", "sms_date"); if (count($table) > 0) { while ($data = $table->fetchArray()) { ?> <tr onclick="viewGr('<?php echo $data['id']; ?> ');"> <td><?php echo $data['id']; ?> </td> <td><?php switch ($data['state']) { case "OK":
<?php include 'C:/xampp/htdocs/profumi/includes/allpage.php'; //require 'C:/xampp/htdocs/gr-guias/sms/bootstrap.php'; //openDataBase("localhost", "gr", "root", "fafedis"); //Estado dos sms //aqui vou atualizar o estado das sms antes $where = 'state != "OK" AND sms_date IS NOT NULL'; $table = smsGetByFiltro($where, 'id'); if (count($table) > 0) { while ($data = $table->fetchArray()) { //$versms = verifysms($data['sms_id']); //$status = $versms->body->MessageInfo->DeliveryStatus; $result = getreportegoi($data['smsid']); $sent = intval($result['SENT']); $delivered = intval($result['DELIVERED']); $not_delivered = intval($result['NOT_DELIVERED']); $invalid = intval($result['INVALID']); $continu = true; $status = 0; if ($delivered - $not_delivered - $invalid > 0) { $texto = "SMS enviado e recebido pelo cliente"; $continu = false; $status = 'OK'; } if ($not_delivered - $delivered - $invalid > 0 && $continu) { $texto = "SMS enviado mas esta pendente"; $continu = false; $status = '2'; } if ($invalid - $delivered - $not_delivered > 0 && $continu) {