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/baretube.com.new/admin/reported_content.php
<?php
    require "header.php";

    if ($_POST['remove']) {
        foreach ($_POST['remove'] as $i) {
            if (is_numeric($i)) {
                dbQuery("DELETE FROM reported_content WHERE content = '$i'");
            }
        }
    }
    if ($_POST['delete']) {
        foreach ($_POST['delete'] as $i) {
            if (is_numeric($i)) {
                dbQuery("DELETE FROM reported_content WHERE content = '$i'");
                dbQuery("DELETE FROM content WHERE record_num = '$i'");
                dbQuery("DELETE FROM content_niches WHERE record_num = '$i'");
                dbQuery("DELETE FROM content_views WHERE record_num = '$i'");
                dbQuery("DELETE FROM comments WHERE content = '$i'");
            }
        }
    }
?>
<h1><span class="style1">Admin Area</span></h1>
<div class="box" id="pagecontent">
    <form method="POST" action="" class="form" novalidate autocomplete="off">
        <h2>Reported Content</h2>
        <table class="pagetable">
            <thead>
                <tr>
                    <td>Video</span></td>
                    <td>Amt</td>
                    <td><span>Remove</span></td>
                    <td><span>Delete</span></td>
                </tr>
            </thead>
            <tbody>
                <?php
                    $result = dbQuery("SELECT content.title, content.ip as ip, content.submitter as submitter, COUNT(reported_content.record_num) as amount, content.record_num as connum FROM content, reported_content WHERE reported_content.content = content.record_num GROUP BY content.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['amount']; ?></td>
                        <td>
                            <label class="checkbox">
                                <input type="checkbox" name="remove[]" value="<?php echo $row['recnum']; ?>" id="ids-record-<?php echo $row['recnum']; ?>"><i></i>
                            </label>
                        </td>
                        <td>
                            <label class="checkbox">
                                <input type="checkbox" name="delete[]" value="<?php echo $row['connum']; ?>" id="ids-content-<?php echo $row['connum']; ?>"><i></i>
                            </label>
                        </td>
                    </tr>
                <?php } ?>
                <tr class="item submit">
                    <td colspan="4">
                        <?php if (count($result) > 0) { ?>
                            <button type="submit" class="btn action-delete">Delete Selected</button>
                        <?php } ?>
                    </td>
                </tr>
                <?php if (count($result) > 0) { ?>
                    <tr>
                        <td colspan="4">
                            <div class="notification info">*Amt = Number of times flagged | Remove: Removes from this list | Delete: Deletes comment </div>
                        </td>
                    </tr>
                <?php } ?>
            </tbody>
        </table>
    </form>
</div>
<?php require "footer.php"; ?>