1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 12:20:44 +02:00

More absolute links

This commit is contained in:
e107steved
2010-01-09 12:44:11 +00:00
parent 608dc984f1
commit 1d7546f0cf
3 changed files with 73 additions and 38 deletions

View File

@@ -9,8 +9,8 @@
* Forthcoming events menu handler for event calendar
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_menu.php,v $
* $Revision: 1.10 $
* $Date: 2010-01-04 22:36:27 $
* $Revision: 1.11 $
* $Date: 2010-01-09 12:44:11 $
* $Author: e107steved $
*/
@@ -19,7 +19,7 @@
*
* @package e107_plugins
* @subpackage event_calendar
* @version $Id: calendar_menu.php,v 1.10 2010-01-04 22:36:27 e107steved Exp $;
* @version $Id: calendar_menu.php,v 1.11 2010-01-09 12:44:11 e107steved Exp $;
*/
if (!defined('e107_INIT')) { exit; }
@@ -192,7 +192,7 @@ for($cal_c = 1; $cal_c <= $numberdays; $cal_c++)
}
}
}
$cal_text .= $CALENDAR_MENU_DAY_START[$cal_css]."<a {$title} href='" . e_PLUGIN . "calendar_menu/event.php?{$cal_linkut}'>{$cal_img}</a>";
$cal_text .= $CALENDAR_MENU_DAY_START[$cal_css]."<a {$title} href='" . e_PLUGIN_ABS."calendar_menu/event.php?{$cal_linkut}'>{$cal_img}</a>";
$cal_text .= $CALENDAR_MENU_DAY_END[$cal_css];
$cal_loop++;
if ($cal_loop == 7)

View File

@@ -9,21 +9,29 @@
*
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/log/stats.php,v $
* $Revision: 1.14 $
* $Date: 2009-11-18 01:05:47 $
* $Author: e107coders $
* $Revision: 1.15 $
* $Date: 2010-01-09 12:44:11 $
* $Author: e107steved $
*/
require_once("../../class2.php");
if (!plugInstalled('log'))
/**
* e107 Stats logging plugin
*
* @package e107_plugins
* @subpackage log
* @version $Id: stats.php,v 1.15 2010-01-09 12:44:11 e107steved Exp $;
*/
require_once('../../class2.php');
if (!e107::isInstalled('log'))
{
header("Location: ".e_BASE."index.php");
header('Location: '.e_BASE.'index.php');
exit;
}
include_lan(e_PLUGIN."log/languages/".e_LANGUAGE.".php");
include_lan(e_PLUGIN.'log/languages/'.e_LANGUAGE.'.php');
$bar = (file_exists(THEME."images/bar.png") ? THEME."images/bar.png" : e_IMAGE."generic/bar.png");
$bar = (file_exists(THEME.'images/bar.png') ? THEME_ABS.'images/bar.png' : e_IMAGE_ABS.'generic/bar.png');
$eplug_css[] = "<style type='text/css'>
<!--
.b { background-image: url(".$bar."); border: 1px solid #999; height: 10px; font-size: 0px }
@@ -406,6 +414,13 @@ $country["zw"] = "Zimbabwe";
6: screen resolution/colour depth
7: referers
8: search engine strings
9: Recent visitors
10: Daily visitors
11: Monthly visitors
12: Error pages today
13: Error pages all-time
14: Browsers consolidated
15: OSs consolidated
*/
function display_pars($rec_pars, $disp_pars = '*')
@@ -555,7 +570,7 @@ switch($action)
15 - Consolidated OS view (not listed as a menu option)
*/
$path = e_PLUGIN."log/stats.php";
$path = e_PLUGIN_ABS.'log/stats.php';
$links = "
<div style='text-align: center;'>".
($action != 1 ? "<a href='{$path}?1'>".ADSTAT_L8."</a>" : "<b>".ADSTAT_L8."</b>")." | ".
@@ -638,11 +653,13 @@ class siteStats
/* get today's logfile ... */
$logfile = e_PLUGIN."log/logs/logp_".date("z.Y", time()).".php";
if(is_readable($logfile)) {
if(is_readable($logfile))
{
require($logfile);
}
$logfile = e_PLUGIN."log/logs/logi_".date("z.Y", time()).".php";
if(is_readable($logfile)) {
if(is_readable($logfile))
{
require($logfile);
}
@@ -797,12 +814,12 @@ class siteStats
{
if($info['ttlv'])
{
if (!$info['url'] && (($key == 'index') || (strpos($key,':index') !== FALSE))) $info['url'] = e_BASE.'index.php'; // Avoids empty link
if (!$info['url'] && (($key == 'index') || (strpos($key,':index') !== FALSE))) $info['url'] = e_HTTP.'index.php'; // Avoids empty link
$percentage = round(($info['ttlv']/$total) * 100, 2);
$text .= "<tr>
<td class='forumheader3' >
".($can_delete ? "<a href='".e_SELF."?{$action}.rem.".rawurlencode($key)."'><img src='".e_PLUGIN."log/images/remove.png' alt='".ADSTAT_L39."' title='".ADSTAT_L39."' style='vertical-align: middle;' /></a> " : "")."
<img src='".e_PLUGIN."log/images/html.png' alt='' style='vertical-align: middle;' /> <a href='".$info['url']."'>".$key."</a>
".($can_delete ? "<a href='".e_SELF."?{$action}.rem.".rawurlencode($key)."'><img src='".e_PLUGIN_ABS."log/images/remove.png' alt='".ADSTAT_L39."' title='".ADSTAT_L39."' style='vertical-align: middle;' /></a> " : "")."
<img src='".e_PLUGIN_ABS."log/images/html.png' alt='' style='vertical-align: middle;' /> <a href='".$info['url']."'>".$key."</a>
";
$text .= "</td>
<td class='forumheader3' >".$this->bar($percentage, $info['ttlv'])."</td>
@@ -831,10 +848,10 @@ class siteStats
{
if($info['ttlv'])
{
if (!$info['url'] && (($key == 'index') || (strpos($key,':index') !== FALSE))) $info['url'] = e_BASE.'index.php'; // Avoids empty link
if (!$info['url'] && (($key == 'index') || (strpos($key,':index') !== FALSE))) $info['url'] = e_HTTP.'index.php'; // Avoids empty link
$percentage = round(($info['unqv']/$totalv) * 100, 2);
$text .= "<tr>
<td class='forumheader3' style='width: 20%;'><img src='".e_PLUGIN."log/images/html.png' alt='' style='vertical-align: middle;' /> <a href='".$info['url']."'>".$key."</a></td>
<td class='forumheader3' style='width: 20%;'><img src='".e_PLUGIN_ABS."log/images/html.png' alt='' style='vertical-align: middle;' /> <a href='".$info['url']."'>".$key."</a></td>
<td class='forumheader3' style='width: 70%;'>".$this -> bar($percentage, $info['unqv'])."</td>
<td class='forumheader3' style='width: 10%; text-align: center;'>".$percentage."%</td>
</tr>\n";
@@ -952,7 +969,7 @@ class siteStats
}
$percentage = round(($info/$total) * 100, 2);
$text .= "<tr>
<td class='forumheader3' style='width: 20%;'>".($image ? "<img src='".e_PLUGIN."log/images/{$image}' alt='' style='vertical-align: middle;' /> " : "").$key."</td>".
<td class='forumheader3' style='width: 20%;'>".($image ? "<img src='".e_PLUGIN_ABS."log/images/{$image}' alt='' style='vertical-align: middle;' /> " : "").$key."</td>".
($entries == 1 ? "<td class='forumheader3' style='width: 70%;'>".$this -> bar($percentage, $info)."</td>" : "<td class='forumheader3' style='width: 70%;'>".$this -> bar($percentage, $info)."</td>")."
<td class='forumheader3' style='width: 10%; text-align: center;'>".$percentage."%</td>
</tr>\n";
@@ -1075,7 +1092,7 @@ class siteStats
$percentage = round(($info/$total) * 100, 2);
$text .= "<tr>
<td class='forumheader3' style='width: 20%;'>".($image ? "<img src='".e_PLUGIN."log/images/$image' alt='' style='vertical-align: middle;' /> " : "").$key."</td>".
<td class='forumheader3' style='width: 20%;'>".($image ? "<img src='".e_PLUGIN_ABS."log/images/{$image}' alt='' style='vertical-align: middle;' /> " : "").$key."</td>".
($entries == 1 ? "<td class='forumheader3' style='width: 70%;'>".$this -> bar($percentage, $info)."</td>" : "<td class='forumheader3' style='width: 70%;'>".$this -> bar($percentage, $info)."</td>")."
<td class='forumheader3' style='width: 10%; text-align: center;'>".$percentage."%</td>
</tr>\n";
@@ -1239,7 +1256,7 @@ class siteStats
{
$percentage = round(($info/$total) * 100, 2);
$text .= "<tr>
<td class='forumheader3' style='width: 20%;'><img src='".e_PLUGIN."log/images/screen.png' alt='' style='vertical-align: middle;' /> ".$key."</td>".
<td class='forumheader3' style='width: 20%;'><img src='".e_PLUGIN_ABS."log/images/screen.png' alt='' style='vertical-align: middle;' /> ".$key."</td>".
($entries == 1 ? "<td class='forumheader3' style='width: 70%;'>".$this -> bar($percentage, $info)."</td>" : "<td class='forumheader3' style='width: 70%;'>".$this -> bar($percentage, $info)."</td>")."
<td class='forumheader3' style='width: 10%; text-align: center;'>".$percentage."%</td>
</tr>\n";
@@ -1313,7 +1330,7 @@ class siteStats
$key = substr($key, 0, 50)." ...";
}
$text .= "<tr>
<td class='forumheader3'><img src='".e_PLUGIN."log/images/html.png' alt='' style='vertical-align: middle;' /> <a href='".$info['url']."' rel='external'>".$key."</a></td>
<td class='forumheader3'><img src='".e_PLUGIN_ABS."log/images/html.png' alt='' style='vertical-align: middle;' /> <a href='".$info['url']."' rel='external'>".$key."</a></td>
<td class='forumheader3'>".$this -> bar($percentage, $info['ttl'])."</td>
<td class='forumheader3' style='text-align: center;'>".$percentage."%</td>
</tr>\n";
@@ -1383,7 +1400,7 @@ class siteStats
$percentage = round(($info/$total) * 100, 2);
$key = str_replace("%20", " ", $key);
$text .= "<tr>
<td class='forumheader3' style='width: 60%;'><img src='".e_PLUGIN."log/images/screen.png' alt='' style='vertical-align: middle;' /> ".$key."</td>
<td class='forumheader3' style='width: 60%;'><img src='".e_PLUGIN_ABS."log/images/screen.png' alt='' style='vertical-align: middle;' /> ".$key."</td>
<td class='forumheader3' style='width: 30%;'>".$this -> bar($percentage, $info)."</td>
<td class='forumheader3' style='width: 10%; text-align: center;'>".$percentage."%</td>
</tr>\n";
@@ -1430,8 +1447,8 @@ class siteStats
$datestamp = $gen -> convert_date($datestamp, "long");
$text .= "<tr>
<td class='forumheader3' style='width: 30%;'>$datestamp</td>
<td class='forumheader3' style='width: 70%;'>Host: $host<br />".ADSTAT_L26.": $browser<br />".ADSTAT_L27.": $os<br />".ADSTAT_L29.": $screen".($referer ? "<br />".ADSTAT_L32.": <a href='$referer' rel='external'>$referer</a>" : "")."</td>
<td class='forumheader3' style='width: 30%;'>{$datestamp}</td>
<td class='forumheader3' style='width: 70%;'>Host: {$host}<br />".ADSTAT_L26.": {$browser}<br />".ADSTAT_L27.": {$os}<br />".ADSTAT_L29.": {$screen}".($referer ? "<br />".ADSTAT_L32.": <a href='{$referer}' rel='external'>{$referer}</a>" : "")."</td>
</tr>\n";
}
@@ -1543,7 +1560,7 @@ class siteStats
foreach($newArray as $key => $total) {
$barWidth = round(($total['total']/$ttotal) * 100, 2);
$text .= "<tr>
<td class='forumheader3' style='width: 30%;'><img src='".e_PLUGIN."log/images/html.png' alt='' style='vertical-align: middle;' /> $key</td>
<td class='forumheader3' style='width: 30%;'><img src='".e_PLUGIN."log/images/html.png' alt='' style='vertical-align: middle;' /> {$key}</td>
<td class='forumheader3' style='width: 70%;'>".$this -> bar($barWidth, $total['total'])."</td>
</tr>\n";
@@ -1555,7 +1572,7 @@ class siteStats
foreach($newArray as $key => $total) {
$barWidth = round(($total['unique']/$utotal) * 100, 2);
$text .= "<tr>
<td class='forumheader3' style='width: 30%;'><img src='".e_PLUGIN."log/images/html.png' alt='' style='vertical-align: middle;' /> $key</td>
<td class='forumheader3' style='width: 30%;'><img src='".e_PLUGIN_ABS."log/images/html.png' alt='' style='vertical-align: middle;' /> {$key}</td>
<td class='forumheader3' style='width: 70%;'>".$this -> bar($barWidth, $total['unique'])."</td>
</tr>\n";
}
@@ -1565,7 +1582,8 @@ class siteStats
/* -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
function renderMonthly() {
function renderMonthly()
{
global $sql;
if(!$entries = $sql -> db_Select("logstats", "*", "log_id REGEXP('^[[:digit:]]+\-[[:digit:]]+$') ORDER BY CONCAT(LEFT(log_id,4), RIGHT(log_id,2)) DESC")) {
@@ -1577,7 +1595,8 @@ class siteStats
$monthTotal = array();
$mtotal = 0;
$utotal = 0;
foreach($array as $info) {
foreach($array as $info)
{
$date = $info['log_id'];
$stats = unserialize($info['log_data']);
@@ -1624,7 +1643,8 @@ class siteStats
/* -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
function getWidthRatio ($array, $column) {
function getWidthRatio ($array, $column)
{
$tmpArray = $this -> arraySort($array, $column);
$data = each($tmpArray);
$maxValue = $data[1]['totalv'];
@@ -1642,11 +1662,16 @@ class siteStats
return $ratio;
}
function getcountry($dom) {
function getcountry($dom)
{
global $country;
return $country[$dom];
}
function bar($percen, $val)
{
return "<div class='b' style='width: ".intval($percen)."%'></div>
@@ -1654,6 +1679,8 @@ class siteStats
<td style='width:10%; text-align:center' class='forumheader3'>".$val;
}
function remove_entry($toremove)
{ // Note - only removes info from the database - not from the current page file
global $sql;

View File

@@ -2,19 +2,27 @@
/*
* 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)
*
* Administration - Site Maintenance
* Newsletter plugin - newsletter selection menu
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/newsletter/newsletter_menu.php,v $
* $Revision: 1.4 $
* $Date: 2009-11-19 20:24:21 $
* $Revision: 1.5 $
* $Date: 2010-01-09 12:44:11 $
* $Author: e107steved $
*
*/
/**
* e107 Newsletter plugin
*
* @package e107_plugins
* @subpackage newsletter
* @version $Id: newsletter_menu.php,v 1.5 2010-01-09 12:44:11 e107steved Exp $;
*/
if (!defined('e107_INIT')) { exit; }
if (!$e107->isInstalled('newsletter'))
{
@@ -95,7 +103,7 @@ foreach($newsletterArray as $nl)
$nl_count = $sql -> db_Count('newsletter', "(*)", "WHERE newsletter_parent='".$nl['newsletter_id']."' AND newsletter_flag='1'");
if($nl_count > 0 && USER)
{ // display issued newsletters
$text .= "<br /><a href='".e_PLUGIN."newsletter/nl_archive.php?show.".$nl['newsletter_id']."' alt='".NLLAN_72."' title='".NLLAN_72."'>".NLLAN_72."</a><br/><br/>";
$text .= "<br /><a href='".e_PLUGIN_ABS."newsletter/nl_archive.php?show.".$nl['newsletter_id']."' alt='".NLLAN_72."' title='".NLLAN_72."'>".NLLAN_72."</a><br/><br/>";
}
$text .= "</form>
</div>