File size: 635B
<?php
require_once('../wu_init.php');
if (!wu_token()) { exit('wu-error'); }
if (!USER_LOGGED) { exit('wu-error'); }
include('wu_checkadmin.php');
if(isset($_POST['id']) && isset($_POST['last'])){
if(!empty($_POST['id']) && !empty($_POST['last'])){
$id = intval($_POST['id']);
$last = $_POST['last'];
$last = str_replace('m_', '', $last);
$last = intval($last);
$islast = mysqli_num_rows(mysqli_query($connect_db, "SELECT id FROM `".DB_PREFIX."_tickets_msg` WHERE tid = '$id' AND id > '$last' ORDER BY id DESC LIMIT 1"));
if ($islast > 0) { exit('1'); } else { exit('0'); }
} else { exit('wu-error'); }
} else { exit('wu-error'); }
?>