public function viewBreakdownAction()
 {
     $_POST['order'] = '';
     //show breakdown
     runBreakdown(true);
     //show real or filtered clicks
     $mysql['user_id'] = DB::quote(getUserID());
     $breakdown = BTAuth::user()->getPref('breakdown');
     //grab breakdown report
     $breakdown_sql = "SELECT * FROM bt_c_statcache WHERE user_id='" . $mysql['user_id'] . "' and type='breakdown' ";
     $breakdown_result = DB::getRows($breakdown_sql);
     $this->setVar("breakdown", $breakdown);
     $this->setVar("breakdown_result", $breakdown_result);
     $this->loadView('overview/view_breakdown');
 }
Exemplo n.º 2
0
<?php

include_once $_SERVER['DOCUMENT_ROOT'] . '/xtracks-app/bootstrap.php';
AUTH::require_user();
//set the timezone for the user, for entering their dates.
AUTH::set_timezone($_SESSION['user_timezone']);
//show breakdown
runBreakdown(true);
//grab user time range preference
$time = grab_timeframe();
$mysql['to'] = mysql_real_escape_string($time['to']);
$mysql['from'] = mysql_real_escape_string($time['from']);
//show real or filtered clicks
$mysql['user_id'] = mysql_real_escape_string($_SESSION['user_id']);
$user_sql = "SELECT user_pref_breakdown, user_pref_show, user_cpc_or_cpv FROM 202_users_pref WHERE user_id=" . $mysql['user_id'];
$user_result = _mysql_query($user_sql, $dbGlobalLink);
//($user_sql);
$user_row = mysql_fetch_assoc($user_result);
$breakdown = $user_row['user_pref_breakdown'];
if ($user_row['user_pref_show'] == 'all') {
    $click_flitered = '';
}
if ($user_row['user_pref_show'] == 'real') {
    $click_filtered = " AND click_filtered='0' ";
}
if ($user_row['user_pref_show'] == 'filtered') {
    $click_filtered = " AND click_filtered='1' ";
}
if ($user_row['user_pref_show'] == 'leads') {
    $click_filtered = " AND click_lead='1' ";
}
Exemplo n.º 3
0
<?php

include_once $_SERVER['DOCUMENT_ROOT'] . '/202-config/connect.php';
AUTH::require_user();
//set the timezone for this user.
AUTH::set_timezone($_SESSION['user_timezone']);
//run the breakdown graph
runBreakdown(false);
//grab the users date range preferences
$time = grab_timeframe();
$mysql['to'] = $db->real_escape_string($time['to']);
$mysql['from'] = $db->real_escape_string($time['from']);
//show real or filtered clicks
$mysql['user_id'] = $db->real_escape_string($_SESSION['user_id']);
$user_sql = "SELECT user_pref_show, user_cpc_or_cpv FROM 202_users_pref WHERE user_id=" . $mysql['user_id'];
$user_result = _mysqli_query($user_sql, $dbGlobalLink);
//($user_sql);
$user_row = $user_result->fetch_assoc();
if ($user_row['user_pref_show'] == 'all') {
    $click_filtered = '';
}
if ($user_row['user_pref_show'] == 'real') {
    $click_filtered = " AND click_filtered='0' ";
}
if ($user_row['user_pref_show'] == 'filtered') {
    $click_filtered = " AND click_filtered='1' ";
}
if ($user_row['user_pref_show'] == 'filtered_bot') {
    $click_filtered = " AND click_bot='1' ";
}
if ($user_row['user_pref_show'] == 'leads') {