mirror of
https://github.com/e107inc/e107.git
synced 2025-07-30 19:30:25 +02:00
Notice removal, general tidy
This commit is contained in:
@@ -6,27 +6,37 @@
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Stats logging plugin - admin functions
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/log/admin_config.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
require_once("../../class2.php");
|
||||
if (!getperms("P") || !plugInstalled('log'))
|
||||
/**
|
||||
* e107 Stats logging plugin
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage log
|
||||
* @version $Id$;
|
||||
*
|
||||
* @todo Change log directory to use new system log directory
|
||||
*/
|
||||
|
||||
require_once('../../class2.php');
|
||||
if (!getperms('P') || !e107::isInstalled('log'))
|
||||
{
|
||||
header("Location: ".e_BASE."index.php");
|
||||
header('Location: '.e_BASE.'index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once(e_ADMIN."auth.php");
|
||||
require_once(e_HANDLER."userclass_class.php");
|
||||
|
||||
require_once(e_ADMIN.'auth.php');
|
||||
require_once(e_HANDLER.'userclass_class.php');
|
||||
|
||||
|
||||
define('LOGPATH', e_PLUGIN.'log/');
|
||||
|
||||
include_lan(LOGPATH.'languages/'.e_LANGUAGE.'_admin_log.php');
|
||||
include_lan(e_PLUGIN.'log/languages/'.e_LANGUAGE.'_admin_log.php');
|
||||
|
||||
if (e_QUERY)
|
||||
{
|
||||
@@ -61,67 +71,67 @@ $export_stripurl = varset($_POST['export_stripurl'], 0);
|
||||
|
||||
if (isset($_POST['create_export']) && (($action == 'export') || ($action == 'datasets')))
|
||||
{
|
||||
$first_date = 0;
|
||||
$last_date = 0;
|
||||
$date_error = FALSE;
|
||||
if ($export_type == 'page')
|
||||
{
|
||||
switch ($export_date)
|
||||
{
|
||||
case '1' : // Single day
|
||||
$first_date = gmmktime(0,0,0,$export_month,$export_day,$export_year);
|
||||
$last_date = $first_date+86399;
|
||||
$export_filter = " `log_id`='".date("Y-m-j",$first_date)."'";
|
||||
break;
|
||||
case '2' : // Daily for a month
|
||||
$first_date = gmmktime(0,0,0,$export_month,1,$export_year);
|
||||
$last_date = gmmktime(0,0,0,$export_month+1,1,$export_year) - 1;
|
||||
$export_filter = " LEFT(`log_id`,8)='".gmstrftime("%Y-%m-",$first_date)."'";
|
||||
break;
|
||||
case '3' : // Monthly for a Year
|
||||
$first_date = gmmktime(0,0,0,1,1,$export_year);
|
||||
$last_date = gmmktime(0,0,0,1,1,$export_year+1) - 1;
|
||||
$export_filter = " LENGTH(`log_id`)=7 AND LEFT(`log_id`,5)='".gmstrftime("%Y-",$first_date)."'";
|
||||
break;
|
||||
case '4' : // Accumulated
|
||||
case '5' :
|
||||
$export_filter = "`log_id`='pageTotal'";
|
||||
$date_error = 'ignore';
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // Calculate strings for non-page sources
|
||||
$prefix_len = 0;
|
||||
$export_date = $export2_date;
|
||||
if (isset($stats_list[$export_type]))
|
||||
$first_date = 0;
|
||||
$last_date = 0;
|
||||
$date_error = FALSE;
|
||||
if ($export_type == 'page')
|
||||
{
|
||||
$prefix_len = strlen($export_type) + 1;
|
||||
switch ($export2_date)
|
||||
{
|
||||
case '3' : // Monthly for a Year
|
||||
if ($prefix_len > 0)
|
||||
switch ($export_date)
|
||||
{
|
||||
$first_date = gmmktime(0,0,0,1,1,$export_year);
|
||||
$last_date = gmmktime(0,0,0,1,1,$export_year+1) - 1;
|
||||
$export_filter = " LENGTH(`log_id`)='".($prefix_len + 7)."' AND LEFT(`log_id`,".($prefix_len + 5).")='".$export_type.":".gmstrftime("%Y-",$first_date)."'";
|
||||
case '1' : // Single day
|
||||
$first_date = gmmktime(0,0,0,$export_month,$export_day,$export_year);
|
||||
$last_date = $first_date+86399;
|
||||
$export_filter = " `log_id`='".date("Y-m-j",$first_date)."'";
|
||||
break;
|
||||
case '2' : // Daily for a month
|
||||
$first_date = gmmktime(0,0,0,$export_month,1,$export_year);
|
||||
$last_date = gmmktime(0,0,0,$export_month+1,1,$export_year) - 1;
|
||||
$export_filter = " LEFT(`log_id`,8)='".gmstrftime("%Y-%m-",$first_date)."'";
|
||||
break;
|
||||
case '3' : // Monthly for a Year
|
||||
$first_date = gmmktime(0,0,0,1,1,$export_year);
|
||||
$last_date = gmmktime(0,0,0,1,1,$export_year+1) - 1;
|
||||
$export_filter = " LENGTH(`log_id`)=7 AND LEFT(`log_id`,5)='".gmstrftime("%Y-",$first_date)."'";
|
||||
break;
|
||||
case '4' : // Accumulated
|
||||
case '5' :
|
||||
$export_filter = "`log_id`='pageTotal'";
|
||||
$date_error = 'ignore';
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case '4' : // Accumulated
|
||||
$export_filter = " `log_id`='".$export_type."'";
|
||||
$date_error = 'ignore';
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = ADSTAT_L54;
|
||||
{ // Calculate strings for non-page sources
|
||||
$prefix_len = 0;
|
||||
$export_date = $export2_date;
|
||||
if (isset($stats_list[$export_type]))
|
||||
{
|
||||
$prefix_len = strlen($export_type) + 1;
|
||||
switch ($export2_date)
|
||||
{
|
||||
case '3' : // Monthly for a Year
|
||||
if ($prefix_len > 0)
|
||||
{
|
||||
$first_date = gmmktime(0,0,0,1,1,$export_year);
|
||||
$last_date = gmmktime(0,0,0,1,1,$export_year+1) - 1;
|
||||
$export_filter = " LENGTH(`log_id`)='".($prefix_len + 7)."' AND LEFT(`log_id`,".($prefix_len + 5).")='".$export_type.":".gmstrftime("%Y-",$first_date)."'";
|
||||
}
|
||||
break;
|
||||
case '4' : // Accumulated
|
||||
$export_filter = " `log_id`='".$export_type."'";
|
||||
$date_error = 'ignore';
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = ADSTAT_L54;
|
||||
}
|
||||
}
|
||||
if (($date_error != 'ignore') && (($first_date == 0) || ($last_date == 0) || $date_error))
|
||||
{
|
||||
$message = ADSTAT_L47;
|
||||
}
|
||||
}
|
||||
if (($date_error != 'ignore') && (($first_date == 0) || ($last_date == 0) || $date_error))
|
||||
{
|
||||
$message = ADSTAT_L47;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -2,38 +2,44 @@
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Copyright (C) 2008-2010 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Stats logging plugin - admin help text
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* e107 Stats logging plugin
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/log/e_help.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* @package e107_plugins
|
||||
* @subpackage log
|
||||
* @version $Id$;
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
define("LOGPATH", e_PLUGIN."log/");
|
||||
include_lan(LOGPATH."languages/".e_LANGUAGE."_log_help.php");
|
||||
include_lan(e_PLUGIN.'log/languages/'.e_LANGUAGE."_log_help.php");
|
||||
|
||||
if (e_QUERY) list($action,$junk) = explode('.',e_QUERY); else $action = 'list';
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
case 'export' :
|
||||
$text = LAN_STAT_HELP_04;
|
||||
break;
|
||||
case 'rempage' :
|
||||
$text = LAN_STAT_HELP_03;
|
||||
break;
|
||||
case 'history' :
|
||||
$text = LAN_STAT_HELP_02;
|
||||
break;
|
||||
default :
|
||||
$text = LAN_STAT_HELP_05;
|
||||
case 'export' :
|
||||
$text = LAN_STAT_HELP_04;
|
||||
break;
|
||||
case 'rempage' :
|
||||
$text = LAN_STAT_HELP_03;
|
||||
break;
|
||||
case 'history' :
|
||||
$text = LAN_STAT_HELP_02;
|
||||
break;
|
||||
default :
|
||||
$text = LAN_STAT_HELP_05;
|
||||
}
|
||||
$ns -> tablerender(LAN_STAT_HELP_01, $text);
|
||||
unset($text);
|
||||
|
Reference in New Issue
Block a user