<?php session_start(); include "include/config.php"; include "include/function.php"; chk_member_login(); if ($_REQUEST['action'] == 'del') { $conn->execute("update pm set\n inbox_track = 1\n where pm_id = {$_REQUEST['id']} and receiver='{$_SESSION['USERNAME']}'\n "); header("Location: inbox.php"); } //PAGING STARTS if ($_REQUEST[page] == "") { $page = 1; } else { $page = $_REQUEST[page]; } $sql = "SELECT count(*) as total from pm where receiver='{$_SESSION['USERNAME']}' and inbox_track=2 limit {$config['total_per_ini']}"; $ars = $conn->Execute($sql); if ($ars->fields['total'] <= $config[total_per_ini]) { $total = $ars->fields['total']; } else { $total = $config[total_per_ini]; } $tpage = ceil($total / $config[items_per_page]); if ($tpage == 0) { $spage = $tpage + 1; } else { $spage = $tpage; } $startfrom = ($page - 1) * $config[items_per_page]; $sql = "select * from pm where receiver='{$_SESSION['USERNAME']}' and inbox_track=2 order by pm_id desc limit {$startfrom}, {$config['items_per_page']}";
$conn->execute($sql); //END //INCREASE TOTAL WATCH COUNT if ($_SESSION[UID] != "") { $sql = "update signup set watched_video=watched_video+1 WHERE UID={$_SESSION['UID']}"; $conn->execute($sql); } //END //ADD AS PLAYLIST if ($_SESSION[UID] != "") { $sql = "insert playlist_audio set UID = '{$_SESSION['UID']}', VID = " . $list[0]; $conn->execute($sql); } //ADD COMMENT if ($_REQUEST[action] == "comment" || $_REQUEST[action] == "addfavour") { chk_member_login($_REQUEST['viewkey']); } if ($_POST[commentpost] != "") { if ($addcomment == "") { $err = "Please type something in the comment box."; } #echo $_SESSION[UID] . "/" .$list[1]; if ($_SESSION[UID] == $list[1]) { $err = "You can not post comment to your audio."; } if ($err == "") { # ADDING COMMENTS FOR AUDIO $sql = "insert into comments_audio set VID='{$list['0']}', UID='{$_SESSION['UID']}', commen='{$addcomment}', addtime='" . time() . "'"; $conn->execute($sql); //echo mysql_affected_rows(); if (mysql_affected_rows() == 1) {