HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/freecams1.com/public_html/admin/reported_comments.php
<?php 
    require "header.php"; 

    if($_POST['remove']) {
	foreach($_POST['remove'] as $i) {
            dbQuery("DELETE FROM reported_comments WHERE comment = '$i'");
	}
    }
    
    if($_POST['delete']) {
        foreach($_POST['delete'] as $i) {
            dbQuery("DELETE FROM reported_comments WHERE comment = '$i'");
            dbQuery("DELETE FROM comments WHERE record_num = '$i'");
        }
    }
?>
<h1><span class="style1">Admin Area</span></h1>
<hr>
<div class="box" id="pagecontent">
<p><?php echo $error; ?></p>
<form method="POST" action="">
<h2>Reported Comments</h2>
<table width="686" style='border: 1px solid #BAC9CF;'>
    <tr>
      <td width="155" bgcolor="#C0C0BE" class="style5"><span class="style5">Video</span></td>
	  <td width="285" bgcolor="#C0C0BE" class="style5">Comment</td>
	  <td width="81" bgcolor="#C0C0BE" class="style5">Poster IP</td>
	  <td width="36" bgcolor="#C0C0BE" class="style5">Amt</td>
	  <td width="50" bgcolor="#C0C0BE" class="style5"><span>Remove</span></td>
      <td width="41" bgcolor="#C0C0BE" class="style5"><span>Delete</span></td>
    </tr>
    <?php
        $bgcolor = "#FFFFFF";
        $result = dbQuery("SELECT content.title, comments.ip as ip, comments.comment, COUNT(reported_comments.record_num) as amount, content.record_num as connum, comments.record_num AS recnum FROM content, comments, reported_comments WHERE comments.content = content.record_num AND reported_comments.comment = comments.record_num GROUP BY comments.record_num ORDER BY amount DESC",false);
        foreach($result as $row) { 
    ?>
    <tr>
      <td><a href='/video.php?id=<?php echo $row[connum]; ?>' target='_blank'><?php echo $row[title]; ?></a></td>
	  <td><?php echo $row[comment]; ?></td>
	  <td><?php echo $row[ip]; ?></td>
	  <td><?php echo $row[amount]; ?></td>
	  <td><input name="remove[]" type="checkbox" value="<?php echo $row[recnum]; ?>" /></td>
      <td><input name="delete[]" type="checkbox" value="<?php echo $row[recnum]; ?>" /></td>
    </tr>
<?php 
if($bgcolor == '#FFFFFF') { $bgcolor = "#E7E7E7"; } else { $bgcolor = '#FFFFFF'; }
}
?>
    <tr>
      <td colspan="8"><center>
        <p><br />
          <input name="Submit" type="submit" value="Delete Selected" />
        </p>
        <p>*Amt = Number of times flagged | Remove: Removes from this list | Delete: Deletes comment </p>
      </center></td>
    </tr>
</table>
  <p>&nbsp;</p>
  </form>
  </div>
<p style="clear: both;"></p>
<?php require "footer.php"; ?>