Exemple #1
0
            photoplog_update_fileuploads_counts_array($photoplog_file_ids);
            photoplog_regenerate_counts_table_v2($photoplog_cat_ids);
            $_REQUEST['do'] = 'wipe';
        }
    }
    if ($_REQUEST['do'] == 'approve' || $_REQUEST['do'] == 'unapprove') {
        $photoplog_moderate = 1;
        if ($_REQUEST['do'] == 'approve') {
            $photoplog_moderate = 0;
        }
        if ($db->query_write("UPDATE " . PHOTOPLOG_PREFIX . "photoplog_ratecomment\r\n\t\t\t\tSET moderate = " . intval($photoplog_moderate) . "\r\n\t\t\t\tWHERE commentid IN (" . $photoplog_comment_sql . ")\r\n\t\t\t")) {
            if ($_REQUEST['do'] == 'approve') {
                $db->query_write("UPDATE " . PHOTOPLOG_PREFIX . "photoplog_fileuploads\r\n\t\t\t\t\tSET moderate = 0\r\n\t\t\t\t\tWHERE fileid IN (" . implode(',', $photoplog_file_ids) . ")\r\n\t\t\t\t");
            }
            photoplog_update_fileuploads_counts_array($photoplog_file_ids);
            photoplog_regenerate_counts_table_v2($photoplog_cat_ids);
            $_REQUEST['do'] = 'wipe';
        }
    }
}
if ($_REQUEST['do'] == 'wipe') {
    if ($photoplog_inline_action == 'files') {
        if ($vbulletin->options['photoplog_display_type'] == 1) {
            setcookie('photoplog_inlinepost', '', TIMENOW - 3600, '/');
        } else {
            setcookie('photoplog_inlinethread', '', TIMENOW - 3600, '/');
        }
    }
    if ($photoplog_inline_action == 'comments') {
        setcookie('photoplog_inlinepost', '', TIMENOW - 3600, '/');
    }
Exemple #2
0
                        $photoplog_fetch_userinfo = $db->query_first("SELECT username,email\r\n\t\t\t\t\t\tFROM " . TABLE_PREFIX . "user\r\n\t\t\t\t\t\tWHERE userid = " . intval($photoplog_fileids_row['userid']) . "\r\n\t\t\t\t\t\tAND (options & " . intval($vbulletin->bf_misc_useroptions['adminemail']) . ")\r\n\t\t\t\t\t");
                        if ($photoplog_fetch_userinfo) {
                            $photoplog_username = unhtmlspecialchars($photoplog_fetch_userinfo['username']);
                            $photoplog_title = $photoplog_fileids_row['title'];
                            $photoplog_subject = $photoplog_message = '';
                            eval(fetch_email_phrases('photoplog_declined_comment', -1, '', 'photoplog_'));
                            vbmail($photoplog_fetch_userinfo['email'], $photoplog_subject, $photoplog_message, true);
                        }
                        $db->free_result($photoplog_fetch_userinfo);
                    }
                }
                $db->free_result($photoplog_fileids_query);
                foreach ($photoplog_checked_commentids as $photoplog_commentid) {
                    $photoplog_comment_info = $db->query_first("SELECT userid,comment\r\n\t\t\t\t\tFROM " . PHOTOPLOG_PREFIX . "photoplog_ratecomment\r\n\t\t\t\t\tWHERE commentid = " . intval($photoplog_commentid) . "\r\n\t\t\t\t");
                    if ($photoplog_comment_info) {
                        $photoplog_have_comment = $photoplog_comment_info['comment'] != '' ? 1 : 0;
                        if ($db->query_write("DELETE FROM " . PHOTOPLOG_PREFIX . "photoplog_ratecomment\r\n\t\t\t\t\t\t\tWHERE commentid = " . intval($photoplog_commentid) . "\r\n\t\t\t\t\t\t")) {
                            if ($photoplog_have_comment) {
                                $db->query_write("UPDATE " . TABLE_PREFIX . "user\r\n\t\t\t\t\t\t\t\tSET photoplog_commentcount = photoplog_commentcount - 1\r\n\t\t\t\t\t\t\t\tWHERE userid = " . intval($photoplog_comment_info['userid']) . "\r\n\t\t\t\t\t\t\t");
                            }
                        }
                    }
                }
                photoplog_update_fileuploads_counts_array($photoplog_fileids_array);
                photoplog_regenerate_counts_table_v2($photoplog_catids_array);
            }
        }
    }
    print_cp_redirect("photoplog_comment.php?" . $vbulletin->session->vars['sessionurl'] . "do=moderate", 1);
}
print_cp_footer();