View Single Post
  #34  
Old 07-04-2009, 11:05 AM
cono1717 cono1717 is offline
 
Join Date: Sep 2008
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

YAY that worked...kinda.

For some reason not all of the fields display properly.

PHP File
PHP Code:
<?php



// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT''activity');

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array('ACTIVITY','ACTIVITY_bits''ACTIVITY_mbits''ACTIVITY_ybits''MEMBERINFO''memberinfo_profilefield');

// pre-cache templates used by specific actions
$actiontemplates = array();


// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################


if(empty($_REQUEST['do']))
{

    
// sanitize the variables myself
    
if(empty($_REQUEST['m']))
    {
        
$month vbdate('n');
        
$monthliteral vbdate('F');
    }
    else
    {
        
$month intval($_REQUEST['m']);
        
$monthliteral $months["$_REQUEST[m]"];
    }
    
    if(empty(
$_REQUEST['y']))
    {
        
$year vbdate('Y');
    }
    else
    {
        
$year intval($_REQUEST['y']);
    }

    
// generate months dropdown
    
$months = array(
        
=> 'January',
        
=> 'February',
        
=> 'March',
        
=> 'April',
        
=> 'May',
        
=> 'June',
        
=> 'July',
        
=> 'August',
        
=> 'September',
        
10 => 'October',
        
11 => 'November',
        
12 => 'December'
    
);
    
    foreach(
$months AS $mkey => $mval)
    {
        if(
$mkey == $month)
        {
            
$checked ' selected="selected"';
        }
        eval(
'$mbits .= "' fetch_template('ACTIVITY_mbits') . '";');
        unset(
$checked);
    }
    
    
// generate years dropdown
    
for($i intval(vbdate('Y')); $i intval(vbdate('Y')) + 4$i++)
    {
        if(
$i == $year)
        {
            
$checked2 ' selected="selected"';
        }
        eval(
'$ybits .= "' fetch_template('ACTIVITY_ybits') . '";');
        unset(
$checked2);
    }            
    
    
// important cutoff data
    
$cutoffstart gmmktime(000$month1$year);
    
$cutoffend gmmktime(000$monthvbdate('t'$cutoffstart), $year);
    
    
//echo $cutoffstart . '=' . TIMENOW;
    
    
if($cutoffstart TIMENOW)
    {
        eval(
standard_error('This date is in the future. You cannot select it. Go back and select antoher.'));    
    }
    
    
// limit our records
    
$limit 30000;    

    
// run query
$getusers $vbulletin->db->query("
    SELECT COUNT(p.postid) AS total, p.userid, u.username, u.joindate, f.field7
    FROM " 
TABLE_PREFIX "post AS p
    LEFT JOIN " 
TABLE_PREFIX "user AS u USING (userid)
    LEFT JOIN " 
TABLE_PREFIX "userfield AS f USING (userid)
    WHERE p.dateline > 
$cutoffstart
        AND p.dateline < 
$cutoffend
    GROUP BY userid
    ORDER BY total DESC
    LIMIT 
$limit
"
);  

    
    
$c 0;
    while(
$auinfo $db->fetch_array($getusers))


    {
        
$c++;
        
$auinfo['joindate'] = vbdate($vbulletin->options['dateformat'], $auinfo['joindate'], true);
        
//Let's define those variables

if ($auinfo['field7'] == "I don\'t have a package")
{
    
$conditional 0;
} else if (
$auinfo['field7'] == "SHARED A")
{
    
$conditional 5;
} else if (
$auinfo['field7'] == "SHARED B")
{
    
$conditional 15;
} else if (
$auinfo['field7'] == "SHARED C")
{
    
$conditional 20;
} else if (
$auinfo['field7'] == "SHARED D")
{
    
$conditional 20;
} else if (
$auinfo['field7'] == "RESELLER A")
{
    
$conditional 25;
}
 else if (
$auinfo['field7'] == "RESELLER B")
{
    
$conditional == 75;
} else if (
$auinfo['field7'] == "RESELLER C")
{
    
$conditional == 200;
}
 else if (
$auinfo['field7'] == "RESELLER D")
{
    
$conditional 200;
} else if (
$auinfo['field7'] == "Custom/Other")
{
    
$conditional 00;
}
        eval(
'$userbits .= "' fetch_template('ACTIVITY_bits') . '";');    

    }

    
$navbits construct_navbits(array('' => 'Activity Statistics'));
    eval(
'$navbar = "' fetch_template('navbar') . '";');
    eval(
'$aufield7 = "' fetch_template('postbit') . '";');
    eval(
'print_output("' fetch_template('ACTIVITY') . '");');    
}




?>
Screenshot of errors:-
http://i41.tinypic.com/5kg1tx.jpg
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01574 seconds
  • Memory Usage 1,852KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete