!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/home/mnnews/public_html/phpads/admin/report-plugins/   drwxr-xr-x
Free 3.9 GB of 27.03 GB (14.41%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     globalhistory.plugin.php (4.21 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php // $Revision: 1.1 $

/************************************************************************/
/* phpAdsNew 2 - Campaign Overview Plugin 1.0                           */
/* ==========================================                           */
/*                                                                      */
/* Copyright (c) 2001 by Niels Leenheer <niels@creatype.nl>             */
/* http://sourceforge.net/projects/phpadsnew                            */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/


// Public name of the plugin info function
$plugin_info_function        = "Plugin_GlobalhistoryInfo";


// Public info function
function Plugin_GlobalhistoryInfo()
{
    global
$strGlobalHistory;
    
    
$plugininfo = array (
        
"plugin-name"            => $strGlobalHistory,
        
"plugin-description"    => "Generate an overview of the global history.
                                    The report is exported as CSV for use in a spreadsheet."
,
        
"plugin-author"            => "Niels Leenheer",
        
"plugin-export"            => "csv",
        
"plugin-authorize"        => phpAds_Admin,
        
"plugin-execute"        => "Plugin_GlobalhistoryExecute",
        
"plugin-import"            => array (
            
"delimiter"        => array (
                
"title"                    => "Delimiter",
                
"type"                    => "edit",
                
"size"                    => 1,
                
"default"                => "," ) )
    );
    
    return (
$plugininfo);
}



/*********************************************************/
/* Private plugin function                               */
/*********************************************************/

function Plugin_GlobalhistoryExecute($delimiter=",")
{
    global
$phpAds_config, $date_format;
    global
$strGlobalHistory, $strTotal, $strDay, $strViews, $strClicks, $strCTRShort;
    
    
header ("Content-type: application/csv\nContent-Disposition: \"inline; filename=globalhistory.csv\"");
    
    
    if (
$phpAds_config['compact_stats'])
    {
        
$res_query = "
            SELECT
                DATE_FORMAT(day, '"
.$date_format."') as day,
                SUM(views) AS adviews,
                SUM(clicks) AS adclicks
            FROM
                "
.$phpAds_config['tbl_adstats']."
            GROUP BY
                day
        "
;
        
        
$res_banners = phpAds_dbQuery($res_query) or phpAds_sqlDie();
        
        while (
$row_banners = phpAds_dbFetchArray($res_banners))
        {
            
$stats [$row_banners['day']]['views'] = $row_banners['adviews'];
            
$stats [$row_banners['day']]['clicks'] = $row_banners['adclicks'];
        }
    }
    else
    {
        
$res_query = "
            SELECT
                DATE_FORMAT(t_stamp, '"
.$date_format."') as day,
                count(bannerid) as adviews
            FROM
                "
.$phpAds_config['tbl_adviews']."
            GROUP BY
                day
        "
;
        
        
$res_banners = phpAds_dbQuery($res_query) or phpAds_sqlDie();
        
        while (
$row_banners = phpAds_dbFetchArray($res_banners))
        {
            
$stats [$row_banners['day']]['views'] = $row_banners['adviews'];
            
$stats [$row_banners['day']]['clicks'] = 0;
        }
        
        
$res_query = "
            SELECT
                DATE_FORMAT(t_stamp, '"
.$date_format."') as day,
                count(bannerid) as adclicks
            FROM
                "
.$phpAds_config['tbl_adclicks']."
            GROUP BY
                day
        "
;
        
        
$res_banners = phpAds_dbQuery($res_query) or phpAds_sqlDie();
        
        while (
$row_banners = phpAds_dbFetchArray($res_banners))
        {
            
$stats [$row_banners['day']]['clicks'] = $row_banners['adclicks'];
        }
    }
    
    echo
$strGlobalHistory."\n\n";
    echo
$strDay.$delimiter.$strViews.$delimiter.$strClicks.$delimiter.$strCTRShort."\n";
    
    
$totalclicks = 0;
    
$totalviews = 0;
    
    if (isset(
$stats) && is_array($stats))
    {
        for (
reset($stats);$key=key($stats);next($stats))
        {
            
$row = array();
            
            
$row[] = $key;
            
$row[] = $stats[$key]['views'];
            
$row[] = $stats[$key]['clicks'];
            
$row[] = phpAds_buildCTR ($stats[$key]['views'], $stats[$key]['clicks']);
            
            echo
implode ($delimiter, $row)."\n";
            
            
$totalclicks += $stats[$key]['clicks'];
            
$totalviews += $stats[$key]['views'];
        }
    }
    
    echo
"\n";
    echo
$strTotal.$delimiter.$totalviews.$delimiter.$totalclicks.$delimiter.phpAds_buildCTR ($totalviews, $totalclicks)."\n";
}

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0039 ]--