예제 #1
0
             $color = 'green';
         } else {
             $color = 'red';
         }
         print_description_row('<table width="100%" border="0"><tr><td width="22%"><font color="' . $color . '">' . $template_phrases[$template['id'] . "_" . $template['varname'] . "_subject"] . '</font></td><td width="29%">' . date("m-d-Y h:i:s A", $campaign['send_when']) . '</td><td width="8%">' . $sent . '</td><td width="8%">' . $failed . '</td><td width="15%">' . $unique_reads . '</td><td width="12%"><a href="qhvbmailer.php?do=manage_campaigns&act=2&campaign_id=' . $campaign['id'] . '">Full Stats</a></td><td width="8%"><a href="qhvbmailer.php?do=manage_campaigns&act=3&campaign_id=' . $campaign['id'] . '">Delete</a></tr></table>');
     }
     print_submit_row('Refresh', '');
 } elseif ($_GET['act'] == 2) {
     $vbulletin->input->clean_array_gpc('g', array('campaign_id' => TYPE_UINT));
     $campaign_id = $vbulletin->GPC['campaign_id'];
     if ($campaign_id > 0) {
         $sent = countTracks($campaign_id, 'sent');
         $failed = countTracks($campaign_id, 'failed');
         $unqread = countTracks($campaign_id, 'unique_read');
         $read = countTracks($campaign_id, 'read');
         $links = countTracks($campaign_id, 'link');
         print_form_header('qhvbmailer', 'manage_campaigns');
         print_table_header('Campaign Statistics');
         if (file_exists(DIR . '/includes/charts/chart.php')) {
             print_description_row('<center>' . InsertChart('../includes/charts/charts.swf', '../includes/charts/charts_library', '../includes/charts/chart.php?sent=' . $sent . '&failed=' . $failed . '&unqread=' . $unqread . '&read=' . $read . '&links=' . $links, 400, 320, 'FFFFFF', true) . '</center>');
         } else {
             print_cp_message('No charts file!', 'qhvbmailer.php?do=manage_campaigns', 2);
         }
         print_submit_row('Back', '');
     } else {
         print_cp_message('Campaign ID must be greater than zero!', 'qhvbmailer.php?do=manage_campaigns', 2);
     }
 } elseif ($_GET['act'] == 3) {
     $vbulletin->input->clean_array_gpc('g', array('campaign_id' => TYPE_UINT));
     if ($vbulletin->GPC['campaign_id'] > 0) {
         $db->query_write("DELETE FROM " . TABLE_PREFIX . "qhvbmailer_campaigns WHERE id='" . $vbulletin->GPC['campaign_id'] . "'");
예제 #2
0
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
include './global.php';
global $vbulletin;
require_once DIR . '/includes/qhvbmailer_functions.php';
$vbulletin->input->clean_array_gpc('g', array('campaign_id' => TYPE_UINT, 'email' => TYPE_STR, 'u' => TYPE_STR));
$campaign_id = $vbulletin->GPC['campaign_id'];
$email = $vbulletin->GPC['email'];
$url = $vbulletin->GPC['u'];
if ($campaign_id > 0 && !empty($email)) {
    if (empty($url)) {
        insertTrack($campaign_id, $email, 'read');
        $tracks = countTracks($campaign_id, 'unique_read');
        if ($tracks == 0) {
            insertTrack($campaign_id, $email, 'unique_read');
        }
    } else {
        insertTrack($campaign_id, $email, 'link');
        header("Location: " . $url);
    }
}
/*
Please do not remove this Copyright notice.
As you see this is a free script accordingly under GPL laws and you will see
a license attached accordingly to GNU.
You may NOT rewrite another hack and release it to the vBulletin.org community
or another website using this code without our permission, So do NOT try to release a hack using any part of our code without written permission from us!
Copyright 2007, BlogToRank.com