E:
/
home
/
kbcomunicacao1
/
Web
/
innterage
/
includes
/
Upload File
HOME
<?php session_start(); require 'conexao/funcao.inc.php'; require 'conexao/config.php'; require 'conexao/conn.php'; require 'conexao/function.php'; date_default_timezone_set("America/Sao_Paulo"); setlocale(LC_ALL, 'pt_BR'); $query1 = "SELECT * FROM cw_ocorrencia WHERE de_ocorrencia='$_SESSION[IDCLI]' AND CONCAT(termino_ocorrencia, ' ', horaco_ocorrencia) < NOW() AND status_ocorrencia='0' OR para_ocorrencia='$_SESSION[IDCLI]' AND CONCAT(termino_ocorrencia, ' ', horaco_ocorrencia) < NOW() AND status_ocorrencia='0'"; $link1 = DBConnect(); $result1 = @mysqli_query($link1, $query1) or die(mysqli_error($link1)); while($res1 = mysqli_fetch_assoc($result1)){ if($res1['de_ocorrencia']==$_SESSION['IDCLI']){ $sql = "select nome_user, sobrenome_user FROM cw_user WHERE id_user='$res1[para_ocorrencia]' LIMIT 1"; $result = DBExecute($sql); $res = mysqli_fetch_assoc($result); $autor = "Para: $res[nome_user] $res[sobrenome_user]"; }else{ $sql = "select nome_user, sobrenome_user FROM cw_user WHERE id_user='$res1[de_ocorrencia]' LIMIT 1"; $result = DBExecute($sql); $res = mysqli_fetch_assoc($result); $autor = "De: $res[nome_user] $res[sobrenome_user]"; } $sql2 = "select id_flw FROM cw_flw WHERE chave_flw='$res1[chave_ocorrencia]' LIMIT 1"; $result2 = DBExecute($sql2); $res2 = mysqli_fetch_assoc($result2); ?> <div class="author-name"> <?php echo $autor; ?> <small class="chat-date"> <?php echo dbDateToDate2($res1['termino_ocorrencia']); ?> às <?php echo $res1['horaco_ocorrencia']; ?> </small> </div> <a href="?pag=flw_detail&id=<?php echo $res2['id_flw']; ?>#<?php echo $res1['id_ocorrencia']; ?>" title="OCORRÊNCIA VENCIDA"> <div class="chat-message active3"> <?php echo limita_caracteres($res1['descricao_ocorrencia'], 58); ?> </div> </a> <?php } ?>