Thread: [Rcts-checkins] SF.net SVN: rcts: [1654] trunk/version1.0
Brought to you by:
bastimmer,
paulsohier
From: <bas...@us...> - 2006-04-03 15:06:52
|
Revision: 1654 Author: bastimmer Date: 2006-04-03 08:06:38 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1654&view=rev Log Message: ----------- Early version of wizard. Untested in SVN. :) Modified Paths: -------------- trunk/version1.0/lang/en/wizz.php trunk/version1.0/lang/nl/wizz.php trunk/version1.0/wizz.php Added Paths: ----------- trunk/version1.0/includes/classes/class.wizard.php trunk/version1.0/includes/wizards/ trunk/version1.0/includes/wizards/configwiz.php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bas...@us...> - 2006-04-04 06:28:05
|
Revision: 1663 Author: bastimmer Date: 2006-04-03 23:27:53 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1663&view=rev Log Message: ----------- First version of refertrends. Todo (not by me): - Fix up no data, it kills all stuff, and changes title to Error, but does not show a error. - Beautify the expand, now it uses br tags. - Change the block title! :) Modified Paths: -------------- trunk/version1.0/includes/classes/class.getstats.php trunk/version1.0/includes/classes/class.stats.php trunk/version1.0/stats.php trunk/version1.0/templates/rcts/stats.html Modified: trunk/version1.0/includes/classes/class.getstats.php =================================================================== --- trunk/version1.0/includes/classes/class.getstats.php 2006-04-03 18:12:14 UTC (rev 1662) +++ trunk/version1.0/includes/classes/class.getstats.php 2006-04-04 06:27:53 UTC (rev 1663) @@ -418,5 +418,49 @@ $rowSet = $db->sql_fetchrowset($result); return $rowSet; } + + function getDateReferers($idid, $day = 0, $limit = 15) { + global $calendar; + + if (empty($day)) { + $day = time(); + } + + $domains = array(); + $domains['today'] = array(); +// $set = $calendar->get_stats('referers', $idid, $calendar->get_day_start_time(time()), $limit); + $set = $calendar->get_stats('referers', $idid, $calendar->get_day_start_time($day), $limit); + foreach ($set as $item) { + $url = parse_url($item['stat_value']); + if (empty($url['host'])) { + $url['host'] = 'UNKNOWN'; + } + if (isset($domains['today'][$url['host']])) { + $domains['today'][$url['host']] += $item['stat_count']; + } else { + $domains['today'][$url['host']] = $item['stat_count']; + } + } + $domains['todaydate'] = date('d/m/Y', $calendar->get_day_start_time($day)); + $domains['yest'] = array(); + $timestamp = time(); + $time = mktime(0, 0, 0, date("m", $timestamp), date("d", $timestamp)-1, date("Y", $timestamp)); +// $set = $calendar->get_stats('referers', $idid, $time, $limit); +// $set = $calendar->get_stats('referers', $idid, $calendar->get_day_start_time(time() - 86300), $limit); + $set = $calendar->get_stats('referers', $idid, $calendar->get_day_start_time($day - 86300), $limit); + foreach ($set as $item) { + $url = parse_url($item['stat_value']); + if (empty($url['host'])) { + $url['host'] = 'UNKNOWN'; + } + if (isset($domains['yest'][$url['host']])) { + $domains['yest'][$url['host']] += $item['stat_count']; + } else { + $domains['yest'][$url['host']] = $item['stat_count']; + } + } + $domains['yestdate'] = date('d/m/Y', $calendar->get_day_start_time($day - 86300)); + return $domains; + } } ?> \ No newline at end of file Modified: trunk/version1.0/includes/classes/class.stats.php =================================================================== --- trunk/version1.0/includes/classes/class.stats.php 2006-04-03 18:12:14 UTC (rev 1662) +++ trunk/version1.0/includes/classes/class.stats.php 2006-04-04 06:27:53 UTC (rev 1663) @@ -461,6 +461,30 @@ )); } } + function referTrends($idid,$calendar_day) + { + foreach($GLOBALS as $key => $val){global $$key;} + $template->block("referTrends"); + $temp = $stats->getDateReferers($idid, $calendar_day); + foreach ($temp['today'] as $key => $today) { + if (isset($temp['yest'][$key])) { + // Some calculation. :) + $diff = $today - $temp['yest'][$key]; + $diff2 = $diff / $temp['yest'][$key]; + $percent = $diff2 * 100; + $template->block('yesterdaytrends', array( + 'yesterday' => $temp['yest'][$key], + 'percent' => $percent, + 'today' => $today, + 'site' => $key, + 'total' => $today + $temp['yest'][$key], + 'id' => str_replace('.', '_', $key), + 'dayyest' => $temp['yestdate'], + 'daynow' => $temp['todaydate'] + )); + } + } + } function topEntryPages($idid,$calendar_day) { foreach($GLOBALS as $key => $val){global $$key;} Modified: trunk/version1.0/stats.php =================================================================== --- trunk/version1.0/stats.php 2006-04-03 18:12:14 UTC (rev 1662) +++ trunk/version1.0/stats.php 2006-04-04 06:27:53 UTC (rev 1663) @@ -120,7 +120,7 @@ $layout->UpdateOrder($mode,$do,$block); } -$posibleBlocks = array('---','LoadTime','Average','Hours','DaysW','DaysM','MonthDisp','topColors','topOs','topBrowsers','last30daysDisp','visitsToday','topEntryPages','topReferers','AvarageOnline','OnlineTime','TimezonesDisp','topFlash','topLanguages','topResolutions','uniekDisp'); +$posibleBlocks = array('---','LoadTime','Average','Hours','DaysW','DaysM','MonthDisp','topColors','topOs','topBrowsers','last30daysDisp','visitsToday','topEntryPages','topReferers','AvarageOnline','OnlineTime','TimezonesDisp','topFlash','topLanguages','topResolutions','uniekDisp','referTrends'); $plugins = array(); Modified: trunk/version1.0/templates/rcts/stats.html =================================================================== --- trunk/version1.0/templates/rcts/stats.html 2006-04-03 18:12:14 UTC (rev 1662) +++ trunk/version1.0/templates/rcts/stats.html 2006-04-04 06:27:53 UTC (rev 1663) @@ -597,6 +597,58 @@ </div> </div> <!-- STOP Average --> + <!-- START referTrends --> + <script type="text/javascript"> + <!-- + function toggleIdTable(id) { + obj = document.getElementById(id); + if (obj.style.display == 'none') { + obj.style.display = 'table-row'; + } else { + obj.style.display = 'none'; + } + } + //--> + </script> + <div class="menu"> + <table width="100%" cellpadding="0" cellspacing="0"> + <tr class="tr_kop"> + <td class="td_kop">aa</td> + [[NAVROW]] + </tr> + </table> + <div class="menu_content"> + <table class="stats_table" cellpadding="1"> + <tr> + <td> </td> + <td><strong>{L_REFERER}</strong></td> + <td><strong>{L_COUNT}</strong></td> + </tr> + <!-- START yesterdaytrends --> + <tr style="background-color: #EFEFEF;"> + <td onclick="toggleIdTable('{yesterdaytrends.id}')">+/-</td> + <td>{yesterdaytrends.site}</td> + <td>{yesterdaytrends.total}</td> + </tr> + <tr style="background-color: #dddddd; display: none;" id="{yesterdaytrends.id}"> + <td colspan="2"> + {yesterdaytrends.dayyest} + <br /> + {yesterdaytrends.daynow} + <br /> + {yesterdaytrends.percent}% + </td> + <td> + {yesterdaytrends.yesterday} + <br /> + {yesterdaytrends.today} + </td> + </tr> + <!-- STOP yesterdaytrends --> + </table> + </div> + </div> + <!-- STOP referTrends --> <!-- START uniekDisp --> <!-- START table --> <div class="menu"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-04-04 10:19:25
|
Revision: 1666 Author: paulsohier Date: 2006-04-04 03:19:03 -0700 (Tue, 04 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1666&view=rev Log Message: ----------- Begin of core class and module class. Modified Paths: -------------- trunk/version1.0/includes/constants.php trunk/version1.0/includes/functions.php trunk/version1.0/includes/start.php trunk/version1.0/templates/rcts/footer.html Added Paths: ----------- trunk/version1.0/admin/ trunk/version1.0/admin/index.php trunk/version1.0/includes/classes/class.core.php trunk/version1.0/includes/classes/class.module.php trunk/version1.0/includes/modules/ trunk/version1.0/includes/modules/admin/ Removed Paths: ------------- trunk/version1.0/conf.php trunk/version1.0/includes/classes/class.version.php Added: trunk/version1.0/admin/index.php =================================================================== --- trunk/version1.0/admin/index.php (rev 0) +++ trunk/version1.0/admin/index.php 2006-04-04 10:19:03 UTC (rev 1666) @@ -0,0 +1,28 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* index.php.php +* **************** +* $Id$ +******************************************************************/ + +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +define('IN_STATS', true); +define('IN_ADMIN',true); +define('RCTS_ROOT_PATH', str_replace("admin","",str_replace("\\admin", "", dirname(__FILE__)))); +$page = get_var('page'); +$mode = get_var('mode'); +if(!$core->is_login()){ + +} +?> Deleted: trunk/version1.0/conf.php =================================================================== --- trunk/version1.0/conf.php 2006-04-04 09:45:18 UTC (rev 1665) +++ trunk/version1.0/conf.php 2006-04-04 10:19:03 UTC (rev 1666) @@ -1,29 +0,0 @@ -<?php -/****************************************************************** -* Really Coding Traffic Statistics -* Begin: October, 3rd 2005 -* Copyright: Copyright 2005 by Really coding Group -****************************************************************** -* conf.php -* **************** -* $Id$ -******************************************************************/ - -/******************************************************************* -* -* 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, or -* (at your option) any later version. -* -*******************************************************************/ -ob_start(); -define('IN_STATS', true); -define('RCTS_ROOT_PATH', dirname(__FILE__)); -include(RCTS_ROOT_PATH.'/includes/start.php'); -//include(RCTS_ROOT_PATH.'/includes/multisite_class.php'); -$multiSite=new multisite; -pageHeader("Config", 'control'); -$config->geef(); -pageFooter(); -?> \ No newline at end of file Added: trunk/version1.0/includes/classes/class.core.php =================================================================== --- trunk/version1.0/includes/classes/class.core.php (rev 0) +++ trunk/version1.0/includes/classes/class.core.php 2006-04-04 10:19:03 UTC (rev 1666) @@ -0,0 +1,432 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* class.core.php +* **************** +* $Id: functions.php 1664 2006-04-04 09:05:10Z bastimmer $ +******************************************************************/ + +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +if(!defined('IN_STATS')) +{ + die('Hacking Attempt'); +} +class core{ + //Vars for GUID + var $valueBeforeMD5; + var $valueAfterMD5; + var $Name = 'localhost'; + var $IP = '127.0.0.1'; + /** + * Load all needed things by rcts + * @access public + * @return nothing + **/ + + function core(){ + if(file_exists(RCTS_ROOT_PATH . "/includes/config.php")){ + include(RCTS_ROOT_PATH."/includes/config.php"); + } + //Added extra check, otherwise there will be always a redirecting! + if(!defined('STATS_INSTALLED') && !defined('IN_INSTALL') && !defined("UPDATOR")) + { + include(RCTS_ROOT_PATH . "/includes/functions.php"); + loc("install/index.php"); + die; + } + $include = array( + "includes/classes/class.graph.php",//This one has to go first + "includes/constants.php", + "includes/detection.php", + "includes/functions.php", + "includes/functions_sql.php", + "includes/functions_color.php", + "includes/functions_vars.php", + "includes/db/db.php", + "includes/classes/class.calendar.php", + "includes/classes/class.viewer.php", + "includes/classes/class.getstats.php", + "includes/classes/class.3dbargraph.php", + "includes/classes/class.config.php", + "includes/classes/class.cron.php", + "includes/classes/class.error.php", + "includes/classes/class.graph.php", + "includes/classes/class.lang.php", + "includes/classes/class.layout.php", + "includes/classes/class.linegraph.php", + "includes/classes/class.load.php", + "includes/classes/class.mailer.php", + "includes/classes/class.multisite.php", + "includes/classes/class.piegraph.php", + "includes/classes/class.plugin.php", + "includes/classes/class.RSS.php", + "includes/classes/class.session.php", + "includes/classes/class.stats.php", + "includes/classes/class.template.php", + "includes/classes/class.time_online.php", + "includes/classes/class.browser.php", + "includes/classes/class.cache.php", + "includes/classes/class.module.php", + ); + for($i = 0; $i < count($include);$i++){ + include_once(RCTS_ROOT_PATH . "/" . $include[$i]); + } + // Exploit check. + check_for_exploits(); + unset_global($_COOKIE); + unset_global($_POST); + unset_global($_GET); + unset_global($_SESSION); + unset_global($_ENV); + unset_global($_SERVER); + unset_global($_REQUEST); + global $error; + $error = new error(); + //The next thing requires php 4.3.0 :) + $old = set_error_handler(array($error, 'trigger')); + $class = array( + "db" => array("db",$host,$username,$password,$database), + "config" => "config", + "lang" => "RCTSLang", + "cron" => "cron", + //"session" => "session", + "pluginClass" => "RCPlugins", + "mailer" => "mailer", + "browser" => "browser", + "calendar" => "calendar", + "cache" => "cache", + "layout" => "layout" + ); + while(list($var,$clas) = each($class)){ + global $$var; + if(is_array($clas)){ + $ev = "$$var = new "; + $ar = array(); + for($i = 0; $i < count($clas);$i++){ + if($i == 0){ + $ev .= $clas[$i] . "("; + }else{ + $ar[] = "'" . $clas[$i] . "'"; + } + } + $ev .= implode(", ",$ar); + $ev .= ");"; + eval($ev); + }else{ + $$var = new $clas; + } + } + //Unset DB pass + unset($password); + $config->load(); + //TPL checks + if(isset($_GET['template']) || isset($_POST['template'])){ + $tpl = get_var("template"); + setcookie('template',$tpl); + }elseif(isset($_COOKIE['template'])){ + $tpl = get_var("template",false,true); + }else{ + $tpl = $config->config['default_tpl']; + } + global $template; + $template = new tpl('templates/'.$tpl. '/',$config->config['default_tpl']); + $lang->loadLang(); //Loading the language + + //Check the RCTS version + $this->checkversion(); + //If first run, get installid + $this->checkguid(); + + } + /* + Check the RCTS version. + @param Nothing + @return Nothing + */ + function checkversion(){ + global $lang,$config,$browser,$cache; + if(defined('IN_CSS')){ + return; + } + $offline = false; + $f = RCTS_ROOT_PATH . '/cache/version.txt'; + if(!is_writable($f)){ + st_die(RCTS_INFO,"$f isn't writeable."); + }elseif(!file_exists($f)){ + st_die(RCTS_INFO,"$f doesn't exists"); + } + include($f); + $check = false; + if(!isset($data)){ + $check = true; + }elseif($data <= time()){ + $check = true; + }elseif(isset($_GET['check']) && get_var('check') == 1){ + $check = true; + } + $_SERVER['QUERY_STRING'] = preg_replace("#&check=([0-9])#si","",$_SERVER['QUERY_STRING']); + $mel = sprintf($lang->lang['old_check'],"<a href='".base(true)."&check=1'>","</a>"); + if($offline && !$check){ + st_die(RCTS_INFO,$lang->lang['old_version'] . "<br />" . $mel); + } + if($check){ + $file = 'http://www.reallycoding.nl/version/version.txt'; + if(isset($this->data[md5($file)])){ + $data = $this->data[md5($file)]; + }else{ + if(class_exists('browser')){ + //Include browser class. + include_once(RCTS_ROOT_PATH . '/includes/classes/class.browser.php'); + } + if(!is_object($browser)){ + $browser = new browser(); + } + $browser->reset(); + $browser->postPage($file,'GET'); + $data = $browser->showContents(); + $this->data[md5($file)] = $data; + $browser->reset(); + } + if(empty($data)){ + return; + } + $data = $this->parse($data); + $v = (isset($config->config['version'])) ? $config->config['version'] : "0.0.5"; + if(!isset($data['version'])){ + //No version found. + }else{ + $v2 = $data['version']; + } + if(!isset($data['offline'])){ + //No version found. + }else{ + $o = $data['offline']; + } + if(version_compare($v, $o, "<=")){ + $data['offline'] = true; + $o = true; + }else{ + $data['offline'] = false; + $o = false; + } + if(!$o){ + if($config->is()){ + if(version_compare($v, $v2, "<")){ + //Don't set $data['offline'] to true! + $o = true; + }else{ + $o = false; + } + }else{ + $o = false; + } + } + $x = "<"."?php\n"; + while(list($el,$wa) = each($data)){ + $x .= "\$$el = '$wa';\n"; + } + // Check it once a day! + $x .= "\$data = ".(time() + 3600 * 24).";\n?".">"; + $cache->write(RCTS_ROOT_PATH . "/cache/version.txt","w",4,array(),$x); + if($o){ + st_die(RCTS_INFO,$lang->lang['old_version'] . "<br />" . $mel); + } + } + } + /* + Parse the blocks requested from the rc server. + @param array The data returned by send. + @param string The search string. + @return array with data. + */ + function parse($block,$search = 'rcts'){ + if(!$block){ + return false; + } + $data = explode("\n",$block); + if(!count($data)){ + return false; + } + $in_block = false; + $found = false; + $mode = 'block'; + $ar = array(); + $block = false; + $c = count($data); + for($i = 0;$i < $c;$i++){ + $t = $data[$i]; + switch($mode){ + case 'block': + if(eregi("<!-- BEGIN $search -->",$t)){ + $mode = 'data'; + $found = true; + $in_block = false; + } + continue; + break; + case 'data': + if(eregi("<!-- END $search -->",$t)){ + return $ar; + }elseif(eregi("<!-- END (.*) -->",$t) || eregi("<!-- BEGIN (.*) -->",$t)){ + trigger_error("Parse block error, the RCTS version file is corrupt!",E_USER_ERROR); + } + if($in_block){ + if(eregi("</$block>",$t)){ + $in_block = false; + $block = false; + }elseif(eregi("<$block>",$t) || eregi("<(.*)>",$t) || eregi("</(.*)>",$t)){ + trigger_error("Parse block error, the RCTS version file is corrupt!",E_USER_ERROR); + }else{ + $ar[$block] .= $t; + } + continue; + }else{ + if(preg_match("#<(.*?)>#",$t,$match)){ + $in_block = true; + $block = $match[1]; + $ar[$block] = ''; + }else{ + continue; + } + } + break; + } + } + st_die(GENERAL_ERROR,'Block not found. Block: ' . $search); + } + function check_conf($mode,$plugin = null){ + global $config,$browser,$lang; + if($mode == 'RCTS'){ + $file = 'http://www.reallycoding.nl/version/version.txt'; + $block = 'rcts'; + }elseif($mode == 'plugin'){ + $file = 'http://www.reallycoding.nl/version/version.txt'; + $block = ''; + if(!is_object($plugin)){ + st_die(RCTS_GENERAL_ERROR,'No object found'); + } + $inf = $plugin->version_info(); + if(empty($inf['block']) || empty($inf['file'])){ + st_die(RCTS_GENERAL_ERROR,sprintf($lang->lang['plugin_not_ready'],$plugin->getPluginName())); + //pageFooter(); + return false; + } + $file = $inf['file']; + $block = $inf['block']; + }else{ + return false; + } + if(isset($this->data[md5($file)])){ + $data = $this->data[md5($file)]; + }else{ + if(class_exists('browser')){ + //Include browser class. + include_once(RCTS_ROOT_PATH . '/includes/classes/class.browser.php'); + } + if(!is_object($browser)){ + $browser = new browser(); + } + $browser->reset(); + $browser->postPage($file,'GET'); + $data = $browser->showContents(); + $this->data[md5($file)] = $data; + $browser->reset(); + } + if(empty($data)){ + return; + } + $data = $this->parse($data,$block); + $v = (isset($config->config['version'])) ? $config->config['version'] : "0.0.5"; + if(!isset($data['version'])){ + //No version found. + return false; + }else{ + return $v2 = $data['version']; + } + } + function getLocalHost() // static + { + + $this->Name = $_ENV["COMPUTERNAME"]; + $this->IP = $_SERVER["SERVER_ADDR"]; + } + + function toStringHost() + { + $this->getLocalHost(); + return strtolower($this->Name.'/'.$this->IP); + } + function currentTimeMillis() + { + list($usec, $sec) = explode(" ",microtime()); + return $sec.substr($usec, 2, 3); + } + function nextLong() + { + $tmp = rand(0,1)?'-':''; + return $tmp.rand(1000, 9999).rand(1000, 9999).rand(1000, 9999).rand(100, 999).rand(100, 999); + } + + function Guid() + { + $this->rcts_url = 'http://www.reallycoding.nl:80/insttrack/it.php'; + $this->cookies = ""; + $this->fields = ""; + } + function getGuid() + { + + $this->valueBeforeMD5 = $this->toStringHost().':'.$this->currentTimeMillis().':'.$this->nextLong(); + $this->valueAfterMD5 = md5($this->valueBeforeMD5); + } + function toString() + { + $raw = strtoupper($this->valueAfterMD5); + return substr($raw,0,8).'-'.substr($raw,8,4).'-'.substr($raw,12,4).'-'.substr($raw,16,4).'-'.substr($raw,20); + } + function checkguid() { + global $config,$browser; + + if(defined("IN_INSTALL")){ + return; + } + if (isset($config->config['installid'])) { + return; + } + $this->getGuid(); + $array = array(); + $array['guid'] = $this->toString(); + $array['base'] = base(); + + if(!is_object($browser)){ + include_once(RCTS_ROOT_PATH . '/includes/classes/class.browser.php'); + $browser = new browser(); + } + + $array = serialize($array); + $array = base64_encode($array); + $browser->addField("array",$array); + $browser->addCookie("IT","1"); + $browser->postPage($this->rcts_url); + $data = $browser->showContents(); + if(trim($data) == "0"){ + $this->verstuurd = true; + }else{ + $this->verstuurd = false; + } + if ($this->verstuurd) { + $config->update('installid', $this->toString()); + } + } +} +?> Added: trunk/version1.0/includes/classes/class.module.php =================================================================== --- trunk/version1.0/includes/classes/class.module.php (rev 0) +++ trunk/version1.0/includes/classes/class.module.php 2006-04-04 10:19:03 UTC (rev 1666) @@ -0,0 +1,20 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* class.module.php +* **************** +* $Id: constants.php 1533 2006-02-04 12:18:24Z eroeling $ +******************************************************************/ + +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +?> Deleted: trunk/version1.0/includes/classes/class.version.php =================================================================== --- trunk/version1.0/includes/classes/class.version.php 2006-04-04 09:45:18 UTC (rev 1665) +++ trunk/version1.0/includes/classes/class.version.php 2006-04-04 10:19:03 UTC (rev 1666) @@ -1,239 +0,0 @@ -<?php -/****************************************************************** -* Really Coding Traffic Statistics -* Begin: October, 3rd 2005 -* Copyright: Copyright 2005 by Really coding Group -****************************************************************** -* class.version.php -* **************** -* $Id$ -******************************************************************/ -/******************************************************************* -* -* 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, or -* (at your option) any later version. -* -*******************************************************************/ -if(!defined('IN_STATS')) -{ - die('Hacking Attempt'); -} -class version{ - /* - Constructor. - @param Nothing - @return Nothing - */ - function version(){ - - } - /* - Check the RCTS version. - @param Nothing - @return Nothing - */ - function check(){ - global $lang,$config,$browser,$cache; - if(defined('IN_CSS')){ - return; - } - $offline = false; - $f = RCTS_ROOT_PATH . '/cache/version.txt'; - if(!is_writable($f)){ - st_die(RCTS_INFO,"$f isn't writeable."); - }elseif(!file_exists($f)){ - st_die(RCTS_INFO,"$f doesn't exists"); - } - include($f); - $check = false; - if(!isset($data)){ - $check = true; - }elseif($data <= time()){ - $check = true; - }elseif(isset($_GET['check']) && get_var('check') == 1){ - $check = true; - } - $_SERVER['QUERY_STRING'] = preg_replace("#&check=([0-9])#si","",$_SERVER['QUERY_STRING']); - $mel = sprintf($lang->lang['old_check'],"<a href='".base(true)."&check=1'>","</a>"); - if($offline && !$check){ - st_die(RCTS_INFO,$lang->lang['old_version'] . "<br />" . $mel); - } - if($check){ - $file = 'http://www.reallycoding.nl/version/version.txt'; - if(isset($this->data[md5($file)])){ - $data = $this->data[md5($file)]; - }else{ - if(class_exists('browser')){ - //Include browser class. - include_once(RCTS_ROOT_PATH . '/includes/classes/class.browser.php'); - } - if(!is_object($browser)){ - $browser = new browser(); - } - $browser->reset(); - $browser->postPage($file,'GET'); - $data = $browser->showContents(); - $this->data[md5($file)] = $data; - $browser->reset(); - } - if(empty($data)){ - return; - } - $data = $this->parse($data); - $v = (isset($config->config['version'])) ? $config->config['version'] : "0.0.5"; - if(!isset($data['version'])){ - //No version found. - }else{ - $v2 = $data['version']; - } - if(!isset($data['offline'])){ - //No version found. - }else{ - $o = $data['offline']; - } - if(version_compare($v, $o, "<=")){ - $data['offline'] = true; - $o = true; - }else{ - $data['offline'] = false; - $o = false; - } - if(!$o){ - if($config->is()){ - if(version_compare($v, $v2, "<")){ - //Don't set $data['offline'] to true! - $o = true; - }else{ - $o = false; - } - }else{ - $o = false; - } - } - $x = "<"."?php\n"; - while(list($el,$wa) = each($data)){ - $x .= "\$$el = '$wa';\n"; - } - // Check it once a day! - $x .= "\$data = ".(time() + 3600 * 24).";\n?".">"; - $cache->write(RCTS_ROOT_PATH . "/cache/version.txt","w",4,array(),$x); - if($o){ - st_die(RCTS_INFO,$lang->lang['old_version'] . "<br />" . $mel); - } - } - } - /* - Parse the blocks requested from the rc server. - @param array The data returned by send. - @param string The search string. - @return array with data. - */ - function parse($block,$search = 'rcts'){ - if(!$block){ - return false; - } - $data = explode("\n",$block); - if(!count($data)){ - return false; - } - $in_block = false; - $found = false; - $mode = 'block'; - $ar = array(); - $block = false; - $c = count($data); - for($i = 0;$i < $c;$i++){ - $t = $data[$i]; - switch($mode){ - case 'block': - if(eregi("<!-- BEGIN $search -->",$t)){ - $mode = 'data'; - $found = true; - $in_block = false; - } - continue; - break; - case 'data': - if(eregi("<!-- END $search -->",$t)){ - return $ar; - }elseif(eregi("<!-- END (.*) -->",$t) || eregi("<!-- BEGIN (.*) -->",$t)){ - trigger_error("Parse block error, the RCTS version file is corrupt!",E_USER_ERROR); - } - if($in_block){ - if(eregi("</$block>",$t)){ - $in_block = false; - $block = false; - }elseif(eregi("<$block>",$t) || eregi("<(.*)>",$t) || eregi("</(.*)>",$t)){ - trigger_error("Parse block error, the RCTS version file is corrupt!",E_USER_ERROR); - }else{ - $ar[$block] .= $t; - } - continue; - }else{ - if(preg_match("#<(.*?)>#",$t,$match)){ - $in_block = true; - $block = $match[1]; - $ar[$block] = ''; - }else{ - continue; - } - } - break; - } - } - st_die(GENERAL_ERROR,'Block not found. Block: ' . $search); - } - function check_conf($mode,$plugin = null){ - global $config,$browser,$lang; - if($mode == 'RCTS'){ - $file = 'http://www.reallycoding.nl/version/version.txt'; - $block = 'rcts'; - }elseif($mode == 'plugin'){ - $file = 'http://www.reallycoding.nl/version/version.txt'; - $block = ''; - if(!is_object($plugin)){ - st_die(RCTS_GENERAL_ERROR,'No object found'); - } - $inf = $plugin->version_info(); - if(empty($inf['block']) || empty($inf['file'])){ - st_die(RCTS_GENERAL_ERROR,sprintf($lang->lang['plugin_not_ready'],$plugin->getPluginName())); - //pageFooter(); - return false; - } - $file = $inf['file']; - $block = $inf['block']; - }else{ - return false; - } - if(isset($this->data[md5($file)])){ - $data = $this->data[md5($file)]; - }else{ - if(class_exists('browser')){ - //Include browser class. - include_once(RCTS_ROOT_PATH . '/includes/classes/class.browser.php'); - } - if(!is_object($browser)){ - $browser = new browser(); - } - $browser->reset(); - $browser->postPage($file,'GET'); - $data = $browser->showContents(); - $this->data[md5($file)] = $data; - $browser->reset(); - } - if(empty($data)){ - return; - } - $data = $this->parse($data,$block); - $v = (isset($config->config['version'])) ? $config->config['version'] : "0.0.5"; - if(!isset($data['version'])){ - //No version found. - return false; - }else{ - return $v2 = $data['version']; - } - } -} -?> Modified: trunk/version1.0/includes/constants.php =================================================================== --- trunk/version1.0/includes/constants.php 2006-04-04 09:45:18 UTC (rev 1665) +++ trunk/version1.0/includes/constants.php 2006-04-04 10:19:03 UTC (rev 1666) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/functions.php =================================================================== --- trunk/version1.0/includes/functions.php 2006-04-04 09:45:18 UTC (rev 1665) +++ trunk/version1.0/includes/functions.php 2006-04-04 10:19:03 UTC (rev 1666) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/start.php =================================================================== --- trunk/version1.0/includes/start.php 2006-04-04 09:45:18 UTC (rev 1665) +++ trunk/version1.0/includes/start.php 2006-04-04 10:19:03 UTC (rev 1666) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -34,19 +34,6 @@ if(!isset($_SESSION)){ $_SESSION = array(); } -// -// Include some files -// -if(file_exists(RCTS_ROOT_PATH . "/includes/config.php")){ - include(RCTS_ROOT_PATH."/includes/config.php"); -} -//Added extra check, otherwise there will be always a redirecting! -if(!defined('STATS_INSTALLED') && !defined('IN_INSTALL') && !defined("UPDATOR")) -{ - include(RCTS_ROOT_PATH . "/includes/functions.php"); - loc("install/index.php"); - die; -} if(function_exists("date_default_timezone_set")){ $value = (function_exists("date_default_timezone_get")) ? date_default_timezone_get() : "UTC"; date_default_timezone_set($value); @@ -57,72 +44,16 @@ if((!extension_loaded("mysql") && !((@ini_get('enable_dl') || strtolower(@ini_get('enable_dl')) == 'on') && (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') && @dl("mysql.$suffix"))) || !function_exists("mysql_connect")){ die("Mysql extesion don't exists"); } -$include = array( - "includes/classes/class.graph.php",//This one has to go first - "includes/constants.php", - "includes/detection.php", - "includes/functions.php", - "includes/functions_sql.php", - "includes/functions_color.php", - "includes/functions_vars.php", - "includes/db/db.php", - "includes/classes/class.calendar.php", - "includes/classes/class.viewer.php", - "includes/classes/class.getstats.php", - "includes/classes/class.3dbargraph.php", - "includes/classes/class.config.php", - "includes/classes/class.cron.php", - "includes/classes/class.error.php", - "includes/classes/class.graph.php", - "includes/classes/class.lang.php", - "includes/classes/class.layout.php", - "includes/classes/class.linegraph.php", - "includes/classes/class.load.php", - "includes/classes/class.mailer.php", - "includes/classes/class.multisite.php", - "includes/classes/class.piegraph.php", - "includes/classes/class.plugin.php", - "includes/classes/class.RSS.php", - "includes/classes/class.session.php", - "includes/classes/class.stats.php", - "includes/classes/class.template.php", - "includes/classes/class.time_online.php", - "includes/classes/class.version.php", - "includes/classes/class.browser.php", - "includes/classes/class.cache.php", - "includes/classes/class.guid.php", -); -for($i = 0; $i < count($include);$i++){ - include_once(RCTS_ROOT_PATH . "/" . $include[$i]); -} -// Exploit check. -check_for_exploits(); -unset_global($_COOKIE); -unset_global($_POST); -unset_global($_GET); -unset_global($_SESSION); -unset_global($_ENV); -unset_global($_SERVER); -unset_global($_REQUEST); +//Included core class +require(RCTS_ROOT_PATH . "/includes/classes/class.core.php"); +$core = new core; -$error = new error(); -//The next thing requires php 4.3.0 :) -$old = set_error_handler(array($error, 'trigger')); -$db = new db($host,$username,$password,$database); -$config = new config; -$config->load(); -$lang = new RCTSLang(); -$cron = new cron(); -$session = new session; -$pluginsClass = new RCPlugins; -$mailer = new mailer(); -$version = new version(); -$browser = new browser(); -$calendar = new calendar; -$cache = new cache(); -$installid = new Guid(); -$layout = new layout; + + + + + if($config->config['mod_rewrite']){ $tmp = explode("?",$_SERVER['REQUEST_URI']); $tmp = explode("&",$tmp[1]); @@ -173,23 +104,6 @@ if(!$gzip || !$load){ ob_start(); } -if(isset($_GET['template']) || isset($_POST['template'])){ - $tpl = get_var("template"); - setcookie('template',$tpl); -}elseif(isset($_COOKIE['template'])){ - $tpl = get_var("template",false,true); -}else{ - $tpl = $config->config['default_tpl']; -} -$template = new tpl('templates/'.$tpl. '/',$config->config['default_tpl']); -$lang->loadLang(); //Loading the language -if($cron->check()){ - $cron->update(); -} -//Check the RCTS version -$version->check(); -//If first run, get installid -$installid->check(); // // Create main menu // Modified: trunk/version1.0/templates/rcts/footer.html =================================================================== --- trunk/version1.0/templates/rcts/footer.html 2006-04-04 09:45:18 UTC (rev 1665) +++ trunk/version1.0/templates/rcts/footer.html 2006-04-04 10:19:03 UTC (rev 1666) @@ -101,10 +101,10 @@ Really coding group, 2005-{YEAR} --> <a href="http://www.reallycoding.nl">© by Really Coding Group, 2005-{YEAR}</a> || {L_VERSION}: {VERSION} {SQL_Q}: {sql}. {L_TIME_RUN}: {TIME} {L_SEC} || - <!-- A IF admin --> - <a href="conf.php">{L_CONF}</a> + <!-- A IF admin --> + <a href="admin/">{L_CONF}</a> <!-- ELSE --> - <a href="conf.php">{L_LOGIN}</a> + <a href="admin/">{L_LOGIN}</a> <!-- END IF --> </div> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-04-04 14:14:27
|
Revision: 1671 Author: paulsohier Date: 2006-04-04 07:11:20 -0700 (Tue, 04 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1671&view=rev Log Message: ----------- ID property. Module system Modified Paths: -------------- trunk/version1.0/admin/index.php trunk/version1.0/admin/tpl/template.css trunk/version1.0/includes/classes/class.core.php trunk/version1.0/includes/classes/class.module.php trunk/version1.0/includes/db/db.php Property Changed: ---------------- trunk/version1.0/.htaccess trunk/version1.0/admin/index.php trunk/version1.0/admin/tpl/error.html trunk/version1.0/admin/tpl/footer.html trunk/version1.0/admin/tpl/header.html trunk/version1.0/admin/tpl/template.css trunk/version1.0/cache/.htaccess trunk/version1.0/cache/IPInfo.php trunk/version1.0/cache/cal.php trunk/version1.0/cache/sql.php trunk/version1.0/cache/version.txt trunk/version1.0/confp.php trunk/version1.0/developer/.htaccess trunk/version1.0/developer/check_lang.php trunk/version1.0/developer/conv.php trunk/version1.0/developer/debugger.php trunk/version1.0/developer/kalenderTest.php trunk/version1.0/developer/test.php trunk/version1.0/developer/test2.php trunk/version1.0/docs/english/usage.txt trunk/version1.0/docs/nederlands/Multisite.txt trunk/version1.0/docs/nederlands/gebruik.txt trunk/version1.0/error.php trunk/version1.0/graph.php trunk/version1.0/images/header_icons/control.png trunk/version1.0/images/header_icons/linneighborhood.png trunk/version1.0/images/icons/amor.png trunk/version1.0/images/icons/cal.png trunk/version1.0/images/icons/edit_user.png trunk/version1.0/images/icons/flag.png trunk/version1.0/images/icons/looknfeel.png trunk/version1.0/images/small.gif trunk/version1.0/images/small.psd trunk/version1.0/images/spacer.gif trunk/version1.0/includes/.htaccess trunk/version1.0/includes/FreeSans.ttf trunk/version1.0/includes/classes/class.3dbargraph.php trunk/version1.0/includes/classes/class.RSS.php trunk/version1.0/includes/classes/class.browser.php trunk/version1.0/includes/classes/class.cache.php trunk/version1.0/includes/classes/class.calendar.php trunk/version1.0/includes/classes/class.config.php trunk/version1.0/includes/classes/class.core.php trunk/version1.0/includes/classes/class.cron.php trunk/version1.0/includes/classes/class.error.php trunk/version1.0/includes/classes/class.getstats.php trunk/version1.0/includes/classes/class.graph.php trunk/version1.0/includes/classes/class.lang.php trunk/version1.0/includes/classes/class.layout.php trunk/version1.0/includes/classes/class.linegraph.php trunk/version1.0/includes/classes/class.load.php trunk/version1.0/includes/classes/class.mailer.php trunk/version1.0/includes/classes/class.module.php trunk/version1.0/includes/classes/class.multisite.php trunk/version1.0/includes/classes/class.piegraph.php trunk/version1.0/includes/classes/class.plugin.php trunk/version1.0/includes/classes/class.session.php trunk/version1.0/includes/classes/class.stats.php trunk/version1.0/includes/classes/class.template.php trunk/version1.0/includes/classes/class.time_online.php trunk/version1.0/includes/classes/class.viewer.php trunk/version1.0/includes/classes/class.wizard.php trunk/version1.0/includes/config.php trunk/version1.0/includes/constants.php trunk/version1.0/includes/db/db.php trunk/version1.0/includes/db/mysql.php trunk/version1.0/includes/detection.php trunk/version1.0/includes/functions.php trunk/version1.0/includes/functions_color.php trunk/version1.0/includes/functions_sql.php trunk/version1.0/includes/functions_vars.php trunk/version1.0/includes/index.htm trunk/version1.0/includes/pngreplacer.php trunk/version1.0/includes/start.php trunk/version1.0/includes/wizards/configwiz.php trunk/version1.0/index.php trunk/version1.0/install/Update.txt trunk/version1.0/install/checkcon.php trunk/version1.0/install/index.php trunk/version1.0/install/install.css trunk/version1.0/install/install.sql trunk/version1.0/install/start.php trunk/version1.0/install/templates/footer.html trunk/version1.0/install/templates/header.html trunk/version1.0/install/templates/install.html trunk/version1.0/install/templates/update.html trunk/version1.0/install/update.php trunk/version1.0/install/update.sql trunk/version1.0/installation.txt trunk/version1.0/javascript/functions.js trunk/version1.0/javascript/stats.php trunk/version1.0/lang/en/config.php trunk/version1.0/lang/en/install.php trunk/version1.0/lang/en/main.php trunk/version1.0/lang/en/rss.php trunk/version1.0/lang/en/stats.php trunk/version1.0/lang/en/wizz.php trunk/version1.0/lang/nl/admin.php trunk/version1.0/lang/nl/config.php trunk/version1.0/lang/nl/install.php trunk/version1.0/lang/nl/main.php trunk/version1.0/lang/nl/rss.php trunk/version1.0/lang/nl/stats.php trunk/version1.0/lang/nl/wizz.php trunk/version1.0/plugins/plugin_ComeFrom/data.php trunk/version1.0/plugins/plugin_ComeFrom/plugin.php trunk/version1.0/plugins/plugin_Follow/class.siteMap.php trunk/version1.0/plugins/plugin_Follow/icon.png trunk/version1.0/plugins/plugin_Follow/plugin.php trunk/version1.0/plugins/plugin_Follow/templates/main.html trunk/version1.0/plugins/plugin_Mysql/icon.png trunk/version1.0/plugins/plugin_Mysql/plugin.php trunk/version1.0/plugins/plugin_Mysql/templates/statsmysql.html trunk/version1.0/plugins/plugin_SearchTerms/plugin.php trunk/version1.0/plugins/plugin_UserOptions/plugin.php trunk/version1.0/plugins/plugin_phpbb/plugin.php trunk/version1.0/plugins/plugin_phpbb/templates/RP_phpbb.html trunk/version1.0/rss.php trunk/version1.0/staticData/languages.php trunk/version1.0/stats.php trunk/version1.0/statsGetJS.php trunk/version1.0/statsGetJSend.php trunk/version1.0/statsGetTimeOnline.php trunk/version1.0/templates/rcts/conf.html trunk/version1.0/templates/rcts/confp.html trunk/version1.0/templates/rcts/error.html trunk/version1.0/templates/rcts/errors.html trunk/version1.0/templates/rcts/footer.html trunk/version1.0/templates/rcts/header.html trunk/version1.0/templates/rcts/images/caption_back.png trunk/version1.0/templates/rcts/images/caption_back2.png trunk/version1.0/templates/rcts/images/del.gif trunk/version1.0/templates/rcts/images/down.gif trunk/version1.0/templates/rcts/images/logo_back.png trunk/version1.0/templates/rcts/images/logo_main.png trunk/version1.0/templates/rcts/images/spacer.gif trunk/version1.0/templates/rcts/images/tab_active_left.gif trunk/version1.0/templates/rcts/images/tab_active_rest.gif trunk/version1.0/templates/rcts/images/tab_normal_left.gif trunk/version1.0/templates/rcts/images/tab_normal_rest.gif trunk/version1.0/templates/rcts/images/up.gif trunk/version1.0/templates/rcts/login.html trunk/version1.0/templates/rcts/pluginsMulti.html trunk/version1.0/templates/rcts/pluginsSingle.html trunk/version1.0/templates/rcts/rcts.php trunk/version1.0/templates/rcts/stats.html trunk/version1.0/templates/rcts/statsfooter.html trunk/version1.0/templates/rcts/statsheader.html trunk/version1.0/templates/rcts/statsuniek.html trunk/version1.0/templates/rcts/template.css trunk/version1.0/templates/rcts/wizz.html trunk/version1.0/versie.php trunk/version1.0/wizz.php trunk/version1.0/xml.php Property changes on: trunk/version1.0/.htaccess ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Modified: trunk/version1.0/admin/index.php =================================================================== --- trunk/version1.0/admin/index.php 2006-04-04 12:52:21 UTC (rev 1670) +++ trunk/version1.0/admin/index.php 2006-04-04 14:11:20 UTC (rev 1671) @@ -28,6 +28,7 @@ //} $core->adminheader(); $module->load_modules('acp'); - +$module->makeit(); +$module->active($page,$mode); $core->adminfooter(); ?> Property changes on: trunk/version1.0/admin/index.php ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/admin/tpl/error.html ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/admin/tpl/footer.html ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/admin/tpl/header.html ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/version1.0/admin/tpl/template.css =================================================================== --- trunk/version1.0/admin/tpl/template.css 2006-04-04 12:52:21 UTC (rev 1670) +++ trunk/version1.0/admin/tpl/template.css 2006-04-04 14:11:20 UTC (rev 1671) @@ -21,4 +21,21 @@ #main #copy{ text-align:center; font-size:9px; +} +#tabs .tab{ + background-color: Green; + width: 10%; + cursor: pointer; +} +#tabs #actief{ + background-color: Blue; + cursor: pointer; +} +#tabs{ + position: absolute; + margin-top:3px; + top:0px; + height:45px; + left:5%; + padding:3px; } \ No newline at end of file Property changes on: trunk/version1.0/admin/tpl/template.css ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/cache/.htaccess ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/cache/IPInfo.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/cache/cal.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/cache/sql.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/cache/version.txt ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/confp.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/developer/.htaccess ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/developer/check_lang.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/developer/conv.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/developer/debugger.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/developer/kalenderTest.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/developer/test.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/developer/test2.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/docs/english/usage.txt ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/docs/nederlands/Multisite.txt ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/docs/nederlands/gebruik.txt ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/error.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/graph.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/images/header_icons/control.png ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/images/header_icons/linneighborhood.png ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/images/icons/amor.png ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/images/icons/cal.png ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/images/icons/edit_user.png ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/images/icons/flag.png ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/images/icons/looknfeel.png ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/images/small.gif ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/images/small.psd ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/images/spacer.gif ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/.htaccess ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/FreeSans.ttf ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/includes/classes/class.3dbargraph.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.RSS.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.browser.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.cache.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.calendar.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.config.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Modified: trunk/version1.0/includes/classes/class.core.php =================================================================== --- trunk/version1.0/includes/classes/class.core.php 2006-04-04 12:52:21 UTC (rev 1670) +++ trunk/version1.0/includes/classes/class.core.php 2006-04-04 14:11:20 UTC (rev 1671) @@ -6,7 +6,7 @@ ****************************************************************** * class.core.php * **************** -* $Id: functions.php 1664 2006-04-04 09:05:10Z bastimmer $ +* $Id$ ******************************************************************/ /******************************************************************* Property changes on: trunk/version1.0/includes/classes/class.core.php ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/includes/classes/class.cron.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.error.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.getstats.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.graph.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.lang.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.layout.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.linegraph.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.load.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.mailer.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Modified: trunk/version1.0/includes/classes/class.module.php =================================================================== --- trunk/version1.0/includes/classes/class.module.php 2006-04-04 12:52:21 UTC (rev 1670) +++ trunk/version1.0/includes/classes/class.module.php 2006-04-04 14:11:20 UTC (rev 1671) @@ -156,11 +156,7 @@ ); } - unset($this->cache['mod'], $names); - var_dump($this->module); - - - + unset($this->cache['mod'], $names); } function parents($parent_id, $left_id, $right_id, &$all_parents){ global $db; @@ -181,6 +177,127 @@ } return $parents; - } + } + function active($id = false,$mode = false){ + + $icat = false; + + if (get_var('cat', '')) + { + $icat = $id; + $id = request_var('cat', ''); + } + + $category = false; + foreach ($this->module as $row_id => $itep_ary) + { + // If this is a module and it's selected, active + // If this is a category and the module is the first within it, active + // If this is a module and no mode selected, select first mode + // If no category or module selected, go active for first module in first category + if ( + (($itep_ary['name'] === $id || $itep_ary['id'] === (int) $id) && (($itep_ary['mode'] == $mode && !$itep_ary['cat']) || ($icat && $itep_ary['cat']))) || + ($itep_ary['parent'] === $category && !$itep_ary['cat'] && !$icat) || + (($itep_ary['name'] === $id || $itep_ary['id'] === (int) $id) && !$mode && !$itep_ary['cat']) || + (!$id && !$mode && !$itep_ary['cat']) + ) + { + if ($itep_ary['cat']) + { + $id = $icat; + $icat = false; + + continue; + } + + $this->p_id = $itep_ary['id']; + $this->p_parent = $itep_ary['parent']; + $this->p_name = $itep_ary['name']; + $this->p_mode = $itep_ary['mode']; + $this->p_left = $itep_ary['left']; + $this->p_right = $itep_ary['right']; + + $this->cache['parents'] = $this->cache['parents'][$this->p_id]; + + break; + } + else if (($itep_ary['cat'] && $itep_ary['id'] === (int) $id) || ($itep_ary['parent'] === $category && $itep_ary['cat'])) + { + $category = $itep_ary['id']; + } + } + + } + function makeit($module_url) + { + global $template; + + $current_id = false; + + $current_padding = $current_depth = 0; + $linear_offset = 'l_block1'; + $tabular_offset = 't_block2'; + + // Generate the list of modules, we'll do this in two ways ... + // 1) In a linear fashion + // 2) In a combined tabbed + linear fashion ... tabs for the categories + // and a linear list for subcategories/items + foreach ($this->module_ary as $row_id => $itep_ary) + { + if (!$itep_ary['display']) + { + continue; + } + + // Select first id we can get + if (!$current_id && (in_array($itep_ary['id'], array_keys($this->cache['parents'])) || $itep_ary['id'] == $this->p_id)) + { + $current_id = $itep_ary['id']; + } + + $depth = $itep_ary['depth']; + + if ($depth > $current_depth) + { + $linear_offset = $linear_offset . '.l_block' . ($depth + 1); + $tabular_offset = ($depth + 1 > 2) ? $tabular_offset . '.t_block' . ($depth + 1) : $tabular_offset; + } + else if ($depth < $current_depth) + { + for ($i = $current_depth - $depth; $i > 0; $i--) + { + $linear_offset = substr($linear_offset, 0, strrpos($linear_offset, '.')); + $tabular_offset = ($i + $depth > 1) ? substr($tabular_offset, 0, strrpos($tabular_offset, '.')) : $tabular_offset; + } + } + + $u_title = $module_url . (($itep_ary['is_duplicate']) ? '&icat=' . $current_id : '') . '&i=' . (($itep_ary['cat']) ? $itep_ary['id'] : $itep_ary['name'] . '&mode=' . $itep_ary['mode']); + $u_title .= (!$itep_ary['cat'] && isset($itep_ary['url_extra'])) ? $itep_ary['url_extra'] : ''; + + // Only output a categories items if it's currently selected + if (!$depth || ($depth && (in_array($itep_ary['parent'], array_values($this->module_cache['parents'])) || $itep_ary['parent'] == $this->p_parent))) + { + $use_tabular_offset = (!$depth) ? 't_block1' : $tabular_offset; + + $tpl_ary = array( + 'L_TITLE' => $itep_ary['lang'], + 'S_SELECTED' => (in_array($itep_ary['id'], array_keys($this->module_cache['parents'])) || $itep_ary['id'] == $this->p_id) ? true : false, + 'U_TITLE' => $u_title + ); + + $template->block($use_tabular_offset, array_merge($tpl_ary, array_change_key_case($itep_ary, CASE_UPPER))); + } + + $tpl_ary = array( + 'L_TITLE' => $itep_ary['lang'], + 'S_SELECTED' => (in_array($itep_ary['id'], array_keys($this->module_cache['parents'])) || $itep_ary['id'] == $this->p_id) ? true : false, + 'U_TITLE' => $u_title + ); + + $template->block($linear_offset, array_merge($tpl_ary, array_change_key_case($itep_ary, CASE_UPPER))); + + $current_depth = $depth; + } + } } ?> Property changes on: trunk/version1.0/includes/classes/class.module.php ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/includes/classes/class.multisite.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.piegraph.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.plugin.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.session.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.stats.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.template.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.time_online.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.viewer.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/classes/class.wizard.php ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/includes/config.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/constants.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Modified: trunk/version1.0/includes/db/db.php =================================================================== --- trunk/version1.0/includes/db/db.php 2006-04-04 12:52:21 UTC (rev 1670) +++ trunk/version1.0/includes/db/db.php 2006-04-04 14:11:20 UTC (rev 1671) @@ -6,7 +6,7 @@ ****************************************************************** * start.php * **************** -* $Id: start.php 1643 2006-03-22 16:07:08Z paulsohier $ +* $Id$ ******************************************************************/ /******************************************************************* * Property changes on: trunk/version1.0/includes/db/db.php ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/includes/db/mysql.php ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/includes/detection.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/functions.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/functions_color.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/functions_sql.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/functions_vars.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/index.htm ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/pngreplacer.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/start.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/includes/wizards/configwiz.php ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/index.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/install/Update.txt ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/install/checkcon.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/install/index.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/install/install.css ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/install/install.sql ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/install/start.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/install/templates/footer.html ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/install/templates/header.html ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/install/templates/install.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/install/templates/update.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/install/update.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/install/update.sql ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/installation.txt ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/javascript/functions.js ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/javascript/stats.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/lang/en/config.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/lang/en/install.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/lang/en/main.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/lang/en/rss.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/lang/en/stats.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/lang/en/wizz.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/lang/nl/admin.php ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/lang/nl/config.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/lang/nl/install.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/lang/nl/main.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/lang/nl/rss.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/lang/nl/stats.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/lang/nl/wizz.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/plugins/plugin_ComeFrom/data.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/plugins/plugin_ComeFrom/plugin.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/plugins/plugin_Follow/class.siteMap.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/plugins/plugin_Follow/icon.png ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/plugins/plugin_Follow/plugin.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/plugins/plugin_Follow/templates/main.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/plugins/plugin_Mysql/icon.png ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/plugins/plugin_Mysql/plugin.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/plugins/plugin_Mysql/templates/statsmysql.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/plugins/plugin_SearchTerms/plugin.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/plugins/plugin_UserOptions/plugin.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/plugins/plugin_phpbb/plugin.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/plugins/plugin_phpbb/templates/RP_phpbb.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/rss.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/staticData/languages.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/stats.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/statsGetJS.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/statsGetJSend.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/statsGetTimeOnline.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/templates/rcts/conf.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/templates/rcts/confp.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/templates/rcts/error.html ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/templates/rcts/errors.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/templates/rcts/footer.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/templates/rcts/header.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/templates/rcts/images/caption_back.png ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/templates/rcts/images/caption_back2.png ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/templates/rcts/images/del.gif ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/templates/rcts/images/down.gif ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/templates/rcts/images/logo_back.png ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/templates/rcts/images/logo_main.png ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/templates/rcts/images/spacer.gif ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/templates/rcts/images/tab_active_left.gif ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/templates/rcts/images/tab_active_rest.gif ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/templates/rcts/images/tab_normal_left.gif ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/templates/rcts/images/tab_normal_rest.gif ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/templates/rcts/images/up.gif ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/version1.0/templates/rcts/login.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/templates/rcts/pluginsMulti.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/templates/rcts/pluginsSingle.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/templates/rcts/rcts.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/templates/rcts/stats.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/templates/rcts/statsfooter.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/templates/rcts/statsheader.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/templates/rcts/statsuniek.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/templates/rcts/template.css ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/templates/rcts/wizz.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/versie.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/wizz.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id Property changes on: trunk/version1.0/xml.php ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-04-04 17:06:10
|
Revision: 1673 Author: paulsohier Date: 2006-04-04 10:05:47 -0700 (Tue, 04 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1673&view=rev Log Message: ----------- ACP basic is working now. Modules can be written :D:D:D (submenu will me maked later ;) Modified Paths: -------------- trunk/version1.0/admin/index.php trunk/version1.0/admin/tpl/header.html trunk/version1.0/admin/tpl/template.css trunk/version1.0/includes/classes/class.error.php trunk/version1.0/includes/classes/class.module.php Added Paths: ----------- trunk/version1.0/includes/modules/acp/ trunk/version1.0/includes/modules/acp/acp_info.php trunk/version1.0/tree.php Removed Paths: ------------- trunk/version1.0/includes/modules/admin/ Modified: trunk/version1.0/admin/index.php =================================================================== --- trunk/version1.0/admin/index.php 2006-04-04 14:31:31 UTC (rev 1672) +++ trunk/version1.0/admin/index.php 2006-04-04 17:05:47 UTC (rev 1673) @@ -21,14 +21,20 @@ define('IN_ADMIN',true); define('RCTS_ROOT_PATH', str_replace("admin","",str_replace("\\admin", "", dirname(__FILE__)))); include(RCTS_ROOT_PATH . '/includes/start.php'); +/** + * @todo: Write the login function + * @todo: Check why the tabs are alway set to active. + * @todo: Write modules :D + **/ $page = get_var('page'); $mode = get_var('mode'); //if(!$core->is_login()){ //} -$core->adminheader(); $module->load_modules('acp'); -$module->makeit(); $module->active($page,$mode); +$module->makeit('index.php?'); +$core->adminheader(); +$module->start(); $core->adminfooter(); ?> Modified: trunk/version1.0/admin/tpl/header.html =================================================================== --- trunk/version1.0/admin/tpl/header.html 2006-04-04 14:31:31 UTC (rev 1672) +++ trunk/version1.0/admin/tpl/header.html 2006-04-04 17:05:47 UTC (rev 1673) @@ -4,5 +4,20 @@ <link rel="stylesheet" href="tpl/template.css" type="text/css" /> </head> <body> - +<div id="tabs"> +<ul> +<!-- START menu --> +<li {menu.S_SELECTED}><a href="{menu.U_TITLE}"><span>{menu.L_TITLE}</span></a></li> +<!-- STOP menu --> +</ul> +</div> <div id="main"> +<div id="menu"> +<!-- START table --> +<ul> + <!-- START table2 --> + <li class="header">{table.table2.L_TITLE}</li> + <!-- STOP table2 --> +</ul> +<!-- STOP table --> +</div> Modified: trunk/version1.0/admin/tpl/template.css =================================================================== --- trunk/version1.0/admin/tpl/template.css 2006-04-04 14:31:31 UTC (rev 1672) +++ trunk/version1.0/admin/tpl/template.css 2006-04-04 17:05:47 UTC (rev 1673) @@ -10,9 +10,9 @@ background-color: #C3E2FF; left: 5%; position: relative; - top: 50px; + color: black; - padding: 3px; +padding:3px; border: 1px solid #B2FEFF; } #main a{ @@ -22,20 +22,130 @@ text-align:center; font-size:9px; } -#tabs .tab{ + +#tabs { + position: relative; + height: 45px; + left: 5%; + width: 90%; + line-height: normal; + margin: 0 0 -7px 0px; + min-width: 570px; + padding:3px; + background-color: Red; + color:white; +} +#tabs ul { + margin:0; + padding: 0; + list-style: none; + } +#tabs li { + display: inline; + margin: 0; + padding: 0; + font-size: 1em; + font-weight: bold; +} +#tabs a { + float:left; + + margin: 0 1px 0 0; + padding: 0 0 0 6px; + text-decoration: none; + position: relative; background-color: Green; - width: 10%; - cursor: pointer; -} -#tabs #actief{ + } +#tabs a span { + float: left; + display: block; + + padding: 7px 12px 6px 6px; + color: white; + white-space: nowrap; + text-transform: uppercase; + + } +/* Commented Backslash Hack hides rule from IE5-Mac \*/ +#tabs a span { float:none; } +/* End hack */ + +#tabs a:hover span { + color: #DD6900; + } +#tabs #activetab a { + background-position: 0 0px; + border-bottom: 1px solid #FFFFFF; background-color: Blue; - cursor: pointer; } -#tabs{ - position: absolute; - margin-top:3px; - top:0px; - height:45px; - left:5%; - padding:3px; -} \ No newline at end of file +#tabs #activetab a span { + background-position: 100% 0px; + padding-bottom: 7px; + color: #333333; + } +#tabs a:hover { + background-position: 0 -70px; + } +#tabs a:hover span { + background-position:100% -70px; + } +#tabs #activetab a:hover span { + color: #333333; + } +menu { + float: left; + width: 20%; + font-size: 100%; + padding: 0; + } +#menu p { + font-size: 1em; + } +#menu ul { + list-style: none; + } + +/* Default list state */ +#menu li { + font-size: 1em; + font-weight: bold; + display: inline; + } + +/* Link styles for the sub-section links */ +#menu li a { + display: block; + padding: 3px 2px 3px 10px; + text-decoration: none; + font-weight: normal; + color: #006699; + font-weight: bold; + background-color: #ECECEC; + border-top: 1px solid #FFFFFF; + } +#menu li a:hover { + text-decoration: none; + background-color: #FFA34F; + color: #FFFFFF; + } +#menu li.header { + display: block; + padding: 5px; + font-size: 0.9em; + font-family: Verdana; + color: #FFA34F; + font-weight: bold; + background: #006699 url("../images/cellpic3.gif") 0 0 repeat-x; + margin-top: 5px; + text-transform: uppercase; + } +#menu li#activemenu a { + text-decoration: none; + font-weight: bold; + color: #000; + background-color: #DADFE4; + } +#menu li#activemenu a:hover { + text-decoration: none; + color: #000; + } \ No newline at end of file Modified: trunk/version1.0/includes/classes/class.error.php =================================================================== --- trunk/version1.0/includes/classes/class.error.php 2006-04-04 14:31:31 UTC (rev 1672) +++ trunk/version1.0/includes/classes/class.error.php 2006-04-04 17:05:47 UTC (rev 1673) @@ -168,6 +168,8 @@ } $txt .= $errmsg; } + $txt .= '<br />File: ' . $file; + $txt .= '<br />Line: ' . $line; $txt .= '<br />Backtrace'; $txt .= $this->get_backtrace(); $lang->loadlang(); Modified: trunk/version1.0/includes/classes/class.module.php =================================================================== --- trunk/version1.0/includes/classes/class.module.php 2006-04-04 14:31:31 UTC (rev 1672) +++ trunk/version1.0/includes/classes/class.module.php 2006-04-04 17:05:47 UTC (rev 1673) @@ -21,6 +21,7 @@ var $cache = array(); function load_modules($mode){ global $db,$core,$cache; + $this->p_class = $mode; //This must really be cached //Will it add later ;) $sql = "SELECT * FROM ".RCTS_MODULES_TABLE . " WHERE module_sort = '$mode' ORDER BY module_left ASC"; @@ -144,7 +145,7 @@ 'name' => (string) $row['module_name'], 'mode' => (string) $row['module_mode'], - 'display' => (int) $row['module_display'], + 'display' => (int) true,//(Must this in the db?) 'url_extra' => (function_exists($url_func)) ? $url_func() : '', @@ -235,15 +236,16 @@ $current_id = false; $current_padding = $current_depth = 0; - $linear_offset = 'l_block1'; - $tabular_offset = 't_block2'; - + $linear_offset = 'menu'; + $tabular_offset = 'table'; // Generate the list of modules, we'll do this in two ways ... // 1) In a linear fashion // 2) In a combined tabbed + linear fashion ... tabs for the categories // and a linear list for subcategories/items - foreach ($this->module_ary as $row_id => $itep_ary) + foreach ($this->module as $row_id => $itep_ary) { + + if (!$itep_ary['display']) { continue; @@ -259,8 +261,8 @@ if ($depth > $current_depth) { - $linear_offset = $linear_offset . '.l_block' . ($depth + 1); - $tabular_offset = ($depth + 1 > 2) ? $tabular_offset . '.t_block' . ($depth + 1) : $tabular_offset; + $linear_offset = $linear_offset . '.table' . ($depth + 1); + $tabular_offset = ($depth + 1 > 2) ? $tabular_offset . '.table' . ($depth + 1) : $tabular_offset; } else if ($depth < $current_depth) { @@ -271,26 +273,26 @@ } } - $u_title = $module_url . (($itep_ary['is_duplicate']) ? '&icat=' . $current_id : '') . '&i=' . (($itep_ary['cat']) ? $itep_ary['id'] : $itep_ary['name'] . '&mode=' . $itep_ary['mode']); + $u_title = $module_url . (($itep_ary['is_duplicate']) ? '&cat=' . $current_id : '') . '&page=' . (($itep_ary['cat']) ? $itep_ary['id'] : $itep_ary['name'] . '&mode=' . $itep_ary['mode']); $u_title .= (!$itep_ary['cat'] && isset($itep_ary['url_extra'])) ? $itep_ary['url_extra'] : ''; // Only output a categories items if it's currently selected - if (!$depth || ($depth && (in_array($itep_ary['parent'], array_values($this->module_cache['parents'])) || $itep_ary['parent'] == $this->p_parent))) + if (!$depth || ($depth && (in_array($itep_ary['parent'], array_values($this->cache['parents'])) || $itep_ary['parent'] == $this->p_parent))) { - $use_tabular_offset = (!$depth) ? 't_block1' : $tabular_offset; - + + $use_tabular_offset = (!$depth) ? 'table' : $tabular_offset; $tpl_ary = array( 'L_TITLE' => $itep_ary['lang'], - 'S_SELECTED' => (in_array($itep_ary['id'], array_keys($this->module_cache['parents'])) || $itep_ary['id'] == $this->p_id) ? true : false, + 'S_SELECTED' => (in_array($itep_ary['id'], array_keys($this->cache['parents'])) || $itep_ary['id'] == $this->p_id) ? "id=\"actief\"" : '', 'U_TITLE' => $u_title ); - $template->block($use_tabular_offset, array_merge($tpl_ary, array_change_key_case($itep_ary, CASE_UPPER))); } + $tpl_ary = array( - 'L_TITLE' => $itep_ary['lang'], - 'S_SELECTED' => (in_array($itep_ary['id'], array_keys($this->module_cache['parents'])) || $itep_ary['id'] == $this->p_id) ? true : false, + 'L_TITLE' => (isset($lang->lang[$itep_ary['lang']])) ? $lang->lang[$itep_ary['lang']] : $itep_ary['lang'], + 'S_SELECTED' => (in_array($itep_ary['id'], array_keys($this->cache['parents'])) || $itep_ary['id'] == $this->p_id) ? "id=\"actief\"" : '', 'U_TITLE' => $u_title ); @@ -298,6 +300,50 @@ $current_depth = $depth; } - } + } + function start($mode = false) + { + + + $module_path = RCTS_ROOT_PATH . '/includes/modules/' . $this->p_class; + + $icat = get_var('cat'); + + + if (!class_exists("{$this->p_class}_$this->p_name")) + { + if (!file_exists("$module_path/{$this->p_class}_$this->p_name.php")) + { + trigger_error('Cannot find module (Name: ' . $this->p_class."_".$this->p_name.".php)", E_USER_ERROR); + } + + include("$module_path/{$this->p_class}_$this->p_name.php"); + + if (!class_exists("{$this->p_class}_$this->p_name")) + { + trigger_error('Module does not contain correct class', E_USER_ERROR); + } + + if (!empty($mode)) + { + $this->p_mode = $mode; + } + + // Create a new instance of the desired module ... if it has a + // constructor it will of course be executed + $instance = "{$this->p_class}_$this->p_name"; + + $this->module = new $instance($this); + + // We pre-define the action parameter we are using all over the place + $this->module->u_action = "{$phpbb_admin_path}index.$phpEx$SID" . (($icat) ? '&icat=' . $icat : '') . "&i={$this->p_id}&mode={$this->p_mode}"; + + // Execute the main method for the new instance, we send the module + // id and mode as parameters + $this->module->main(($this->p_name) ? $this->p_name : $this->p_id, $this->p_mode); + + return; + } + } } ?> Added: trunk/version1.0/includes/modules/acp/acp_info.php =================================================================== --- trunk/version1.0/includes/modules/acp/acp_info.php (rev 0) +++ trunk/version1.0/includes/modules/acp/acp_info.php 2006-04-04 17:05:47 UTC (rev 1673) @@ -0,0 +1,25 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* class.module.php +* **************** +* $Id: class.module.php 1671 2006-04-04 14:11:20Z paulsohier $ +******************************************************************/ + +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +class acp_info{ + function main(){ + print "Zie je dit? Mooi dan werkt het ;)"; + } +} +?> Added: trunk/version1.0/tree.php =================================================================== --- trunk/version1.0/tree.php (rev 0) +++ trunk/version1.0/tree.php 2006-04-04 17:05:47 UTC (rev 1673) @@ -0,0 +1,38 @@ +<?php +//Tree builder:D:D:D +define('IN_STATS', true); +define('RCTS_ROOT_PATH', dirname(__FILE__)); +include(RCTS_ROOT_PATH.'/includes/start.php'); +pageheader('Lets make a tree :D:D:D'); +function rebuild_tree($parent, $left) { + global $db; + + // the right value of this node is the left value + 1 + $right = $left+1; + + // get all children of this node + $result = $db->sql_query('SELECT module_parent,module_id FROM '.RCTS_MODULES_TABLE.' WHERE module_parent="'.$parent.'";'); + + + while ($row = $db->sql_fetchrow($result)) { + print $row[0] . $row[1] . $parent . "<br />"; +// die; + + // recursive execution of this function for each + // child of this node + // $right is the current right value, which is + // incremented by the rebuild_tree function + $right = rebuild_tree($row['module_id'], $right); + // print $right;die; + } + // we've got the left value, and now that we've processed + // the children of this node we also know the right value + $db->sql_query('UPDATE '.RCTS_MODULES_TABLE.' SET module_left='.$left.', module_right='.$right.' WHERE module_id="'.$parent.'";'); + + // return the right value of this node + 1 + return $right+1; +} +rebuild_tree(0,1); +trigger_error('Done'); +pagefooter(); +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-04-04 18:47:07
|
Revision: 1675 Author: paulsohier Date: 2006-04-04 11:46:51 -0700 (Tue, 04 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1675&view=rev Log Message: ----------- bugfixes :D Modified Paths: -------------- trunk/version1.0/admin/tpl/header.html trunk/version1.0/cache/version.txt trunk/version1.0/includes/classes/class.module.php trunk/version1.0/tree.php Modified: trunk/version1.0/admin/tpl/header.html =================================================================== --- trunk/version1.0/admin/tpl/header.html 2006-04-04 17:06:56 UTC (rev 1674) +++ trunk/version1.0/admin/tpl/header.html 2006-04-04 18:46:51 UTC (rev 1675) @@ -15,8 +15,9 @@ <div id="menu"> <!-- START table --> <ul> +<li class="header"><a href="{table.U_TITLE}">{table.L_TITLE}</a></li> <!-- START table2 --> - <li class="header">{table.table2.L_TITLE}</li> + <!-- STOP table2 --> </ul> <!-- STOP table --> Modified: trunk/version1.0/cache/version.txt =================================================================== --- trunk/version1.0/cache/version.txt 2006-04-04 17:06:56 UTC (rev 1674) +++ trunk/version1.0/cache/version.txt 2006-04-04 18:46:51 UTC (rev 1675) @@ -2,5 +2,5 @@ $version = '1.2.2'; $offline = ''; $data = 'Nothing'; -$data = 1144172722; +$data = 1144259160; ?> \ No newline at end of file Modified: trunk/version1.0/includes/classes/class.module.php =================================================================== --- trunk/version1.0/includes/classes/class.module.php 2006-04-04 17:06:56 UTC (rev 1674) +++ trunk/version1.0/includes/classes/class.module.php 2006-04-04 18:46:51 UTC (rev 1675) @@ -36,16 +36,21 @@ $rows = array(); while($r = $db->sql_fetchrow($result)){ - $rows[] = $r; + $rows[$r['module_id']] = $r; } $this->cache = array(); - - for($i = 0; $i < count($rows);$i++){ - $row = $rows[$i]; + + while(list($module_id,$row) = each($rows)){ + $this->cache['mod'][] = $row; + + + $this->cache['parents'][$row['module_id']] = $this->parents($row['module_parent'], $row['module_left'], $row['module_right'], $rows); - } + } + + //Clean up the array with modules. //Delete inactive modules $right_id = false; @@ -158,15 +163,17 @@ } unset($this->cache['mod'], $names); + } function parents($parent_id, $left_id, $right_id, &$all_parents){ global $db; - + //print $parent_id . $left_id . $right_id ."<br />"; $parents = array(); - + if ($parent_id > 0){ - if ($parent_id > 0){ - foreach ($all_parents as $module_id => $row){ + for($i = 0; $i < count($all_parents);$i++){ + $row = $all_parents[$i]; + $module_id = $row['module_id']; if ($row['module_left'] < $left_id && $row['module_right'] > $right_id){ $parents[$module_id] = $row['module_parent']; } @@ -176,7 +183,6 @@ } } } - return $parents; } function active($id = false,$mode = false){ @@ -203,6 +209,7 @@ (!$id && !$mode && !$itep_ary['cat']) ) { + if ($itep_ary['cat']) { $id = $icat; @@ -210,7 +217,6 @@ continue; } - $this->p_id = $itep_ary['id']; $this->p_parent = $itep_ary['parent']; $this->p_name = $itep_ary['name']; @@ -220,6 +226,7 @@ $this->cache['parents'] = $this->cache['parents'][$this->p_id]; + break; } else if (($itep_ary['cat'] && $itep_ary['id'] === (int) $id) || ($itep_ary['parent'] === $category && $itep_ary['cat'])) @@ -228,6 +235,7 @@ } } + } function makeit($module_url) { @@ -242,6 +250,7 @@ // 1) In a linear fashion // 2) In a combined tabbed + linear fashion ... tabs for the categories // and a linear list for subcategories/items + foreach ($this->module as $row_id => $itep_ary) { @@ -288,11 +297,15 @@ ); $template->block($use_tabular_offset, array_merge($tpl_ary, array_change_key_case($itep_ary, CASE_UPPER))); } + /* print 'id: ' . $itep_ary['id'] . 'm1: '; + print (int) (in_array($itep_ary['id'], array_keys($this->cache['parents'])) ); + print 'm2: '; + print (int)($itep_ary['id'] == $this->p_id); + print '<br />';*/ - $tpl_ary = array( 'L_TITLE' => (isset($lang->lang[$itep_ary['lang']])) ? $lang->lang[$itep_ary['lang']] : $itep_ary['lang'], - 'S_SELECTED' => (in_array($itep_ary['id'], array_keys($this->cache['parents'])) || $itep_ary['id'] == $this->p_id) ? "id=\"actief\"" : '', + 'S_SELECTED' => (in_array($itep_ary['id'], array_keys($this->cache['parents'])) || $itep_ary['id'] == $this->p_id) ? "id=\"activetab\"" : '', 'U_TITLE' => $u_title ); @@ -336,7 +349,7 @@ $this->module = new $instance($this); // We pre-define the action parameter we are using all over the place - $this->module->u_action = "{$phpbb_admin_path}index.$phpEx$SID" . (($icat) ? '&icat=' . $icat : '') . "&i={$this->p_id}&mode={$this->p_mode}"; + $this->module->u_action = RCTS_ROOT_PATH . "index.php?" . (($icat) ? '&cat=' . $icat : '') . "&page={$this->p_id}&mode={$this->p_mode}"; // Execute the main method for the new instance, we send the module // id and mode as parameters Modified: trunk/version1.0/tree.php =================================================================== --- trunk/version1.0/tree.php 2006-04-04 17:06:56 UTC (rev 1674) +++ trunk/version1.0/tree.php 2006-04-04 18:46:51 UTC (rev 1675) @@ -32,7 +32,86 @@ // return the right value of this node + 1 return $right+1; } -rebuild_tree(0,1); +//rebuild_tree(0,1); + $sql_id = 'module_id'; + $sql_table = RCTS_MODULES_TABLE; + $sql_where = ($module_class) ? " WHERE module_class = '" . $db->sql_escape($module_class) . "'" : "WHERE $sql_id = $sql_id"; + + // Reset to minimum possible left and right id + $sql = "SELECT MIN(module_left) as min_module_left, MIN(module_right) as min_module_right + FROM $sql_table + $sql_where"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $substract = (int) (min($row['min_module_left'], $row['min_module_right']) - 1); + + if ($substract > 0) + { + $sql = "UPDATE $sql_table + SET module_left = module_left - $substract, module_right = module_right - $substract + $sql_where"; + $db->sql_query($sql); + } + + $sql = "SELECT $sql_id, module_parent, module_left, module_right + FROM $sql_table + $sql_where + ORDER BY module_left ASC, module_parent ASC, $sql_id ASC"; + $f_result = $db->sql_query($sql); + + while ($item_data = $db->sql_fetchrow($f_result)) + { + if ($item_data['module_parent']) + { + $sql = "SELECT module_left, module_right + FROM $sql_table + $sql_where + AND $sql_id = {$item_data['module_parent']}"; + $result = $db->sql_query($sql); + + if (!$row = $db->sql_fetchrow($result)) + { + $sql = "UPDATE $sql_table SET module_parent = 0 WHERE $sql_id = " . $item_data[$sql_id]; + $db->sql_query($sql); + } + $db->sql_freeresult($result); + + $sql = "UPDATE $sql_table + SET module_left = module_left + 2, module_right = module_right + 2 + $sql_where + AND module_left > {$row['module_right']}"; + $db->sql_query($sql); + + $sql = "UPDATE $sql_table + SET module_right = module_right + 2 + $sql_where + AND {$row['module_left']} BETWEEN module_left AND module_right"; + $db->sql_query($sql); + + $item_data['module_left'] = $row['module_right']; + $item_data['module_right'] = $row['module_right'] + 1; + } + else + { + $sql = "SELECT MAX(module_right) AS module_right + FROM $sql_table + $sql_where"; + $result = $db->sql_query($sql); + + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $item_data['module_left'] = $row['module_right'] + 1; + $item_data['module_right'] = $row['module_right'] + 2; + } + + $sql = "UPDATE $sql_table + SET module_left = {$item_data['module_left']}, module_right = {$item_data['module_right']} + WHERE $sql_id = " . $item_data[$sql_id]; + $db->sql_query($sql); + } trigger_error('Done'); pagefooter(); ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-04-04 20:04:47
|
Revision: 1682 Author: paulsohier Date: 2006-04-04 13:03:28 -0700 (Tue, 04 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1682&view=rev Log Message: ----------- Some headers updated :) Modified Paths: -------------- trunk/version1.0/developer/check_lang.php trunk/version1.0/developer/debugger.php trunk/version1.0/developer/kalenderTest.php trunk/version1.0/error.php trunk/version1.0/graph.php trunk/version1.0/includes/classes/class.3dbargraph.php trunk/version1.0/includes/classes/class.RSS.php trunk/version1.0/includes/classes/class.browser.php trunk/version1.0/includes/classes/class.cache.php trunk/version1.0/includes/classes/class.calendar.php trunk/version1.0/includes/classes/class.config.php trunk/version1.0/includes/classes/class.cron.php trunk/version1.0/includes/classes/class.error.php trunk/version1.0/includes/classes/class.getstats.php trunk/version1.0/includes/classes/class.graph.php trunk/version1.0/includes/classes/class.lang.php trunk/version1.0/includes/classes/class.layout.php trunk/version1.0/includes/classes/class.linegraph.php trunk/version1.0/includes/classes/class.load.php trunk/version1.0/includes/classes/class.mailer.php trunk/version1.0/includes/classes/class.multisite.php trunk/version1.0/includes/classes/class.piegraph.php trunk/version1.0/includes/classes/class.plugin.php trunk/version1.0/includes/classes/class.session.php trunk/version1.0/includes/classes/class.stats.php trunk/version1.0/includes/classes/class.template.php trunk/version1.0/includes/classes/class.time_online.php trunk/version1.0/includes/classes/class.viewer.php trunk/version1.0/includes/classes/class.wizard.php trunk/version1.0/includes/db/db.php trunk/version1.0/includes/db/mysql.php trunk/version1.0/includes/detection.php trunk/version1.0/includes/functions_color.php trunk/version1.0/includes/functions_sql.php trunk/version1.0/includes/functions_vars.php trunk/version1.0/includes/pngreplacer.php trunk/version1.0/includes/wizards/configwiz.php trunk/version1.0/index.php trunk/version1.0/install/checkcon.php trunk/version1.0/install/index.php trunk/version1.0/install/start.php trunk/version1.0/install/update.php trunk/version1.0/javascript/stats.php trunk/version1.0/lang/en/config.php trunk/version1.0/lang/en/install.php trunk/version1.0/lang/en/main.php trunk/version1.0/lang/en/rss.php trunk/version1.0/lang/en/stats.php trunk/version1.0/lang/en/wizz.php trunk/version1.0/lang/nl/admin.php trunk/version1.0/lang/nl/config.php trunk/version1.0/lang/nl/install.php trunk/version1.0/lang/nl/main.php trunk/version1.0/lang/nl/rss.php trunk/version1.0/lang/nl/wizz.php trunk/version1.0/plugins/plugin_ComeFrom/data.php trunk/version1.0/plugins/plugin_ComeFrom/plugin.php trunk/version1.0/plugins/plugin_Follow/class.siteMap.php trunk/version1.0/plugins/plugin_Follow/plugin.php trunk/version1.0/plugins/plugin_Mysql/plugin.php trunk/version1.0/plugins/plugin_SearchTerms/plugin.php trunk/version1.0/plugins/plugin_UserOptions/plugin.php trunk/version1.0/plugins/plugin_phpbb/plugin.php trunk/version1.0/rss.php trunk/version1.0/staticData/languages.php trunk/version1.0/stats.php trunk/version1.0/statsGetJS.php trunk/version1.0/statsGetJSend.php trunk/version1.0/statsGetTimeOnline.php trunk/version1.0/templates/rcts/rcts.php trunk/version1.0/versie.php trunk/version1.0/wizz.php trunk/version1.0/xml.php Removed Paths: ------------- trunk/version1.0/confp.php Deleted: trunk/version1.0/confp.php =================================================================== --- trunk/version1.0/confp.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/confp.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,29 +0,0 @@ -<?php -/****************************************************************** -* Really Coding Traffic Statistics -* Begin: October, 3rd 2005 -* Copyright: Copyright 2005 by Really coding Group -****************************************************************** -* confp.php -* **************** -* $Id$ -******************************************************************/ - -/******************************************************************* -* -* 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, or -* (at your option) any later version. -* -*******************************************************************/ -ob_start(); -define('IN_STATS', true); -define('RCTS_ROOT_PATH', dirname(__FILE__)); -include(RCTS_ROOT_PATH.'/includes/start.php'); -//include_once(RCTS_ROOT_PATH.'/includes/multisite_class.php'); -$multiSite=new multisite; -pageHeader("Plugin config"); -$config->geefplug(); -pageFooter(); -?> \ No newline at end of file Modified: trunk/version1.0/developer/check_lang.php =================================================================== --- trunk/version1.0/developer/check_lang.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/developer/check_lang.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -44,4 +44,4 @@ print "Klaar<br />"; print "NL count: ".count($lang['nl']).". <br />EN count: ".count($lang['en']).""; -?> \ No newline at end of file +?> Modified: trunk/version1.0/developer/debugger.php =================================================================== --- trunk/version1.0/developer/debugger.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/developer/debugger.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -65,4 +65,4 @@ } echo "</table><br><br>"; } -?> \ No newline at end of file +?> Modified: trunk/version1.0/developer/kalenderTest.php =================================================================== --- trunk/version1.0/developer/kalenderTest.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/developer/kalenderTest.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -24,4 +24,4 @@ pageHeader('Kalender testpage'); echo $kalender->makeKalender(1); pageFooter(); -?> \ No newline at end of file +?> Modified: trunk/version1.0/error.php =================================================================== --- trunk/version1.0/error.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/error.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -47,4 +47,4 @@ )); } $template->parse("body"); -?> \ No newline at end of file +?> Modified: trunk/version1.0/graph.php =================================================================== --- trunk/version1.0/graph.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/graph.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin October, 3rd 2005 * Copyright Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.3dbargraph.php =================================================================== --- trunk/version1.0/includes/classes/class.3dbargraph.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.3dbargraph.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -316,4 +316,4 @@ } } } -?> \ No newline at end of file +?> Modified: trunk/version1.0/includes/classes/class.RSS.php =================================================================== --- trunk/version1.0/includes/classes/class.RSS.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.RSS.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.browser.php =================================================================== --- trunk/version1.0/includes/classes/class.browser.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.browser.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.cache.php =================================================================== --- trunk/version1.0/includes/classes/class.cache.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.cache.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -471,4 +471,4 @@ return $result;//will result TRUE or FALSE } } -?> \ No newline at end of file +?> Modified: trunk/version1.0/includes/classes/class.calendar.php =================================================================== --- trunk/version1.0/includes/classes/class.calendar.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.calendar.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.config.php =================================================================== --- trunk/version1.0/includes/classes/class.config.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.config.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.cron.php =================================================================== --- trunk/version1.0/includes/classes/class.cron.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.cron.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 4rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.error.php =================================================================== --- trunk/version1.0/includes/classes/class.error.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.error.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.getstats.php =================================================================== --- trunk/version1.0/includes/classes/class.getstats.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.getstats.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -463,4 +463,4 @@ return $domains; } } -?> \ No newline at end of file +?> Modified: trunk/version1.0/includes/classes/class.graph.php =================================================================== --- trunk/version1.0/includes/classes/class.graph.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.graph.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.lang.php =================================================================== --- trunk/version1.0/includes/classes/class.lang.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.lang.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -116,4 +116,4 @@ } } -?> \ No newline at end of file +?> Modified: trunk/version1.0/includes/classes/class.layout.php =================================================================== --- trunk/version1.0/includes/classes/class.layout.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.layout.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?PHP /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.linegraph.php =================================================================== --- trunk/version1.0/includes/classes/class.linegraph.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.linegraph.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.load.php =================================================================== --- trunk/version1.0/includes/classes/class.load.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.load.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 5rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.mailer.php =================================================================== --- trunk/version1.0/includes/classes/class.mailer.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.mailer.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.multisite.php =================================================================== --- trunk/version1.0/includes/classes/class.multisite.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.multisite.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.piegraph.php =================================================================== --- trunk/version1.0/includes/classes/class.piegraph.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.piegraph.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -358,4 +358,4 @@ } } -?> \ No newline at end of file +?> Modified: trunk/version1.0/includes/classes/class.plugin.php =================================================================== --- trunk/version1.0/includes/classes/class.plugin.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.plugin.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.session.php =================================================================== --- trunk/version1.0/includes/classes/class.session.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.session.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -77,4 +77,4 @@ } } } -?> \ No newline at end of file +?> Modified: trunk/version1.0/includes/classes/class.stats.php =================================================================== --- trunk/version1.0/includes/classes/class.stats.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.stats.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?PHP /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.template.php =================================================================== --- trunk/version1.0/includes/classes/class.template.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.template.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 4rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.time_online.php =================================================================== --- trunk/version1.0/includes/classes/class.time_online.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.time_online.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -75,4 +75,4 @@ } } -?> \ No newline at end of file +?> Modified: trunk/version1.0/includes/classes/class.viewer.php =================================================================== --- trunk/version1.0/includes/classes/class.viewer.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.viewer.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/classes/class.wizard.php =================================================================== --- trunk/version1.0/includes/classes/class.wizard.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/classes/class.wizard.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,4 +1,21 @@ -<? +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* class.wizzard.php +* **************** +* $Id$ +******************************************************************/ +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ /* NBBS Wizard - Wizard Component & Installation Wizard Extracted from: The Next BBS - Forums Software @@ -1075,4 +1092,4 @@ EOB; } }*/ -?> \ No newline at end of file +?> Modified: trunk/version1.0/includes/db/db.php =================================================================== --- trunk/version1.0/includes/db/db.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/db/db.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,10 +1,10 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** -* start.php +* db.php * **************** * $Id$ ******************************************************************/ Modified: trunk/version1.0/includes/db/mysql.php =================================================================== --- trunk/version1.0/includes/db/mysql.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/db/mysql.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/detection.php =================================================================== --- trunk/version1.0/includes/detection.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/detection.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?PHP /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -618,4 +618,4 @@ //$browser_number = strrpos( $browser_user_agent, $search_string ); return $browser_number; } -?> \ No newline at end of file +?> Modified: trunk/version1.0/includes/functions_color.php =================================================================== --- trunk/version1.0/includes/functions_color.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/functions_color.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -60,4 +60,4 @@ ); return $rgb; } -?> \ No newline at end of file +?> Modified: trunk/version1.0/includes/functions_sql.php =================================================================== --- trunk/version1.0/includes/functions_sql.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/functions_sql.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -188,4 +188,4 @@ return $output; } -?> \ No newline at end of file +?> Modified: trunk/version1.0/includes/functions_vars.php =================================================================== --- trunk/version1.0/includes/functions_vars.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/functions_vars.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/pngreplacer.php =================================================================== --- trunk/version1.0/includes/pngreplacer.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/pngreplacer.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/includes/wizards/configwiz.php =================================================================== --- trunk/version1.0/includes/wizards/configwiz.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/includes/wizards/configwiz.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,4 +1,22 @@ <?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* configwizz.php +* **************** +* $Id$ +******************************************************************/ + +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ class Splash extends Wizard { function init() @@ -242,4 +260,4 @@ $this->page = $this->getBlockCode($blockBody); } } -?> \ No newline at end of file +?> Modified: trunk/version1.0/index.php =================================================================== --- trunk/version1.0/index.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/index.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/install/checkcon.php =================================================================== --- trunk/version1.0/install/checkcon.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/install/checkcon.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -68,4 +68,4 @@ print '<?xml version="1.0" encoding="ISO-8859-1" ?>' . "\n"; print "<xml>"; print "<result>$result</result>\n<error>$error</error></xml>"; -?> \ No newline at end of file +?> Modified: trunk/version1.0/install/index.php =================================================================== --- trunk/version1.0/install/index.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/install/index.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/install/start.php =================================================================== --- trunk/version1.0/install/start.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/install/start.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/install/update.php =================================================================== --- trunk/version1.0/install/update.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/install/update.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/javascript/stats.php =================================================================== --- trunk/version1.0/javascript/stats.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/javascript/stats.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/lang/en/config.php =================================================================== --- trunk/version1.0/lang/en/config.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/lang/en/config.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/lang/en/install.php =================================================================== --- trunk/version1.0/lang/en/install.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/lang/en/install.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/lang/en/main.php =================================================================== --- trunk/version1.0/lang/en/main.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/lang/en/main.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/lang/en/rss.php =================================================================== --- trunk/version1.0/lang/en/rss.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/lang/en/rss.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -48,4 +48,4 @@ $lang['Load_time']="Load time"; $lang['site_stats'] = 'Site Stats'; $lang['stats_from'] = 'Stats from a site'; -?> \ No newline at end of file +?> Modified: trunk/version1.0/lang/en/stats.php =================================================================== --- trunk/version1.0/lang/en/stats.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/lang/en/stats.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/lang/en/wizz.php =================================================================== --- trunk/version1.0/lang/en/wizz.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/lang/en/wizz.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -58,4 +58,4 @@ $lang['Wiz_la_computer'] = 'Default, with statistics about the visitor their computer on a seperate page.'; $lang['Wiz_la_computerplus'] = 'Default, with statistics about the visitor their computer on a seperate page, and the plugins ComeFrom and UserOptions.'; -?> \ No newline at end of file +?> Modified: trunk/version1.0/lang/nl/admin.php =================================================================== --- trunk/version1.0/lang/nl/admin.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/lang/nl/admin.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -22,4 +22,4 @@ die('Hacking Attempt'); } $lang['NO_MODULES'] = 'Er zijn geen modules voor deze modes.'; -?> \ No newline at end of file +?> Modified: trunk/version1.0/lang/nl/config.php =================================================================== --- trunk/version1.0/lang/nl/config.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/lang/nl/config.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/lang/nl/install.php =================================================================== --- trunk/version1.0/lang/nl/install.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/lang/nl/install.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/lang/nl/main.php =================================================================== --- trunk/version1.0/lang/nl/main.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/lang/nl/main.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/lang/nl/rss.php =================================================================== --- trunk/version1.0/lang/nl/rss.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/lang/nl/rss.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -48,4 +48,4 @@ $lang['Load_time']="Laad tijd"; $lang['site_stats'] = 'Site Stats'; $lang['stats_from'] = 'Stats from a site'; -?> \ No newline at end of file +?> Modified: trunk/version1.0/lang/nl/wizz.php =================================================================== --- trunk/version1.0/lang/nl/wizz.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/lang/nl/wizz.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -57,4 +57,4 @@ $lang['Wiz_la_computer'] = 'Standaard, met statistieken over de bezoeker hun computer op een losse pagina.'; $lang['Wiz_la_computerplus'] = 'Standaard, met statistieken over de bezoeker hun computer op een losse pagina, en de plugins ComeFrom en UserOptions.'; -?> \ No newline at end of file +?> Modified: trunk/version1.0/plugins/plugin_ComeFrom/data.php =================================================================== --- trunk/version1.0/plugins/plugin_ComeFrom/data.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/plugins/plugin_ComeFrom/data.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?PHP /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -65,4 +65,4 @@ "org"=>"Organisation (.org)", "com"=>"Commercial (.com)", "net"=>"Network (.net)", "org"=>"Organisation (.org)", "edu"=>"University USA (.edu)", "gov"=>"Government USA (.gov)", "mil"=>"US Army (.mil)", "localhost" => "Onbekend", "" => "Onbekend", "Onbekend" => "onbekend"); -?> \ No newline at end of file +?> Modified: trunk/version1.0/plugins/plugin_ComeFrom/plugin.php =================================================================== --- trunk/version1.0/plugins/plugin_ComeFrom/plugin.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/plugins/plugin_ComeFrom/plugin.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/plugins/plugin_Follow/class.siteMap.php =================================================================== --- trunk/version1.0/plugins/plugin_Follow/class.siteMap.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/plugins/plugin_Follow/class.siteMap.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -257,4 +257,4 @@ } } -?> \ No newline at end of file +?> Modified: trunk/version1.0/plugins/plugin_Follow/plugin.php =================================================================== --- trunk/version1.0/plugins/plugin_Follow/plugin.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/plugins/plugin_Follow/plugin.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/plugins/plugin_Mysql/plugin.php =================================================================== --- trunk/version1.0/plugins/plugin_Mysql/plugin.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/plugins/plugin_Mysql/plugin.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/plugins/plugin_SearchTerms/plugin.php =================================================================== --- trunk/version1.0/plugins/plugin_SearchTerms/plugin.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/plugins/plugin_SearchTerms/plugin.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/plugins/plugin_UserOptions/plugin.php =================================================================== --- trunk/version1.0/plugins/plugin_UserOptions/plugin.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/plugins/plugin_UserOptions/plugin.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/plugins/plugin_phpbb/plugin.php =================================================================== --- trunk/version1.0/plugins/plugin_phpbb/plugin.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/plugins/plugin_phpbb/plugin.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/rss.php =================================================================== --- trunk/version1.0/rss.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/rss.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -205,4 +205,4 @@ $date_mod .= $time_zone; return $date_mod; } -?> \ No newline at end of file +?> Modified: trunk/version1.0/staticData/languages.php =================================================================== --- trunk/version1.0/staticData/languages.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/staticData/languages.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?PHP /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -169,4 +169,4 @@ 'xh' => 'Xhosa', 'yi' => 'Yiddish', 'zu' => 'Zulu' ); - ?> \ No newline at end of file + ?> Modified: trunk/version1.0/stats.php =================================================================== --- trunk/version1.0/stats.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/stats.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/statsGetJS.php =================================================================== --- trunk/version1.0/statsGetJS.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/statsGetJS.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/statsGetJSend.php =================================================================== --- trunk/version1.0/statsGetJSend.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/statsGetJSend.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/statsGetTimeOnline.php =================================================================== --- trunk/version1.0/statsGetTimeOnline.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/statsGetTimeOnline.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** Modified: trunk/version1.0/templates/rcts/rcts.php =================================================================== --- trunk/version1.0/templates/rcts/rcts.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/templates/rcts/rcts.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,10 +1,10 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** -* standaard.php +* rcts.php * **************** * $Id$ ******************************************************************/ @@ -27,4 +27,4 @@ $themeColor['imAxText'] = "#000000"; $themeColor['isRobot'] = '#DEDEDE'; $themeColor['isnotRobot'] = '#EFEFEF'; -?> \ No newline at end of file +?> Modified: trunk/version1.0/versie.php =================================================================== --- trunk/version1.0/versie.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/versie.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?PHP /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -25,4 +25,4 @@ $r = mysql_query($sql) or die(mysql_error()); $g = mysql_fetch_array($r); echo "Version: ".$g['waarde']; -?> \ No newline at end of file +?> Modified: trunk/version1.0/wizz.php =================================================================== --- trunk/version1.0/wizz.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/wizz.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -79,4 +79,4 @@ //statsFooter(); pageFooter();*/ } -?> \ No newline at end of file +?> Modified: trunk/version1.0/xml.php =================================================================== --- trunk/version1.0/xml.php 2006-04-04 19:29:20 UTC (rev 1681) +++ trunk/version1.0/xml.php 2006-04-04 20:03:28 UTC (rev 1682) @@ -1,6 +1,6 @@ <?php /****************************************************************** -* Really Coding Traffic Statistics +* Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** @@ -71,4 +71,4 @@ print "<string>Geen mode</string>"; } print "</xml>"; -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-04-05 09:34:32
|
Revision: 1686 Author: paulsohier Date: 2006-04-05 02:34:22 -0700 (Wed, 05 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1686&view=rev Log Message: ----------- Bugfixes. Modified Paths: -------------- trunk/version1.0/install/install.sql Added Paths: ----------- trunk/version1.0/includes/modules/acp/acp_tree.php Removed Paths: ------------- trunk/version1.0/tree.php Added: trunk/version1.0/includes/modules/acp/acp_tree.php =================================================================== --- trunk/version1.0/includes/modules/acp/acp_tree.php (rev 0) +++ trunk/version1.0/includes/modules/acp/acp_tree.php 2006-04-05 09:34:22 UTC (rev 1686) @@ -0,0 +1,108 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* acp_tree.php +* **************** +* $Id$ +******************************************************************/ + +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +class acp_tree{ + function main(){ + global $db; + + $sql_id = 'module_id'; + $sql_table = RCTS_MODULES_TABLE; + + $db->sql_query('UPDATE '.$sql_table.' SET module_left = 0, module_right = 0'); + $sql_where = ($module_class) ? " WHERE module_class = '" . $db->sql_escape($module_class) . "'" : "WHERE $sql_id = $sql_id"; + + // Reset to minimum possible left and right id + $sql = "SELECT MIN(module_left) as min_module_left, MIN(module_right) as min_module_right + FROM $sql_table + $sql_where"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $substract = (int) (min($row['min_module_left'], $row['min_module_right']) - 1); + + if ($substract > 0) + { + $sql = "UPDATE $sql_table + SET module_left = module_left - $substract, module_right = module_right - $substract + $sql_where"; + $db->sql_query($sql); + } + + $sql = "SELECT $sql_id, module_parent, module_left, module_right + FROM $sql_table + $sql_where + ORDER BY module_left ASC, module_parent ASC, $sql_id ASC"; + $f_result = $db->sql_query($sql); + + while ($item_data = $db->sql_fetchrow($f_result)) + { + if ($item_data['module_parent']) + { + $sql = "SELECT module_left, module_right + FROM $sql_table + $sql_where + AND $sql_id = {$item_data['module_parent']}"; + $result = $db->sql_query($sql); + + if (!$row = $db->sql_fetchrow($result)) + { + $sql = "UPDATE $sql_table SET module_parent = 0 WHERE $sql_id = " . $item_data[$sql_id]; + $db->sql_query($sql); + } + $db->sql_freeresult($result); + + $sql = "UPDATE $sql_table + SET module_left = module_left + 2, module_right = module_right + 2 + $sql_where + AND module_left > {$row['module_right']}"; + $db->sql_query($sql); + + $sql = "UPDATE $sql_table + SET module_right = module_right + 2 + $sql_where + AND {$row['module_left']} BETWEEN module_left AND module_right"; + $db->sql_query($sql); + + $item_data['module_left'] = $row['module_right']; + $item_data['module_right'] = $row['module_right'] + 1; + } + else + { + $sql = "SELECT MAX(module_right) AS module_right + FROM $sql_table + $sql_where"; + $result = $db->sql_query($sql); + + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $item_data['module_left'] = $row['module_right'] + 1; + $item_data['module_right'] = $row['module_right'] + 2; + } + + $sql = "UPDATE $sql_table + SET module_left = {$item_data['module_left']}, module_right = {$item_data['module_right']} + WHERE $sql_id = " . $item_data[$sql_id]; + $db->sql_query($sql); + } + trigger_error('Tree done.'); + } +} +?> Modified: trunk/version1.0/install/install.sql =================================================================== --- trunk/version1.0/install/install.sql 2006-04-05 08:26:24 UTC (rev 1685) +++ trunk/version1.0/install/install.sql 2006-04-05 09:34:22 UTC (rev 1686) @@ -164,9 +164,14 @@ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; -INSERT INTO `rcts_module` (`module_id`, `module_name`, `module_parent`, `module_left`, `module_right`, `module_enabled`, `module_sort`, `module_langname`, `module_mode`) VALUES (1, '', 0, 2, 5, 1, 'acp', 'INFO', ''), -(2, 'info', 1, 3, 4, 1, 'acp', 'INFO', 'info'), -(3, '', 0, 6, 13, 1, 'acp', 'CONFIG', 'config'), -(4, 'config_general', 3, 7, 8, 1, 'acp', 'CONFIG_GENERAL', 'config'), -(6, 'layout', 3, 9, 10, 1, 'acp', 'LAYOUT', 'layout'), -(8, 'config_user', 3, 11, 12, 1, 'acp', 'CONFIG_USER', 'config_user'); \ No newline at end of file +INSERT INTO `rcts_module` (`module_id`, `module_name`, `module_parent`, `module_left`, `module_right`, `module_enabled`, `module_sort`, `module_langname`, `module_mode`) VALUES (1, '', 0, 1, 4, 1, 'acp', 'INFO', ''), +(2, 'info', 1, 2, 3, 1, 'acp', 'INFO', 'info'), +(3, '', 0, 5, 20, 1, 'acp', 'CONFIG', 'config'), +(4, 'config_general', 3, 6, 7, 1, 'acp', 'CONFIG_GENERAL', 'config'), +(6, 'layout', 3, 8, 9, 1, 'acp', 'LAYOUT', 'layout'), +(8, 'config_user', 3, 10, 11, 1, 'acp', 'CONFIG_USER', 'config_user'), +(9, 'ftp', 3, 12, 13, 1, 'acp', 'FTP', 'ftp'), +(10, 'smtp', 3, 14, 15, 1, 'acp', 'SMTP', 'smtp'), +(11, 'multiesite', 3, 16, 17, 1, 'acp', 'MULTISITE', 'multi'), +(12, 'header', 3, 18, 19, 1, 'acp', 'HEADER', 'header'), +(14, 'tree', 0, 21, 22, 1, 'acp', 'TREE', 'tree'); Deleted: trunk/version1.0/tree.php =================================================================== --- trunk/version1.0/tree.php 2006-04-05 08:26:24 UTC (rev 1685) +++ trunk/version1.0/tree.php 2006-04-05 09:34:22 UTC (rev 1686) @@ -1,117 +0,0 @@ -<?php -//Tree builder:D:D:D -define('IN_STATS', true); -define('RCTS_ROOT_PATH', dirname(__FILE__)); -include(RCTS_ROOT_PATH.'/includes/start.php'); -pageheader('Lets make a tree :D:D:D'); -function rebuild_tree($parent, $left) { - global $db; - - // the right value of this node is the left value + 1 - $right = $left+1; - - // get all children of this node - $result = $db->sql_query('SELECT module_parent,module_id FROM '.RCTS_MODULES_TABLE.' WHERE module_parent="'.$parent.'";'); - - - while ($row = $db->sql_fetchrow($result)) { - print $row[0] . $row[1] . $parent . "<br />"; -// die; - - // recursive execution of this function for each - // child of this node - // $right is the current right value, which is - // incremented by the rebuild_tree function - $right = rebuild_tree($row['module_id'], $right); - // print $right;die; - } - // we've got the left value, and now that we've processed - // the children of this node we also know the right value - $db->sql_query('UPDATE '.RCTS_MODULES_TABLE.' SET module_left='.$left.', module_right='.$right.' WHERE module_id="'.$parent.'";'); - - // return the right value of this node + 1 - return $right+1; -} -//rebuild_tree(0,1); - $sql_id = 'module_id'; - $sql_table = RCTS_MODULES_TABLE; - $sql_where = ($module_class) ? " WHERE module_class = '" . $db->sql_escape($module_class) . "'" : "WHERE $sql_id = $sql_id"; - - // Reset to minimum possible left and right id - $sql = "SELECT MIN(module_left) as min_module_left, MIN(module_right) as min_module_right - FROM $sql_table - $sql_where"; - $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - $substract = (int) (min($row['min_module_left'], $row['min_module_right']) - 1); - - if ($substract > 0) - { - $sql = "UPDATE $sql_table - SET module_left = module_left - $substract, module_right = module_right - $substract - $sql_where"; - $db->sql_query($sql); - } - - $sql = "SELECT $sql_id, module_parent, module_left, module_right - FROM $sql_table - $sql_where - ORDER BY module_left ASC, module_parent ASC, $sql_id ASC"; - $f_result = $db->sql_query($sql); - - while ($item_data = $db->sql_fetchrow($f_result)) - { - if ($item_data['module_parent']) - { - $sql = "SELECT module_left, module_right - FROM $sql_table - $sql_where - AND $sql_id = {$item_data['module_parent']}"; - $result = $db->sql_query($sql); - - if (!$row = $db->sql_fetchrow($result)) - { - $sql = "UPDATE $sql_table SET module_parent = 0 WHERE $sql_id = " . $item_data[$sql_id]; - $db->sql_query($sql); - } - $db->sql_freeresult($result); - - $sql = "UPDATE $sql_table - SET module_left = module_left + 2, module_right = module_right + 2 - $sql_where - AND module_left > {$row['module_right']}"; - $db->sql_query($sql); - - $sql = "UPDATE $sql_table - SET module_right = module_right + 2 - $sql_where - AND {$row['module_left']} BETWEEN module_left AND module_right"; - $db->sql_query($sql); - - $item_data['module_left'] = $row['module_right']; - $item_data['module_right'] = $row['module_right'] + 1; - } - else - { - $sql = "SELECT MAX(module_right) AS module_right - FROM $sql_table - $sql_where"; - $result = $db->sql_query($sql); - - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - $item_data['module_left'] = $row['module_right'] + 1; - $item_data['module_right'] = $row['module_right'] + 2; - } - - $sql = "UPDATE $sql_table - SET module_left = {$item_data['module_left']}, module_right = {$item_data['module_right']} - WHERE $sql_id = " . $item_data[$sql_id]; - $db->sql_query($sql); - } -trigger_error('Done'); -pagefooter(); -?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-04-05 11:46:14
|
Revision: 1692 Author: paulsohier Date: 2006-04-05 04:45:57 -0700 (Wed, 05 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1692&view=rev Log Message: ----------- Begin of AJAX stats. More follow soon. @other devs: Please don't edit the next files: stats_js.php, javascript/functions.php, javascript/functions.js. xml/*.* Modified Paths: -------------- trunk/version1.0/javascript/functions.js trunk/version1.0/lang/nl/stats.php trunk/version1.0/templates/rcts/header.html Added Paths: ----------- trunk/version1.0/XML/ trunk/version1.0/XML/main.php trunk/version1.0/javascript/functions.php trunk/version1.0/stats_js.php Added: trunk/version1.0/XML/main.php =================================================================== --- trunk/version1.0/XML/main.php (rev 0) +++ trunk/version1.0/XML/main.php 2006-04-05 11:45:57 UTC (rev 1692) @@ -0,0 +1,4 @@ +<?php +header("Content-type: text/xml"); + +?> Modified: trunk/version1.0/javascript/functions.js =================================================================== --- trunk/version1.0/javascript/functions.js 2006-04-05 10:23:13 UTC (rev 1691) +++ trunk/version1.0/javascript/functions.js 2006-04-05 11:45:57 UTC (rev 1692) @@ -1,71 +1,25 @@ -// $Id$ -var baseopacity = 0; -var textcontainerobj, browserdetect, highlighting, ie4, ns4, ns6, moz = null; -function getIEversion(){ - var ua = navigator.userAgent; - var IEoffset = ua.indexOf("MSIE "); - return parseFloat(ua.substring(IEoffset+5, ua.indexOf(";",IEoffset))); -} -onload = function(){ - textcontainerobj = document.getElementById("tabledescription"); - moz = typeof textcontainerobj.style.MozOpacity == "string" ? true : false; - ie4 = ((navigator.appName.indexOf("Microsoft") == 0 && parseInt(getIEversion()) > 4)); - ns4 = document.layers; - ns6 = document.getElementById && !document.all; -} -function showtext(thetext){ - instantset(baseopacity); - document.getElementById("tabledescription").innerHTML = thetext; - highlighting = setInterval("gradualfade(textcontainerobj)",50); -} +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* functions.js +* **************** +* $Id$ +******************************************************************/ -function hidetext(){ - cleartimer(); - instantset(baseopacity); -} - -function instantset(degree){ - if (!ie4 && moz){ - try{ - textcontainerobj.style.MozOpacity = degree / 100; - }catch(e){} - }else if (ie4){ - try{ - textcontainerobj.filters.alpha.opacity = degree; - }catch(e){} - }else if (baseopacity == 0){ - document.getElementById("tabledescription").innerHTML = ""; - } -} - -function cleartimer(){ - if (highlighting){ - clearInterval(highlighting); - } -} - -function gradualfade(cur2){ - if (!ie4 && moz && cur2.style.MozOpacity < 1){ - try{ - cur2.style.MozOpacity = Math.min(parseFloat(cur2.style.MozOpacity) + 0.2, 0.99); - }catch(e){} - }else if (ie4){ - if(cur2.filters.alpha.opacity < 100){ - try{ - cur2.filters.alpha.opacity += 20; - }catch(e){ - cleartimer(); - } - }else{ - cleartimer(); - } - }else { - cleartimer(); - } -} -window.onerror = function(){ - return false; -} +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +var ajax = false; +var mode = false; +var base = null; +var txt = null; function makeHttpRequest(url, callback_function, method, post, return_xml) { var http_request = false; @@ -117,3 +71,70 @@ http_request.send(null); } } +onload = function(){ + if(!ajax){ + return; + } + //In ajax mode ;) + //First check some things, after that we got some XML ;) + + if(typeof lng != "object" || lng['NO_MODULES'] == null){ + alert("The dynamic JS file isn't loaded well."); + return; + } + reset(); + if(base == null){ + base = document.getElementById('basis'); + } + if(!mode){ + error(lng['no_mode_exists']); + return; + } + hd('Loading'); + text('One moment please. Loading the stats.'); + + set(); + reset(); + run(mode); +} +function reset(){ + txt = document.createElement('div'); + +} +function hd(tx){ + var tmp = document.createElement('h2'); + tmp.appendChild(document.createTextNode(tx)); + txt.appendChild(tmp); +} +function text(tx){ + var tmp = document.createElement('p'); + tmp.appendChild(document.createTextNode(tx)); + txt.appendChild(tmp); +} +function set(){ + base.innerHTML = ''; + base.appendChild(txt); +} +function error(t){ + hd(lng['error']); + text(t); + set(); + reset(); + return; +} +function run(m){ + makeHttpRequest('XML/main.php?m=' + m, 'run_c', 'GET', null, true); +} +function run_c(c){ + if(!validate_xml(c)){ + return; + } + +} +function validate_xml(c){ + if(typeof c != "object" || c == null){ + error("XML not valid."); + return false; + } + return true; +} Added: trunk/version1.0/javascript/functions.php =================================================================== --- trunk/version1.0/javascript/functions.php (rev 0) +++ trunk/version1.0/javascript/functions.php 2006-04-05 11:45:57 UTC (rev 1692) @@ -0,0 +1,37 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* functions.php +* **************** +* $Id$ +******************************************************************/ + +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +ob_start(); + +define('IN_STATS', true); +define('RCTS_ROOT_PATH', dirname(dirname(__FILE__))); +include(RCTS_ROOT_PATH.'/includes/start.php'); +ob_end_clean(); +header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past +header("Content-type: text/javascript"); +//In this file, there will come some dynamic JS. +print 'var login = "'.$core->is_login().'";' . "\n"; +print "var lng = new Array();\n"; +unset($lang->lang["Install_Text_3"],$lang->lang["Stats_Wizz"]); +while(list($el,$wa) = each($lang->lang)){ + print 'lng["'.$el.'"] = "'.str_replace(array('"',"\n"),array('\"',''),$wa).'";' . "\n"; +} +?> +ajax = true; Modified: trunk/version1.0/lang/nl/stats.php =================================================================== --- trunk/version1.0/lang/nl/stats.php 2006-04-05 10:23:13 UTC (rev 1691) +++ trunk/version1.0/lang/nl/stats.php 2006-04-05 11:45:57 UTC (rev 1692) @@ -172,4 +172,8 @@ $lang['totaal_visit'] = 'Totaal aantal bezoeken'; $lang['jaar'] = 'Jaar'; $lang['maand2'] = 'Maand'; + + +//JS :) +$lang['no_mode_exists'] = 'Geen mode gevonden.'; ?> Added: trunk/version1.0/stats_js.php =================================================================== --- trunk/version1.0/stats_js.php (rev 0) +++ trunk/version1.0/stats_js.php 2006-04-05 11:45:57 UTC (rev 1692) @@ -0,0 +1,34 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* stats.php +* **************** +* $Id: stats.php 1682 2006-04-04 20:03:28Z paulsohier $ +******************************************************************/ + +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +define('IN_STATS', true); +define('RCTS_ROOT_PATH', dirname(__FILE__)); +include(RCTS_ROOT_PATH.'/includes/start.php'); +if(count($_SESSION)) +{ + @session_destroy(); +} +$js = "\n".'<script type="text/javascript" language="javascript">mode = '.$layout->getMode().';</script>'; +$template->assign(array( + 'js' => '<script type="text/javascript" language="javascript" src="javascript/functions.php"></script>' . $js +)); +pageheader(); +print "<p id='basis'></p>"; +pagefooter(); +?> Modified: trunk/version1.0/templates/rcts/header.html =================================================================== --- trunk/version1.0/templates/rcts/header.html 2006-04-05 10:23:13 UTC (rev 1691) +++ trunk/version1.0/templates/rcts/header.html 2006-04-05 11:45:57 UTC (rev 1692) @@ -8,7 +8,9 @@ <base href="{base}" /> <!-- END IFTPL --> <link rel="stylesheet" href="templates/rcts/template.css" type="text/css" /> -<!-- <script type="text/javascript" language="javascript" src="javascript/functions.js"></script>--> + <script type="text/javascript" language="javascript" src="javascript/functions.js"></script> + {js} + <!-- IF TPL title --> <title>{title}</title> <!-- ELSE --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-04-05 16:58:41
|
Revision: 1696 Author: paulsohier Date: 2006-04-05 09:58:22 -0700 (Wed, 05 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1696&view=rev Log Message: ----------- Stats are working :D Modified Paths: -------------- trunk/version1.0/XML/stats.php trunk/version1.0/developer/.htaccess trunk/version1.0/includes/classes/class.stats.php trunk/version1.0/javascript/functions.js trunk/version1.0/lang/nl/stats.php trunk/version1.0/stats_js.php trunk/version1.0/templates/rcts/stats.html trunk/version1.0/templates/rcts/template.css Modified: trunk/version1.0/XML/stats.php =================================================================== --- trunk/version1.0/XML/stats.php 2006-04-05 15:02:24 UTC (rev 1695) +++ trunk/version1.0/XML/stats.php 2006-04-05 16:58:22 UTC (rev 1696) @@ -40,14 +40,14 @@ $idid = 1; $_SESSION["idid"] = $idid; +print "<row>$m</row>"; if(!method_exists($displayStats,$m . "_js")){ print "<error>Not JS ready</error>"; print "<stats/>"; }else{ $m = $m . '_js'; - $displayStats->$m(); + $displayStats->$m($idid,$calendar_day); } -print "<row>$m</row>"; print "</xml>"; ?> Modified: trunk/version1.0/developer/.htaccess =================================================================== --- trunk/version1.0/developer/.htaccess 2006-04-05 15:02:24 UTC (rev 1695) +++ trunk/version1.0/developer/.htaccess 2006-04-05 16:58:22 UTC (rev 1696) @@ -1,4 +1,4 @@ <Limit GET POST PUT> -Order Allow,Deny -Deny from All -</Limit> \ No newline at end of file +#Order Allow,Deny +#Deny from All +</Limit> Modified: trunk/version1.0/includes/classes/class.stats.php =================================================================== --- trunk/version1.0/includes/classes/class.stats.php 2006-04-05 15:02:24 UTC (rev 1695) +++ trunk/version1.0/includes/classes/class.stats.php 2006-04-05 16:58:22 UTC (rev 1696) @@ -539,9 +539,43 @@ )); } $template->assign(array( - "TOTAL_VISIT" => $lang->lang['totaal_visit'].': ' . $total_visit + "TOTAL_VISIT" => $lang->lang['totaal_visit'].': ' . $total_visit )); } + function visitsToday_js($idid,$calendar_day) + { + + foreach($GLOBALS as $key => $val){global $$key;} + global $template,$calendar,$config; + + $template->block("visitsToday"); + $visitsToday = array(); + $visitsToday = $calendar->get_stats('visitors', $idid, (ctype_digit($calendar_day) ? $calendar_day : time()), 0); + + $total_visit = 0; + foreach ($visitsToday as $visit) + { + print "<stats>"; + print "<r1>"; + //IP alleen voor ingelogde mensen. + if(!$config->is()) + { + $visit['stat_value'] = $lang->lang['verborgen']; + } + $total_visit += $visit['stat_count']; + print $visit['stat_value']; + print "</r1><r2>"; + print $visit['stat_count']; + print "</r2>"; + print "</stats>"; + } + print "<num>2</num>"; + print "<labels>"; + print "<r1>".$lang->lang['Count']."</r1>"; + print "<r2>".$lang->lang['Ip_add']."</r2>"; + print "</labels>"; + print "<txt>".$lang->lang['totaal_visit'].': ' . $total_visit."</txt>"; + } function last30daysDisp($idid,$calendar_day) { foreach($GLOBALS as $key => $val){global $$key;} Modified: trunk/version1.0/javascript/functions.js =================================================================== --- trunk/version1.0/javascript/functions.js 2006-04-05 15:02:24 UTC (rev 1695) +++ trunk/version1.0/javascript/functions.js 2006-04-05 16:58:22 UTC (rev 1696) @@ -87,7 +87,7 @@ } reset(); if(base == null){ - base = document.getElementById('basis'); + base = document.getElementById('main_content'); } if(!mode){ error(lng['no_mode_exists']); @@ -209,7 +209,9 @@ } function item(it){ var div = document.createElement('div'); + var div2 = document.createElement('div'); div.id = 'item_box_' + it; + div2.id = 'item_box_big_' + it; div.classname = 'menu'; var table = document.createElement('table'); table.width = '100%'; @@ -228,6 +230,7 @@ div.appendChild(table); txt.appendChild(div); + txt.appendChild(div2); txt.appendChild(document.createElement('br')); } function load_it(it){ @@ -237,9 +240,98 @@ if(!validate_xml(c,'stats')){ return; } - if(c.getElementsByTagName("xml")[0].getElementsByTagName("error") != null){ + if(c.getElementsByTagName("xml")[0].getElementsByTagName("error")[0] != null){ + error(obj(c.getElementsByTagName("xml")[0].getElementsByTagName("error")[0],true)); }else{ - //c.getElementsByTagName("xml")[0].getElementsByTagName("item") + var row = obj(c.getElementsByTagName("xml")[0].getElementsByTagName("row")[0],true); + document.getElementById('item_box_' + row).style.display = 'none'; + var div = document.getElementById('item_box_big_' + row); + div.className = 'menu'; + var table = document.createElement('table'); + + + table.width = '100%'; + + var row2 = table.insertRow(0); + row2.className = 'tr_kop'; + var cel = row2.insertCell(0); + + + + cel.appendChild(document.createTextNode(lng['verberg'] + ': ' + row)); + cel.className = 'td_kop'; + cel.style.cursor = 'pointer'; + div.appendChild(table); + + var div2 = document.createElement('div'); + div2.className = 'menu_content'; + var table = document.createElement('table'); + var numrow = 0; + + table.className = 'stats_table'; + + var stats = c.getElementsByTagName("xml")[0].getElementsByTagName("stats"); + if(c.getElementsByTagName("xml")[0].getElementsByTagName("num")[0] != null){ + var num = obj(c.getElementsByTagName("xml")[0].getElementsByTagName("num")[0],true); + cel.colSpan = num; + }else{ + error("Xml error"); + return; + } + if(c.getElementsByTagName("xml")[0].getElementsByTagName("labels")[0] != null){ + var la = new Array(); + var labels = c.getElementsByTagName("xml")[0].getElementsByTagName("labels")[0]; + var row2 = table.insertRow(numrow); + numrow++ + for(var j = 1; j <= num; j++){ + la[j] = obj(c.getElementsByTagName("xml")[0].getElementsByTagName("labels")[0].getElementsByTagName("r" + j)[0],true); + var cel = row2.insertCell((j - 1)); + var b = document.createElement('strong'); + b.appendChild(document.createTextNode(la[j])); + cel.appendChild(b); + + } + } + //Lets add some stats ;) + for(var k = 0; k < stats.length;k++){ + var tmp = stats[k]; + var row2 = table.insertRow(numrow); + numrow++ + for(var l = 1; l <= num; l++){ + var cel = row2.insertCell((l - 1)); + var b = document.createElement('p'); + b.appendChild(obj(stats[k].getElementsByTagName("r" + l)[0])); + cel.appendChild(b); + + } + } + if(c.getElementsByTagName("xml")[0].getElementsByTagName("txt")[0] != null){ + //Extra text with it. Add it ;) + for(var m = 0; m < c.getElementsByTagName("xml")[0].getElementsByTagName("txt").length;m++){ + var row2 = table.insertRow(numrow); + numrow++ + var cel = row2.insertCell(0); + cel.colSpan = num; + cel.appendChild(obj(c.getElementsByTagName("xml")[0].getElementsByTagName("txt")[m])); + } + } + if(c.getElementsByTagName("xml")[0].getElementsByTagName("img")[0] != null){ + //Graph ;) + for(var n = 0; n < c.getElementsByTagName("xml")[0].getElementsByTagName("img").length;n++){ + var row2 = table.insertRow(numrow); + numrow++ + var cel = row2.insertCell(0); + cel.colSpan = num; + var tmp = obj(c.getElementsByTagName("xml")[0].getElementsByTagName("img")[n],true); + var img = document.createElement('img'); + img.alt = row; + img.src = tmp; + cel.appendChild(img); + } + } + div2.appendChild(table); + div.appendChild(div2); + } } Modified: trunk/version1.0/lang/nl/stats.php =================================================================== --- trunk/version1.0/lang/nl/stats.php 2006-04-05 15:02:24 UTC (rev 1695) +++ trunk/version1.0/lang/nl/stats.php 2006-04-05 16:58:22 UTC (rev 1696) @@ -177,4 +177,5 @@ //JS :) $lang['no_mode_exists'] = 'Geen mode gevonden.'; $lang['display'] = 'Weergeef'; +$lang['verberg'] = 'Verberg'; ?> Modified: trunk/version1.0/stats_js.php =================================================================== --- trunk/version1.0/stats_js.php 2006-04-05 15:02:24 UTC (rev 1695) +++ trunk/version1.0/stats_js.php 2006-04-05 16:58:22 UTC (rev 1696) @@ -29,6 +29,6 @@ 'js' => '<script type="text/javascript" language="javascript" src="javascript/functions.php"></script>' . $js )); pageheader(); -print "<p id='basis'></p>"; +print "<p id='main_content'></p>"; pagefooter(); ?> Modified: trunk/version1.0/templates/rcts/stats.html =================================================================== --- trunk/version1.0/templates/rcts/stats.html 2006-04-05 15:02:24 UTC (rev 1695) +++ trunk/version1.0/templates/rcts/stats.html 2006-04-05 16:58:22 UTC (rev 1696) @@ -35,7 +35,7 @@ <!-- START last30days --> <div class="menu"> - <table width="100%" cellpadding="0" cellspacing="0"> + <table width="100%" cellpadding="0" cellspacing="0"> <tr class="tr_kop"> <td class="td_kop">{L_VISITS_LAST_30_DAYS}</td> [[NAVROW]] Modified: trunk/version1.0/templates/rcts/template.css =================================================================== --- trunk/version1.0/templates/rcts/template.css 2006-04-05 15:02:24 UTC (rev 1695) +++ trunk/version1.0/templates/rcts/template.css 2006-04-05 16:58:22 UTC (rev 1696) @@ -180,7 +180,7 @@ font-size: 14px; } -#main_content .menu +.menu { padding: 0px; margin: 3px; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-04-05 17:25:48
|
Revision: 1697 Author: paulsohier Date: 2006-04-05 10:25:28 -0700 (Wed, 05 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1697&view=rev Log Message: ----------- Some updates :) Modified Paths: -------------- trunk/version1.0/XML/main.php trunk/version1.0/includes/start.php trunk/version1.0/javascript/functions.js trunk/version1.0/stats_js.php trunk/version1.0/templates/rcts/header.html trunk/version1.0/templates/rcts/template.css Modified: trunk/version1.0/XML/main.php =================================================================== --- trunk/version1.0/XML/main.php 2006-04-05 16:58:22 UTC (rev 1696) +++ trunk/version1.0/XML/main.php 2006-04-05 17:25:28 UTC (rev 1697) @@ -42,8 +42,8 @@ { $calendar_day = "all"; } +$mode = get_var('m'); - $sql = "UPDATE ".RCTS_STATS_STATS_TABLE." SET visit = visit + 1 WHERE mode = '".$mode."'"; if(!$db->sql_query($sql) || !$db->sql_affectedrows()) @@ -57,15 +57,7 @@ } } -//First tings first -$do = get_var('do'); -$block = get_var('block'); -if(!empty($do) && !empty($mode) && !empty($block)) -{ - $layout->UpdateOrder($mode,$do,$block); -} - $posibleBlocks = array('---','LoadTime','Average','Hours','DaysW','DaysM','MonthDisp','topColors','topOs','topBrowsers','last30daysDisp','visitsToday','topEntryPages','topReferers','AvarageOnline','OnlineTime','TimezonesDisp','topFlash','topLanguages','topResolutions','uniekDisp','referTrends'); $plugins = array(); Modified: trunk/version1.0/includes/start.php =================================================================== --- trunk/version1.0/includes/start.php 2006-04-05 16:58:22 UTC (rev 1696) +++ trunk/version1.0/includes/start.php 2006-04-05 17:25:28 UTC (rev 1697) @@ -129,6 +129,7 @@ } } $mode = $layout->getMode(); +$modes = array(); foreach($main_menu_arr as $info) { // Ik kan op dit moment ff geen andere manier vinden om te kijken welke mode het is, @@ -139,8 +140,11 @@ "link" => $info['link'], "desc" => $info['desc'], "name" => (isset($lang->lang[$info['name']])) ? $lang->lang[$info['name']] : $info['name'], - "selected" => ($mode == $info['mode']) ? ' id="active"' : '' + "selected" => ($mode == $info['mode']) ? ' class="active"' : '', + "id" => " id='m_".$info['mode']."'", + "mode" => $info['mode'] )); + $modes[] = $info['mode']; } if((file_exists(RCTS_ROOT_PATH . "/developer") && file_exists(RCTS_ROOT_PATH . '/install') && !defined('IN_INSTALL')) || (file_exists(RCTS_ROOT_PATH . '/update') && !defined('UPDATOR'))){ // trigger_error("Please delete the install and developer directory."); Modified: trunk/version1.0/javascript/functions.js =================================================================== --- trunk/version1.0/javascript/functions.js 2006-04-05 16:58:22 UTC (rev 1696) +++ trunk/version1.0/javascript/functions.js 2006-04-05 17:25:28 UTC (rev 1697) @@ -127,7 +127,12 @@ hd('Loading'); text('One moment please. Loading the stats.'); set(); + for(var i = 0;i < menu.length;i++){ + document.getElementById('m_' + menu[i]).className = ''; + } + document.getElementById('m_' + m).className = 'active'; makeHttpRequest('XML/main.php?m=' + m, 'run_c', 'GET', null, true); + } function run_c(c){ if(!validate_xml(c,'item')){ @@ -246,7 +251,9 @@ }else{ var row = obj(c.getElementsByTagName("xml")[0].getElementsByTagName("row")[0],true); document.getElementById('item_box_' + row).style.display = 'none'; + document.getElementById('item_box_big_' + row).style.display = 'block'; var div = document.getElementById('item_box_big_' + row); + div.innerHTML = ''; div.className = 'menu'; var table = document.createElement('table'); @@ -262,6 +269,10 @@ cel.appendChild(document.createTextNode(lng['verberg'] + ': ' + row)); cel.className = 'td_kop'; cel.style.cursor = 'pointer'; + cel.item_name = row; + cel.onclick = function(){ + close_it(this.item_name); + } div.appendChild(table); var div2 = document.createElement('div'); @@ -335,3 +346,7 @@ } } +function close_it(it){ + document.getElementById('item_box_' + it).style.display = 'block'; + document.getElementById('item_box_big_' + it).style.display = 'none'; +} Modified: trunk/version1.0/stats_js.php =================================================================== --- trunk/version1.0/stats_js.php 2006-04-05 16:58:22 UTC (rev 1696) +++ trunk/version1.0/stats_js.php 2006-04-05 17:25:28 UTC (rev 1697) @@ -24,7 +24,11 @@ { @session_destroy(); } -$js = "\n".'<script type="text/javascript" language="javascript">mode = '.$layout->getMode().';</script>'; +$js = "var menu = new Array();\n"; +for($i = 0; $i < count($modes);$i++){ + $js .= "menu[menu.length] = '".$modes[$i]."';\n"; +} +$js = "\n".'<script type="text/javascript" language="javascript">mode = '.$layout->getMode().';'.$js.'</script>'; $template->assign(array( 'js' => '<script type="text/javascript" language="javascript" src="javascript/functions.php"></script>' . $js )); Modified: trunk/version1.0/templates/rcts/header.html =================================================================== --- trunk/version1.0/templates/rcts/header.html 2006-04-05 16:58:22 UTC (rev 1696) +++ trunk/version1.0/templates/rcts/header.html 2006-04-05 17:25:28 UTC (rev 1697) @@ -24,7 +24,7 @@ <div id="navigation"> <ul> <!-- START menu_row --> - <li{menu_row.selected} onclick="document.location='{menu_row.link}'"><a href="{menu_row.link}">{menu_row.name}</a></li> + <li{menu_row.selected}{menu_row.id} onclick="if(!ajax){document.location='{menu_row.link}';}else{run('{menu_row.mode}');}"><a href="{menu_row.link}" onClick="return false;">{menu_row.name}</a></li> <!-- STOP menu_row --> </ul> </div> Modified: trunk/version1.0/templates/rcts/template.css =================================================================== --- trunk/version1.0/templates/rcts/template.css 2006-04-05 16:58:22 UTC (rev 1696) +++ trunk/version1.0/templates/rcts/template.css 2006-04-05 17:25:28 UTC (rev 1697) @@ -137,12 +137,12 @@ text-decoration: none; } -#navigation #active +#navigation .active { background-image: url('images/tab_active_rest.gif'); } -#navigation #active a +#navigation .active a { background-image: url('images/tab_active_left.gif'); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bas...@us...> - 2006-04-06 15:50:30
|
Revision: 1708 Author: bastimmer Date: 2006-04-06 08:50:12 -0700 (Thu, 06 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1708&view=rev Log Message: ----------- First version of overlay! Added Paths: ----------- trunk/version1.0/XML/overlay.php trunk/version1.0/javascript/overlay.js trunk/version1.0/javascript/overlay_functions.php trunk/version1.0/overlay.php Added: trunk/version1.0/XML/overlay.php =================================================================== --- trunk/version1.0/XML/overlay.php (rev 0) +++ trunk/version1.0/XML/overlay.php 2006-04-06 15:50:12 UTC (rev 1708) @@ -0,0 +1,31 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* stats.php +* **************** +* $Id$ +******************************************************************/ + +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +ob_start(); +define('IN_STATS', true); +define('RCTS_ROOT_PATH', dirname(dirname(__FILE__))); +include(RCTS_ROOT_PATH.'/includes/start.php'); + +ob_end_clean(); + +$url = get_var('url'); +$sql = 'SELECT stat_count FROM '.RCTS_CALENDAR_TABLE.' WHERE stat_type=\'entry_pages\' AND stat_value LIKE \'%'.$url.'%\''; +$rowset = $cache->query($sql, 3600 * 2); +echo $rowset[0]['stat_count']; +?> \ No newline at end of file Added: trunk/version1.0/javascript/overlay.js =================================================================== --- trunk/version1.0/javascript/overlay.js (rev 0) +++ trunk/version1.0/javascript/overlay.js 2006-04-06 15:50:12 UTC (rev 1708) @@ -0,0 +1,113 @@ +function insertAfter(nPrevious,nInsert) { + var nParent = nPrevious.parentNode; + if (nPrevious.nextSibling) { + nParent.insertBefore(nInsert, nPrevious.nextSibling) + } else { + nParent.appendChild(nInsert); + } +} + +onload = function() { + loadOverlay(); +} + +function loadOverlay() { + IFrameObj = document.getElementById('contframe'); + if (IFrameObj.contentDocument) { + // For NS6 + IFrameDoc = IFrameObj.contentDocument; + } else if (IFrameObj.contentWindow) { + // For IE5.5 and IE6 + IFrameDoc = IFrameObj.contentWindow.document; + } else if (IFrameObj.document) { + // For IE5 + IFrameDoc = IFrameObj.document; + } else { + return true; + } + links = IFrameDoc.getElementsByTagName('a'); + document.getElementById('loading').style.display = 'block'; + for(var i = 0; i < links.length;i++){ + +/* div = IFrameDoc.createElement("div"); + div.style.backgroundColor = 'white'; + div.style.borderColor = 'black'; + div.style.borderSize = '1px'; + div.style.borderStyle = 'solid'; +// div.appendChild(IFrameDoc.createTextNode('iii')); + insertAfter(links[i], div);*/ + makeHttpRequest_ret('XML/overlay.php?url='+links[i].href, 'overlay_callback', 'GET', '', links[i]); + links[i].href = "javascript:parent.overlayNavigate('"+links[i].href+"');"; +//links[i] + } + document.getElementById('loading').style.display = 'none'; + +} + +function overlay_callback(cont, linky) { + div = IFrameDoc.createElement("div"); + div.style.backgroundColor = 'white'; + div.style.borderColor = 'black'; + div.style.borderSize = '1px'; + div.style.borderStyle = 'solid'; + div.style.display = 'inline'; + div.appendChild(IFrameDoc.createTextNode(cont)); + insertAfter(linky, div); +} + +function makeHttpRequest_ret(url, callback_function, method, post, giveobject) +{ + var http_request = false; + url.replace("/ /g","+"); + if(post){ + post.replace("/ /g","+"); + } + if (window.XMLHttpRequest) { // Mozilla, Safari,... + http_request = new XMLHttpRequest(); + if (http_request.overrideMimeType) { + http_request.overrideMimeType('text/xml'); + } + } else if (window.ActiveXObject) { // IE + try { + http_request = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + http_request = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (e) { + } + } + } + + if (!http_request) { + document.getElementById('loading').style.display = 'none'; + alert('Your browser doesn\'t support AJAX'); + return false; + } + http_request.onreadystatechange = function() { + if (http_request.readyState == 4) { + if (http_request.status == 200) { + eval(callback_function + '(http_request.responseText, giveobject)'); + } else { + document.getElementById('loading').style.display = 'none'; + alert('There has been a error, browser respone: ' + http_request.status); + } + } + } + if(method == ''){ + method = 'GET'; + } + http_request.open(method, url, true); + if(post){ + http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); + http_request.send(post); + }else{ + http_request.send(null); + } +} + +function overlayNavigate(url) { + document.getElementById('contframe').src = 'overlay.php?modproxy='+url; + document.getElementById('contframe').onload = function() { + loadOverlay(); + } +} \ No newline at end of file Added: trunk/version1.0/javascript/overlay_functions.php =================================================================== --- trunk/version1.0/javascript/overlay_functions.php (rev 0) +++ trunk/version1.0/javascript/overlay_functions.php 2006-04-06 15:50:12 UTC (rev 1708) @@ -0,0 +1,36 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* functions.php +* **************** +* $Id$ +******************************************************************/ + +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +ob_start(); + +define('IN_STATS', true); +define('RCTS_ROOT_PATH', dirname(dirname(__FILE__))); +include(RCTS_ROOT_PATH.'/includes/start.php'); +ob_end_clean(); +header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past +header("Content-type: text/javascript"); +//In this file, there will come some dynamic JS. +print 'var login = "'.$core->is_login().'";' . "\n"; +print "var lng = new Array();\n"; +unset($lang->lang["Install_Text_3"],$lang->lang["Stats_Wizz"]); +while(list($el,$wa) = each($lang->lang)){ + print 'lng["'.$el.'"] = "'.str_replace(array('"',"\n"),array('\"',''),$wa).'";' . "\n"; +} +?> \ No newline at end of file Added: trunk/version1.0/overlay.php =================================================================== --- trunk/version1.0/overlay.php (rev 0) +++ trunk/version1.0/overlay.php 2006-04-06 15:50:12 UTC (rev 1708) @@ -0,0 +1,43 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* stats.php +* **************** +* $Id: stats.php 1682 2006-04-04 20:03:28Z paulsohier $ +******************************************************************/ + +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +define('IN_STATS', true); +define('RCTS_ROOT_PATH', dirname(__FILE__)); +include(RCTS_ROOT_PATH.'/includes/start.php'); +if(count($_SESSION)) +{ + @session_destroy(); +} + +if (isset($_GET['modproxy'])) { + $url = get_var('modproxy'); + $content = file_get_contents($url); + $content = preg_replace('#<head>#i', '<head><base href="'.$url.'" />', $content); + echo $content; + exit; +} + +$template->assign(array( + 'js' => '<script type="text/javascript" src="javascript/overlay_functions.php"></script><script type="text/javascript" src="javascript/overlay.js">' +)); +pageheader(); +print '<input type="text" value="http://www.reallycoding.nl/" id="urlto" /> <button onclick="overlayNavigate(document.getElementById(\'urlto\').value)">»»</button><br />'; +print '<iframe src="overlay.php?modproxy=http://www.reallycoding.nl/" id="contframe" width="740" height="500"></iframe>'; +pagefooter(); +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-04-16 19:49:58
|
Revision: 1724 Author: paulsohier Date: 2006-04-16 12:49:43 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1724&view=rev Log Message: ----------- Some bugfixes, and changes :P Modified Paths: -------------- trunk/version1.0/cache/version.txt trunk/version1.0/includes/classes/class.calendar.php trunk/version1.0/includes/classes/class.config.php trunk/version1.0/includes/classes/class.core.php trunk/version1.0/includes/classes/class.getstats.php trunk/version1.0/includes/classes/class.lang.php trunk/version1.0/includes/classes/class.template.php trunk/version1.0/includes/db/db.php trunk/version1.0/includes/functions_vars.php trunk/version1.0/stats.php trunk/version1.0/templates/rcts/footer.html Modified: trunk/version1.0/cache/version.txt =================================================================== --- trunk/version1.0/cache/version.txt 2006-04-16 19:13:33 UTC (rev 1723) +++ trunk/version1.0/cache/version.txt 2006-04-16 19:49:43 UTC (rev 1724) @@ -2,5 +2,5 @@ $version = '1.2.2'; $offline = ''; $data = 'Nothing'; -$data = 1145130906; +$data = 1145301328; ?> \ No newline at end of file Modified: trunk/version1.0/includes/classes/class.calendar.php =================================================================== --- trunk/version1.0/includes/classes/class.calendar.php 2006-04-16 19:13:33 UTC (rev 1723) +++ trunk/version1.0/includes/classes/class.calendar.php 2006-04-16 19:49:43 UTC (rev 1724) @@ -566,6 +566,9 @@ if($time <= $today) { + if(!isset($total[$time])){ + $total[$time] = 0; + } $hits = ($day != " " ? $total[$time]: 0); //$hits = count($hits); } Modified: trunk/version1.0/includes/classes/class.config.php =================================================================== --- trunk/version1.0/includes/classes/class.config.php 2006-04-16 19:13:33 UTC (rev 1723) +++ trunk/version1.0/includes/classes/class.config.php 2006-04-16 19:49:43 UTC (rev 1724) @@ -31,8 +31,7 @@ class config{ var $load = false; - function config(){ - } + /** * load() * @@ -44,7 +43,7 @@ * ?> * </code> */ - function load(){ + function config(){ global $db; unset($this->config); $this->config = array(); Modified: trunk/version1.0/includes/classes/class.core.php =================================================================== --- trunk/version1.0/includes/classes/class.core.php 2006-04-16 19:13:33 UTC (rev 1723) +++ trunk/version1.0/includes/classes/class.core.php 2006-04-16 19:49:43 UTC (rev 1724) @@ -125,7 +125,6 @@ } //Unset DB pass unset($password); - $config->load(); //TPL checks if(isset($_GET['template']) || isset($_POST['template'])){ $tpl = get_var("template"); @@ -592,7 +591,7 @@ } //We don't want to have notice in our databases. if($errno == E_NOTICE || $errno == E_STRICT){ - return; + return false; } $dis = false; $user = true; Modified: trunk/version1.0/includes/classes/class.getstats.php =================================================================== --- trunk/version1.0/includes/classes/class.getstats.php 2006-04-16 19:13:33 UTC (rev 1723) +++ trunk/version1.0/includes/classes/class.getstats.php 2006-04-16 19:49:43 UTC (rev 1724) @@ -74,6 +74,9 @@ krsort($total); while(list($el,$wa) = each($total)){ if($el > $begin){ + if(!isset($return[$el])){ + $return[$el] = 0; + } $return[$el] += $wa; } } @@ -286,7 +289,7 @@ st_die(SQL, "Could not get weeks", '', __LINE__, __FILE__, $sql); } $temp = array(); - foreach($db->sql_fetchrowset($result) as $row) + while($row = $db->sql_fetchrow($result)) { $temp[$row['day']] = $row['total_visits']; } Modified: trunk/version1.0/includes/classes/class.lang.php =================================================================== --- trunk/version1.0/includes/classes/class.lang.php 2006-04-16 19:13:33 UTC (rev 1723) +++ trunk/version1.0/includes/classes/class.lang.php 2006-04-16 19:49:43 UTC (rev 1724) @@ -28,10 +28,9 @@ @return lang in code (nl, en) */ function autoDetectLang() { - $array = array('/','\\','gif','jpg','png','.ht','php');//Maybe add more extensions? $handle = opendir(RCTS_ROOT_PATH.'/lang/'); while (false!==($file = readdir($handle))) { - if ($file != '.' && $file != '..' && is_dir(RCTS_ROOT_PATH.'/lang/'.$file) && !eregi($file,$array) && $this->check_lang($file)) { + if ($file != '.' && $file != '..' && is_dir(RCTS_ROOT_PATH.'/lang/'.$file) && $this->check_lang($file)) { if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) && substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2) == $file) { setcookie('lang', $file); @@ -100,9 +99,8 @@ function langAvd(){ $handle = opendir(RCTS_ROOT_PATH.'/lang/'); $ar = array(); - $array = array('/','\\','gif','jpg','png','.ht','php');//Maybe add more extensions? while (false!==($file = readdir($handle))) { - if ($file != '.' && $file != '..' && is_dir(RCTS_ROOT_PATH.'/lang/'.$file) && !eregi($file,$array)) { + if ($file != '.' && $file != '..' && is_dir(RCTS_ROOT_PATH.'/lang/'.$file)) { if($this->check_lang($file)){ include(RCTS_ROOT_PATH . "/lang/$file/main.php"); $ar[$file] = $langname; Modified: trunk/version1.0/includes/classes/class.template.php =================================================================== --- trunk/version1.0/includes/classes/class.template.php 2006-04-16 19:13:33 UTC (rev 1723) +++ trunk/version1.0/includes/classes/class.template.php 2006-04-16 19:49:43 UTC (rev 1724) @@ -273,12 +273,12 @@ for ($i = 0; $i < count($code_lines); $i++) { $code_lines[$i] = chop($code_lines[$i]); - if (preg_match('#<!-- START (.*?) -->#', $code_lines[$i], $m)) + if (preg_match('#<!-- START ([a-zA-Z0-9_-]+) -->#', $code_lines[$i], $m)) { $n[0] = $m[0]; $n[1] = $m[1]; - if ( preg_match('#<!-- STOP (.*?) -->#', $code_lines[$i], $n) ) + if ( preg_match('#<!-- STOP ([a-zA-Z0-9_-]+) -->#', $code_lines[$i], $n) ) { $block_nesting_level++; $block_names[$block_nesting_level] = $m[1]; @@ -328,14 +328,14 @@ } } } - else if (preg_match('#<!-- STOP (.*?) -->#', $code_lines[$i], $m)) + else if (preg_match('#<!-- STOP ([a-zA-Z0-9_-]+) -->#', $code_lines[$i], $m)) { $tab--; $code_lines[$i] .= $this->gen_tab($tab) . '} // END ' . $m[1]; unset($block_names[$block_nesting_level]); $block_nesting_level--; } - elseif(preg_match("#<!-- INCLUDE (.*?) -->#",$code_lines[$i],$m)){ + elseif(preg_match("#<!-- INCLUDE ([a-zA-Z0-9_-]+) -->#",$code_lines[$i],$m)){ if(!eregi(".html",$m[1])){ st_die(RCTS_GENERAL_ERROR,"Hacking attempt!<br />No extension, or not allowed extension found!"); } @@ -348,7 +348,7 @@ //TPL IF //TPL IF tags are there for checking if there are set a var at the TPL //They work the same at IF tags. - elseif(preg_match("#<!-- IF TPL (.*?) -->#",$code_lines[$i],$m) && !$block_in_IF_TPL) + elseif(preg_match("#<!-- IF TPL ([a-zA-Z0-9_-]+) -->#",$code_lines[$i],$m) && !$block_in_IF_TPL) { $m[1] = str_replace("'","\'",$m[1]); $block_in_IF_TPL = true; @@ -365,7 +365,7 @@ $code_lines[$i] = $this->gen_tab($tab) . "}//END IF TPL ".$block_IF_TPL; $block_IF_TPL = ''; } - elseif(preg_match("#<!-- A IF (.*?) -->#",$code_lines[$i],$m) && !$block_in_IF) + elseif(preg_match("#<!-- A IF ([a-zA-Z0-9_-]+) -->#",$code_lines[$i],$m) && !$block_in_IF) { $block_in_IF = true; $m[1] = str_replace("\'","'",$m[1]); @@ -389,7 +389,7 @@ //If you want to use a var, that isn't global, use the <!-- GLOBAL var --> tag! //(Use that before the IF tag!) //IF you want to check a tpl var, use TPL IF! - elseif(preg_match("#<!-- IF (.*?) -->#",$code_lines[$i],$m) && !$block_in_IF) + elseif(preg_match("#<!-- IF ([a-zA-Z0-9_-]+) -->#",$code_lines[$i],$m) && !$block_in_IF) { $block_in_IF = true; $tab++; @@ -412,12 +412,12 @@ } } - elseif(preg_match("#<!-- ELSE IF TPL (.*?) -->#",$code_lines[$i],$m) && ($block_in_IF || $block_in_IF_TPL) && !$block_in_ELSE) + elseif(preg_match("#<!-- ELSE IF TPL ([a-zA-Z0-9]+) -->#",$code_lines[$i],$m) && ($block_in_IF || $block_in_IF_TPL) && !$block_in_ELSE) { $m[1] = str_replace("'","\'",$m[1]); $code_lines[$i] = $this->gen_tab($tab) . "}\nelse if(isset(\$this->vars['".$m[1]."']) && !empty(\$this->vars['".$m[1]."']))\n" . $this->gen_tab($tab) . "{//BEGIN ELSE IF TPL tag ".$m[1]; } - elseif(preg_match("#<!-- ELSE A IF (.*?) -->#",$code_lines[$i],$m) && ($block_in_IF || $block_in_IF_TPL) && !$block_in_ELSE) + elseif(preg_match("#<!-- ELSE A IF ([a-zA-Z0-9]+) -->#",$code_lines[$i],$m) && ($block_in_IF || $block_in_IF_TPL) && !$block_in_ELSE) { $m[1] = str_replace("\'","'",$m[1]); @@ -428,7 +428,7 @@ $code_lines[$i] = "\n" . $this->gen_tab($tab) . "}\n" . $this->gen_tab($tab) . "elseif(".$tmp.")" . $this->gen_tab($tab) . "\n" . $this->gen_tab($tab) . "{//BEGIN tag ELSE A IF tag ".$m[1]; $tab++; } - elseif(preg_match("#<!-- ELSE IF (.*?) -->#",$code_lines[$i],$m) && ($block_in_IF || $block_in_IF_TPL) && !$block_in_ELSE) + elseif(preg_match("#<!-- ELSE IF ([a-zA-Z0-9_-]+) -->#",$code_lines[$i],$m) && ($block_in_IF || $block_in_IF_TPL) && !$block_in_ELSE) { $m[1] = str_replace("\'","'",$m[1]); $code_lines[$i] = $this->gen_tab($tab) . "}\n" . $this->gen_tab($tab) . "else if(".$m[1].")\n{//BEGIN ELSE IF tag ".$m[1]; @@ -463,11 +463,8 @@ } $code_lines[$i] = $this->gen_tab($tab) . "}//END IF ".$block_IF; $block_IF = ''; - }elseif(preg_match("#<!-- GLOBAL (.*?) -->#",$code_lines[$i],$m)){ - $array = array("'",'"',";",",","$"," "); - if(eregi($m[1],$array)){ - st_die(RCTS_GENERAL_ERROR,"Hacking attempt.<br />Don't use a ".implode(", ")." in your global tags."); - } + }elseif(preg_match("#<!-- GLOBAL ([a-zA-Z0-9_-]+) -->#",$code_lines[$i],$m)){ + $m[1] = trim($m[1]); $t = explode(" ",$m[1]); if(count($t) > 1){ st_die(RCTS_GENERAL_ERROR,"Hacking attempt.<br />Don't use a space at your global tags."); @@ -486,8 +483,8 @@ } } $row = implode("\n", $code_lines); - $row = preg_replace("#<!-- STOP (.*?) -->#","",$row); - $row = preg_replace("#<!-- START (.*?) -->#","",$row); + $row = preg_replace("#<!-- STOP ([a-zA-Z0-9_-]+) -->#","",$row); + $row = preg_replace("#<!-- START ([a-zA-Z0-9_-]+) -->#","",$row); /* highlight_string('<?php'."\n".$row.'?>');*/ if($no_eval){ return $row; @@ -551,14 +548,13 @@ */ function list_themes($dir) { - $array = array('/','\\','gif','jpg','png','.ht','php');//Maybe add more extensions? $themes = array(); if (($handle = @opendir($dir))) { while ($node = @readdir($handle)) { $nodebase = basename($node); - if ($node != "." && $node != ".." && !eregi($array,$node)) + if ($node != "." && $node != "..") { if(is_dir($dir.$node) && is_readable($dir . $node) && file_exists($dir . "/" . $node . "/".$node.".php")) { Modified: trunk/version1.0/includes/db/db.php =================================================================== --- trunk/version1.0/includes/db/db.php 2006-04-16 19:13:33 UTC (rev 1723) +++ trunk/version1.0/includes/db/db.php 2006-04-16 19:49:43 UTC (rev 1724) @@ -18,7 +18,9 @@ *******************************************************************/ class db{ function db($host,$name,$wachtwoord,$db,$makedb = false){ - + if(!defined('LAYER')){ + define('LAYER','mysql'); + } switch(LAYER){ case "mysql": default: @@ -28,6 +30,7 @@ } $result = $this->db->connect($host,$name,$wachtwoord,$db,$makedb); + $this->is_connect = $result; unset($wachtwoord); if(!$result){ Modified: trunk/version1.0/includes/functions_vars.php =================================================================== --- trunk/version1.0/includes/functions_vars.php 2006-04-16 19:13:33 UTC (rev 1723) +++ trunk/version1.0/includes/functions_vars.php 2006-04-16 19:49:43 UTC (rev 1724) @@ -173,18 +173,19 @@ } function ArrayMergeKeepKeys() { - $arg_list = func_get_args(); - foreach((array)$arg_list as $arg){ - foreach((array)$arg as $K => $V){ - if(is_numeric($V)&& is_numeric($Zoo[$K])) + $arg_list = func_get_args(); + $Zoo = array(); + foreach((array)$arg_list as $arg){ + foreach((array)$arg as $K => $V){ + if(is_numeric($V) && isset($Zoo[$K]) && is_numeric($Zoo[$K])) { - $Zoo[$K]+=$V; + $Zoo[$K]+=$V; }else{ $Zoo[$K]=$V; } - } - } - return $Zoo; + } + } + return $Zoo; } function urldecode_array($array){ $new_array = array(); Modified: trunk/version1.0/stats.php =================================================================== --- trunk/version1.0/stats.php 2006-04-16 19:13:33 UTC (rev 1723) +++ trunk/version1.0/stats.php 2006-04-16 19:49:43 UTC (rev 1724) @@ -29,6 +29,7 @@ $multi_site = new multisite; $displayStats = new displayStats; $mode = $layout->getMode(); +$title = ''; //If you set at config that the stats are closed for guest, you must login! if($config->config['stats_open'] == 0) { @@ -291,7 +292,7 @@ 'L_VISITS_LAST_30_DAYS' => $lang->lang['visits_past_30_days'], 'ADDLINK' => "stats.php?mode=".$mode."&day=".$calendar_day."&do=add", 'expected_hits' => $predicted, - 'total_visit' => $total_visit, + //'total_visit' => $total_visit, 'num_views' => $lang->lang['Times_showed_1'] . $views . $lang->lang['Times_showed_2'] )); pageHeader($title, 'linneighborhood'); Modified: trunk/version1.0/templates/rcts/footer.html =================================================================== --- trunk/version1.0/templates/rcts/footer.html 2006-04-16 19:13:33 UTC (rev 1723) +++ trunk/version1.0/templates/rcts/footer.html 2006-04-16 19:49:43 UTC (rev 1724) @@ -89,10 +89,7 @@ </div> <br clear="all" /> <div id="page_footer"> - <!-- GLOBAL config --> - <!-- IF ads --> - {ADD_2} - <!-- END IF --> + <!-- GLOBAL config --> <!-- Don't delete this copyright. If you delete it, it is possible that you get no support. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-04-16 20:00:32
|
Revision: 1725 Author: paulsohier Date: 2006-04-16 13:00:24 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1725&view=rev Log Message: ----------- And again, bugfixes :P Modified Paths: -------------- trunk/version1.0/includes/functions.php trunk/version1.0/stats.php trunk/version1.0/templates/rcts/header.html Modified: trunk/version1.0/includes/functions.php =================================================================== --- trunk/version1.0/includes/functions.php 2006-04-16 19:49:43 UTC (rev 1724) +++ trunk/version1.0/includes/functions.php 2006-04-16 20:00:24 UTC (rev 1725) @@ -55,7 +55,6 @@ "footer" => "footer.html", )); $template->assign_if("admin",'$config->is_login()'); - $template->assign_if("ads",'$config->config["enable_ads"]'); //Kalender Start if(isset($_GET['time'])){ $time = get_var('time'); @@ -104,9 +103,6 @@ 'L_CHOOSE_LANG' => $lang->lang['choose_lang'], 'L_SELECT2' => $lang->lang['select_lang'], 'L_CHANGE_LANG' => $lang->lang['change_lang'], - //ADS - 'ADD_1' => $config->config['add1'], - 'ADD_2' => $config->config['add2'], //Version 'VERSION' => $config->config['version'], 'L_VERSION' => $lang->lang['version'], Modified: trunk/version1.0/stats.php =================================================================== --- trunk/version1.0/stats.php 2006-04-16 19:49:43 UTC (rev 1724) +++ trunk/version1.0/stats.php 2006-04-16 20:00:24 UTC (rev 1725) @@ -106,10 +106,7 @@ $sql = "INSERT INTO ".RCTS_STATS_STATS_TABLE." (mode,visit) VALUES ('".$mode."',1)"; - if(!$db->sql_query($sql)) - { - st_die(SQL, "Could not update Stats_stats", '', __LINE__, __FILE__, $sql); - } + $db->sql_query($sql); } //First tings first @@ -132,11 +129,6 @@ $res = $db->sql_query($sql); -if(!$res) -{ - st_die(SQL,"Could not query plugins for MT","",__LINE__,__FILE__,$sql); -} - while ($row = $db->sql_fetchrow($res)) { $plugins[] = $row['plugin_name']; @@ -174,7 +166,7 @@ if(!$loaded) { - st_die(RCTS_GENERAL_MESSAGE,"No plugin found",""); + trigger_error("No plugin found",E_USER_WARNING); } $icon = (file_exists(RCTS_ROOT_PATH.'/plugins/plugin_'.$plugin_row[$i]['pluginn'].'/icon.png')) ? '../../plugins/plugin_'.$plugin_row[$i]['pluginn'].'/icon' : 'linneighborhood'; @@ -231,7 +223,7 @@ // elseif(!$pluginsClass->loadPlugin($name)) else if (!in_array($name, $plugins)) { - trigger_error("Method not exists (\$displayStats->".$name."())"); + trigger_error("Method not exists (\$displayStats->".$name."())",E_USER_WARNING); } $i++; } Modified: trunk/version1.0/templates/rcts/header.html =================================================================== --- trunk/version1.0/templates/rcts/header.html 2006-04-16 19:49:43 UTC (rev 1724) +++ trunk/version1.0/templates/rcts/header.html 2006-04-16 20:00:24 UTC (rev 1725) @@ -40,8 +40,5 @@ </div> <div class="page_body"> <div id="loading"><img src='images/loading.gif' />Loading...</div> - <!-- IF ads --> - {ADD_1} - <!-- END IF --> <div id="main_content"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-04-16 20:37:53
|
Revision: 1726 Author: paulsohier Date: 2006-04-16 13:37:09 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1726&view=rev Log Message: ----------- Removed lang class :P Modified Paths: -------------- trunk/version1.0/admin/index.php trunk/version1.0/cache/sql.php trunk/version1.0/error.php trunk/version1.0/includes/classes/class.calendar.php trunk/version1.0/includes/classes/class.config.php trunk/version1.0/includes/classes/class.core.php trunk/version1.0/includes/classes/class.cron.php trunk/version1.0/includes/classes/class.getstats.php trunk/version1.0/includes/classes/class.load.php trunk/version1.0/includes/classes/class.mailer.php trunk/version1.0/includes/classes/class.module.php trunk/version1.0/includes/classes/class.plugin.php trunk/version1.0/includes/classes/class.stats.php trunk/version1.0/includes/classes/class.viewer.php trunk/version1.0/includes/classes/class.wizard.php trunk/version1.0/includes/functions.php trunk/version1.0/includes/modules/acp/acp_config_general.php trunk/version1.0/includes/modules/acp/acp_config_user.php trunk/version1.0/includes/modules/acp/acp_ftp.php trunk/version1.0/includes/modules/acp/acp_header.php trunk/version1.0/includes/modules/acp/acp_info.php trunk/version1.0/includes/modules/acp/acp_layout.php trunk/version1.0/includes/modules/acp/acp_multisite.php trunk/version1.0/includes/modules/acp/acp_smtp.php trunk/version1.0/includes/start.php trunk/version1.0/includes/wizards/configwiz.php trunk/version1.0/install/index.php trunk/version1.0/install/update.php trunk/version1.0/plugins/plugin_Follow/plugin.php trunk/version1.0/plugins/plugin_Mysql/plugin.php trunk/version1.0/plugins/plugin_phpbb/plugin.php trunk/version1.0/rss.php trunk/version1.0/stats.php trunk/version1.0/wizz.php trunk/version1.0/xml.php Removed Paths: ------------- trunk/version1.0/includes/classes/class.lang.php Modified: trunk/version1.0/admin/index.php =================================================================== --- trunk/version1.0/admin/index.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/admin/index.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -19,7 +19,7 @@ *******************************************************************/ define('IN_STATS', true); define('IN_ADMIN',true); -define('RCTS_ROOT_PATH', str_replace("admin","",str_replace("\\admin", "", dirname(__FILE__)))); +define('RCTS_ROOT_PATH',dirname(dirname(__FILE__))); include(RCTS_ROOT_PATH . '/includes/start.php'); /** * @todo: Write the login function Modified: trunk/version1.0/cache/sql.php =================================================================== --- trunk/version1.0/cache/sql.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/cache/sql.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -1 +1 @@ -$cache['b63d6013d49dccfa7e71cabb0c3067d2']=array('time'=>'1144246813','value'=>'YTowOnt9'); \ No newline at end of file +$cache['b63d6013d49dccfa7e71cabb0c3067d2']=array('time'=>'1145218936','value'=>'YTowOnt9'); \ No newline at end of file Modified: trunk/version1.0/error.php =================================================================== --- trunk/version1.0/error.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/error.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -24,11 +24,11 @@ pageHeader("Mysql fouten."); $template->add_file(array("body"=>"errors.html")); $template->assign(array( - "L_FILE" => $lang->lang['file'], - "L_LINE" => $lang->lang['line'], - "L_ERROR" => $lang->lang['error'], - "L_SQL" => $lang->lang['sql'], - "L_NO_RESULT" => $lang->lang['no_result'] + "L_FILE" => $core->lang['file'], + "L_LINE" => $core->lang['line'], + "L_ERROR" => $core->lang['error'], + "L_SQL" => $core->lang['sql'], + "L_NO_RESULT" => $core->lang['no_result'] )); $sql = "SELECT * FROM ".RCTS_ERROR_TABLE." ORDER BY bestand DESC, regel ASC"; $r = $db->sql_query($sql); Modified: trunk/version1.0/includes/classes/class.calendar.php =================================================================== --- trunk/version1.0/includes/classes/class.calendar.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/includes/classes/class.calendar.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -523,7 +523,7 @@ function assign_calendar_template($idid, $timestamp = 0) { - global $template, $lang, $config, $db; + global $template, $core, $config, $db; if(!$timestamp) { @@ -581,7 +581,7 @@ 'DAY' => $day, 'HITS' => $hits, - 'U_DAY' => ($hits > 0 ? '<a href="stats.php?mode='.$mode.'&day='.$time.'" title="'.$lang->lang['visits'].': '.$hits.'">' : '').$day.($hits > 0 ? '</a>' : ''), + 'U_DAY' => ($hits > 0 ? '<a href="stats.php?mode='.$mode.'&day='.$time.'" title="'.$core->lang['visits'].': '.$hits.'">' : '').$day.($hits > 0 ? '</a>' : ''), )); if($time == $today) @@ -612,7 +612,7 @@ } else { - $u_prev = '<a href="stats.php?mode='.$mode.'&time='.$prev.'">'.$lang->lang['PREV'].'</a>'; + $u_prev = '<a href="stats.php?mode='.$mode.'&time='.$prev.'">'.$core->lang['PREV'].'</a>'; } if($next > time()) @@ -621,19 +621,19 @@ } else { - $u_next = '<a href="stats.php?mode='.$mode.'&time='.$next.'">'.$lang->lang['NEXT'].'</a>'; + $u_next = '<a href="stats.php?mode='.$mode.'&time='.$next.'">'.$core->lang['NEXT'].'</a>'; } - $assign['L_VISITS'] = $lang->lang['visits']; + $assign['L_VISITS'] = $core->lang['visits']; $assign['U_PREV_MONTH'] = $u_prev; $assign['U_NEXT_MONTH'] = $u_next; - $assign['CURRENT_MONTH'] = $lang->lang['Months_of_Year'][$month]." ".$year; + $assign['CURRENT_MONTH'] = $core->lang['Months_of_Year'][$month]." ".$year; for($i = 0; $i < 7; $i++) { - $assign['L_DAY_'.$i] = $lang->lang['Days_Of_Week_Sort'][$i]; + $assign['L_DAY_'.$i] = $core->lang['Days_Of_Week_Sort'][$i]; } $template -> assign($assign); Modified: trunk/version1.0/includes/classes/class.config.php =================================================================== --- trunk/version1.0/includes/classes/class.config.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/includes/classes/class.config.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -106,7 +106,7 @@ * This function logs you in, according to what is given in GET/POST vars. */ function login($goto = "conf.php"){ - global $lang; + global $core; if(!$this->load){ $this->load(); } @@ -123,7 +123,7 @@ loc($goto); die; }else{ - st_die(RCTS_INFO,$lang->lang['pass_error']); + st_die(RCTS_INFO,$core->lang['pass_error']); } } } @@ -153,7 +153,7 @@ * Checks if the user is logged in, and does all stuff for the configuration page. */ function geef(){ - global $template,$multiSite,$lang,$pluginsClass,$db,$layout; + global $template,$multiSite,$core,$pluginsClass,$db,$layout; if(!$this->is()){ $this->form(); die; @@ -164,7 +164,7 @@ } $this->load(); - st_die(RCTS_GENERAL_MESSAGE,$lang->lang["Configupdated"] . "<br />" . sprintf($lang->lang['clickhere_return_config'], '<a href="conf.php?clickt='.get_var('clickt').'">', '</a>')); + st_die(RCTS_GENERAL_MESSAGE,$core->lang["Configupdated"] . "<br />" . sprintf($core->lang['clickhere_return_config'], '<a href="conf.php?clickt='.get_var('clickt').'">', '</a>')); }elseif(isset($_GET['update']) && $_GET['update'] == 2){ $this->update('use_multisite',get_var('use_multisite')); @@ -172,7 +172,7 @@ $multiSite->doUpdate(); } $this->load(); - st_die(RCTS_GENERAL_MESSAGE,$lang->lang["Configupdated"] . "<br />" . sprintf($lang->lang['clickhere_return_config'], '<a href="conf.php?clickt='.get_var('clickt').'">', '</a>')); + st_die(RCTS_GENERAL_MESSAGE,$core->lang["Configupdated"] . "<br />" . sprintf($core->lang['clickhere_return_config'], '<a href="conf.php?clickt='.get_var('clickt').'">', '</a>')); }elseif(isset($_GET['installadd'])){ $sql = "SELECT * FROM ".RCTS_PLUGINS_TABLE." WHERE plugin_name='".array_add_slashes($_GET['installadd'])."'"; $res = $db->sql_query($sql); @@ -180,20 +180,20 @@ st_die(SQL,"Could not query plugin","",__LINE__,__FILE__,$sql); } if ($db->sql_numrows($res) != 0) { - st_die(RCTS_GENERAL_MESSAGE, $lang->lang['plugin_already'] . "<br />" . sprintf($lang->lang['clickhere_return_config'], '<a href="conf.php?clickt='.get_var('clickt').'">', '</a>')); + st_die(RCTS_GENERAL_MESSAGE, $core->lang['plugin_already'] . "<br />" . sprintf($core->lang['clickhere_return_config'], '<a href="conf.php?clickt='.get_var('clickt').'">', '</a>')); pageFooter(); die; } $pluginsClass->installPlugin($_GET['installadd']); $nowInstalled = $_GET['installadd']; //Against fatal error. :) - st_die(RCTS_GENERAL_MESSAGE,$lang->lang['plug_install'] . "<br />" . sprintf($lang->lang['clickhere_return_config'], '<a href="conf.php?clickt='.get_var('clickt').'">', '</a>')); + st_die(RCTS_GENERAL_MESSAGE,$core->lang['plug_install'] . "<br />" . sprintf($core->lang['clickhere_return_config'], '<a href="conf.php?clickt='.get_var('clickt').'">', '</a>')); pageFooter(); die; }elseif(isset($_GET['uninstalladd'])){ $pluginsClass->uninstallPlugin($_GET['uninstalladd']); $nowUninstalled = $_GET['uninstalladd']; - echo $lang->lang['plug_un'] . "<br />"; - echo sprintf($lang->lang['clickhere_return_config'], '<a href="conf.php?clickt='.get_var('clickt').'">', '</a>'); + echo $core->lang['plug_un'] . "<br />"; + echo sprintf($core->lang['clickhere_return_config'], '<a href="conf.php?clickt='.get_var('clickt').'">', '</a>'); pageFooter(); die; }elseif(isset($_GET['update_user'])){ @@ -201,10 +201,10 @@ $pass = md5($_POST['pass']); $this->update('password',$pass); $this->update('username',$user); - st_die(RCTS_GENERAL_MESSAGE,$lang->lang["Configupdated"] . "<br />" . sprintf($lang->lang['clickhere_return_config'], '<a href="conf.php?clickt='.get_var('clickt').'">', '</a>')); + st_die(RCTS_GENERAL_MESSAGE,$core->lang["Configupdated"] . "<br />" . sprintf($core->lang['clickhere_return_config'], '<a href="conf.php?clickt='.get_var('clickt').'">', '</a>')); }elseif(isset($_GET['update']) && $_GET['update'] == 4){ $layout->UpdateConfig(); - st_die(RCTS_GENERAL_MESSAGE,$lang->lang["Configupdated"] . "<br />" . sprintf($lang->lang['clickhere_return_config'], '<a href="conf.php?clickt='.get_var('clickt').'">', '</a>')); + st_die(RCTS_GENERAL_MESSAGE,$core->lang["Configupdated"] . "<br />" . sprintf($core->lang['clickhere_return_config'], '<a href="conf.php?clickt='.get_var('clickt').'">', '</a>')); }else{ $clickt = "conf"; if(isset($_GET['clickt']) && get_var('clickt')){ @@ -283,7 +283,7 @@ )); $template -> block('layoutAfter', array( 'id' => $tabId, - 'name' => $lang->lang['layout_before']." ".$tabName + 'name' => $core->lang['layout_before']." ".$tabName )); } @@ -304,7 +304,7 @@ }else{ $template->block("header_check", array( 'num' => "", - 'header' => $lang->lang['Header_None'], + 'header' => $core->lang['Header_None'], 'id' => "" )); $headerEnabled = 'disabled="disabled"'; @@ -430,70 +430,70 @@ "Samen2" => $list2, "default_tpl" => $selectTheme, //Taal - "L_STATS_MAIN_CONFIG" =>$lang->lang['Stats_Main_config'], - "L_STATS_OPEN" => $lang->lang['Stats_Open'], - "L_STATS_IMAGE" => $lang->lang['Stats_Image'], - "L_STATS_THEME" => $lang->lang['Stats_Theme'], - "L_STATS_SEND" => $lang->lang['Stats_Send'], - "L_STATS_MULTI" => $lang->lang['Stats_Multi'], - "L_STATS_MULTI_ON" => $lang->lang['Stats_Multi_on'], - "L_STATS_MULTI_Q" => $lang->lang['Stats_Multi_q'], - "L_STATS_NAME" => $lang->lang['Stats_Name'], - "L_STATS_COMBINE" => $lang->lang['Stats_Combine'], - "L_STATS_THIS" => $lang->lang['Stats_This'], - "L_STATS_SEND_MULTI" => $lang->lang['Stats_Send_multi'], - "L_STATS_YES" => $lang->lang['Stats_Yes'], - "L_STATS_NO" => $lang->lang['Stats_No'], - "L_ADDONS" => $lang->lang['Addons'], - "L_UNINSTALL" => $lang->lang['Uninstall'], - "L_ADDONS_INSTALL" => $lang->lang['Addons_install'], - "L_INSTALL" => $lang->lang['Install'], - "L_STATS_FTP_T" => $lang->lang['Stats_ftp_title'], - "L_STATS_FTP" => $lang->lang['Stats_ftp'], - "L_STATS_FTP_SERVER" => $lang->lang['Stats_ftp_server'], - "L_STATS_FTP_GB" => $lang->lang['Stats_ftp_gb'], - "L_STATS_FTP_WW" => $lang->lang['Stats_ftp_ww'], - "L_STATS_FTP_ROOT" => $lang->lang['Stats_ftp_root'], - "L_STATS_FTP_SEND" => $lang->lang['Stats_ftp_send'], - "L_STATS_SMTP_T" => $lang->lang['Stats_smtp_title'], - "L_STATS_SMTP" => $lang->lang['Stats_smtp'], - "L_STATS_SMTP_HOST" => $lang->lang['Stats_smtp_host'], - "L_STATS_SMTP_GB" => $lang->lang['Stats_smtp_gb'], - "L_STATS_SMTP_WW" => $lang->lang['Stats_smtp_ww'], - "L_STATS_SMTP_SEND" => $lang->lang['Stats_smtp_send'], - "L_HEADERS_CHECK" => $lang->lang['Headers_Check'], - "L_HEADER_TEXT1" => $lang->lang['Header_Text1'], - "L_HEADER" => $lang->lang['Header'], - "L_NUM_SIGN" => $lang->lang['Number_sign'], - "L_ACTION" => $lang->lang['Action'], - "L_ACCEPT" => $lang->lang['Accept'], - "L_WAIT" => $lang->lang['Wait'], - "L_BLOCK" => $lang->lang['Block'], - "L_STATS_SEND_HEADER" => $lang->lang['Send_Header'], - "L_USE_DW" => $lang->lang['use_dw'], - "L_MOD_REWRITE" => $lang->lang['use_re'], - "L_GZIP" => $lang->lang['gzip'], - "L_USER" => $lang->lang['user_cfg'], - "L_USERN" => $lang->lang['username'], - "L_PASSN" => $lang->lang['password'], - "L_CHANGE_USER" => $lang->lang['cu'], - "L_PLUGIN" => $lang->lang['plug'], - "L_HEADERC" => $lang->lang['hc'], + "L_STATS_MAIN_CONFIG" =>$core->lang['Stats_Main_config'], + "L_STATS_OPEN" => $core->lang['Stats_Open'], + "L_STATS_IMAGE" => $core->lang['Stats_Image'], + "L_STATS_THEME" => $core->lang['Stats_Theme'], + "L_STATS_SEND" => $core->lang['Stats_Send'], + "L_STATS_MULTI" => $core->lang['Stats_Multi'], + "L_STATS_MULTI_ON" => $core->lang['Stats_Multi_on'], + "L_STATS_MULTI_Q" => $core->lang['Stats_Multi_q'], + "L_STATS_NAME" => $core->lang['Stats_Name'], + "L_STATS_COMBINE" => $core->lang['Stats_Combine'], + "L_STATS_THIS" => $core->lang['Stats_This'], + "L_STATS_SEND_MULTI" => $core->lang['Stats_Send_multi'], + "L_STATS_YES" => $core->lang['Stats_Yes'], + "L_STATS_NO" => $core->lang['Stats_No'], + "L_ADDONS" => $core->lang['Addons'], + "L_UNINSTALL" => $core->lang['Uninstall'], + "L_ADDONS_INSTALL" => $core->lang['Addons_install'], + "L_INSTALL" => $core->lang['Install'], + "L_STATS_FTP_T" => $core->lang['Stats_ftp_title'], + "L_STATS_FTP" => $core->lang['Stats_ftp'], + "L_STATS_FTP_SERVER" => $core->lang['Stats_ftp_server'], + "L_STATS_FTP_GB" => $core->lang['Stats_ftp_gb'], + "L_STATS_FTP_WW" => $core->lang['Stats_ftp_ww'], + "L_STATS_FTP_ROOT" => $core->lang['Stats_ftp_root'], + "L_STATS_FTP_SEND" => $core->lang['Stats_ftp_send'], + "L_STATS_SMTP_T" => $core->lang['Stats_smtp_title'], + "L_STATS_SMTP" => $core->lang['Stats_smtp'], + "L_STATS_SMTP_HOST" => $core->lang['Stats_smtp_host'], + "L_STATS_SMTP_GB" => $core->lang['Stats_smtp_gb'], + "L_STATS_SMTP_WW" => $core->lang['Stats_smtp_ww'], + "L_STATS_SMTP_SEND" => $core->lang['Stats_smtp_send'], + "L_HEADERS_CHECK" => $core->lang['Headers_Check'], + "L_HEADER_TEXT1" => $core->lang['Header_Text1'], + "L_HEADER" => $core->lang['Header'], + "L_NUM_SIGN" => $core->lang['Number_sign'], + "L_ACTION" => $core->lang['Action'], + "L_ACCEPT" => $core->lang['Accept'], + "L_WAIT" => $core->lang['Wait'], + "L_BLOCK" => $core->lang['Block'], + "L_STATS_SEND_HEADER" => $core->lang['Send_Header'], + "L_USE_DW" => $core->lang['use_dw'], + "L_MOD_REWRITE" => $core->lang['use_re'], + "L_GZIP" => $core->lang['gzip'], + "L_USER" => $core->lang['user_cfg'], + "L_USERN" => $core->lang['username'], + "L_PASSN" => $core->lang['password'], + "L_CHANGE_USER" => $core->lang['cu'], + "L_PLUGIN" => $core->lang['plug'], + "L_HEADERC" => $core->lang['hc'], //layout - "L_STATS_LAYOUT_CONFIG" => $lang->lang['layoutconf'], - "L_NEW" => $lang->lang['layout_new'], - "L_NAME" => $lang->lang['layout_name'], - "L_POSITION" => $lang->lang['layout_position'], - "L_LAST" => $lang->lang['layout_last'], - "L_NEW_LAYOUT" => $lang->lang['layout_new_subm'], - "L_RENAME_A" => $lang->lang['layout_rename_a'], - "L_RENAME" => $lang->lang['layout_rename'], - "L_EDIT_LAYOUT" => $lang->lang['layout_rename_subm'], - "L_EMPTY_DEL" => $lang->lang['layout_empty_del'], + "L_STATS_LAYOUT_CONFIG" => $core->lang['layoutconf'], + "L_NEW" => $core->lang['layout_new'], + "L_NAME" => $core->lang['layout_name'], + "L_POSITION" => $core->lang['layout_position'], + "L_LAST" => $core->lang['layout_last'], + "L_NEW_LAYOUT" => $core->lang['layout_new_subm'], + "L_RENAME_A" => $core->lang['layout_rename_a'], + "L_RENAME" => $core->lang['layout_rename'], + "L_EDIT_LAYOUT" => $core->lang['layout_rename_subm'], + "L_EMPTY_DEL" => $core->lang['layout_empty_del'], //Version :) - "L_CHECK_VERSIONS" => $lang->lang['check_version'], - "L_PLUGIN_NAME" => $lang->lang['plugin_name'], - "L_NEWEST" => $lang->lang['newest'] + "L_CHECK_VERSIONS" => $core->lang['check_version'], + "L_PLUGIN_NAME" => $core->lang['plugin_name'], + "L_NEWEST" => $core->lang['newest'] )); $template->parse("body"); } @@ -506,7 +506,7 @@ * */ function form($res="conf.php"){ - global $template,$lang; + global $template,$core; pageHeader("Login"); if(isset($_POST['uname'])){ $this->login(); @@ -514,10 +514,10 @@ $template->add_file(array("body"=>"login.html")); $template->assign(array( "action" => $res, - "L_LOGIN" => $lang->lang['Stats_Login'], - "L_UNAME" => $lang->lang['Stats_Uname'], - "L_PASS" => $lang->lang['Stats_Pass'], - "L_AUTOLOGIN" => $lang->lang['Stats_Autologin'], + "L_LOGIN" => $core->lang['Stats_Login'], + "L_UNAME" => $core->lang['Stats_Uname'], + "L_PASS" => $core->lang['Stats_Pass'], + "L_AUTOLOGIN" => $core->lang['Stats_Autologin'], )); $template->parse("body"); pageFooter(); @@ -528,7 +528,7 @@ * This function builds and outputs the page for plugins. */ function geefplug() { - global $template,$multiSite,$lang,$pluginsClass,$db; + global $template,$multiSite,$core,$pluginsClass,$db; if(!$this->is()){ $this->form(); die; @@ -538,7 +538,7 @@ while(list($el,$wa) = each($_POST)){ $this->setPlugOption($el,get_var($el)); } - echo $lang->lang["Configupdated"]; + echo $core->lang["Configupdated"]; } $template->add_file(array("body"=>"confp.html")); $sql = "SELECT * FROM ".RCTS_PLUGIN_OPTION_TABLE." @@ -571,7 +571,7 @@ } $template->assign(array( - "L_STATS_SEND" => $lang->lang['Stats_Send'] + "L_STATS_SEND" => $core->lang['Stats_Send'] )); $template->parse("body"); } Modified: trunk/version1.0/includes/classes/class.core.php =================================================================== --- trunk/version1.0/includes/classes/class.core.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/includes/classes/class.core.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -55,7 +55,6 @@ "includes/classes/class.config.php", "includes/classes/class.cron.php", "includes/classes/class.graph.php", - "includes/classes/class.lang.php", "includes/classes/class.layout.php", "includes/classes/class.linegraph.php", "includes/classes/class.load.php", @@ -93,7 +92,6 @@ $class = array( "db" => array("db",$host,$username,$password,$database), "config" => "config", - "lang" => "RCTSLang", "cron" => "cron", //"session" => "session", "pluginClass" => "RCPlugins", @@ -140,7 +138,7 @@ }else{ $template = new tpl('admin/tpl/'); } - $lang->loadLang(); //Loading the language + $this->loadLang(); //Loading the language //Check the RCTS version $this->checkversion(); @@ -157,7 +155,7 @@ @return Nothing */ function checkversion(){ - global $lang,$config,$browser,$cache; + global $config,$browser,$cache; if(defined('IN_CSS')){ return; } @@ -178,9 +176,9 @@ $check = true; } $_SERVER['QUERY_STRING'] = preg_replace("#&check=([0-9])#si","",$_SERVER['QUERY_STRING']); - $mel = sprintf($lang->lang['old_check'],"<a href='".base(true)."&check=1'>","</a>"); + $mel = sprintf($this->lang['old_check'],"<a href='".base(true)."&check=1'>","</a>"); if($offline && !$check){ - st_die(RCTS_INFO,$lang->lang['old_version'] . "<br />" . $mel); + st_die(RCTS_INFO,$this->lang['old_version'] . "<br />" . $mel); } if($check){ $file = 'http://www.reallycoding.nl/version/version.txt'; @@ -242,7 +240,7 @@ $x .= "\$data = ".(time() + 3600 * 24).";\n?".">"; $cache->write(RCTS_ROOT_PATH . "/cache/version.txt","w",4,array(),$x); if($o){ - st_die(RCTS_INFO,$lang->lang['old_version'] . "<br />" . $mel); + st_die(RCTS_INFO,$this->lang['old_version'] . "<br />" . $mel); } } } @@ -308,7 +306,7 @@ st_die(GENERAL_ERROR,'Block not found. Block: ' . $search); } function check_conf($mode,$plugin = null){ - global $config,$browser,$lang; + global $config,$browser; if($mode == 'RCTS'){ $file = 'http://www.reallycoding.nl/version/version.txt'; $block = 'rcts'; @@ -320,7 +318,7 @@ } $inf = $plugin->version_info(); if(empty($inf['block']) || empty($inf['file'])){ - st_die(RCTS_GENERAL_ERROR,sprintf($lang->lang['plugin_not_ready'],$plugin->getPluginName())); + st_die(RCTS_GENERAL_ERROR,sprintf($this->lang['plugin_not_ready'],$plugin->getPluginName())); //pageFooter(); return false; } @@ -432,7 +430,7 @@ } } function adminheader(){ - global $template,$lang,$config; + global $template,$config; if(defined('ah')) return; define('ah',true); $template->add_file(array( @@ -440,13 +438,13 @@ "af" => "footer.html" )); $template->assign(array( - 'SQL_Q' => $lang->lang['sql_q'], + 'SQL_Q' => $this->lang['sql_q'], //Version 'VERSION' => $config->config['version'], - 'L_VERSION' => $lang->lang['version'], + 'L_VERSION' => $this->lang['version'], 'YEAR' => date("Y"), - 'L_TIME_RUN' => $lang->lang['time_run'], - 'L_SEC' => $lang->lang['Sec'] + 'L_TIME_RUN' => $this->lang['time_run'], + 'L_SEC' => $this->lang['Sec'] )); $template->parse("ah"); } @@ -472,7 +470,6 @@ * This function logs you in, according to what is given in GET/POST vars. */ function login($goto = "index.php"){ - global $lang; if($this->is_login()){ return false; }else{ @@ -487,7 +484,7 @@ loc($goto); die; }else{ - trigger_error($lang->lang['pass_error']); + trigger_error($this->lang['pass_error']); } } } @@ -509,7 +506,7 @@ * */ function login_form($res="index.php"){ - global $template,$lang; + global $template; $this->adminheader(); if(isset($_POST['uname'])){ $this->login(); @@ -517,10 +514,10 @@ $template->add_file(array("body"=>"login.html")); $template->assign(array( "action" => $res, - "L_LOGIN" => $lang->lang['Stats_Login'], - "L_UNAME" => $lang->lang['Stats_Uname'], - "L_PASS" => $lang->lang['Stats_Pass'], - "L_AUTOLOGIN" => $lang->lang['Stats_Autologin'], + "L_LOGIN" => $this->lang['Stats_Login'], + "L_UNAME" => $this->lang['Stats_Uname'], + "L_PASS" => $this->lang['Stats_Pass'], + "L_AUTOLOGIN" => $this->lang['Stats_Autologin'], )); $template->parse("body"); $this->adminfooter(); @@ -627,11 +624,11 @@ ); } extract($array); - global $db,$template,$lang; + global $db,$template; $dbt = false; if(!is_object($db) || !$db->is_connect){ //Maybe something wrong in db? - $lang->lang = array(); + $this->lang = array(); define('CRITICAL',true); }else{ @@ -654,11 +651,9 @@ if(!class_exists('RCTSLang')){ include(RCTS_ROOT_PATH . '/includes/classes/class.lang.php'); } - if(!is_object($lang)){ - $lang = new RCTSLang; - + if(!count($this->lang)){ + $this->loadlang(); } - $lang->loadlang(); } $txt = ''; if($dbt){ @@ -667,8 +662,8 @@ $txt .= '<br />SQL error nr: ' . $err[1]; $txt .= '<br />SQL query: ' . $err[2]; }else{ - if(isset($lang->lang[$errmsg])){ - $errmsg = $lang->lang[$errmsg]; + if(isset($this->lang[$errmsg])){ + $errmsg = $this->lang[$errmsg]; } $txt .= $errmsg; } @@ -680,9 +675,9 @@ print "<html><head><title>Critical error</title></head><body>$txt</body></html>"; }else{ if(!defined("IN_ADMIN")){ - pageHeader($lang->lang['error']); + pageHeader($this->lang['error']); }else{ - $this->adminheader($lang->lang['error']); + $this->adminheader($this->lang['error']); } $template->add_file(array('body' => 'error.html')); $template->assign(array( @@ -692,7 +687,7 @@ if(!defined('IN_ADMIN')){ pageFooter(); }else{ - $this->adminfooter($lang->lang['error']); + $this->adminfooter($this->lang['error']); } } die; @@ -773,6 +768,91 @@ } $output .= '</div>'; return $output; - } + } + /* + This functions detects the language of the current user + @return lang in code (nl, en) + */ + function autoDetectLang() { + $handle = opendir(RCTS_ROOT_PATH.'/lang/'); + while (false!==($file = readdir($handle))) { + if ($file != '.' && $file != '..' && is_dir(RCTS_ROOT_PATH.'/lang/'.$file) && $this->check_lang($file)) { + + if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) && substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2) == $file) { + setcookie('lang', $file); + return $file; + } + } + } + return 'en'; + closedir($handle); + } + /* + This function loads al php is the folder of your language + @return nothing + */ + function loadLang(){ + global $db,$pluginsClass; + if(isset($_GET['lang']) || isset($_POST['lang'])){ + setcookie('lang', get_var('lang')); + $taal = get_var('lang'); + }elseif(isset($_COOKIE['lang'])){ + $taal = get_var('lang',false,true); + }else{ + $taal = $this->autoDetectLang(); + } + if(!file_exists(RCTS_ROOT_PATH.'/lang/'.$taal.'/')){ + $taal = $this->autoDetectLang(); + } + $this->use_lang = $taal; + $handle = opendir(RCTS_ROOT_PATH.'/lang/'.$taal.'/'); + while (false!==($file = readdir($handle))) { + if ($file != "." && $file != ".." && eregi(".php",$file) && !eregi(".phps",$file)) { + include(RCTS_ROOT_PATH.'/lang/'.$taal.'/'.$file); + } + } + closedir($handle); + if(!defined('IN_INSTALL')){ + //Load plugin languages + $sql = "SELECT * + FROM + ".RCTS_PLUGINS_TABLE." + WHERE plugin_dhooks LIKE '%StatsLang%'"; + $res = $db->sql_query($sql); + $functions = ''; + $get = ''; + $varinit = ''; + $totalPlugLang = array(); + while ($row = $db->sql_fetchrow($res)) { + $plugin = $pluginsClass->loadPlugin($row['plugin_name']); + $plugLang = $plugin->pluginLang(); + if(is_array($plugLang[$taal]) && count($plugLang[$taal])){ + $totalPlugLang = array_merge($totalPlugLang,$plugLang[$taal]); + }elseif(is_array($plugLang['en']) && count($plangLang['en'])){ + $totalPlugLang = array_merge($totalPlugLang,$plugLang['en']); + } + unset($plugin); + } + + $this->lang = array_merge($totalPlugLang,$lang); + + }else{ + $this->lang = $lang; + } + } + function langAvd(){ + $handle = opendir(RCTS_ROOT_PATH.'/lang/'); + $ar = array(); + while (false!==($file = readdir($handle))) { + if ($file != '.' && $file != '..' && is_dir(RCTS_ROOT_PATH.'/lang/'.$file) && $this->check_lang($file)) { + include(RCTS_ROOT_PATH . "/lang/$file/main.php"); + $ar[$file] = $langname; + } + } + return $ar; + } + function check_lang($lang){ + return file_exists(RCTS_ROOT_PATH . "/lang/$lang/main.php"); + } } ?> Modified: trunk/version1.0/includes/classes/class.cron.php =================================================================== --- trunk/version1.0/includes/classes/class.cron.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/includes/classes/class.cron.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -111,8 +111,8 @@ if($x && $y && $z){ print $file; }else{ - global $lang; - $string = $lang->lang['no_st']; + global $core; + $string = $core->lang['no_st']; $im = imagecreate(300,25); $orange = imagecolorallocate($im, 0, 0, 0); $orange = imagecolorallocate($im, 220, 210, 60); @@ -579,7 +579,7 @@ $legends = array(); $colors = array(); foreach ($topLanguages as $info) { - $info['stat_value'] = $info['stat_value']=="UNKNOWN" ? $lang->lang['onbekend'] : $info['stat_value']; + $info['stat_value'] = $info['stat_value']=="UNKNOWN" ? $core->lang['onbekend'] : $info['stat_value']; $legends[] = stripslashes($info['stat_value']); $data[] = $info['stat_count']; } @@ -630,7 +630,7 @@ $legends = array(); $colors = array(); foreach ($topFlash as $info) { - $info['stat_value'] = ($info['stat_value'] == "") ? $lang->lang['no_flash'] : $info['stat_value']; + $info['stat_value'] = ($info['stat_value'] == "") ? $core->lang['no_flash'] : $info['stat_value']; $legends[] = stripslashes(urldecode($info['stat_value'])); $data[] = $info['stat_count']; } @@ -670,7 +670,7 @@ */ function load(){ - global $display,$idid,$template,$lang; + global $display,$idid,$template,$core; $topLoad = $display->getTopTijd(0,$idid,'DESC',true); //var_dump($topLoad); $data = array(); @@ -679,7 +679,7 @@ //foreach($topLoad as $load) { while(list($el,$wa) = each($topLoad)){ $data[] = $wa; - $legends[] = $el . $lang->lang['sec']; + $legends[] = $el . $core->lang['sec']; $colors[] = randomHex(); } foreach($data as $var){ @@ -771,7 +771,7 @@ foreach($days as $dayN=>$count) { - //$namesW = $lang->lang['Days_Of_Week']; + //$namesW = $core->lang['Days_Of_Week']; $dayN = $daynames[$dayN]; $data[$dayN] = $count; } @@ -913,7 +913,7 @@ */ function online(){ - global $idid,$db,$lang,$template; + global $idid,$db,$core,$template; if($idid == 1){$idid=0;} $data = array(); $legends = array(); @@ -930,7 +930,7 @@ while($g = $db->sql_fetchrow($res)){ $t = $g['userTT']; if($t <= 60){ - $tijd["< 1 ".$lang->lang['min']] = (int)$tijd["< 1 ".$lang->lang['min']]+1; + $tijd["< 1 ".$core->lang['min']] = (int)$tijd["< 1 ".$core->lang['min']]+1; }elseif($t > 60 && $t <= 120){ $tijd["1-2"] = (int)$tijd["1-2"]+1; }elseif($t > 120 && $t <= 180){ @@ -970,7 +970,7 @@ }elseif($t > 518400 && $t < 604800){ $tijd["8640-10080"] = (int)$tijd["8640-10080"]+1; //6-7 dagen }else{ - $tijd["> 7 ".$lang->lang['days']] = (int)$tijd["> 7 ".$lang->lang['days']]+1; + $tijd["> 7 ".$core->lang['days']] = (int)$tijd["> 7 ".$core->lang['days']]+1; } } @@ -983,16 +983,16 @@ foreach($vars as $tmp){ if($tmp < 60){ $tmpArray[]=$tmp; - $ex=$lang->lang['min']; + $ex=$core->lang['min']; }else{ $tmp = $tmp / 60; if($tmp < 24){ $tmpArray[]=$tmp; - $ex=$lang->lang['hours']; + $ex=$core->lang['hours']; }else{ $tmp = $tmp / 24; $tmpArray[]=$tmp; - $ex=$lang->lang['days']; + $ex=$core->lang['days']; } } } @@ -1040,7 +1040,7 @@ */ function uniek(){ - global $stats,$idid,$template,$calendar,$lang; + global $stats,$idid,$template,$calendar,$core; $visits = $calendar->get_stats('visitors', $idid, 'all', false, false, -1, false,true,'stat_timestamp'); //Make some new vars :) $week = array(); @@ -1049,7 +1049,7 @@ $jaar = array(); foreach($visits as $i => $row){ $dag = $row['stat_timestamp']; - $week[$lang->lang['Days_Of_Week_Sort'][(date("w",$dag) + 1)]]++; + $week[$core->lang['Days_Of_Week_Sort'][(date("w",$dag) + 1)]]++; $dagen[(date("j",$dag) + 1)]++; $maand[(date("M",$dag) + 1)]++; $jaar[date("Y",$dag)]++; Modified: trunk/version1.0/includes/classes/class.getstats.php =================================================================== --- trunk/version1.0/includes/classes/class.getstats.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/includes/classes/class.getstats.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -129,6 +129,9 @@ $ar = array(); } while(list($el,$wa) = each($ar)){ + if(!isset($return[date("w",$el)])){ + $return[date("w",$el)] = 0; + } $return[date("w",$el)] += $wa; } } @@ -161,6 +164,9 @@ $ar = array(); } while(list($el,$wa) = each($ar)){ + if(!isset($return[date("d",$el)])){ + $return[date("d",$el)] = 0; + } $return[date("d",$el)] += $wa; } } @@ -193,6 +199,9 @@ $ar = array(); } while(list($el,$wa) = each($ar)){ + if(!isset($return[(int)date("m",$el)])){ + $return[(int)date("m",$el)] = 0; + } $return[(int)date("m",$el)] += $wa; } } Deleted: trunk/version1.0/includes/classes/class.lang.php =================================================================== --- trunk/version1.0/includes/classes/class.lang.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/includes/classes/class.lang.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -1,117 +0,0 @@ -<?php -/****************************************************************** -* Really Coding Traffic Statistics 2 -* Begin: October, 3rd 2005 -* Copyright: Copyright 2005 by Really coding Group -****************************************************************** -* lang.php -* **************** -* $Id$ -******************************************************************/ - -/******************************************************************* -* -* 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, or -* (at your option) any later version. -* -*******************************************************************/ -if(!defined('IN_STATS')) -{ - die('Hacking Attempt'); -} -// This class is based on the one in PMS. -class RCTSLang{ - /* - This functions detects the language of the current user - @return lang in code (nl, en) - */ - function autoDetectLang() { - $handle = opendir(RCTS_ROOT_PATH.'/lang/'); - while (false!==($file = readdir($handle))) { - if ($file != '.' && $file != '..' && is_dir(RCTS_ROOT_PATH.'/lang/'.$file) && $this->check_lang($file)) { - - if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) && substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2) == $file) { - setcookie('lang', $file); - return $file; - } - } - } - return 'en'; - closedir($handle); - } - /* - This function loads al php is the folder of your language - @return nothing - */ - function loadLang(){ - global $db,$pluginsClass; - if(isset($_GET['lang']) || isset($_POST['lang'])){ - setcookie('lang', get_var('lang')); - $taal = get_var('lang'); - }elseif(isset($_COOKIE['lang'])){ - $taal = get_var('lang',false,true); - }else{ - $taal = $this->autoDetectLang(); - } - if(!file_exists(RCTS_ROOT_PATH.'/lang/'.$taal.'/')){ - $taal = $this->autoDetectLang(); - } - $this->use_lang = $taal; - $handle = opendir(RCTS_ROOT_PATH.'/lang/'.$taal.'/'); - while (false!==($file = readdir($handle))) { - if ($file != "." && $file != ".." && eregi(".php",$file) && !eregi(".phps",$file)) { - include(RCTS_ROOT_PATH.'/lang/'.$taal.'/'.$file); - } - } - closedir($handle); - if(!defined('IN_INSTALL')){ - //Load plugin languages - $sql = "SELECT * - FROM - ".RCTS_PLUGINS_TABLE." - WHERE plugin_dhooks LIKE '%StatsLang%'"; - $res = $db->sql_query($sql); - if(!$res){ - st_die(SQL,"Could not query plugins for Lang","",__LINE__,__FILE__,$sql); - } - $functions = ''; - $get = ''; - $varinit = ''; - $totalPlugLang = array(); - while ($row = $db->sql_fetchrow($res)) { - $plugin = $pluginsClass->loadPlugin($row['plugin_name']); - $plugLang = $plugin->pluginLang(); - if(is_array($plugLang[$taal]) && count($plugLang[$taal])){ - $totalPlugLang = array_merge($totalPlugLang,$plugLang[$taal]); - }elseif(is_array($plugLang['en']) && count($plangLang['en'])){ - $totalPlugLang = array_merge($totalPlugLang,$plugLang['en']); - } - } - - $this->lang = array_merge($totalPlugLang,$lang); - - }else{ - $this->lang = $lang; - } - } - function langAvd(){ - $handle = opendir(RCTS_ROOT_PATH.'/lang/'); - $ar = array(); - while (false!==($file = readdir($handle))) { - if ($file != '.' && $file != '..' && is_dir(RCTS_ROOT_PATH.'/lang/'.$file)) { - if($this->check_lang($file)){ - include(RCTS_ROOT_PATH . "/lang/$file/main.php"); - $ar[$file] = $langname; - } - } - } - return $ar; - } - function check_lang($lang){ - return file_exists(RCTS_ROOT_PATH . "/lang/$lang/main.php"); - } -} - -?> Modified: trunk/version1.0/includes/classes/class.load.php =================================================================== --- trunk/version1.0/includes/classes/class.load.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/includes/classes/class.load.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -91,11 +91,11 @@ $hours = floor($hours - ($days * 24)); $min = floor($min - ($days * 60 * 24) - ($hours * 60)); - global $lang; - $text['days'] = ucfirst($lang->lang['DAYS']);//"Dagen"; - $text['hours'] = ucfirst($lang->lang['hours']);//"Uren"; - $text['minutes'] = ucfirst($lang->lang['min']);//"Minuten"; - $text['seconds'] = ucfirst($lang->lang['sec']);//'Seconden'; + global $core; + $text['days'] = ucfirst($core->lang['DAYS']);//"Dagen"; + $text['hours'] = ucfirst($core->lang['hours']);//"Uren"; + $text['minutes'] = ucfirst($core->lang['min']);//"Minuten"; + $text['seconds'] = ucfirst($core->lang['sec']);//'Seconden'; if ($days != 0) { $result = "$days " . $text['days'] . " "; @@ -133,11 +133,11 @@ } function uptime () { - global $lang; - $text['days'] = ucfirst($lang->lang['DAYS']);//"Dagen"; - $text['hours'] = ucfirst($lang->lang['hours']);//"Uren"; - $text['minutes'] = ucfirst($lang->lang['min']);//"Minuten"; - $text['seconds'] = ucfirst($lang->lang['sec']);//'Seconden'; + global $core; + $text['days'] = ucfirst($core->lang['DAYS']);//"Dagen"; + $text['hours'] = ucfirst($core->lang['hours']);//"Uren"; + $text['minutes'] = ucfirst($core->lang['min']);//"Minuten"; + $text['seconds'] = ucfirst($core->lang['sec']);//'Seconden'; $objInstance = $this->wmi->InstancesOf("Win32_OperatingSystem"); foreach ($objInstance as $obj) { $year = intval(substr($obj->LastBootUpTime, 0, 4)); @@ -206,11 +206,11 @@ class load { function load(){} function uptime () { - global $lang; - $text['days'] = ucfirst($lang->lang['DAYS']);//"Dagen"; - $text['hours'] = ucfirst($lang->lang['hours']);//"Uren"; - $text['minutes'] = ucfirst($lang->lang['min']);//"Minuten"; - $text['seconds'] = ucfirst($lang->lang['sec']);//'Seconden'; + global $core; + $text['days'] = ucfirst($core->lang['DAYS']);//"Dagen"; + $text['hours'] = ucfirst($core->lang['hours']);//"Uren"; + $text['minutes'] = ucfirst($core->lang['min']);//"Minuten"; + $text['seconds'] = ucfirst($core->lang['sec']);//'Seconden'; //Geen /dirname erbij :) if(!file_exists('/proc/uptime')){ return ''; @@ -271,11 +271,11 @@ @return nothing */ function display(){ - global $lang,$text; - $text['days'] = ucfirst($lang->lang['DAYS']);//"Dagen"; - $text['hours'] = ucfirst($lang->lang['hours']);//"Uren"; - $text['minutes'] = ucfirst($lang->lang['min']);//"Minuten"; - $text['seconds'] = ucfirst($lang->lang['sec']);//'Seconden'; + global $core,$text; + $text['days'] = ucfirst($core->lang['DAYS']);//"Dagen"; + $text['hours'] = ucfirst($core->lang['hours']);//"Uren"; + $text['minutes'] = ucfirst($core->lang['min']);//"Minuten"; + $text['seconds'] = ucfirst($core->lang['sec']);//'Seconden'; } /* Ordert the times Modified: trunk/version1.0/includes/classes/class.mailer.php =================================================================== --- trunk/version1.0/includes/classes/class.mailer.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/includes/classes/class.mailer.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -146,7 +146,7 @@ @return true or nothing */ function send($id){ - global $config,$lang; + global $config,$core; if(!isset($this->email[$id])){ st_die(RCTS_GENERAL_ERROR,"Email id doesn't exists."); } Modified: trunk/version1.0/includes/classes/class.module.php =================================================================== --- trunk/version1.0/includes/classes/class.module.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/includes/classes/class.module.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -20,7 +20,7 @@ class module{ var $cache = array(); function load_modules($mode){ - global $db,$core,$cache,$lang; + global $db,$core,$cache,$core; $this->p_class = $mode; //This must really be cached //Will it add later ;) @@ -135,7 +135,7 @@ // We need to prefix the functions to not create a naming conflict $url_func = '_module_' . $row['module_name'] . '_' . $row['module_mode'] . '_url'; - $lang_func = '_module_' . $row['module_name']; + $core_func = '_module_' . $row['module_name']; $names[$row['module_name'] . '_' . $row['module_mode']][] = true; @@ -154,7 +154,7 @@ 'url_extra' => (function_exists($url_func)) ? $url_func() : '', - 'lang' => ($row['module_name'] && function_exists($lang_func)) ? $lang_func($row['module_mode'], $row['module_langname']) : ((!empty($lang->lang[$row['module_langname']])) ? $lang->lang[$row['module_langname']] : $row['module_langname']), + 'lang' => ($row['module_name'] && function_exists($core_func)) ? $core_func($row['module_mode'], $row['module_langname']) : ((!empty($core->lang[$row['module_langname']])) ? $core->lang[$row['module_langname']] : $row['module_langname']), 'langname' => $row['module_langname'], 'left' => $row['module_left'], Modified: trunk/version1.0/includes/classes/class.plugin.php =================================================================== --- trunk/version1.0/includes/classes/class.plugin.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/includes/classes/class.plugin.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -26,20 +26,20 @@ class RCPluginBase { // Plugin data function getPluginName() { - global $lang; - return $lang->lang['un']; + global $core; + return $core->lang['un']; } function getPluginVersion() { - global $lang; - return $lang->lang['un']; + global $core; + return $core->lang['un']; } function getPluginAuthor() { - global $lang; - return $lang->lang['un']; + global $core; + return $core->lang['un']; } function getPluginDesc() { - global $lang; - return $lang->lang['un']; + global $core; + return $core->lang['un']; } function version_info(){ return array('block' => '','file' => ''); Modified: trunk/version1.0/includes/classes/class.stats.php =================================================================== --- trunk/version1.0/includes/classes/class.stats.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/includes/classes/class.stats.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -144,7 +144,7 @@ { $template->block("timerow", array( 'id' => ($i + 1), - 'time' => $topLoad[$i]['stat_value'] ." " . $lang->lang['sec'], + 'time' => $topLoad[$i]['stat_value'] ." " . $core->lang['sec'], 'count' => $topLoad[$i]['stat_count'] )); if($i == 14) @@ -166,28 +166,29 @@ { $template->block("timerow2", array( 'id' => ($i + 1), - 'time' => $topLoad[$i]['stat_value'] ." " . $lang->lang['sec'], + 'time' => $topLoad[$i]['stat_value'] ." " . $core->lang['sec'], 'count' => $topLoad[$i]['stat_count'] )); } - } - $count = $topLoad[$i]['stat_count']; - $name = $topLoad[$i]['stat_value']; - if($count > 1) - { - $t = floatval($name); - $t = floatval($t * floatval($count)); - $j = $j + floatval($count); - } - else - { - $t = floatval($name); - $j++; - } - $time = $time + $t; - if($i == 14) - { - break; + + $count = $topLoad[$i]['stat_count']; + $name = $topLoad[$i]['stat_value']; + if($count > 1) + { + $t = floatval($name); + $t = floatval($t * floatval($count)); + $j = $j + floatval($count); + } + else + { + $t = floatval($name); + $j++; + } + $time = $time + $t; + if($i == 14) + { + break; + } } //Stop LoadTime } @@ -233,7 +234,7 @@ } else { - $loa = $up = $lang->lang['onbekend']; + $loa = $up = $core->lang['onbekend']; } $template->assign(array( 'avload' => $loa, @@ -291,7 +292,7 @@ foreach ($daysW as $day =>$count) { $i++; - $namesW = $lang->lang['Days_Of_Week']; + $namesW = $core->lang['Days_Of_Week']; $day = $namesW[$day]; $template->block("day_w_row", array( 'day' => $day, @@ -350,7 +351,7 @@ foreach ($months as $month=>$count) { $i++; - $monthnames = $lang->lang['Months_of_Year']; + $monthnames = $core->lang['Months_of_Year']; $monthname = $monthnames[$month]; $template->block("monthrow", array( 'month' => $monthname, @@ -394,13 +395,13 @@ $time = human_duration($onlines['userTT']); if($time['days']!=""||$time['days']!=0) { - $days = $time['days'] ." ". $lang->lang['days']; - $hours = $time['hours'].":".$time['minutes'].":".$time['seconds']. " ". $lang->lang['hours']; + $days = $time['days'] ." ". $core->lang['days']; + $hours = $time['hours'].":".$time['minutes'].":".$time['seconds']. " ". $core->lang['hours']; $disp = $days .", ".$hours; } else { - $disp = $time['hours'].":".$time['minutes'].":".$time['seconds']. " ". $lang->lang['hours']; + $disp = $time['hours'].":".$time['minutes'].":".$time['seconds']. " ". $core->lang['hours']; } $template->block("onlinerow", array( 'online' => $disp, @@ -434,13 +435,13 @@ $averagetime = human_duration($averageonline); if($averagetime['days']!=""||$averagetime['days']!=0) { - $days = $averagetime['days'] ." ". $lang->lang['days']; - $hours = $averagetime['hours'].":".$averagetime['minutes'].":".$averagetime['seconds']. " ". $lang->lang['hours']; + $days = $averagetime['days'] ." ". $core->lang['days']; + $hours = $averagetime['hours'].":".$averagetime['minutes'].":".$averagetime['seconds']. " ". $core->lang['hours']; $avgdisp = $days .", ".$hours; } else { - $avgdisp = $averagetime['hours'].":".$averagetime['minutes'].":".$averagetime['seconds']. " ". $lang->lang['hours']; + $avgdisp = $averagetime['hours'].":".$averagetime['minutes'].":".$averagetime['seconds']. " ". $core->lang['hours']; } $template->assign(array('AVERAGE_ONLINE_TIME' => $avgdisp)); } @@ -532,9 +533,9 @@ } print "<num>3</num>"; print "<labels>"; - print "<r1>".$lang->lang['Number_sign']."</r1>"; - print "<r2>".$lang->lang['Entrypage']."</r2>"; - print "<r3>".$lang->lang['Count']."</r3>"; + print "<r1>".$core->lang['Number_sign']."</r1>"; + print "<r2>".$core->lang['Entrypage']."</r2>"; + print "<r3>".$core->lang['Count']."</r3>"; print "</labels>"; print "<img>graph.php?graph=pages</img>"; @@ -555,7 +556,7 @@ //IP alleen voor ingelogde mensen. if(!$config->is()) { - $visit['stat_value'] = $lang->lang['verborgen']; + $visit['stat_value'] = $core->lang['verborgen']; } $total_visit += $visit['stat_count']; $template->block("visitrow", array( @@ -568,7 +569,7 @@ )); } $template->assign(array( - "TOTAL_VISIT" => $lang->lang['totaal_visit'].': ' . $total_visit + "TOTAL_VISIT" => $core->lang['totaal_visit'].': ' . $total_visit )); } function visitsToday_js($idid,$calendar_day) @@ -589,7 +590,7 @@ //IP alleen voor ingelogde mensen. if(!$config->is()) { - $visit['stat_value'] = $lang->lang['verborgen']; + $visit['stat_value'] = $core->lang['verborgen']; } $total_visit += $visit['stat_count']; print $visit['stat_value']; @@ -600,10 +601,10 @@ } print "<num>2</num>"; print "<labels>"; - print "<r1>".$lang->lang['Count']."</r1>"; - print "<r2>".$lang->lang['Ip_add']."</r2>"; + print "<r1>".$core->lang['Count']."</r1>"; + print "<r2>".$core->lang['Ip_add']."</r2>"; print "</labels>"; - print "<txt>".$lang->lang['totaal_visit'].': ' . $total_visit."</txt>"; + print "<txt>".$core->lang['totaal_visit'].': ' . $total_visit."</txt>"; } function last30daysDisp_js($idid,$calendar_day) { @@ -618,7 +619,7 @@ print "<r1>"; $total_visit += $visit['stat_count']; - print date("d",$el)." ".$lang->lang['Months_of_Year'][((int)date("m",$el))]." ".date("Y",$el); + print date("d",$el)." ".$core->lang['Months_of_Year'][((int)date("m",$el))]." ".date("Y",$el); print "</r1><r2>"; print $wa; print "</r2>"; @@ -626,8 +627,8 @@ } print "<num>2</num>"; print "<labels>"; - print "<r1>".$lang->lang['date']."</r1>"; - print "<r2>".$lang->lang['Count']."</r2>"; + print "<r1>".$core->lang['date']."</r1>"; + print "<r2>".$core->lang['Count']."</r2>"; print "<img>graph.php?graph=last30days</img>"; print "</labels>"; @@ -641,7 +642,7 @@ while(list($el,$wa) = each($last_30_days)) { $template -> block("last30daysrow", array( - 'date' => date("d",$el)." ".$lang->lang['Months_of_Year'][((int)date("m",$el))]." ".date("Y",$el), + 'date' => date("d",$el)." ".$core->lang['Months_of_Year'][((int)date("m",$el))]." ".date("Y",$el), 'count' => $wa )); } @@ -724,7 +725,7 @@ foreach ($topLanguages as $info) { $i++; - $info['stat_value'] = $info['stat_value']=="UNKNOWN" ? $lang->lang['onbekend'] : $info['stat_value']; + $info['stat_value'] = $info['stat_value']=="UNKNOWN" ? $core->lang['onbekend'] : $info['stat_value']; $template->block("languagerow", array( 'num' => $i, 'string' => stripslashes($info['stat_value']), @@ -742,7 +743,7 @@ foreach ($topFlash as $info) { $i++; - $info['stat_value'] = ($info['stat_value'] == "") ? $lang->lang['no_flash'] : $info['stat_value']; + $info['stat_value'] = ($info['stat_value'] == "") ? $core->lang['no_flash'] : $info['stat_value']; $template->block("flashrow", array( 'num' => $i, 'string' => stripslashes($info['stat_value']), @@ -758,8 +759,8 @@ // 'body' => 'statsuniek.html' )); $visits = $calendar->get_stats('visitors', $idid, 'all', false, false, -1, false,true,'stat_timestamp'); - $array = array($lang->lang['Pages'],$lang->lang['Ip_add']); - $template->block('table',array('NAME'=>$lang->lang['uniek_vandaag'])); + $array = array($core->lang['Pages'],$core->lang['Ip_add']); + $template->block('table',array('NAME'=>$core->lang['uniek_vandaag'])); $this->prepare('table.kolom',$array); $day = $calendar->get_day_start_time(time()); $total = 0; @@ -784,14 +785,14 @@ } $total++; if(!$config->is_login()){ - $row['stat_value'] = $lang->lang['verborgen']; + $row['stat_value'] = $core->lang['verborgen']; } $array = array($count,$row['stat_value']); $template->block('table.row'); $this->prepare('table.row.kolom',$array); } - $this->prepare('table.extra',array(sprintf($lang->lang['uniek_totaal_vandaag'],$total))); + $this->prepare('table.extra',array(sprintf($core->lang['uniek_totaal_vandaag'],$total))); //Make some new vars :) $week = array(); $dagen = array(); @@ -799,6 +800,18 @@ $jaar = array(); foreach($stat_data as $i => $row){ $dag = $row['stat_timestamp']; + if(!isset($week[date("w",$dag)])){ + $week[date("w",$dag)] = 0; + } + if(!isset($dagen[date("j",$dag)])){ + $dagen[date("j",$dag)] = 0; + } + if(!isset($maand[date("n",$dag)])){ + $maand[date("n",$dag)] = 0; + } + if(!isset($jaar[date("Y",$dag)])){ + $jaar[date("Y",$dag)] = 0; + } $week[date("w",$dag)]++; $dagen[date("j",$dag)]++; $maand[date("n",$dag)]++; @@ -809,8 +822,8 @@ sort($maand); //Weeks :) - $array = array($lang->lang['Day'],$lang->lang['Count'],$lang->lang['Day'],$lang->lang['Count']); - $template->block('table',array('NAME'=>$lang->lang['uniek_per_dag'])); + $array = array($core->lang['Day'],$core->lang['Count'],$core->lang['Day'],$core->lang['Count']); + $template->block('table',array('NAME'=>$core->lang['uniek_per_dag'])); $this->prepare('table.kolom',$array); $template->block('table.img',array("GRAPH"=>'week')); //Let make the table ;) @@ -821,7 +834,7 @@ $array = array(); $template->block("table.row"); } - $array[] = $lang->lang['Days_Of_Week'][$el]; + $array[] = $core->lang['Days_Of_Week'][$el]; $array[] = $wa; if(!$new){ $this->prepare("table.row.kolom",$array); @@ -832,8 +845,8 @@ $this->prepare("table.row.kolom",$array); } //Day's - $array = array($lang->lang['Day'],$lang->lang['Count'],$lang->lang['Day'],$lang->lang['Count']); - $template->block('table',array('NAME'=>$lang->lang['uniek_per_dag2'])); + $array = array($core->lang['Day'],$core->lang['Count'],$core->lang['Day'],$core->lang['Count']); + $template->block('table',array('NAME'=>$core->lang['uniek_per_dag2'])); $this->prepare('table.kolom',$array); $template->block('table.img',array("GRAPH"=>'dag')); @@ -858,8 +871,8 @@ } //Months :) - $array = array($lang->lang['maand2'],$lang->lang['Count'],$lang->lang['maand2'],$lang->lang['Count']); - $template->block('table',array('NAME'=>$lang->lang['uniek_per_maand'])); + $array = array($core->lang['maand2'],$core->lang['Count'],$core->lang['maand2'],$core->lang['Count']); + $template->block('table',array('NAME'=>$core->lang['uniek_per_maand'])); $this->prepare('table.kolom',$array); $template->block('table.img',array("GRAPH"=>'maand')); @@ -872,7 +885,7 @@ $array = array(); $template->block("table.row"); } - $array[] = $lang->lang['Months_of_Year'][$el]; + $array[] = $core->lang['Months_of_Year'][$el]; $array[] = $wa; if(!$new){ $this->prepare("table.row.kolom",$array); @@ -883,8 +896,8 @@ $this->prepare("table.row.kolom",$array); } //Years :) - $array = array($lang->lang['jaar'],$lang->lang['Count'],$lang->lang['jaar'],$lang->lang['Count']); - $template->block('table',array('NAME'=>$lang->lang['uniek_per_jaar'])); + $array = array($core->lang['jaar'],$core->lang['Count'],$core->lang['jaar'],$core->lang['Count']); + $template->block('table',array('NAME'=>$core->lang['uniek_per_jaar'])); $this->prepare('table.kolom',$array); $template->block('table.img',array("GRAPH"=>'jaar')); //Let make the table ;) @@ -915,4 +928,4 @@ } } } -?> \ No newline at end of file +?> Modified: trunk/version1.0/includes/classes/class.viewer.php =================================================================== --- trunk/version1.0/includes/classes/class.viewer.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/includes/classes/class.viewer.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -180,8 +180,8 @@ $ip = $_SERVER['REMOTE_ADDR']; } if (empty($ip)) { - global $lang; - $ip = $lang->lang['network']; + global $core; + $ip = $core->lang['network']; } return $ip; @@ -217,8 +217,8 @@ } else { - global $lang; - return $lang->lang['onbekend']; + global $core; + return $core->lang['onbekend']; } } @@ -236,8 +236,8 @@ } else { - global $lang; - return $lang->lang['onbekend']; + global $core; + return $core->lang['onbekend']; } } /* @@ -263,8 +263,8 @@ } $browser = $data[0] . " v". $data[1]; if($browser==""){ - global $lang; - return $lang->lang['onbekend']; + global $core; + return $core->lang['onbekend']; }else{ return $browser; } @@ -278,8 +278,8 @@ function getOs($data) { $os = $data[5] ." ".$data[6]; if($os==""){ - global $lang; - return $lang->lang['onbekend']; + global $core; + return $core->lang['onbekend']; }else{ return $os; } @@ -298,17 +298,17 @@ //check to see if language is set if ( isset( $_SERVER["HTTP_ACCEPT_LANGUAGE"] ) ) { - $languages = strtolower( $_SERVER["HTTP_ACCEPT_LANGUAGE"] ); - $languages = explode( ",", $languages ); + $coreuages = strtolower( $_SERVER["HTTP_ACCEPT_LANGUAGE"] ); + $coreuages = explode( ",", $coreuages ); - foreach ( $languages as $language_list ) + foreach ( $coreuages as $coreuage_list ) { // pull out the language, place languages into array of full and primary // string structure: $temp_array = array(); // slice out the part before ; on first step, the part before - on second, place into array - $temp_array[0] = substr( $language_list, 0, strcspn( $language_list, ';' ) );//full language - $temp_array[1] = substr( $language_list, 0, 2 );// cut out primary language + $temp_array[0] = substr( $coreuage_list, 0, strcspn( $coreuage_list, ';' ) );//full language + $temp_array[1] = substr( $coreuage_list, 0, 2 );// cut out primary language //place this array into main $user_languages language array $user_languages[] = $temp_array; } @@ -330,8 +330,8 @@ } else// if no languages found { - global $lang; - $user_languages[0] = $lang->lang['onbekend'];//return blank array. + global $core; + $user_languages[0] = $core->lang['onbekend'];//return blank array. } return $user_languages; } Modified: trunk/version1.0/includes/classes/class.wizard.php =================================================================== --- trunk/version1.0/includes/classes/class.wizard.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/includes/classes/class.wizard.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -61,7 +61,7 @@ */ function Wizard($pagename=null) { - global $lang; + global $core; /** This is the prefix that this class will look for to maintain variables persistency */ if(!defined('PREFIX')) define('PREFIX', 'wiz_'); /** In this mode, the wizard component will be displayed by this class */ @@ -84,10 +84,10 @@ $this->nextCaption = 'Next'; $this->prevCaption = 'Prev'; $this->submitCaption = 'OK';*/ - $this->cancelCaption = $lang->lang['Wiz_cancel']; - $this->nextCaption = $lang->lang['Install_Next']; - $this->prevCaption = $lang->lang['Install_Back']; - $this->submitCaption = $lang->lang['Wiz_OK']; + $this->cancelCaption = $core->lang['Wiz_cancel']; + $this->nextCaption = $core->lang['Install_Next']; + $this->prevCaption = $core->lang['Install_Back']; + $this->submitCaption = $core->lang['Wiz_OK']; $this->cancelPage = true; $this->width = 800; $this->height = 600; Modified: trunk/version1.0/includes/functions.php =================================================================== --- trunk/version1.0/includes/functions.php 2006-04-16 20:00:24 UTC (rev 1725) +++ trunk/version1.0/includes/functions.php 2006-04-16 20:37:09 UTC (rev 1726) @@ -46,7 +46,7 @@ @return nothing */ function pageHeader($title = '', $image = ''){ - global $template,$config,$lang,$calendar; + global $template,$config,$core,$calendar; if(defined("header")) return; if(defined("NO_HEAD")) return; define("header",true); @@ -75,10 +75,10 @@ "name" => $themes[$i] )); } - $langs = $lang->langavd(); - while(list($el,$wa) = each($langs)){ + $cores = $core->langavd(); + while(list($el,$wa) = each($cores)){ $template->block("lang",array( - "sel" => ($lang->use_lang == $el) ? "selected='selected'" : '', + "sel" => ($core->use_lang == $el) ? "selected='selected'" : '', "name" => $wa, "value" => $el )); @@ -87,31 +87,31 @@ $template->assign(array( 'title' => $title, 'base' => base(), - 'L_CONF' => $lang->lang['configu'], - 'L_LOGIN' => $lang->lang['login'], - 'SQL_Q' => $lang->lang['sql_q'], + 'L_CONF' => $core->lang['configu'], + 'L_LOGIN' => $core->lang['login'], + 'SQL_Q' => $core->lang['sql_q'], 'TEMPLATE' => (isset($config->config['default_tpl']) && $config->config['default_tpl']) ? $config->config... [truncated message content] |
From: <bas...@us...> - 2006-04-17 18:56:13
|
Revision: 1730 Author: bastimmer Date: 2006-04-17 11:55:39 -0700 (Mon, 17 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1730&view=rev Log Message: ----------- Notices. :) Modified Paths: -------------- trunk/version1.0/includes/functions.php trunk/version1.0/javascript/functions.js trunk/version1.0/lang/en/main.php trunk/version1.0/lang/nl/main.php trunk/version1.0/templates/rcts/footer.html Added Paths: ----------- trunk/version1.0/images/icons/update.png trunk/version1.0/notice.php Added: trunk/version1.0/images/icons/update.png =================================================================== (Binary files differ) Property changes on: trunk/version1.0/images/icons/update.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/version1.0/includes/functions.php =================================================================== --- trunk/version1.0/includes/functions.php 2006-04-17 16:58:03 UTC (rev 1729) +++ trunk/version1.0/includes/functions.php 2006-04-17 18:55:39 UTC (rev 1730) @@ -83,6 +83,16 @@ "value" => $el )); } + // Icons... :) + $notices = ''; + if ($core->is_login()) { + // First, version. :) + include(RCTS_ROOT_PATH . '/cache/version.txt'); + if ($config->config['version'] != $version) { + // Target? :-P + $notices .= '<a href="#" onclick="window.open(\'notice.php?notice=version&version='.$version.'\', \'_rctsnotice\', \'HEIGHT=225,resizable=yes,WIDTH=400\'); "><img src="images/icons/update.png" title="'.$core->lang['Updates_available'].'" alt="'.$core->lang['Updates_available'].'" border="0" /></a>'; + } + } $template->assign(array( 'title' => $title, @@ -113,6 +123,7 @@ 'L_ERROR' => $core->lang['error'], 'L_CALENDAR' => $core->lang['calendar'], 'HEADER_ICON' => (!empty($image)) ? '<img src="images/header_icons/'.$image.'.png" alt="'.$title.'" title="'.$title.'" />' : '', + 'NOTICES' => $notices, )); $template->parse("header"); } Modified: trunk/version1.0/javascript/functions.js =================================================================== --- trunk/version1.0/javascript/functions.js 2006-04-17 16:58:03 UTC (rev 1729) +++ trunk/version1.0/javascript/functions.js 2006-04-17 18:55:39 UTC (rev 1730) @@ -27,7 +27,7 @@ var txt = null; var nodetxt = ''; var items_use = new Array(); -var open = 0; +var opened = 0; var pos = new Array(); var in_move = false; var offsetX = 0 @@ -309,7 +309,7 @@ } function down(evt){ - if(open != 0){ + if(opened != 0){ alert(lng['only_when_closed']); return; } @@ -334,7 +334,7 @@ } function move(evt){ - if(open != 0){ + if(opened != 0){ return; } @@ -358,7 +358,7 @@ } } function up(evt){ - if(open != 0){ + if(opened != 0){ return; } evt = (evt) ? evt : event @@ -381,7 +381,7 @@ return false; } function shiftTo(obj, x, y) { - if(open != 0){ + if(opened != 0){ return; } if (obj.moveTo) { @@ -497,12 +497,12 @@ } div2.appendChild(table); div.appendChild(div2); - open++; + opened++; } } function close_it(it){ document.getElementById('item_box_' + it).style.display = 'block'; document.getElementById('item_box_big_' + it).style.display = 'none'; - open--; + opened--; } Modified: trunk/version1.0/lang/en/main.php =================================================================== --- trunk/version1.0/lang/en/main.php 2006-04-17 16:58:03 UTC (rev 1729) +++ trunk/version1.0/lang/en/main.php 2006-04-17 18:55:39 UTC (rev 1730) @@ -67,4 +67,10 @@ $lang['calendar'] = 'Calendar'; $lang['uniek'] = 'Unique visitors'; $lang['uniek_desc'] = 'Unique visitors this month'; + +// Paul is a banana... + +$lang['Updates_available'] = 'Updates are available! Click here for more information.'; +$lang['Updates'] = 'A new version is available'; +$lang['Version_stuff'] = 'A new version of RCTS is available for download. You can find it on <a href="http://www.reallycoding.nl/">the RCTS website</a>. You are now using %s.The latest version is %s.'; ?> Modified: trunk/version1.0/lang/nl/main.php =================================================================== --- trunk/version1.0/lang/nl/main.php 2006-04-17 16:58:03 UTC (rev 1729) +++ trunk/version1.0/lang/nl/main.php 2006-04-17 18:55:39 UTC (rev 1730) @@ -67,4 +67,8 @@ $lang['calendar'] = 'Kalender'; $lang['uniek'] = 'Unieke bezoekers'; $lang['uniek_desc'] = 'Unieke bezoekers deze maand.'; + +$lang['Updates_available'] = 'Er zijn updates! Klik hier voor meer informatie.'; +$lang['Updates'] = 'Er is een nieuwe versie'; +$lang['Version_stuff'] = 'Er is een nieuwe versie van RCTS te downloaden. Deze valt te vinden op <a href="http://www.reallycoding.nl/">de website van RCTS</a>. Je gebruikt nu de versie %s. De nieuwste versie is %s.'; ?> Added: trunk/version1.0/notice.php =================================================================== --- trunk/version1.0/notice.php (rev 0) +++ trunk/version1.0/notice.php 2006-04-17 18:55:39 UTC (rev 1730) @@ -0,0 +1,49 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* stats.php +* **************** +* $Id: stats.php 1682 2006-04-04 20:03:28Z paulsohier $ +******************************************************************/ + +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +define('IN_STATS', true); +define('RCTS_ROOT_PATH', dirname(__FILE__)); +include(RCTS_ROOT_PATH.'/includes/start.php'); +?> +<html> +<head> +<title>Really Coding Traffic Statistics</title> +<link rel="stylesheet" href="templates/rcts/template.css" /> +</head> +<body> +<div class="menu"> +<?php +$notice = get_var('notice'); +switch ($notice) { +case 'version': +?> +<table width="100%" cellpadding="0" cellspacing="0"> +<tr class="tr_kop"> +<td class="td_kop"><?php echo $core->lang['Updates'] ?></td> +</tr> +</table> +<div class="menu_content"> +<?php echo sprintf($core->lang['Version_stuff'], $config->config['version'], get_var('version'));?> +</div> +<?php +} +?> +</div> +</body> +</html> \ No newline at end of file Modified: trunk/version1.0/templates/rcts/footer.html =================================================================== --- trunk/version1.0/templates/rcts/footer.html 2006-04-17 16:58:03 UTC (rev 1729) +++ trunk/version1.0/templates/rcts/footer.html 2006-04-17 18:55:39 UTC (rev 1730) @@ -2,6 +2,12 @@ </div> <div id="right_menu"> + <div class="menu"> + <div class="menu_content"> + {NOTICES} + </div> + </div> + <br /> <div class="menu"> <h3><img src="images/icons/cal.png" alt="{L_CALENDAR}" title="{L_CALENDAR}" /> {L_CALENDAR}</h3> <div class="menu_content"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bas...@us...> - 2006-04-18 08:22:52
|
Revision: 1731 Author: bastimmer Date: 2006-04-18 01:22:33 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1731&view=rev Log Message: ----------- Fixed a graph, and more notices. :) Modified Paths: -------------- trunk/version1.0/includes/classes/class.cron.php trunk/version1.0/includes/functions.php trunk/version1.0/lang/en/main.php trunk/version1.0/lang/nl/main.php trunk/version1.0/notice.php Added Paths: ----------- trunk/version1.0/images/icons/no_stats.png trunk/version1.0/images/icons/ok.png Added: trunk/version1.0/images/icons/no_stats.png =================================================================== (Binary files differ) Property changes on: trunk/version1.0/images/icons/no_stats.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/version1.0/images/icons/ok.png =================================================================== (Binary files differ) Property changes on: trunk/version1.0/images/icons/ok.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/version1.0/includes/classes/class.cron.php =================================================================== --- trunk/version1.0/includes/classes/class.cron.php 2006-04-17 18:55:39 UTC (rev 1730) +++ trunk/version1.0/includes/classes/class.cron.php 2006-04-18 08:22:33 UTC (rev 1731) @@ -773,7 +773,8 @@ { //$namesW = $core->lang['Days_Of_Week']; $dayN = $daynames[$dayN]; - $data[$dayN] = $count; +// $data[$dayN] = $count; + $data[] = array($dayN, $count); } $graph = new PHPlot(400, 200); @@ -783,11 +784,11 @@ $graph->SetXTitle(""); $graph->SetYTitle(""); - $graph->SetNumYTicks(7); + $graph->SetNumYTicks(10); $graph->SetNumXTicks(1); $graph->SetPlotType("bars"); $graph->SetXLabelAngle(45); - $graph->SetDataColors($color); +// $graph->SetDataColors($color); $graph->SetBackgroundColor($template->themeColor['imBG']); $graph->DrawGraph(); @@ -809,23 +810,29 @@ header('Content-Type: image/png'); header("Location: "."./images/small.gif"); }else{ - $colors=array(); + $color = randomDecColor(); + foreach($days as $dayN=>$count) { - $data[$dayN] =$count; - $colors[]=randomDecColor(); + $data[] = array($dayN, $count); } - $bar = new BarGraph(); - $bar->bar_bgcolor = $colors; - $bar->data=$data; - $bar->graph_bgcolor = $template->themeColor['imBG']; - $bar->graph_bordercolor = $template->themeColor['imBGBorder']; - $bar->time_color = $template->themeColor['imText']; - $bar->axis_scalecolor = $template->themeColor['imAxText']; - $bar->bar_width = 17; - $bar->bar_padding = 2; - $bar->scale_roundY=-1; - $bar->DrawGraph(); + + $graph = new PHPlot(400, 200); + $graph->SetDataType("text-data"); + + $graph->SetDataValues($data); + + $graph->SetXTitle(""); + $graph->SetYTitle(""); + $graph->SetNumYTicks(10); + $graph->SetNumXTicks(1); + $graph->SetPlotType("bars"); + $graph->SetXLabelAngle(45); +// $graph->SetDataColors($color); + $graph->SetBackgroundColor($template->themeColor['imBG']); + + $graph->DrawGraph(); + } } /** Modified: trunk/version1.0/includes/functions.php =================================================================== --- trunk/version1.0/includes/functions.php 2006-04-17 18:55:39 UTC (rev 1730) +++ trunk/version1.0/includes/functions.php 2006-04-18 08:22:33 UTC (rev 1731) @@ -85,13 +85,29 @@ } // Icons... :) $notices = ''; + $noticeShown = false; if ($core->is_login()) { // First, version. :) include(RCTS_ROOT_PATH . '/cache/version.txt'); if ($config->config['version'] != $version) { // Target? :-P - $notices .= '<a href="#" onclick="window.open(\'notice.php?notice=version&version='.$version.'\', \'_rctsnotice\', \'HEIGHT=225,resizable=yes,WIDTH=400\'); "><img src="images/icons/update.png" title="'.$core->lang['Updates_available'].'" alt="'.$core->lang['Updates_available'].'" border="0" /></a>'; + $notices .= '<a href="#" onclick="window.open(\'notice.php?notice=version&version='.$version.'\', \'_rctsnotice\', \'HEIGHT=225,resizable=yes,WIDTH=400\'); return false;"><img src="images/icons/update.png" title="'.$core->lang['Updates_available'].'" alt="'.$core->lang['Updates_available'].'" border="0" /></a>'; + $noticeShown = true; } + // Now, the no stats. :) + global $db; + $sql = 'SELECT COUNT(stat_id) AS number FROM '.RCTS_CALENDAR_TABLE; + $res = $db->sql_query($sql); + $row = $db->sql_fetchrow($res); + // Want to see it? Just use ?devaction_nostats :) + if ($row['number'] <= 0 || isset($_GET['devaction_nostats'])) { + $notices .= '<a href="#" onclick="window.open(\'notice.php?notice=statistics\', \'_rctsnotice\', \'HEIGHT=225,resizable=yes,WIDTH=400\'); return false;"><img src="images/icons/no_stats.png" title="'.$core->lang['No_statistics_n'].'" alt="'.$core->lang['No_statistics_n'].'" border="0" /></a>'; + $noticeShown = true; + } + // You won't see this one for a while... + if (!$noticeShown) { + $notices .= '<img src="images/icons/ok.png" alt="'.$core->lang['Everything_OK'].'" title="'.$core->lang['Everything_OK'].'" />'; + } } $template->assign(array( Modified: trunk/version1.0/lang/en/main.php =================================================================== --- trunk/version1.0/lang/en/main.php 2006-04-17 18:55:39 UTC (rev 1730) +++ trunk/version1.0/lang/en/main.php 2006-04-18 08:22:33 UTC (rev 1731) @@ -73,4 +73,7 @@ $lang['Updates_available'] = 'Updates are available! Click here for more information.'; $lang['Updates'] = 'A new version is available'; $lang['Version_stuff'] = 'A new version of RCTS is available for download. You can find it on <a href="http://www.reallycoding.nl/">the RCTS website</a>. You are now using %s.The latest version is %s.'; +$lang['No_statistics_n'] = 'There are no statistics in the database. Click here for help.'; // Notice title +$lang['No_statistics_p'] = 'There are no statistics in the RCTS database. Possible reasons for this are that you have not yet put the code on your website, or there have been no visits. <br />» %sOpen the configuration wizard%s'; // Notice popup +$lang['Everything_OK'] = 'There are no notices available for showing.'; ?> Modified: trunk/version1.0/lang/nl/main.php =================================================================== --- trunk/version1.0/lang/nl/main.php 2006-04-17 18:55:39 UTC (rev 1730) +++ trunk/version1.0/lang/nl/main.php 2006-04-18 08:22:33 UTC (rev 1731) @@ -71,4 +71,8 @@ $lang['Updates_available'] = 'Er zijn updates! Klik hier voor meer informatie.'; $lang['Updates'] = 'Er is een nieuwe versie'; $lang['Version_stuff'] = 'Er is een nieuwe versie van RCTS te downloaden. Deze valt te vinden op <a href="http://www.reallycoding.nl/">de website van RCTS</a>. Je gebruikt nu de versie %s. De nieuwste versie is %s.'; +$lang['No_statistics_n'] = 'Er zijn geen statistieken in de database. Klik hier voor hulp.'; // Notice title +$lang['No_statistics_p'] = 'Er zijn geen statistieken in de RCTS-database. Het kan zijn dat je de code nog niet op je website hebt gezet, of er nog geen bezoeken zijn geweest. <br />» %sOpen de configuratiewizard%s'; // Notice popup +// Who wants to eat Lucas? :) +$lang['Everything_OK'] = 'Er zijn geen meldingen om weer te geven.'; ?> Modified: trunk/version1.0/notice.php =================================================================== --- trunk/version1.0/notice.php 2006-04-17 18:55:39 UTC (rev 1730) +++ trunk/version1.0/notice.php 2006-04-18 08:22:33 UTC (rev 1731) @@ -42,6 +42,19 @@ <?php echo sprintf($core->lang['Version_stuff'], $config->config['version'], get_var('version'));?> </div> <?php +break; +case 'statistics': +?> +<table width="100%" cellpadding="0" cellspacing="0"> +<tr class="tr_kop"> +<td class="td_kop"><?php echo $core->lang['no_st'] ?></td> +</tr> +</table> +<div class="menu_content"> +<?php echo sprintf($core->lang['No_statistics_p'], '<a href="wizz.php" target="_blank">', '</a>');?> +</div> +<?php + } ?> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bas...@us...> - 2006-04-18 15:05:13
|
Revision: 1734 Author: bastimmer Date: 2006-04-18 08:04:24 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1734&view=rev Log Message: ----------- Fixed many things. :) Especially code stuff... :P Modified Paths: -------------- trunk/version1.0/developer/check_lang.php trunk/version1.0/includes/classes/class.3dbargraph.php trunk/version1.0/includes/classes/class.cache.php trunk/version1.0/includes/classes/class.config.php trunk/version1.0/includes/classes/class.core.php trunk/version1.0/includes/classes/class.cron.php trunk/version1.0/includes/classes/class.graph.php trunk/version1.0/includes/classes/class.mailer.php trunk/version1.0/includes/classes/class.phplot.php trunk/version1.0/includes/classes/class.stats.php trunk/version1.0/includes/classes/class.template.php trunk/version1.0/includes/classes/class.viewer.php trunk/version1.0/includes/functions.php trunk/version1.0/includes/modules/acp/acp_header.php trunk/version1.0/includes/modules/acp/acp_tree.php trunk/version1.0/plugins/plugin_ComeFrom/plugin.php trunk/version1.0/plugins/plugin_Follow/plugin.php trunk/version1.0/plugins/plugin_Mysql/plugin.php trunk/version1.0/plugins/plugin_SearchTerms/plugin.php trunk/version1.0/plugins/plugin_UserOptions/plugin.php trunk/version1.0/rss.php Modified: trunk/version1.0/developer/check_lang.php =================================================================== --- trunk/version1.0/developer/check_lang.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/developer/check_lang.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -19,6 +19,7 @@ *******************************************************************/ define('IN_STATS', true); function load($taal){ + $lang = array(); $handle = opendir("../lang/".$taal); while (false!==($file = readdir($handle))) { if ($file != "." && $file != ".." && eregi(".php",$file) && !eregi(".phps",$file)) { Modified: trunk/version1.0/includes/classes/class.3dbargraph.php =================================================================== --- trunk/version1.0/includes/classes/class.3dbargraph.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/includes/classes/class.3dbargraph.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -155,7 +155,7 @@ $x = $this->graph_padding['left'] + (($this->bar_width + ($this->bar_padding * 2)) * ($bar - 1)); //if(imageloadfont(RCTS_FONT_PATH)!=false){ - $y = $this->graph_height - $this->graph_padding['bottom'] + imagefontheight($size)+2; + //}else{ // $y = $this->graph_height - $this->graph_padding['bottom']; //} @@ -169,6 +169,7 @@ $align=0; } $x += imagefontheight($size); + $y = $this->graph_height - $this->graph_padding['bottom'] + imagefontheight($size)+2; $this->__DrawText($text, $x, $y, Modified: trunk/version1.0/includes/classes/class.cache.php =================================================================== --- trunk/version1.0/includes/classes/class.cache.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/includes/classes/class.cache.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -292,7 +292,6 @@ } return true; } - return false; } /** * write() @@ -347,12 +346,12 @@ $this->ftp_parameter['dir'] = (isset($parameter['dir'])) ? $parameter['dir'] : ''; } $file2 = explode("/",$file); - if(isset($parameter['mkdir']) && $parameter['mkdir'] && isset($parameter['dir']) && !file_exists($paramter['dir'])){ + if(isset($parameter['mkdir']) && $parameter['mkdir'] && isset($parameter['dir']) && !file_exists($parameter['dir'])){ $tmp = $this->_mkdir($parameter['dir']); if(!$tmp){ st_die(RCTS_GENERAL_MESSAGE,"Could not create ".$parameter['dir'].".","",__LINE__,__FILE__); } - while(!file_exists($paramter['dir']) && !($tmp = $this->_mkdir($parameter['dir']))){ + while(!file_exists($parameter['dir']) && !($tmp = $this->_mkdir($parameter['dir']))){ if(!$tmp){ st_die(RCTS_GENERAL_MESSAGE,"Could not create ".$parameter['dir'].".","",__LINE__,__FILE__); @@ -386,7 +385,6 @@ } return true; } - return false; } /** * _fwrite() Modified: trunk/version1.0/includes/classes/class.config.php =================================================================== --- trunk/version1.0/includes/classes/class.config.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/includes/classes/class.config.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -261,9 +261,7 @@ } $installedPlugs = array(); while ($row = $db->sql_fetchrow($res)) { - if ($nowInstalled != $row['plugin_name']) { // Could somebody solve the notice? - $plug = $pluginsClass->loadPlugin($row['plugin_name']); - } + $plug = $pluginsClass->loadPlugin($row['plugin_name']); $template->block('pluginlist', array( 'title' => $plug->getPluginName(), 'desc' => $plug->getPluginDesc(), @@ -292,6 +290,7 @@ $res = $db->sql_query($sql); if($db->sql_numrows($res)){ $rowSet = $db->sql_fetchrowset($res); + $i = 0; foreach($rowSet as $row){ $i++; $template->block("header_check", array( Modified: trunk/version1.0/includes/classes/class.core.php =================================================================== --- trunk/version1.0/includes/classes/class.core.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/includes/classes/class.core.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -35,7 +35,11 @@ **/ function core(){ - if(file_exists(RCTS_ROOT_PATH . "/includes/config.php")){ + $database = ''; + $host = ''; + $password = ''; + $username = ''; + if(file_exists(RCTS_ROOT_PATH . "/includes/config.php")){ include(RCTS_ROOT_PATH."/includes/config.php"); } @@ -667,8 +671,8 @@ } $txt .= $errmsg; } - $txt .= '<br />File: ' . $file; - $txt .= '<br />Line: ' . $line; + $txt .= '<br />File: ' . $filename; + $txt .= '<br />Line: ' . $linenum; $txt .= '<br />Backtrace'; $txt .= $this->get_backtrace(); if(defined('CRITICAL')){ @@ -806,6 +810,7 @@ $taal = $this->autoDetectLang(); } $this->use_lang = $taal; + $lang = array(); $handle = opendir(RCTS_ROOT_PATH.'/lang/'.$taal.'/'); while (false!==($file = readdir($handle))) { if ($file != "." && $file != ".." && eregi(".php",$file) && !eregi(".phps",$file)) { @@ -829,7 +834,7 @@ $plugLang = $plugin->pluginLang(); if(is_array($plugLang[$taal]) && count($plugLang[$taal])){ $totalPlugLang = array_merge($totalPlugLang,$plugLang[$taal]); - }elseif(is_array($plugLang['en']) && count($plangLang['en'])){ + }elseif(is_array($plugLang['en']) && count($plugLang['en'])){ $totalPlugLang = array_merge($totalPlugLang,$plugLang['en']); } unset($plugin); @@ -846,6 +851,7 @@ $ar = array(); while (false!==($file = readdir($handle))) { if ($file != '.' && $file != '..' && is_dir(RCTS_ROOT_PATH.'/lang/'.$file) && $this->check_lang($file)) { + $langname = ''; include(RCTS_ROOT_PATH . "/lang/$file/main.php"); $ar[$file] = $langname; } Modified: trunk/version1.0/includes/classes/class.cron.php =================================================================== --- trunk/version1.0/includes/classes/class.cron.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/includes/classes/class.cron.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -213,7 +213,7 @@ { global $stats, $idid, $template,$calendar_day; - $last_visits = $stats->get_last_visits($idid, $calenday_day); + $last_visits = $stats->get_last_visits($idid, $calendar_day); $graph = new PHPlot(400, 200); $data = array(); @@ -929,7 +929,7 @@ $res = $db->sql_query($sql); if(!$res){ - st_die(SQL,"Could not get online time.","",__LINE__,__FILE__,$sql.$PV); + st_die(SQL,"Could not get online time.","",__LINE__,__FILE__,$sql); } $tijd = array(); Modified: trunk/version1.0/includes/classes/class.graph.php =================================================================== --- trunk/version1.0/includes/classes/class.graph.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/includes/classes/class.graph.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -794,6 +794,7 @@ $text = preg_split("/\r?\n/", $text); $data = array(); $section = ''; + $index = 0; for ($i = 0; $i < count($text); $i++) { if (preg_match("/^\s*#/", $text[$i])) { //ignore.. it's just a comment Modified: trunk/version1.0/includes/classes/class.mailer.php =================================================================== --- trunk/version1.0/includes/classes/class.mailer.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/includes/classes/class.mailer.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -64,7 +64,7 @@ @param bcc @return nothing */ - function bcc($id,$cc){ + function bcc($id,$bcc){ $this->cid($id); $this->email[$id]['bcc'][] = $bcc; } Modified: trunk/version1.0/includes/classes/class.phplot.php =================================================================== --- trunk/version1.0/includes/classes/class.phplot.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/includes/classes/class.phplot.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -503,9 +503,6 @@ 'aquamarine1' => array(127, 255, 212) ); return TRUE; - } elseif ($which_color_array === 'large') { // Large color array - include("./rgb.inc.php"); - $this->rgb_array = $RGBArray; } else { // Default to black and white only. $this->rgb_array = array('white' => array(255, 255, 255), 'black' => array(0, 0, 0)); } @@ -649,6 +646,7 @@ function SetDashedStyle($which_ndxcol) { // See SetDefaultDashedStyle() to understand this. + $style = ''; eval ("\$style = $this->default_dashed_style;"); return imagesetstyle($this->img, $style); } @@ -3255,6 +3253,8 @@ */ function DrawDotsError() { + $x_now_pixels = 0; + $this->CheckOption($this->data_type, 'data-data-error', __FUNCTION__); for($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) { @@ -3603,6 +3603,9 @@ return FALSE; } + $lastx = array(); + $lasty = array(); + $start_lines = array_fill(0, $this->records_per_group, FALSE); for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) { @@ -4050,7 +4053,7 @@ function SetAxisFontSize($which_size) { $this->SetFont('x_label', $which_size); - $this->SetFont('y_label', $whic_size); + $this->SetFont('y_label', $which_size); } /*! Modified: trunk/version1.0/includes/classes/class.stats.php =================================================================== --- trunk/version1.0/includes/classes/class.stats.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/includes/classes/class.stats.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -25,6 +25,8 @@ function Blocks() { + $mode = $content = $idid = ''; + //Start Plugins foreach($GLOBALS as $key => $val){global $$key;} $outputBlock = array(); @@ -618,7 +620,7 @@ print "<stats>"; print "<r1>"; - $total_visit += $visit['stat_count']; + $total_visit += $wa; print date("d",$el)." ".$core->lang['Months_of_Year'][((int)date("m",$el))]." ".date("Y",$el); print "</r1><r2>"; print $wa; Modified: trunk/version1.0/includes/classes/class.template.php =================================================================== --- trunk/version1.0/includes/classes/class.template.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/includes/classes/class.template.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -74,6 +74,7 @@ } $this->dir = $dir; if(!defined("IN_INSTALL") && !defined("IN_ADMIN")){ + $themeColor = array(); include($themeFile); $this->themeColor = $themeColor; } @@ -128,6 +129,7 @@ $str = '$this->blocks'; for ($i = 0; $i < $blockcount; $i++) { + $lastiteration = ''; $str .= '[\'' . $blocks[$i] . '\']'; eval('$lastiteration = sizeof(' . $str . ') - 1;'); $str .= '[' . $lastiteration . ']'; Modified: trunk/version1.0/includes/classes/class.viewer.php =================================================================== --- trunk/version1.0/includes/classes/class.viewer.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/includes/classes/class.viewer.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -139,14 +139,6 @@ */ $hour = date("H"); $calendar -> insert_stats('hour', $hour, $idid); - - - /* - // Bot visit count - */ - if ($isBot) { - $calendar -> insert_stats('bot', $botNameVersion, $idid); - } }//end function /* @@ -294,6 +286,7 @@ $complete = ''; $found = false; $user_languages = array(); + $a_languages = array(); include(RCTS_ROOT_PATH.'/staticData/languages.php'); //check to see if language is set if ( isset( $_SERVER["HTTP_ACCEPT_LANGUAGE"] ) ) Modified: trunk/version1.0/includes/functions.php =================================================================== --- trunk/version1.0/includes/functions.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/includes/functions.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -88,6 +88,7 @@ $noticeShown = false; if ($core->is_login()) { // First, version. :) + $version = ''; include(RCTS_ROOT_PATH . '/cache/version.txt'); if ($config->config['version'] != $version) { // Target? :-P Modified: trunk/version1.0/includes/modules/acp/acp_header.php =================================================================== --- trunk/version1.0/includes/modules/acp/acp_header.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/includes/modules/acp/acp_header.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -38,6 +38,7 @@ $sql = "SELECT * FROM ".RCTS_HEADER_CHECK_TABLE." WHERE Status = '2'"; $res = $db->sql_query($sql); if($db->sql_numrows($res)){ + $i = 0; $rowSet = $db->sql_fetchrowset($res); foreach($rowSet as $row){ $i++; Modified: trunk/version1.0/includes/modules/acp/acp_tree.php =================================================================== --- trunk/version1.0/includes/modules/acp/acp_tree.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/includes/modules/acp/acp_tree.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -25,7 +25,7 @@ $sql_table = RCTS_MODULES_TABLE; $db->sql_query('UPDATE '.$sql_table.' SET module_left = 0, module_right = 0'); - $sql_where = ($module_class) ? " WHERE module_class = '" . $db->sql_escape($module_class) . "'" : "WHERE $sql_id = $sql_id"; + $sql_where = "WHERE $sql_id = $sql_id"; // Reset to minimum possible left and right id $sql = "SELECT MIN(module_left) as min_module_left, MIN(module_right) as min_module_right Modified: trunk/version1.0/plugins/plugin_ComeFrom/plugin.php =================================================================== --- trunk/version1.0/plugins/plugin_ComeFrom/plugin.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/plugins/plugin_ComeFrom/plugin.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -93,6 +93,8 @@ var $ip ="";//Ipadres function getInfo() { + $land = array(); // This should not be this, but it is defined nowhere else. + // Maybe time for a new ComeFrom? if($this->controlIP()){ $ex_prov = explode('.', gethostbyaddr($this->ip)); if($ex_prov[0] == $this->ip || $ex_prov[0] == gethostbyaddr($this->ip)){ Modified: trunk/version1.0/plugins/plugin_Follow/plugin.php =================================================================== --- trunk/version1.0/plugins/plugin_Follow/plugin.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/plugins/plugin_Follow/plugin.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -108,7 +108,6 @@ $output = ob_get_contents(); ob_end_clean(); $serArray = serialize($array); - error_reporting($old); $p = array( "mkdir" => true, "dir" => RCTS_ROOT_PATH . '/cache/follow', @@ -154,7 +153,7 @@ $template -> add_file(array( 'body' => '../../plugins/plugin_Follow/templates/main.html' )); - $views = $stats->getViews($mode); + $views = $stats->getViews('Follow'); // Don't know if this is correct. if(is_array($array)){ $map = "<map name='Test' style='border:0'>"; foreach($array as $row) Modified: trunk/version1.0/plugins/plugin_Mysql/plugin.php =================================================================== --- trunk/version1.0/plugins/plugin_Mysql/plugin.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/plugins/plugin_Mysql/plugin.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -349,7 +349,7 @@ 'body' => '../../plugins/plugin_Mysql/templates/statsmysql.html' )); $title = $core->lang['mysql_stats']; - $views = $stats->getViews($mode); + $views = $stats->getViews('Mysql'); // Again, check this. :) $template->assign(array( 'L_BYTES_SEND_RECEIVED' => $core->lang['Bytes_send_received'], 'L_BYTES_SEND_TIME' => $core->lang['Bytes_send_time'], Modified: trunk/version1.0/plugins/plugin_SearchTerms/plugin.php =================================================================== --- trunk/version1.0/plugins/plugin_SearchTerms/plugin.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/plugins/plugin_SearchTerms/plugin.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -188,7 +188,7 @@ $ref = $args['ref']; $search = $this->get_keywords($ref, false); if ($search) { - $sql = "UPDATE ".RCTS_P_SEARCHT_TABLE." SET count = count + 1 WHERE term = '".$entryPage."' && idid = '$idid'"; + $sql = "UPDATE ".RCTS_P_SEARCHT_TABLE." SET count = count + 1 WHERE term = '".$search."' && idid = '$idid'"; if(!$db->sql_query($sql) || !$db->sql_affectedrows()){ $sql = "INSERT INTO ".RCTS_P_SEARCHT_TABLE." (term,count,idid) VALUES ( '".$search[0]."',1,'".$idid."')"; Modified: trunk/version1.0/plugins/plugin_UserOptions/plugin.php =================================================================== --- trunk/version1.0/plugins/plugin_UserOptions/plugin.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/plugins/plugin_UserOptions/plugin.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -150,7 +150,8 @@ return $return; } function eventStatsTable($idid) { - $this->initConstants(); + $this->initConstants(); + $visit = $java = $WMP = $Shockwave = $Realplayer = $QuickTime = $AcrobatReader = $SVGV = 0; $data = $this->getData($idid); foreach($data as $name => $value){$$name=$value;} $ret = array('name' => 'User Adds', @@ -213,6 +214,7 @@ function eventStatsGraph($idid) { global $stats,$template; + $visit = $java = $WMP = $Shockwave = $Realplayer = $QuickTime = $AcrobatReader = $SVGV = 0; $data = $this->getData($idid); foreach($data as $name => $value){$$name=$value;} if(empty($data)){ Modified: trunk/version1.0/rss.php =================================================================== --- trunk/version1.0/rss.php 2006-04-18 10:07:49 UTC (rev 1733) +++ trunk/version1.0/rss.php 2006-04-18 15:04:24 UTC (rev 1734) @@ -38,26 +38,6 @@ $idid = 1; } RSS_write($idid); -function make_rss() -{ - global $db,$multisite; - $idid = $multisite->getIdId($id); - $id = ($idid == 1) ? "Total" : $id; - $file = RCTS_ROOT_PATH . '/cache/' .$id. '.xml'; - if(file_exists($file)){ - $sql = "SELECT * FROM ".RCTS_CACHE_TABLE." WHERE graph = 'RSS' && idid = '$idid'"; - $r = $db->sql_query($sql); - if(!$r){ - st_die(SQL,"Could not select graph cache.","",__LINE__,__FILE__,$sql); - } - $g = $db->sql_fetchrow($r); - if($db->sql_numrows($r) == 0 || $g['tijd'] <= time()){ - RSS_write($idid); - } - }else{ - RSS_write($idid); - } -} function start_rss(){ global $id,$db,$core; //Start RSS feed This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ero...@us...> - 2006-04-20 12:27:53
|
Revision: 1779 Author: eroeling Date: 2006-04-20 05:27:04 -0700 (Thu, 20 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1779&view=rev Log Message: ----------- Conf en confp even tijdelijk terug zodat je de plugins kunt gebruiken, tot dat we helemaal over gaan om de andere methode Added Paths: ----------- trunk/version1.0/conf.php trunk/version1.0/confp.php trunk/version1.0/includes/classes/class.error.php trunk/version1.0/plugins/plugin_Mysql/index.php trunk/version1.0/plugins/plugin_Mysql/rcts_init.php trunk/version1.0/plugins/plugin_Mysql/rcts_tabels.php trunk/version1.0/plugins/plugin_Postnuke/index.php trunk/version1.0/plugins/plugin_Postnuke/rcts_init.php trunk/version1.0/plugins/plugin_SearchTerms/index.php trunk/version1.0/plugins/plugin_SearchTerms/rcts_init.php trunk/version1.0/plugins/plugin_UserOptions/index.php trunk/version1.0/plugins/plugin_UserOptions/rcts_init.php trunk/version1.0/plugins/plugin_phpbb/index.php trunk/version1.0/plugins/plugin_phpbb/rcts_init.php Added: trunk/version1.0/conf.php =================================================================== --- trunk/version1.0/conf.php (rev 0) +++ trunk/version1.0/conf.php 2006-04-20 12:27:04 UTC (rev 1779) @@ -0,0 +1,29 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* conf.php +* **************** +* $Id: conf.php 1612 2006-03-07 09:41:24Z bastimmer $ +******************************************************************/ + +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +ob_start(); +define('IN_STATS', true); +define('RCTS_ROOT_PATH', dirname(__FILE__)); +include(RCTS_ROOT_PATH.'/includes/start.php'); +//include(RCTS_ROOT_PATH.'/includes/multisite_class.php'); +$multiSite=new multisite; +pageHeader("Config", 'control'); +$config->geef(); +pageFooter(); +?> \ No newline at end of file Added: trunk/version1.0/confp.php =================================================================== --- trunk/version1.0/confp.php (rev 0) +++ trunk/version1.0/confp.php 2006-04-20 12:27:04 UTC (rev 1779) @@ -0,0 +1,29 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* confp.php +* **************** +* $Id: confp.php 1344 2006-01-14 18:04:32Z paulsohier $ +******************************************************************/ + +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +ob_start(); +define('IN_STATS', true); +define('RCTS_ROOT_PATH', dirname(__FILE__)); +include(RCTS_ROOT_PATH.'/includes/start.php'); +//include_once(RCTS_ROOT_PATH.'/includes/multisite_class.php'); +$multiSite=new multisite; +pageHeader("Plugin config"); +$config->geefplug(); +pageFooter(); +?> \ No newline at end of file Added: trunk/version1.0/includes/classes/class.error.php =================================================================== --- trunk/version1.0/includes/classes/class.error.php (rev 0) +++ trunk/version1.0/includes/classes/class.error.php 2006-04-20 12:27:04 UTC (rev 1779) @@ -0,0 +1,236 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* class.error.php +* **************** +* $Id: class.error.php 1637 2006-03-22 13:08:21Z paulsohier $ +******************************************************************/ +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +if(!defined('IN_STATS')) +{ + die('Hacking Attempt'); +} +class error{ + function error(){ + $this->rcts_url = 'http://www.reallycoding.nl:80/DW/dw.php'; + $this->cookies = ""; + $this->fields = ""; + //These config values are unset if there is sending a report. + $this->unset = array("ftp_ww","smtp_ww","username","password"); + } + /* + This function send a error message to the RCTS team. + @param: $array to send + @return: Nothing. + */ + function DW($array){ + global $config,$browser; + + if($config){ + $guid = $config->config['installid']; + if(!$guid && !defined("IN_INSTALL")){ + $guid = new Guid(); + $guid->check(); + $guid = $config->config['installid']; + + } + if(!$config->config['use_dw']){ + return; + } + $array['version'] = $config->config['version']; + $array['config'] = $config->config; + //Unset some vars. + for($i = 0; $i < count($this->unset);$i++){ + unset($array['config'][$this->unset[$i]]); + } + }else{ + if(defined("IN_INSTALL")){ + return; + }else{ + include_once(RCTS_ROOT_PATH . "/includes/classes/class.config.php"); + $config = new config; + $config->load(); + return $this->DW($array); + } + } + if(!is_object($browser)){ + $browser = new browser(); + } + $browser->reset(); + $array = serialize($array); + $array = base64_encode($array); + $browser->addField("array",$array); + $browser->addField("guid",$guid); + $browser->addCookie("DW","1"); + $browser->postPage($this->rcts_url); + $data = $browser->showContents(); + if(trim($data) == "0"){ + $this->verstuurd = true; + }else{ + $this->verstuurd = false; + } + } + /* + This is the old st_die function + @param: The array with the message, and some other information + @param: Display a message(By php errors, we don't display them at this moment) + @return: Nothing + */ + function trigger($array,$dis = false){ + if(defined("error")){ + $array['second'] = true; + } + extract($array); + global $db,$template,$lang; + if(!isset($type)){ + $type = 0; + } + if($type != RCTS_CRITICAL_ERROR){//Load not existings objects ONLY when $type isn't RCTS_CRITICAL_ERROR. + if((!is_object($db) || !$db || $db == null) && !defined("IN_INSTALL")){ + include_once(RCTS_ROOT_PATH . "/includes/classes/class.mysql.php"); + include(RCTS_ROOT_PATH . "/includes/config.php"); + $db = new mysql; + //And connecting to mysql + if($db->connect($host,$username,$password,$database) === false){ + //Using st_die give problems with not loaded functions and headers. + print "Could not connect to the database. <br />Mysql error: " . mysql_error(); + exit; + } + } + if(!is_object($lang) || !$lang || $lang == null){ + include_once(RCTS_ROOT_PATH."/includes/classes/class.lang.php"); + $lang = new RCTSLang; + $lang->loadLang(); + } + if((!is_object($template) || !$template || $template == null) && $type != RCTS_CRITICAL_ERROR){ + + include_once(RCTS_ROOT_PATH."/includes/classes/class.template.php"); + $template = new tpl('templates/standaard/'); + } + } + //Don't display the directory! + $file = basename($file); + if($type != SQL){ + $sql = ""; + } + switch($type) + { + case RCTS_INFO: + if($caption == '') + { + $caption = $lang->lang['informatie'];//'Informatie'; + } + break; + case SQL: + if($caption == '') + { + $caption = $lang->lang['sql'];//'SQL fout.'; + } + break; + case RCTS_CRITICAL_ERROR: + //Here we don't use $template! + //(Why not? Because it is possible that it doesn't work correctly.) + if($caption == '') + { + $caption = $lang->lang['crit'];//'Cruciale Fout!'; + } + $error_html = ""; + if($template || defined("header")){ + if(!defined("header")){ + pageHeader($caption); + } + }else{ + $error_html .= "<html>\n<head>\n<title>".$caption."</title>\n</head>\n<body>\n"; + + } + $error_html .= "<h1>".$caption."</h1>\n<p>\n + + ".($error2 != '' ? "<b>".$lang->lang['fout_ontstaan']."</b> <br />\n".$error2 : '')." + ".($line ? "<br />\n<b>".$lang->lang['line']."</b>\n ".$line : '')." + ".($file ? "<br />\n<b>".$lang->lang['file']."</b> ".$file : '')."\n</p>\n"; + print $error_html; + if(defined("header")){ + pageFooter(); + }else{ + print "</body>\n</html>"; + } + exit; + + break; + case RCTS_GENERAL_ERROR: + $dis = false; + default: + if($caption == '') + { + $caption = $lang->lang['alg'];//'Algemene Fout'; + } + break; + } + + $template->block('error',array( + "header" => $caption, + "fout" => $error2 + + )); + $template->assign(array( + "file" => $lang->lang['file'], + "line" => $lang->lang['line'], + "query" => $lang->lang['query'], + "serror" => $lang->lang['serror'] + )); + if($line){ + $template->block('error.regel',array('regel'=>$line)); + } + if($file){ + $template->block('error.bestand',array('bestand'=>$file)); + } + if($sql && $type == SQL){ + $template->block('error.sql'); + if($sql){ + $template->block('error.sql.query',array('query'=>$sql)); + } + $err = $db->sql_error(); + if($err){ + $template->block('error.sql.error',array('sql'=>$err)); + } + global $db; + $err = addslashes($err); + $sql = stripslashes($sql); + $sql = addslashes($sql); + $sql = "INSERT INTO ".RCTS_ERROR_TABLE." + (bestand,regel,query,fout) + VALUES('$file','$line','$sql','$err')"; + $db->sql_query($sql); + return; + } + $this->DW($array); + if(!$dis){ + return; + } + if(defined("error")){ + print("St_die has called multiple. Please check your syntax."); + } + if($type != SQL){ + define("error",true); + } + pageHeader($lang->lang['error']); + pageFooter(); + die; + } + /* + * + * PHP browser function moved to class.browser.php + * + */ +} +?> Added: trunk/version1.0/plugins/plugin_Mysql/index.php =================================================================== --- trunk/version1.0/plugins/plugin_Mysql/index.php (rev 0) +++ trunk/version1.0/plugins/plugin_Mysql/index.php 2006-04-20 12:27:04 UTC (rev 1779) @@ -0,0 +1,217 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* plugin.php +* **************** +* $Id: plugin.php 1734 2006-04-18 15:04:24Z bastimmer $ +******************************************************************/ +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +if(!defined('IN_STATS')) +{ + die('Hacking Attempt'); +} +function Follow_write($imagename,$idid,$file){ + global $db,$cache; + ob_start(); + $array = Follow_doImg($idid); + + $output = ob_get_contents(); + ob_end_clean(); + $serArray = serialize($array); + $p = array( + "mkdir" => true, + "dir" => RCTS_ROOT_PATH . '/cache/follow', + "ftp_mode" => FTP_BINARY + ); + $cache->write($file,"w",4,$p,$output); + $sql = "UPDATE ".RCTS_CACHE_TABLE." SET tijd = " . time() . " WHERE graph = '".$imagename."' && idid = '$idid'"; + if(!$db->sql_query($sql) || !$db->sql_affectedrows()){ + $sql = "INSERT INTO ".RCTS_CACHE_TABLE." (graph,tijd,idid,extra) VALUES ( + '".$imagename."',".time().",'".$idid."','".$serArray."')"; + if(!$db->sql_query($sql)) + { + st_die(SQL, "Could not update page", '', __LINE__, __FILE__, $sql); + } + } + return $array; + } + function Follow_menu() { + global $template,$stats,$core,$cache,$idid,$db; + //First make the picture + $page = Follow_getPage(); + $imagename = Follow_makeImageName($page); + $file = RCTS_ROOT_PATH . '/cache/follow/follow_'.$imagename.'.png'; + if(file_exists($file)){ + $sql = "SELECT * FROM ".RCTS_CACHE_TABLE." WHERE graph = '".$imagename."' && idid = '$idid'"; + $r = $db->sql_query($sql); + if(!$r){ + st_die(SQL,"Could not select graph cache.","",__LINE__,__FILE__,$sql); + } + $g = $db->sql_fetchrow($r); + $secAdd = 60*$config->config['image_catch']; + if($secAdd==0){$secAdd=60;} + if($db->sql_numrows($r) == 0 || $g['tijd'] <= (time()-$secAdd)){ + $array = Follow_write($imagename,$idid,$file); + }else{ + $array = unserialize($g['extra']); + } + }else{ + $array = Follow_write($imagename,$idid,$file); + } + //And now fil the template + $template -> add_file(array( + 'body' => '../../plugins/plugin_Follow/templates/main.html' + )); + $views = $stats->getViews('Follow'); // Don't know if this is correct. + if(is_array($array)){ + $map = "<map name='Test' style='border:0'>"; + foreach($array as $row) + { + list($xText,$yText,$x2,$y2,$name) = $row; + + $map .= '<area coords="'.$xText.','.$yText.','.$x2.','.$y2.'" href="stats.php?mode=Follow&page='.$name.'" title="'.$name.'" alt="'.$name.'" />'; + } + $map .= "</map>"; + } + $template->assign(array( + 'MAP' => $map, + 'page' => $_GET['page'] + )); + } + function Follow_graph($idid) + { + global $core; + $page = Follow_getPage(); + $imagename = Follow_makeImageName($page); + $file = RCTS_ROOT_PATH . '/cache/follow/follow_'.$imagename.'.png'; + + header('Cache-control: no-cache, no-store'); + header('Content-Type: image/png'); + + $x = file_exists($file); + //Voor zekerheid! + @clearstatcache(); + $y = @filesize($file); + $y = ($y > 0); + if(!$y){ + unlink($file); + } + if($x){ + $file = file_get_contents($file); + $z = (strlen($file) > 0); + } + + if($x && $y && $z){ + print $file; + }else{ + global $core; + $string = $core->lang['no_st']; + $im = imagecreate(300,25); + $orange = imagecolorallocate($im, 0, 0, 0); + $orange = imagecolorallocate($im, 220, 210, 60); + $px = (imagesx($im) - 7.5 * strlen($string)) / 2; + imagestring($im, 3, $px, 9, $string, $orange); + imagepng($im); + } + die; + } + function Follow_makeImageName($page) + { + $search=array('/','\\',':','*','<','>','?','"'); + $replace=array('','','','','','','',''); + $page = str_replace($search,$replace,$page); + return $page; + } + function Follow_getPage(){ + global $db,$constants; + if(!isset($_GET['page'])){ + $page = ""; + }else{ + $page = $_GET['page']; + } + + if($page=="" || !isset($page)){ + $sql = "SELECT `from` FROM ".$constants['FOLLOW_TABLE']." WHERE `from` LIKE '%index.%' Limit 1"; + $res = $db->sql_query($sql); + $row = $db->sql_fetchrow($res); + $page = $row['from']; + } + return $page; + } + function Follow_doImg($idid) + { + global $template,$db,$constants; + define('MAPROOT',dirname(__FILE__)); + include(MAPROOT."/class.siteMap.php"); + $page = Follow_getPage(); + $test = new WebSiteMap; + //from to id + $sql = "SELECT t1.`stat_count`, t2.`to` FROM ".$constants['FOLLOW_TABLE']." as t1, + ".$constants['FOLLOW_TABLE']." as t2 + WHERE t1.`stat_value` = t2.`id` AND + t1.`stat_type` = 'follow' AND + t2.`from` = '".$page."' AND + t1.`idid` = '".$idid."' + "; + $sql2 = "SELECT t1.`stat_count`, t2.`from` FROM ".$constants['FOLLOW_TABLE']." as t1, + ".$constants['FOLLOW_TABLE']." as t2 + WHERE t1.`stat_value` = t2.`id` AND + t1.`stat_type` = 'follow' AND + t2.`to` = '".$page."' AND + t1.`idid` = '".$idid."' + "; + $res1 = $db->sql_query($sql); + $res2 = $db->sql_query($sql2); + if(!$res1){ + st_die(SQL,"Could not select from","",__LINE__,__FILE__,$sql); + } + if(!$res2){ + st_die(SQL,"Could not select to","",__LINE__,__FILE__,$sql2); + } + $from = $to = array(); + while($row = $db->sql_fetchrow($res1)) + { + $from[$row['to']] += $row['stat_count']; + } + while($row = $db->sql_fetchrow($res2)) + { + $to[$row['from']] += $row['stat_count']; + } + $temp = array(); + foreach($from as $goto => $countFrom) + { + if($goto != $page){ + if(isset($to[$goto])){ + $countTo=$to[$goto]; + }else{ + $countTo='0'; + } + $array = array($page,$goto,$countFrom,$countTo); + $temp[]=$array; + } + } + foreach($to as $comeFrom => $countTo) + { + if($comeFrom != $page){ + if(!isset($from[$comeFrom])){ + $array = array($page,$comeFrom,0,$countTo); + $temp[]=$array; + } + } + } + $test->bgColor = $template->themeColor['imBG']; + $test->pages = $temp; + $test->main= $page; + return $test->doMake(); + } +?> Added: trunk/version1.0/plugins/plugin_Mysql/rcts_init.php =================================================================== --- trunk/version1.0/plugins/plugin_Mysql/rcts_init.php (rev 0) +++ trunk/version1.0/plugins/plugin_Mysql/rcts_init.php 2006-04-20 12:27:04 UTC (rev 1779) @@ -0,0 +1,56 @@ +<?PHP +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* rcts_init.php +* **************** +* $Id: plugin.php 1734 2006-04-18 15:04:24Z bastimmer $ +******************************************************************/ +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +if(!defined('IN_STATS')) +{ + die('Hacking Attempt'); +} +// Install event + function Follow_installPlugin() + { + $pluginName = 'Follow'; + $sql = "CREATE TABLE `".$mysql_prefix."follow` ( + `id` bigint(21) NOT NULL auto_increment, + `from` varchar(255) NOT NULL, + `to` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +);"; + if (!$db->sql_query($sql)) { + st_die(SQL,"Could not create table","",__LINE__,__FILE__,$sql); + } + SetPluginHooks($pluginName,array('StatsGather'); // Hooks, such as gatherViewerStats. + createOption("menu_Follow", "menu", "Page Following", "Follow", "Follow"); + } + + // Uninstall event + function Follow_uninstallPlugin() + { + global $db, $mysql_prefix; + // Perform queries here! + $sql = "DROP TABLE `".$mysql_prefix."follow`;"; + if (!$db->sql_query($sql)) { + st_die(SQL,"Could not drop table","",__LINE__,__FILE__,$sql); + } + dropVars('Follow'); + } + //Update function + function Follow_updatePlugin($version) + { + + } +?> \ No newline at end of file Added: trunk/version1.0/plugins/plugin_Mysql/rcts_tabels.php =================================================================== --- trunk/version1.0/plugins/plugin_Mysql/rcts_tabels.php (rev 0) +++ trunk/version1.0/plugins/plugin_Mysql/rcts_tabels.php 2006-04-20 12:27:04 UTC (rev 1779) @@ -0,0 +1,34 @@ +<?PHP +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* rcts_tabels.php +* **************** +* $Id: class.plugin.php 1726 2006-04-16 20:37:09Z paulsohier $ +******************************************************************/ + +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +// This is the base class, which all plugins must use! +if(!defined('IN_STATS')) +{ + die('Hacking Attempt'); +} +function get_Follow_Constants() +{ + global $mysql_prefix; + $constants= array(); + $constants['FOLLOW_TABLE'] = $mysql_prefix.'follow'; + return $constats; + +} + +?> \ No newline at end of file Added: trunk/version1.0/plugins/plugin_Postnuke/index.php =================================================================== --- trunk/version1.0/plugins/plugin_Postnuke/index.php (rev 0) +++ trunk/version1.0/plugins/plugin_Postnuke/index.php 2006-04-20 12:27:04 UTC (rev 1779) @@ -0,0 +1,217 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* plugin.php +* **************** +* $Id: plugin.php 1734 2006-04-18 15:04:24Z bastimmer $ +******************************************************************/ +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +if(!defined('IN_STATS')) +{ + die('Hacking Attempt'); +} +function Follow_write($imagename,$idid,$file){ + global $db,$cache; + ob_start(); + $array = Follow_doImg($idid); + + $output = ob_get_contents(); + ob_end_clean(); + $serArray = serialize($array); + $p = array( + "mkdir" => true, + "dir" => RCTS_ROOT_PATH . '/cache/follow', + "ftp_mode" => FTP_BINARY + ); + $cache->write($file,"w",4,$p,$output); + $sql = "UPDATE ".RCTS_CACHE_TABLE." SET tijd = " . time() . " WHERE graph = '".$imagename."' && idid = '$idid'"; + if(!$db->sql_query($sql) || !$db->sql_affectedrows()){ + $sql = "INSERT INTO ".RCTS_CACHE_TABLE." (graph,tijd,idid,extra) VALUES ( + '".$imagename."',".time().",'".$idid."','".$serArray."')"; + if(!$db->sql_query($sql)) + { + st_die(SQL, "Could not update page", '', __LINE__, __FILE__, $sql); + } + } + return $array; + } + function Follow_menu() { + global $template,$stats,$core,$cache,$idid,$db; + //First make the picture + $page = Follow_getPage(); + $imagename = Follow_makeImageName($page); + $file = RCTS_ROOT_PATH . '/cache/follow/follow_'.$imagename.'.png'; + if(file_exists($file)){ + $sql = "SELECT * FROM ".RCTS_CACHE_TABLE." WHERE graph = '".$imagename."' && idid = '$idid'"; + $r = $db->sql_query($sql); + if(!$r){ + st_die(SQL,"Could not select graph cache.","",__LINE__,__FILE__,$sql); + } + $g = $db->sql_fetchrow($r); + $secAdd = 60*$config->config['image_catch']; + if($secAdd==0){$secAdd=60;} + if($db->sql_numrows($r) == 0 || $g['tijd'] <= (time()-$secAdd)){ + $array = Follow_write($imagename,$idid,$file); + }else{ + $array = unserialize($g['extra']); + } + }else{ + $array = Follow_write($imagename,$idid,$file); + } + //And now fil the template + $template -> add_file(array( + 'body' => '../../plugins/plugin_Follow/templates/main.html' + )); + $views = $stats->getViews('Follow'); // Don't know if this is correct. + if(is_array($array)){ + $map = "<map name='Test' style='border:0'>"; + foreach($array as $row) + { + list($xText,$yText,$x2,$y2,$name) = $row; + + $map .= '<area coords="'.$xText.','.$yText.','.$x2.','.$y2.'" href="stats.php?mode=Follow&page='.$name.'" title="'.$name.'" alt="'.$name.'" />'; + } + $map .= "</map>"; + } + $template->assign(array( + 'MAP' => $map, + 'page' => $_GET['page'] + )); + } + function Follow_graph($idid) + { + global $core; + $page = Follow_getPage(); + $imagename = Follow_makeImageName($page); + $file = RCTS_ROOT_PATH . '/cache/follow/follow_'.$imagename.'.png'; + + header('Cache-control: no-cache, no-store'); + header('Content-Type: image/png'); + + $x = file_exists($file); + //Voor zekerheid! + @clearstatcache(); + $y = @filesize($file); + $y = ($y > 0); + if(!$y){ + unlink($file); + } + if($x){ + $file = file_get_contents($file); + $z = (strlen($file) > 0); + } + + if($x && $y && $z){ + print $file; + }else{ + global $core; + $string = $core->lang['no_st']; + $im = imagecreate(300,25); + $orange = imagecolorallocate($im, 0, 0, 0); + $orange = imagecolorallocate($im, 220, 210, 60); + $px = (imagesx($im) - 7.5 * strlen($string)) / 2; + imagestring($im, 3, $px, 9, $string, $orange); + imagepng($im); + } + die; + } + function Follow_makeImageName($page) + { + $search=array('/','\\',':','*','<','>','?','"'); + $replace=array('','','','','','','',''); + $page = str_replace($search,$replace,$page); + return $page; + } + function Follow_getPage(){ + global $db,$constants; + if(!isset($_GET['page'])){ + $page = ""; + }else{ + $page = $_GET['page']; + } + + if($page=="" || !isset($page)){ + $sql = "SELECT `from` FROM ".$constants['FOLLOW_TABLE']." WHERE `from` LIKE '%index.%' Limit 1"; + $res = $db->sql_query($sql); + $row = $db->sql_fetchrow($res); + $page = $row['from']; + } + return $page; + } + function Follow_doImg($idid) + { + global $template,$db,$constants; + define('MAPROOT',dirname(__FILE__)); + include(MAPROOT."/class.siteMap.php"); + $page = Follow_getPage(); + $test = new WebSiteMap; + //from to id + $sql = "SELECT t1.`stat_count`, t2.`to` FROM ".$constants['FOLLOW_TABLE']." as t1, + ".$constants['FOLLOW_TABLE']." as t2 + WHERE t1.`stat_value` = t2.`id` AND + t1.`stat_type` = 'follow' AND + t2.`from` = '".$page."' AND + t1.`idid` = '".$idid."' + "; + $sql2 = "SELECT t1.`stat_count`, t2.`from` FROM ".$constants['FOLLOW_TABLE']." as t1, + ".$constants['FOLLOW_TABLE']." as t2 + WHERE t1.`stat_value` = t2.`id` AND + t1.`stat_type` = 'follow' AND + t2.`to` = '".$page."' AND + t1.`idid` = '".$idid."' + "; + $res1 = $db->sql_query($sql); + $res2 = $db->sql_query($sql2); + if(!$res1){ + st_die(SQL,"Could not select from","",__LINE__,__FILE__,$sql); + } + if(!$res2){ + st_die(SQL,"Could not select to","",__LINE__,__FILE__,$sql2); + } + $from = $to = array(); + while($row = $db->sql_fetchrow($res1)) + { + $from[$row['to']] += $row['stat_count']; + } + while($row = $db->sql_fetchrow($res2)) + { + $to[$row['from']] += $row['stat_count']; + } + $temp = array(); + foreach($from as $goto => $countFrom) + { + if($goto != $page){ + if(isset($to[$goto])){ + $countTo=$to[$goto]; + }else{ + $countTo='0'; + } + $array = array($page,$goto,$countFrom,$countTo); + $temp[]=$array; + } + } + foreach($to as $comeFrom => $countTo) + { + if($comeFrom != $page){ + if(!isset($from[$comeFrom])){ + $array = array($page,$comeFrom,0,$countTo); + $temp[]=$array; + } + } + } + $test->bgColor = $template->themeColor['imBG']; + $test->pages = $temp; + $test->main= $page; + return $test->doMake(); + } +?> Added: trunk/version1.0/plugins/plugin_Postnuke/rcts_init.php =================================================================== --- trunk/version1.0/plugins/plugin_Postnuke/rcts_init.php (rev 0) +++ trunk/version1.0/plugins/plugin_Postnuke/rcts_init.php 2006-04-20 12:27:04 UTC (rev 1779) @@ -0,0 +1,56 @@ +<?PHP +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* rcts_init.php +* **************** +* $Id: plugin.php 1734 2006-04-18 15:04:24Z bastimmer $ +******************************************************************/ +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +if(!defined('IN_STATS')) +{ + die('Hacking Attempt'); +} +// Install event + function Follow_installPlugin() + { + $pluginName = 'Follow'; + $sql = "CREATE TABLE `".$mysql_prefix."follow` ( + `id` bigint(21) NOT NULL auto_increment, + `from` varchar(255) NOT NULL, + `to` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +);"; + if (!$db->sql_query($sql)) { + st_die(SQL,"Could not create table","",__LINE__,__FILE__,$sql); + } + SetPluginHooks($pluginName,array('StatsGather'); // Hooks, such as gatherViewerStats. + createOption("menu_Follow", "menu", "Page Following", "Follow", "Follow"); + } + + // Uninstall event + function Follow_uninstallPlugin() + { + global $db, $mysql_prefix; + // Perform queries here! + $sql = "DROP TABLE `".$mysql_prefix."follow`;"; + if (!$db->sql_query($sql)) { + st_die(SQL,"Could not drop table","",__LINE__,__FILE__,$sql); + } + dropVars('Follow'); + } + //Update function + function Follow_updatePlugin($version) + { + + } +?> \ No newline at end of file Added: trunk/version1.0/plugins/plugin_SearchTerms/index.php =================================================================== --- trunk/version1.0/plugins/plugin_SearchTerms/index.php (rev 0) +++ trunk/version1.0/plugins/plugin_SearchTerms/index.php 2006-04-20 12:27:04 UTC (rev 1779) @@ -0,0 +1,217 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* plugin.php +* **************** +* $Id: plugin.php 1734 2006-04-18 15:04:24Z bastimmer $ +******************************************************************/ +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +if(!defined('IN_STATS')) +{ + die('Hacking Attempt'); +} +function Follow_write($imagename,$idid,$file){ + global $db,$cache; + ob_start(); + $array = Follow_doImg($idid); + + $output = ob_get_contents(); + ob_end_clean(); + $serArray = serialize($array); + $p = array( + "mkdir" => true, + "dir" => RCTS_ROOT_PATH . '/cache/follow', + "ftp_mode" => FTP_BINARY + ); + $cache->write($file,"w",4,$p,$output); + $sql = "UPDATE ".RCTS_CACHE_TABLE." SET tijd = " . time() . " WHERE graph = '".$imagename."' && idid = '$idid'"; + if(!$db->sql_query($sql) || !$db->sql_affectedrows()){ + $sql = "INSERT INTO ".RCTS_CACHE_TABLE." (graph,tijd,idid,extra) VALUES ( + '".$imagename."',".time().",'".$idid."','".$serArray."')"; + if(!$db->sql_query($sql)) + { + st_die(SQL, "Could not update page", '', __LINE__, __FILE__, $sql); + } + } + return $array; + } + function Follow_menu() { + global $template,$stats,$core,$cache,$idid,$db; + //First make the picture + $page = Follow_getPage(); + $imagename = Follow_makeImageName($page); + $file = RCTS_ROOT_PATH . '/cache/follow/follow_'.$imagename.'.png'; + if(file_exists($file)){ + $sql = "SELECT * FROM ".RCTS_CACHE_TABLE." WHERE graph = '".$imagename."' && idid = '$idid'"; + $r = $db->sql_query($sql); + if(!$r){ + st_die(SQL,"Could not select graph cache.","",__LINE__,__FILE__,$sql); + } + $g = $db->sql_fetchrow($r); + $secAdd = 60*$config->config['image_catch']; + if($secAdd==0){$secAdd=60;} + if($db->sql_numrows($r) == 0 || $g['tijd'] <= (time()-$secAdd)){ + $array = Follow_write($imagename,$idid,$file); + }else{ + $array = unserialize($g['extra']); + } + }else{ + $array = Follow_write($imagename,$idid,$file); + } + //And now fil the template + $template -> add_file(array( + 'body' => '../../plugins/plugin_Follow/templates/main.html' + )); + $views = $stats->getViews('Follow'); // Don't know if this is correct. + if(is_array($array)){ + $map = "<map name='Test' style='border:0'>"; + foreach($array as $row) + { + list($xText,$yText,$x2,$y2,$name) = $row; + + $map .= '<area coords="'.$xText.','.$yText.','.$x2.','.$y2.'" href="stats.php?mode=Follow&page='.$name.'" title="'.$name.'" alt="'.$name.'" />'; + } + $map .= "</map>"; + } + $template->assign(array( + 'MAP' => $map, + 'page' => $_GET['page'] + )); + } + function Follow_graph($idid) + { + global $core; + $page = Follow_getPage(); + $imagename = Follow_makeImageName($page); + $file = RCTS_ROOT_PATH . '/cache/follow/follow_'.$imagename.'.png'; + + header('Cache-control: no-cache, no-store'); + header('Content-Type: image/png'); + + $x = file_exists($file); + //Voor zekerheid! + @clearstatcache(); + $y = @filesize($file); + $y = ($y > 0); + if(!$y){ + unlink($file); + } + if($x){ + $file = file_get_contents($file); + $z = (strlen($file) > 0); + } + + if($x && $y && $z){ + print $file; + }else{ + global $core; + $string = $core->lang['no_st']; + $im = imagecreate(300,25); + $orange = imagecolorallocate($im, 0, 0, 0); + $orange = imagecolorallocate($im, 220, 210, 60); + $px = (imagesx($im) - 7.5 * strlen($string)) / 2; + imagestring($im, 3, $px, 9, $string, $orange); + imagepng($im); + } + die; + } + function Follow_makeImageName($page) + { + $search=array('/','\\',':','*','<','>','?','"'); + $replace=array('','','','','','','',''); + $page = str_replace($search,$replace,$page); + return $page; + } + function Follow_getPage(){ + global $db,$constants; + if(!isset($_GET['page'])){ + $page = ""; + }else{ + $page = $_GET['page']; + } + + if($page=="" || !isset($page)){ + $sql = "SELECT `from` FROM ".$constants['FOLLOW_TABLE']." WHERE `from` LIKE '%index.%' Limit 1"; + $res = $db->sql_query($sql); + $row = $db->sql_fetchrow($res); + $page = $row['from']; + } + return $page; + } + function Follow_doImg($idid) + { + global $template,$db,$constants; + define('MAPROOT',dirname(__FILE__)); + include(MAPROOT."/class.siteMap.php"); + $page = Follow_getPage(); + $test = new WebSiteMap; + //from to id + $sql = "SELECT t1.`stat_count`, t2.`to` FROM ".$constants['FOLLOW_TABLE']." as t1, + ".$constants['FOLLOW_TABLE']." as t2 + WHERE t1.`stat_value` = t2.`id` AND + t1.`stat_type` = 'follow' AND + t2.`from` = '".$page."' AND + t1.`idid` = '".$idid."' + "; + $sql2 = "SELECT t1.`stat_count`, t2.`from` FROM ".$constants['FOLLOW_TABLE']." as t1, + ".$constants['FOLLOW_TABLE']." as t2 + WHERE t1.`stat_value` = t2.`id` AND + t1.`stat_type` = 'follow' AND + t2.`to` = '".$page."' AND + t1.`idid` = '".$idid."' + "; + $res1 = $db->sql_query($sql); + $res2 = $db->sql_query($sql2); + if(!$res1){ + st_die(SQL,"Could not select from","",__LINE__,__FILE__,$sql); + } + if(!$res2){ + st_die(SQL,"Could not select to","",__LINE__,__FILE__,$sql2); + } + $from = $to = array(); + while($row = $db->sql_fetchrow($res1)) + { + $from[$row['to']] += $row['stat_count']; + } + while($row = $db->sql_fetchrow($res2)) + { + $to[$row['from']] += $row['stat_count']; + } + $temp = array(); + foreach($from as $goto => $countFrom) + { + if($goto != $page){ + if(isset($to[$goto])){ + $countTo=$to[$goto]; + }else{ + $countTo='0'; + } + $array = array($page,$goto,$countFrom,$countTo); + $temp[]=$array; + } + } + foreach($to as $comeFrom => $countTo) + { + if($comeFrom != $page){ + if(!isset($from[$comeFrom])){ + $array = array($page,$comeFrom,0,$countTo); + $temp[]=$array; + } + } + } + $test->bgColor = $template->themeColor['imBG']; + $test->pages = $temp; + $test->main= $page; + return $test->doMake(); + } +?> Added: trunk/version1.0/plugins/plugin_SearchTerms/rcts_init.php =================================================================== --- trunk/version1.0/plugins/plugin_SearchTerms/rcts_init.php (rev 0) +++ trunk/version1.0/plugins/plugin_SearchTerms/rcts_init.php 2006-04-20 12:27:04 UTC (rev 1779) @@ -0,0 +1,56 @@ +<?PHP +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* rcts_init.php +* **************** +* $Id: plugin.php 1734 2006-04-18 15:04:24Z bastimmer $ +******************************************************************/ +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +if(!defined('IN_STATS')) +{ + die('Hacking Attempt'); +} +// Install event + function Follow_installPlugin() + { + $pluginName = 'Follow'; + $sql = "CREATE TABLE `".$mysql_prefix."follow` ( + `id` bigint(21) NOT NULL auto_increment, + `from` varchar(255) NOT NULL, + `to` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +);"; + if (!$db->sql_query($sql)) { + st_die(SQL,"Could not create table","",__LINE__,__FILE__,$sql); + } + SetPluginHooks($pluginName,array('StatsGather'); // Hooks, such as gatherViewerStats. + createOption("menu_Follow", "menu", "Page Following", "Follow", "Follow"); + } + + // Uninstall event + function Follow_uninstallPlugin() + { + global $db, $mysql_prefix; + // Perform queries here! + $sql = "DROP TABLE `".$mysql_prefix."follow`;"; + if (!$db->sql_query($sql)) { + st_die(SQL,"Could not drop table","",__LINE__,__FILE__,$sql); + } + dropVars('Follow'); + } + //Update function + function Follow_updatePlugin($version) + { + + } +?> \ No newline at end of file Added: trunk/version1.0/plugins/plugin_UserOptions/index.php =================================================================== --- trunk/version1.0/plugins/plugin_UserOptions/index.php (rev 0) +++ trunk/version1.0/plugins/plugin_UserOptions/index.php 2006-04-20 12:27:04 UTC (rev 1779) @@ -0,0 +1,217 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* plugin.php +* **************** +* $Id: plugin.php 1734 2006-04-18 15:04:24Z bastimmer $ +******************************************************************/ +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +if(!defined('IN_STATS')) +{ + die('Hacking Attempt'); +} +function Follow_write($imagename,$idid,$file){ + global $db,$cache; + ob_start(); + $array = Follow_doImg($idid); + + $output = ob_get_contents(); + ob_end_clean(); + $serArray = serialize($array); + $p = array( + "mkdir" => true, + "dir" => RCTS_ROOT_PATH . '/cache/follow', + "ftp_mode" => FTP_BINARY + ); + $cache->write($file,"w",4,$p,$output); + $sql = "UPDATE ".RCTS_CACHE_TABLE." SET tijd = " . time() . " WHERE graph = '".$imagename."' && idid = '$idid'"; + if(!$db->sql_query($sql) || !$db->sql_affectedrows()){ + $sql = "INSERT INTO ".RCTS_CACHE_TABLE." (graph,tijd,idid,extra) VALUES ( + '".$imagename."',".time().",'".$idid."','".$serArray."')"; + if(!$db->sql_query($sql)) + { + st_die(SQL, "Could not update page", '', __LINE__, __FILE__, $sql); + } + } + return $array; + } + function Follow_menu() { + global $template,$stats,$core,$cache,$idid,$db; + //First make the picture + $page = Follow_getPage(); + $imagename = Follow_makeImageName($page); + $file = RCTS_ROOT_PATH . '/cache/follow/follow_'.$imagename.'.png'; + if(file_exists($file)){ + $sql = "SELECT * FROM ".RCTS_CACHE_TABLE." WHERE graph = '".$imagename."' && idid = '$idid'"; + $r = $db->sql_query($sql); + if(!$r){ + st_die(SQL,"Could not select graph cache.","",__LINE__,__FILE__,$sql); + } + $g = $db->sql_fetchrow($r); + $secAdd = 60*$config->config['image_catch']; + if($secAdd==0){$secAdd=60;} + if($db->sql_numrows($r) == 0 || $g['tijd'] <= (time()-$secAdd)){ + $array = Follow_write($imagename,$idid,$file); + }else{ + $array = unserialize($g['extra']); + } + }else{ + $array = Follow_write($imagename,$idid,$file); + } + //And now fil the template + $template -> add_file(array( + 'body' => '../../plugins/plugin_Follow/templates/main.html' + )); + $views = $stats->getViews('Follow'); // Don't know if this is correct. + if(is_array($array)){ + $map = "<map name='Test' style='border:0'>"; + foreach($array as $row) + { + list($xText,$yText,$x2,$y2,$name) = $row; + + $map .= '<area coords="'.$xText.','.$yText.','.$x2.','.$y2.'" href="stats.php?mode=Follow&page='.$name.'" title="'.$name.'" alt="'.$name.'" />'; + } + $map .= "</map>"; + } + $template->assign(array( + 'MAP' => $map, + 'page' => $_GET['page'] + )); + } + function Follow_graph($idid) + { + global $core; + $page = Follow_getPage(); + $imagename = Follow_makeImageName($page); + $file = RCTS_ROOT_PATH . '/cache/follow/follow_'.$imagename.'.png'; + + header('Cache-control: no-cache, no-store'); + header('Content-Type: image/png'); + + $x = file_exists($file); + //Voor zekerheid! + @clearstatcache(); + $y = @filesize($file); + $y = ($y > 0); + if(!$y){ + unlink($file); + } + if($x){ + $file = file_get_contents($file); + $z = (strlen($file) > 0); + } + + if($x && $y && $z){ + print $file; + }else{ + global $core; + $string = $core->lang['no_st']; + $im = imagecreate(300,25); + $orange = imagecolorallocate($im, 0, 0, 0); + $orange = imagecolorallocate($im, 220, 210, 60); + $px = (imagesx($im) - 7.5 * strlen($string)) / 2; + imagestring($im, 3, $px, 9, $string, $orange); + imagepng($im); + } + die; + } + function Follow_makeImageName($page) + { + $search=array('/','\\',':','*','<','>','?','"'); + $replace=array('','','','','','','',''); + $page = str_replace($search,$replace,$page); + return $page; + } + function Follow_getPage(){ + global $db,$constants; + if(!isset($_GET['page'])){ + $page = ""; + }else{ + $page = $_GET['page']; + } + + if($page=="" || !isset($page)){ + $sql = "SELECT `from` FROM ".$constants['FOLLOW_TABLE']." WHERE `from` LIKE '%index.%' Limit 1"; + $res = $db->sql_query($sql); + $row = $db->sql_fetchrow($res); + $page = $row['from']; + } + return $page; + } + function Follow_doImg($idid) + { + global $template,$db,$constants; + define('MAPROOT',dirname(__FILE__)); + include(MAPROOT."/class.siteMap.php"); + $page = Follow_getPage(); + $test = new WebSiteMap; + //from to id + $sql = "SELECT t1.`stat_count`, t2.`to` FROM ".$constants['FOLLOW_TABLE']." as t1, + ".$constants['FOLLOW_TABLE']." as t2 + WHERE t1.`stat_value` = t2.`id` AND + t1.`stat_type` = 'follow' AND + t2.`from` = '".$page."' AND + t1.`idid` = '".$idid."' + "; + $sql2 = "SELECT t1.`stat_count`, t2.`from` FROM ".$constants['FOLLOW_TABLE']." as t1, + ".$constants['FOLLOW_TABLE']." as t2 + WHERE t1.`stat_value` = t2.`id` AND + t1.`stat_type` = 'follow' AND + t2.`to` = '".$page."' AND + t1.`idid` = '".$idid."' + "; + $res1 = $db->sql_query($sql); + $res2 = $db->sql_query($sql2); + if(!$res1){ + st_die(SQL,"Could not select from","",__LINE__,__FILE__,$sql); + } + if(!$res2){ + st_die(SQL,"Could not select to","",__LINE__,__FILE__,$sql2); + } + $from = $to = array(); + while($row = $db->sql_fetchrow($res1)) + { + $from[$row['to']] += $row['stat_count']; + } + while($row = $db->sql_fetchrow($res2)) + { + $to[$row['from']] += $row['stat_count']; + } + $temp = array(); + foreach($from as $goto => $countFrom) + { + if($goto != $page){ + if(isset($to[$goto])){ + $countTo=$to[$goto]; + }else{ + $countTo='0'; + } + $array = array($page,$goto,$countFrom,$countTo); + $temp[]=$array; + } + } + foreach($to as $comeFrom => $countTo) + { + if($comeFrom != $page){ + if(!isset($from[$comeFrom])){ + $array = array($page,$comeFrom,0,$countTo); + $temp[]=$array; + } + } + } + $test->bgColor = $template->themeColor['imBG']; + $test->pages = $temp; + $test->main= $page; + return $test->doMake(); + } +?> Added: trunk/version1.0/plugins/plugin_UserOptions/rcts_init.php =================================================================== --- trunk/version1.0/plugins/plugin_UserOptions/rcts_init.php (rev 0) +++ trunk/version1.0/plugins/plugin_UserOptions/rcts_init.php 2006-04-20 12:27:04 UTC (rev 1779) @@ -0,0 +1,56 @@ +<?PHP +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* rcts_init.php +* **************** +* $Id: plugin.php 1734 2006-04-18 15:04:24Z bastimmer $ +******************************************************************/ +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +if(!defined('IN_STATS')) +{ + die('Hacking Attempt'); +} +// Install event + function Follow_installPlugin() + { + $pluginName = 'Follow'; + $sql = "CREATE TABLE `".$mysql_prefix."follow` ( + `id` bigint(21) NOT NULL auto_increment, + `from` varchar(255) NOT NULL, + `to` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +);"; + if (!$db->sql_query($sql)) { + st_die(SQL,"Could not create table","",__LINE__,__FILE__,$sql); + } + SetPluginHooks($pluginName,array('StatsGather'); // Hooks, such as gatherViewerStats. + createOption("menu_Follow", "menu", "Page Following", "Follow", "Follow"); + } + + // Uninstall event + function Follow_uninstallPlugin() + { + global $db, $mysql_prefix; + // Perform queries here! + $sql = "DROP TABLE `".$mysql_prefix."follow`;"; + if (!$db->sql_query($sql)) { + st_die(SQL,"Could not drop table","",__LINE__,__FILE__,$sql); + } + dropVars('Follow'); + } + //Update function + function Follow_updatePlugin($version) + { + + } +?> \ No newline at end of file Added: trunk/version1.0/plugins/plugin_phpbb/index.php =================================================================== --- trunk/version1.0/plugins/plugin_phpbb/index.php (rev 0) +++ trunk/version1.0/plugins/plugin_phpbb/index.php 2006-04-20 12:27:04 UTC (rev 1779) @@ -0,0 +1,217 @@ +<?php +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* plugin.php +* **************** +* $Id: plugin.php 1734 2006-04-18 15:04:24Z bastimmer $ +******************************************************************/ +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +if(!defined('IN_STATS')) +{ + die('Hacking Attempt'); +} +function Follow_write($imagename,$idid,$file){ + global $db,$cache; + ob_start(); + $array = Follow_doImg($idid); + + $output = ob_get_contents(); + ob_end_clean(); + $serArray = serialize($array); + $p = array( + "mkdir" => true, + "dir" => RCTS_ROOT_PATH . '/cache/follow', + "ftp_mode" => FTP_BINARY + ); + $cache->write($file,"w",4,$p,$output); + $sql = "UPDATE ".RCTS_CACHE_TABLE." SET tijd = " . time() . " WHERE graph = '".$imagename."' && idid = '$idid'"; + if(!$db->sql_query($sql) || !$db->sql_affectedrows()){ + $sql = "INSERT INTO ".RCTS_CACHE_TABLE." (graph,tijd,idid,extra) VALUES ( + '".$imagename."',".time().",'".$idid."','".$serArray."')"; + if(!$db->sql_query($sql)) + { + st_die(SQL, "Could not update page", '', __LINE__, __FILE__, $sql); + } + } + return $array; + } + function Follow_menu() { + global $template,$stats,$core,$cache,$idid,$db; + //First make the picture + $page = Follow_getPage(); + $imagename = Follow_makeImageName($page); + $file = RCTS_ROOT_PATH . '/cache/follow/follow_'.$imagename.'.png'; + if(file_exists($file)){ + $sql = "SELECT * FROM ".RCTS_CACHE_TABLE." WHERE graph = '".$imagename."' && idid = '$idid'"; + $r = $db->sql_query($sql); + if(!$r){ + st_die(SQL,"Could not select graph cache.","",__LINE__,__FILE__,$sql); + } + $g = $db->sql_fetchrow($r); + $secAdd = 60*$config->config['image_catch']; + if($secAdd==0){$secAdd=60;} + if($db->sql_numrows($r) == 0 || $g['tijd'] <= (time()-$secAdd)){ + $array = Follow_write($imagename,$idid,$file); + }else{ + $array = unserialize($g['extra']); + } + }else{ + $array = Follow_write($imagename,$idid,$file); + } + //And now fil the template + $template -> add_file(array( + 'body' => '../../plugins/plugin_Follow/templates/main.html' + )); + $views = $stats->getViews('Follow'); // Don't know if this is correct. + if(is_array($array)){ + $map = "<map name='Test' style='border:0'>"; + foreach($array as $row) + { + list($xText,$yText,$x2,$y2,$name) = $row; + + $map .= '<area coords="'.$xText.','.$yText.','.$x2.','.$y2.'" href="stats.php?mode=Follow&page='.$name.'" title="'.$name.'" alt="'.$name.'" />'; + } + $map .= "</map>"; + } + $template->assign(array( + 'MAP' => $map, + 'page' => $_GET['page'] + )); + } + function Follow_graph($idid) + { + global $core; + $page = Follow_getPage(); + $imagename = Follow_makeImageName($page); + $file = RCTS_ROOT_PATH . '/cache/follow/follow_'.$imagename.'.png'; + + header('Cache-control: no-cache, no-store'); + header('Content-Type: image/png'); + + $x = file_exists($file); + //Voor zekerheid! + @clearstatcache(); + $y = @filesize($file); + $y = ($y > 0); + if(!$y){ + unlink($file); + } + if($x){ + $file = file_get_contents($file); + $z = (strlen($file) > 0); + } + + if($x && $y && $z){ + print $file; + }else{ + global $core; + $string = $core->lang['no_st']; + $im = imagecreate(300,25); + $orange = imagecolorallocate($im, 0, 0, 0); + $orange = imagecolorallocate($im, 220, 210, 60); + $px = (imagesx($im) - 7.5 * strlen($string)) / 2; + imagestring($im, 3, $px, 9, $string, $orange); + imagepng($im); + } + die; + } + function Follow_makeImageName($page) + { + $search=array('/','\\',':','*','<','>','?','"'); + $replace=array('','','','','','','',''); + $page = str_replace($search,$replace,$page); + return $page; + } + function Follow_getPage(){ + global $db,$constants; + if(!isset($_GET['page'])){ + $page = ""; + }else{ + $page = $_GET['page']; + } + + if($page=="" || !isset($page)){ + $sql = "SELECT `from` FROM ".$constants['FOLLOW_TABLE']." WHERE `from` LIKE '%index.%' Limit 1"; + $res = $db->sql_query($sql); + $row = $db->sql_fetchrow($res); + $page = $row['from']; + } + return $page; + } + function Follow_doImg($idid) + { + global $template,$db,$constants; + define('MAPROOT',dirname(__FILE__)); + include(MAPROOT."/class.siteMap.php"); + $page = Follow_getPage(); + $test = new WebSiteMap; + //from to id + $sql = "SELECT t1.`stat_count`, t2.`to` FROM ".$constants['FOLLOW_TABLE']." as t1, + ".$constants['FOLLOW_TABLE']." as t2 + WHERE t1.`stat_value` = t2.`id` AND + t1.`stat_type` = 'follow' AND + t2.`from` = '".$page."' AND + t1.`idid` = '".$idid."' + "; + $sql2 = "SELECT t1.`stat_count`, t2.`from` FROM ".$constants['FOLLOW_TABLE']." as t1, + ".$constants['FOLLOW_TABLE']." as t2 + WHERE t1.`stat_value` = t2.`id` AND + t1.`stat_type` = 'follow' AND + t2.`to` = '".$page."' AND + t1.`idid` = '".$idid."' + "; + $res1 = $db->sql_query($sql); + $res2 = $db->sql_query($sql2); + if(!$res1){ + st_die(SQL,"Could not select from","",__LINE__,__FILE__,$sql); + } + if(!$res2){ + st_die(SQL,"Could not select to","",__LINE__,__FILE__,$sql2); + } + $from = $to = array(); + while($row = $db->sql_fetchrow($res1)) + { + $from[$row['to']] += $row['stat_count']; + } + while($row = $db->sql_fetchrow($res2)) + { + $to[$row['from']] += $row['stat_count']; + } + $temp = array(); + foreach($from as $goto => $countFrom) + { + if($goto != $page){ + if(isset($to[$goto])){ + $countTo=$to[$goto]; + }else{ + $countTo='0'; + } + $array = array($page,$goto,$countFrom,$countTo); + $temp[]=$array; + } + } + foreach($to as $comeFrom => $countTo) + { + if($comeFrom != $page){ + if(!isset($from[$comeFrom])){ + $array = array($page,$comeFrom,0,$countTo); + $temp[]=$array; + } + } + } + $test->bgColor = $template->themeColor['imBG']; + $test->pages = $temp; + $test->main= $page; + return $test->doMake(); + } +?> Added: trunk/version1.0/plugins/plugin_phpbb/rcts_init.php =================================================================== --- trunk/version1.0/plugins/plugin_phpbb/rcts_init.php (rev 0) +++ trunk/version1.0/plugins/plugin_phpbb/rcts_init.php 2006-04-20 12:27:04 UTC (rev 1779) @@ -0,0 +1,56 @@ +<?PHP +/****************************************************************** +* Really Coding Traffic Statistics 2 +* Begin: October, 3rd 2005 +* Copyright: Copyright 2005 by Really coding Group +****************************************************************** +* rcts_init.php +* **************** +* $Id: plugin.php 1734 2006-04-18 15:04:24Z bastimmer $ +******************************************************************/ +/******************************************************************* +* +* 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, or +* (at your option) any later version. +* +*******************************************************************/ +if(!defined('IN_STATS')) +{ + die('Hacking Attempt'); +} +// Install event + function Follow_installPlugin() + { + $pluginName = 'Follow'; + $sql = "CREATE TABLE `".$mysql_prefix."follow` ( + `id` bigint(21) NOT NULL auto_increment, + `from` varchar(255) NOT NULL, + `to` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +);"; + if (!$db->sql_query($sql)) { + st_die(SQL,"Could not create table","",__LINE__,__FILE__,$sql); + } + SetPluginHooks($pluginName,array('StatsGather'); // Hooks, such as gatherViewerStats. + createOption("menu_Follow", "menu", "Page Following", "Follow", "Follow"); + } + + // Uninstall event + function Follow_uninstallPlugin() + { + global $db, $mysql_prefix; + // Perform queries here! + $sql = "DROP TABLE `".$mysql_prefix."follow`;"; + if (!$db->sql_query($sql)) { + st_die(SQL,"Could not drop table","",__LINE__,__FILE__,$sql); + } + dropVars('Follow'); + } + //Update function + function Follow_updatePlugin($version) + { + + } +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-04-20 14:54:53
|
Revision: 1789 Author: paulsohier Date: 2006-04-20 07:54:34 -0700 (Thu, 20 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1789&view=rev Log Message: ----------- Re-removed old files. Plugins are at new acp. (Will commit it later, if you want to install one, use LOCAL the conf file. DON'T ADD conf.php TO SVN!) Modified Paths: -------------- trunk/version1.0/cache/version.txt Removed Paths: ------------- trunk/version1.0/conf.php trunk/version1.0/confp.php trunk/version1.0/includes/classes/class.error.php trunk/version1.0/templates/rcts/conf.html trunk/version1.0/templates/rcts/confp.html Modified: trunk/version1.0/cache/version.txt =================================================================== --- trunk/version1.0/cache/version.txt 2006-04-20 12:59:25 UTC (rev 1788) +++ trunk/version1.0/cache/version.txt 2006-04-20 14:54:34 UTC (rev 1789) @@ -3,5 +3,5 @@ $time = '0'; $offline = ''; $data = 'Nothing'; -$data = 1145539663; +$data = 1145629641; ?> \ No newline at end of file Deleted: trunk/version1.0/conf.php =================================================================== --- trunk/version1.0/conf.php 2006-04-20 12:59:25 UTC (rev 1788) +++ trunk/version1.0/conf.php 2006-04-20 14:54:34 UTC (rev 1789) @@ -1,29 +0,0 @@ -<?php -/****************************************************************** -* Really Coding Traffic Statistics -* Begin: October, 3rd 2005 -* Copyright: Copyright 2005 by Really coding Group -****************************************************************** -* conf.php -* **************** -* $Id: conf.php 1612 2006-03-07 09:41:24Z bastimmer $ -******************************************************************/ - -/******************************************************************* -* -* 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, or -* (at your option) any later version. -* -*******************************************************************/ -ob_start(); -define('IN_STATS', true); -define('RCTS_ROOT_PATH', dirname(__FILE__)); -include(RCTS_ROOT_PATH.'/includes/start.php'); -//include(RCTS_ROOT_PATH.'/includes/multisite_class.php'); -$multiSite=new multisite; -pageHeader("Config", 'control'); -$config->geef(); -pageFooter(); -?> \ No newline at end of file Deleted: trunk/version1.0/confp.php =================================================================== --- trunk/version1.0/confp.php 2006-04-20 12:59:25 UTC (rev 1788) +++ trunk/version1.0/confp.php 2006-04-20 14:54:34 UTC (rev 1789) @@ -1,29 +0,0 @@ -<?php -/****************************************************************** -* Really Coding Traffic Statistics -* Begin: October, 3rd 2005 -* Copyright: Copyright 2005 by Really coding Group -****************************************************************** -* confp.php -* **************** -* $Id: confp.php 1344 2006-01-14 18:04:32Z paulsohier $ -******************************************************************/ - -/******************************************************************* -* -* 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, or -* (at your option) any later version. -* -*******************************************************************/ -ob_start(); -define('IN_STATS', true); -define('RCTS_ROOT_PATH', dirname(__FILE__)); -include(RCTS_ROOT_PATH.'/includes/start.php'); -//include_once(RCTS_ROOT_PATH.'/includes/multisite_class.php'); -$multiSite=new multisite; -pageHeader("Plugin config"); -$config->geefplug(); -pageFooter(); -?> \ No newline at end of file Deleted: trunk/version1.0/includes/classes/class.error.php =================================================================== --- trunk/version1.0/includes/classes/class.error.php 2006-04-20 12:59:25 UTC (rev 1788) +++ trunk/version1.0/includes/classes/class.error.php 2006-04-20 14:54:34 UTC (rev 1789) @@ -1,236 +0,0 @@ -<?php -/****************************************************************** -* Really Coding Traffic Statistics -* Begin: October, 3rd 2005 -* Copyright: Copyright 2005 by Really coding Group -****************************************************************** -* class.error.php -* **************** -* $Id: class.error.php 1637 2006-03-22 13:08:21Z paulsohier $ -******************************************************************/ -/******************************************************************* -* -* 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, or -* (at your option) any later version. -* -*******************************************************************/ -if(!defined('IN_STATS')) -{ - die('Hacking Attempt'); -} -class error{ - function error(){ - $this->rcts_url = 'http://www.reallycoding.nl:80/DW/dw.php'; - $this->cookies = ""; - $this->fields = ""; - //These config values are unset if there is sending a report. - $this->unset = array("ftp_ww","smtp_ww","username","password"); - } - /* - This function send a error message to the RCTS team. - @param: $array to send - @return: Nothing. - */ - function DW($array){ - global $config,$browser; - - if($config){ - $guid = $config->config['installid']; - if(!$guid && !defined("IN_INSTALL")){ - $guid = new Guid(); - $guid->check(); - $guid = $config->config['installid']; - - } - if(!$config->config['use_dw']){ - return; - } - $array['version'] = $config->config['version']; - $array['config'] = $config->config; - //Unset some vars. - for($i = 0; $i < count($this->unset);$i++){ - unset($array['config'][$this->unset[$i]]); - } - }else{ - if(defined("IN_INSTALL")){ - return; - }else{ - include_once(RCTS_ROOT_PATH . "/includes/classes/class.config.php"); - $config = new config; - $config->load(); - return $this->DW($array); - } - } - if(!is_object($browser)){ - $browser = new browser(); - } - $browser->reset(); - $array = serialize($array); - $array = base64_encode($array); - $browser->addField("array",$array); - $browser->addField("guid",$guid); - $browser->addCookie("DW","1"); - $browser->postPage($this->rcts_url); - $data = $browser->showContents(); - if(trim($data) == "0"){ - $this->verstuurd = true; - }else{ - $this->verstuurd = false; - } - } - /* - This is the old st_die function - @param: The array with the message, and some other information - @param: Display a message(By php errors, we don't display them at this moment) - @return: Nothing - */ - function trigger($array,$dis = false){ - if(defined("error")){ - $array['second'] = true; - } - extract($array); - global $db,$template,$lang; - if(!isset($type)){ - $type = 0; - } - if($type != RCTS_CRITICAL_ERROR){//Load not existings objects ONLY when $type isn't RCTS_CRITICAL_ERROR. - if((!is_object($db) || !$db || $db == null) && !defined("IN_INSTALL")){ - include_once(RCTS_ROOT_PATH . "/includes/classes/class.mysql.php"); - include(RCTS_ROOT_PATH . "/includes/config.php"); - $db = new mysql; - //And connecting to mysql - if($db->connect($host,$username,$password,$database) === false){ - //Using st_die give problems with not loaded functions and headers. - print "Could not connect to the database. <br />Mysql error: " . mysql_error(); - exit; - } - } - if(!is_object($lang) || !$lang || $lang == null){ - include_once(RCTS_ROOT_PATH."/includes/classes/class.lang.php"); - $lang = new RCTSLang; - $lang->loadLang(); - } - if((!is_object($template) || !$template || $template == null) && $type != RCTS_CRITICAL_ERROR){ - - include_once(RCTS_ROOT_PATH."/includes/classes/class.template.php"); - $template = new tpl('templates/standaard/'); - } - } - //Don't display the directory! - $file = basename($file); - if($type != SQL){ - $sql = ""; - } - switch($type) - { - case RCTS_INFO: - if($caption == '') - { - $caption = $lang->lang['informatie'];//'Informatie'; - } - break; - case SQL: - if($caption == '') - { - $caption = $lang->lang['sql'];//'SQL fout.'; - } - break; - case RCTS_CRITICAL_ERROR: - //Here we don't use $template! - //(Why not? Because it is possible that it doesn't work correctly.) - if($caption == '') - { - $caption = $lang->lang['crit'];//'Cruciale Fout!'; - } - $error_html = ""; - if($template || defined("header")){ - if(!defined("header")){ - pageHeader($caption); - } - }else{ - $error_html .= "<html>\n<head>\n<title>".$caption."</title>\n</head>\n<body>\n"; - - } - $error_html .= "<h1>".$caption."</h1>\n<p>\n - - ".($error2 != '' ? "<b>".$lang->lang['fout_ontstaan']."</b> <br />\n".$error2 : '')." - ".($line ? "<br />\n<b>".$lang->lang['line']."</b>\n ".$line : '')." - ".($file ? "<br />\n<b>".$lang->lang['file']."</b> ".$file : '')."\n</p>\n"; - print $error_html; - if(defined("header")){ - pageFooter(); - }else{ - print "</body>\n</html>"; - } - exit; - - break; - case RCTS_GENERAL_ERROR: - $dis = false; - default: - if($caption == '') - { - $caption = $lang->lang['alg'];//'Algemene Fout'; - } - break; - } - - $template->block('error',array( - "header" => $caption, - "fout" => $error2 - - )); - $template->assign(array( - "file" => $lang->lang['file'], - "line" => $lang->lang['line'], - "query" => $lang->lang['query'], - "serror" => $lang->lang['serror'] - )); - if($line){ - $template->block('error.regel',array('regel'=>$line)); - } - if($file){ - $template->block('error.bestand',array('bestand'=>$file)); - } - if($sql && $type == SQL){ - $template->block('error.sql'); - if($sql){ - $template->block('error.sql.query',array('query'=>$sql)); - } - $err = $db->sql_error(); - if($err){ - $template->block('error.sql.error',array('sql'=>$err)); - } - global $db; - $err = addslashes($err); - $sql = stripslashes($sql); - $sql = addslashes($sql); - $sql = "INSERT INTO ".RCTS_ERROR_TABLE." - (bestand,regel,query,fout) - VALUES('$file','$line','$sql','$err')"; - $db->sql_query($sql); - return; - } - $this->DW($array); - if(!$dis){ - return; - } - if(defined("error")){ - print("St_die has called multiple. Please check your syntax."); - } - if($type != SQL){ - define("error",true); - } - pageHeader($lang->lang['error']); - pageFooter(); - die; - } - /* - * - * PHP browser function moved to class.browser.php - * - */ -} -?> Deleted: trunk/version1.0/templates/rcts/conf.html =================================================================== --- trunk/version1.0/templates/rcts/conf.html 2006-04-20 12:59:25 UTC (rev 1788) +++ trunk/version1.0/templates/rcts/conf.html 2006-04-20 14:54:34 UTC (rev 1789) @@ -1,453 +0,0 @@ -<!-- $Id$ --> - <script type="text/javascript"> - var tabs = new Array(); - var tabs2 = new Array(); - var count = 0; - var html = "<table width=\"100%\" border=\"0\" class=\"tab_table\" cellpadding='0' cellspacing='0'><tr>"; - function add(id,tabname){ - tabs[id] = tabname; - tabs2[tabs2.length] = id; - count++; - writeit(id); - clickt(id); - } - function writeit(id){ - html += "<td align='center' onClick='clickt(\""+ id +"\")' id=\"tab_"+id+"\" class='inactief'><a href='javascript:clickt(\""+ id +"\");' class='tab'>"+ tabs[id] +"</a></td>"; - if(count >= 6) - { - html += "</tr><tr>"; - count = 0; - } - } - function clickt(id){ - if(id == 'phpbb'){ - location.href='stats.php?mode=phpbb&conf=1'; - } - for(var i = 0;i < tabs2.length;i++){ - document.getElementById(tabs2[i]).style.display = 'none'; - tmp = "tab_" + tabs2[i]; - if(document.getElementById(tmp) == null){ - - }else{ - document.getElementById(tmp).className = 'inactief'; - } - } - tmp = "tab_" + id; - if(document.getElementById(id).style.display != 'none'){ - document.getElementById(id).style.display = 'none'; - if(document.getElementById(tmp) != null){ - document.getElementById(tmp).className = 'inactief'; - } - }else{ - document.getElementById(id).style.display = 'block'; - if(document.getElementById(tmp) != null){ - document.getElementById(tmp).className = 'actief'; - } - } - } - </script> - <div id="tab"></div> - - <div id="conf"> - <script type="text/javascript">add("conf","{L_STATS_MAIN_CONFIG}");</script> - <form method="post" action="conf.php?update=1"> - <input type="hidden" name="clickt" value="conf" /> - <div class="menu"> - <h3>{L_STATS_MAIN_CONFIG}</h3> - <div class="menu_content"> - <table class="stats_table" cellpadding="2" cellspacing="0"> - <tr> - <td>{L_STATS_OPEN}</td> - <td> - <input type="radio" name="stats_open" value="1" {stats_open1} />{L_STATS_YES} - <input type="radio" name="stats_open" value="0" {stats_open2} />{L_STATS_NO} - </td> - </tr> - <!-- START iis --> - <tr> - <td>{L_MOD_REWRITE}</td> - <td> - <input type="radio" name="mod_rewrite" value="1" {rewrite1} />{L_STATS_YES} - <input type="radio" name="mod_rewrite" value="0" {rewrite2} />{L_STATS_NO} - </td> - </tr> - <!-- STOP iis --> - <tr> - <td>{L_GZIP}</td> - <td> - <input type="radio" name="gzip" value="1" {gzip1} />{L_STATS_YES} - <input type="radio" name="gzip" value="0" {gzip2} />{L_STATS_NO} - </td> - </tr> - <tr> - <td>{L_STATS_IMAGE}</td> - <td> - <input type="text" name="image_catch" value="{image_catch}" /> - </td> - </tr> - <tr> - <td>{L_STATS_THEME}</td> - <td> - {default_tpl} - </td> - </tr> - <tr> - <td>{L_USE_DW}</td> - <td> - <input type="radio" name="use_dw" value="1" {use_dw1} {dw_dis} />{L_STATS_YES} - <input type="radio" name="use_dw" value="0" {use_dw2} />{L_STATS_NO} - </td> - </tr> - <tr> - <td colspan="2"> - <input type="submit" value="{L_STATS_SEND}"> - </td> - </tr> - </table> - </div> - </div> - </form> - </div> - - <div id="ftp"> - <script type="text/javascript">add("ftp","{L_STATS_FTP_T}");</script> - <form method="post" action="conf.php?update=1"> - <input type="hidden" name="clickt" value="ftp" /> - <div class="menu"> - <h3>{L_STATS_FTP_T}</h3> - <div class="menu_content"> - <table class="stats_table" cellpadding="2" cellspacing="0"> - <tr> - <td width="75%">{L_STATS_FTP}</td> - <td width="25%"> - <input type="radio" name="use_ftp" value="1" {use_ftp1} />{L_STATS_YES} - <input type="radio" name="use_ftp" value="0" {use_ftp2} />{L_STATS_NO} - </td> - </tr> - <!-- START ftp --> - <tr> - <td width="75%">{L_STATS_FTP_SERVER}</td> - <td width="25%"> - <input type="text" name="ftp_server" value="{ftp_server}" /> - </td> - </tr> - <tr> - <td width="75%">{L_STATS_FTP_GB}</td> - <td width="25%"> - <input type="text" name="ftp_gb" value="{ftp_gb}" /> - </td> - </tr> - <tr> - <td width="75%">{L_STATS_FTP_WW}</td> - <td width="25%"> - <input type="password" name="ftp_ww" value="{ftp_ww}" /> - </td> - </tr> - <tr> - <td width="75%">{L_STATS_FTP_ROOT}</td> - <td width="25%"> - <input type="text" name="ftp_root" value="{ftp_root}" /> - </td> - </tr> - <!-- STOP ftp --> - <tr> - <td colspan="2"> - <input type="submit" value="{L_STATS_FTP_SEND}"> - </td> - </tr> - </table> - </div> - </div> - </form> - </div> - - <div id="smtp"> - <script type="text/javascript">add("smtp","{L_STATS_SMTP_T}");</script> - <form method="post" action="conf.php?update=1"> - <input type="hidden" name="clickt" value="smtp" /> - <div class="menu"> - <h3>{L_STATS_SMTP}</h3> - <div class="menu_content"> - <table class="stats_table" cellpadding="2" cellspacing="0"> - <tr> - <td width="75%">{L_STATS_SMTP}</td> - <td width="25%"> - <input type="radio" name="use_smtp" value="1" {use_smtp1} />{L_STATS_YES} - <input type="radio" name="use_smtp" value="0" {use_smtp2} />{L_STATS_NO} - </td> - </tr> - <!-- START smtp --> - <tr> - <td width="75%">{L_STATS_SMTP_HOST}</td> - <td width="25%"> - <input type="text" name="smtp_host" value="{smtp_host}" /> - </td> - </tr> - <tr> - <td width="75%">{L_STATS_SMTP_GB}</td> - <td width="25%"> - <input type="text" name="smtp_gb" value="{smtp_gb}" /> - </td> - </tr> - <tr> - <td width="75%">{L_STATS_SMTP_WW}</td> - <td width="25%"> - <input type="password" name="smtp_ww" value="{smtp_ww}" /> - </td> - </tr> - <!-- STOP smtp --> - <tr> - <td colspan="2"> - <input type="submit" value="{L_STATS_SMTP_SEND}"> - </td> - </tr> - </table> - </div> - </div> - </form> - </div> - - <div id="multi"> - - <script type="text/javascript">add("multi","{L_STATS_MULTI}");</script> - <form method="post" action="conf.php?update=2"> - <input type="hidden" name="clickt" value="multi" /> - <div class="menu"> - <h3>{L_STATS_MULTI}</h3> - <div class="menu_content"> - <table class="stats_table" cellpadding="2" cellspacing="0"> - <tr> - <td colspan="2"><b>{L_STATS_MULTI_ON}</b></td> - </tr> - <tr> - <td width="75%">{L_STATS_MULTI_Q}</td> - <td width="25%"> - <input type="radio" name="use_multisite" value="1" {use_multisite1} />{L_STATS_YES} - <input type="radio" name="use_multisite" value="0" {use_multisite2} />{L_STATS_NO} - </td> - </tr> - <!-- START multi --> - <tr> - <td colspan="2"><b>{L_STATS_NAME}</b></td> - </tr> - <!-- START idlist --> - <tr> - <td>{multi.idlist.idname}</td> - <td><input type="text" name="idname[{multi.idlist.id}]" value="{multi.idlist.name}" /></td> - </tr> - <!-- STOP idlist --> - <tr> - <td colspan="2"><b>{L_STATS_COMBINE}</b></td> - </tr> - <tr> - <td>{L_STATS_THIS} -></td><td>{L_STATS_THIS}</td> - </tr> - <tr> - <td>{Samen1}</td> - <td>{Samen2}</td> - </tr> - <!-- STOP multi --> - <tr> - <td colspan="2"> - <input type="submit" value="{L_STATS_SEND_MULTI}"> - </td> - </tr> - </table> - </div> - </div> - </form> - </div> - <div id="layout"> - <script type="text/javascript">add("layout","{L_STATS_LAYOUT_CONFIG}");</script> - <form method="post" action="conf.php?update=4"> - <input type="hidden" name="clickt" value="layout" /> - <div class="menu"> - <h3>{L_STATS_LAYOUT_CONFIG}</h3> - <div class="menu_content"> - <div class="menu"> - <h4>{L_NEW}</h4> - <form action="conf.php?update=4" method="post"> - <input type="hidden" name="do" value="add"/> - <table class="stats_table" cellpadding="2" cellspacing="0"> - <tr> - <td width="75%">{L_NAME}:</td> - <td width="25%"><input type="text" name="New" /></td> - </tr> - <tr> - <td colspan="2"><input type="submit" value="{L_NEW_LAYOUT}" name="submit"></td> - </tr> - </table> - </form> - - </div> - <br /> - <div class="menu"> - <h4>{L_RENAME_A}</h4> - <form action="conf.php?update=4" method="post"> - <input type="hidden" name="do" value="edit"/> - <table class="stats_table" cellpadding="2" cellspacing="1"> - <tr> - <td colspan="2"><font size="-2">{L_EMPTY_DEL}</font></td> - </tr> - <!-- START layoutEdit --> - <tr style="background-color: #EFEFEF;"> - <td width="75%">{L_RENAME} {layoutEdit.value}:</td> - <td width="25%"> - <input type="text" name="{layoutEdit.name}" value="{layoutEdit.value}" /> - <a href="conf.php?update=4&do=up&id={layoutEdit.id}&clickt=layout" title="Up"> - <img class="nav_img" src="templates/rcts/images/up.gif" border="0" hspace="0" vspace="0"/> - </a> - <a href="conf.php?update=4&do=down&id={layoutEdit.id}&clickt=layout" title="Down"> - <img class="nav_img" src="templates/rcts/images/down.gif" border="0" hspace="0" vspace="0"/> - </a> - <a href="conf.php?update=4&do=del&id={layoutEdit.id}&clickt=layout" title="Delete" > - <img class="nav_img" src="templates/rcts/images/del.gif" hspace="0" border="0" vspace="0"/> - </a> - </td> - </tr> - <!-- STOP layoutEdit --> - <tr> - <td colspan="2"><input type="submit" value="{L_EDIT_LAYOUT}" name="submit"></td> - </tr> - </table> - </form> - </div> - </div> - </div> - </form> - </div> - <div id="header"> - <form method="post" action="conf.php?update=3"> - <input type="hidden" name="clickt" value="header" /> - <script type="text/javascript">add("header","{L_HEADERC}");</script> - - <div class="menu"> - <h3>{L_HEADERC}</h3> - <h4>{L_HEADERS_CHECK}</h4> - <div class="menu_content"> - <p>{L_HEADER_TEXT1}</p> - <table class="stats_table" cellpadding="2" cellspacing="0"> - <tr> - <td width="5%"><b>{L_NUM_SIGN}</b></td> - <td width="70%"><b>{L_HEADER}</b></td> - <td width="25%"><b>{L_ACTION}</b></td> - </tr> - <!-- START header_check --> - <tr style="background-color: #EFEFEF;"> - <td>{header_check.num}</td> - <td>{header_check.header}</td> - <td><select name="headerAction[{header_check.id}]"{headerEnabeld}><option value="1">{L_ACCEPT}</option><option selected="selected" value="2">{L_WAIT}</option><option value="3">{L_BLOCK}</option></select></td> - </tr> - <!-- STOP header_check --> - <tr> - <td colspan="3"> - <input type="submit" value="{L_STATS_SEND_HEADER}"{headerEnabeld}> - </td> - </tr> - </table> - </div> - </div> - </form> - </div> - - - <div id="plug"> - <script type="text/javascript">add("plug","{L_PLUGIN}");</script> - - <div class="menu"> - <h3>{L_ADDONS}</h3> - <div class="menu_content"> - <table class="stats_table" cellpadding="2" cellspacing="0"> - <!-- START pluginlist --> - <tr> - <td>{pluginlist.title}</td> - <td>{pluginlist.desc}</td> - <td><a href="{pluginlist.U_UNINSTALL}">{L_UNINSTALL}</a><br /><a href="{pluginlist.U_OPTIONS}">{L_OPTIONS}</a></td> - </tr> - <!-- STOP pluginlist --> - </table> - </div> - </div> - - <div class="menu"> - <h3>{L_ADDONS_INSTALL}</h3> - <div class="menu_content"> - <table class="stats_table" cellpadding="2" cellspacing="0"> - <!-- START plugininstlist --> - <tr> - <td>{plugininstlist.title}</td> - <td><a href="{plugininstlist.U_INSTALL}">{L_INSTALL}</a></td> - </tr> - <!-- STOP plugininstlist --> - </table> - </div> - </div> - </div> - - <div id="user"> - <script type="text/javascript">add("user","{L_USER}");</script> - <form action="conf.php?user_user=1" method="post"> - <input type="hidden" name="clickt" value="user" /> - <div class="menu"> - <h3>{L_USER}</h3> - <div class="menu_content"> - <table class="stats_table" cellpadding="2" cellspacing="0"> - <tr> - <td colspan="2">{L_CHANGE_USER}</td> - </tr> - <tr> - <td>{L_USERN}</td> - <td><input type="text" name="user" /></td> - </tr> - <tr> - <td>{L_PASSN}</td> - <td><input type="text" name="user" /></td> - </tr> - <tr> - <td colspan="2"><input type="submit" value="{L_STATS_SEND}"></td> - </tr> - </table> - </div> - </div> - </form> - </div> - - <div id="version"> - <script type="text/javascript">add("version","{L_VERSION}");</script> - <div class="menu"> - <h3>{L_VERSION}</h3> - <div class="menu_content"> - <table class="stats_table" cellpadding="2" cellspacing="0"> - <!-- A IF check --> - <a href="conf.php?clickt=version&check_version=1">{L_CHECK_VERSIONS}</a> - <!-- ELSE --> - <tr> - <th> - {L_PLUGIN_NAME} - </th> - <th>{L_VERSION}</th> - <th>{L_NEWEST}</th> - - </tr> - <!-- START version_row --> - <tr> - <td>{version_row.NAME}</td> - <td>{version_row.VERSION}</td> - <td style="color:{version_row.COLOR};">{version_row.NEWEST}</td> - </tr> - <!-- STOP version_row --> - <!-- END IF --> - </table> - </div> - </div> - </div> - - <script type="text/javascript"> - html += "</tr></table>"; - document.getElementById("tab").innerHTML = html; - <!-- IF TPL clickt --> - clickt('{clickt}'); - <!-- ELSE --> - clickt('conf'); - <!-- END IFTPL --> - </script> Deleted: trunk/version1.0/templates/rcts/confp.html =================================================================== --- trunk/version1.0/templates/rcts/confp.html 2006-04-20 12:59:25 UTC (rev 1788) +++ trunk/version1.0/templates/rcts/confp.html 2006-04-20 14:54:34 UTC (rev 1789) @@ -1,33 +0,0 @@ - <div class="menu"> - <h3>Plugin Config</h3> - <div class="menu_content"> - <form method="post" action="confp.php?update=1"> - <table class="stats_table" cellpadding="2" cellspacing="0"> - <!-- START yesnorow --> - <tr> - <td>{yesnorow.desc}</td> - <td> - <input type="radio" name="{yesnorow.naam}" value="1" {yesnorow.yes} />Y - <input type="radio" name="{yesnorow.naam}" value="0" {yesnorow.no} />N - </td> - </tr> - <!-- STOP yesnorow --> - <!-- START textrow --> - <tr> - <td>{textrow.desc}</td> - <td> - <input type="text" name="{textrow.naam}" value="{textrow.value}" /> - </td> - </tr> - <!-- STOP textrow --> - <tr> - <td colspan="2"> - <input type="submit" value="{L_STATS_SEND}"> - </td> - </tr> - </table> - </form> - - <a href="conf.php">\xAB conf.php</a> - </div> - </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-04-20 18:32:15
|
Revision: 1793 Author: paulsohier Date: 2006-04-20 11:31:59 -0700 (Thu, 20 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1793&view=rev Log Message: ----------- Removed changes from erik. Modified Paths: -------------- trunk/version1.0/includes/classes/class.cron.php trunk/version1.0/includes/classes/class.plugin.php trunk/version1.0/includes/classes/class.stats.php trunk/version1.0/stats.php Modified: trunk/version1.0/includes/classes/class.cron.php =================================================================== --- trunk/version1.0/includes/classes/class.cron.php 2006-04-20 15:48:25 UTC (rev 1792) +++ trunk/version1.0/includes/classes/class.cron.php 2006-04-20 18:31:59 UTC (rev 1793) @@ -162,8 +162,7 @@ ob_start(); if($soort == "plugin"){ - $functionName = $plugin."_".$func; - $functionName($idid); + $plugin->$func($idid); }else{ $graph($soort); } Modified: trunk/version1.0/includes/classes/class.plugin.php =================================================================== --- trunk/version1.0/includes/classes/class.plugin.php 2006-04-20 15:48:25 UTC (rev 1792) +++ trunk/version1.0/includes/classes/class.plugin.php 2006-04-20 18:31:59 UTC (rev 1793) @@ -195,10 +195,10 @@ function loadPlugin($name) { - $filename = RCTS_ROOT_PATH.'/plugins/plugin_'.$name.'/index.php'; + $filename = RCTS_ROOT_PATH.'/plugins/plugin_'.$name.'/plugin.php'; if (file_exists($filename)) { include_once $filename; - return $filename; + return new $name; } else { return false; } Modified: trunk/version1.0/includes/classes/class.stats.php =================================================================== --- trunk/version1.0/includes/classes/class.stats.php 2006-04-20 15:48:25 UTC (rev 1792) +++ trunk/version1.0/includes/classes/class.stats.php 2006-04-20 18:31:59 UTC (rev 1793) @@ -1,10 +1,10 @@ -<?PHP +<?php /****************************************************************** * Really Coding Traffic Statistics 2 * Begin: October, 3rd 2005 * Copyright: Copyright 2005 by Really coding Group ****************************************************************** -* class.config.php +* class.stats.php * **************** * $Id$ ******************************************************************/ @@ -35,8 +35,7 @@ $sql = "SELECT * FROM ".RCTS_PLUGINS_TABLE." - WHERE plugin_dhooks LIKE '%StatsTable%' - AND active = 1"; + WHERE plugin_dhooks LIKE '%StatsTable%'"; $res = $db->sql_query($sql); if(!$res) { @@ -51,10 +50,8 @@ $row['plugin_name'] => 'pluginsSingle.html' )); //This is a fix, it gives a error that eventStatsTable don't exists. - $function_StatsTable = $plugin."_StatsTable"; - $function_StatsGraph = $plugin."_StatsGraph"; - $plugStats = function_exists($function_StatsTable) ? $function_StatsTable($idid) : array(); - $graph = function_exists($function_StatsGraph)?'<img src="graph.php?type=plugin&name='.$row['plugin_name'].'&func=StatsGraph" />':''; + $plugStats = function_exists("$plugin_StatsTable") ? $plugin_StatsTable($idid) : array(); + $graph = function_exists("$plugin_StatsGraph")?'<img src="graph.php?type=plugin&name='.$row['plugin_name'].'&func=eventStatsGraph" />':''; $template->block('pluginrow', array( 'PLUGINNAME' => stripslashes($plugStats['name']), 'PLUGIN_H1' => $plugStats['h1'], @@ -86,8 +83,7 @@ $sql = "SELECT * FROM ".RCTS_PLUGINS_TABLE." - WHERE plugin_dhooks LIKE '%MultiTable%' - AND active = 1"; + WHERE plugin_dhooks LIKE '%MultiTable%'"; $res = $db->sql_query($sql); if(!$res) { @@ -101,10 +97,8 @@ $template -> add_file(array( $row['plugin_name'] => 'pluginsMulti.html' )); - $function_MultiTable = $plugin."_MultiTable"; - $function_StatsGraph = $plugin."_StatsGraph"; - $plugMStats = $function_MultiTable($idid); - $graph = function_exists($function_StatsGraph)?'graph.php?type=plugin&name='.$row['plugin_name'].'&func=StatsGraph" />':''; + $plugMStats = $plugin_MultiTable($idid); + $graph = function_exists("$plugin_StatsGraph")?'graph.php?type=plugin&name='.$row['plugin_name'].'&func=eventStatsGraph" />':''; foreach ($plugMStats as $plugStats) { $template->block('mpluginrow', array( @@ -937,3 +931,4 @@ } } ?> + Modified: trunk/version1.0/stats.php =================================================================== --- trunk/version1.0/stats.php 2006-04-20 15:48:25 UTC (rev 1792) +++ trunk/version1.0/stats.php 2006-04-20 18:31:59 UTC (rev 1793) @@ -148,11 +148,10 @@ if($mode == $plugin_menu[$i]) { $plugin = $pluginsClass->loadPlugin($plugin_row[$i]['pluginn']); - $plugin_menu = $plugin."_menu"; - if(function_exists($plugin_menu)) + if(method_exists($plugin,"plugin_menu")) { $loaded = true; - $plugin_menu(); + $plugin->plugin_menu(); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-04-22 21:00:49
|
Revision: 1810 Author: paulsohier Date: 2006-04-22 14:00:40 -0700 (Sat, 22 Apr 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1810&view=rev Log Message: ----------- Removed file_get_contents because our minimum requirement is 4.3.0 Removed st_die's :P Removed trigger_error when install dir exists, because it never exits with our new installer. Changed URL in rss.php to our net address ;) Modified Paths: -------------- trunk/version1.0/error.php trunk/version1.0/includes/functions.php trunk/version1.0/includes/start.php trunk/version1.0/rss.php Modified: trunk/version1.0/error.php =================================================================== --- trunk/version1.0/error.php 2006-04-22 20:57:50 UTC (rev 1809) +++ trunk/version1.0/error.php 2006-04-22 21:00:40 UTC (rev 1810) @@ -32,9 +32,7 @@ )); $sql = "SELECT * FROM ".RCTS_ERROR_TABLE." ORDER BY bestand DESC, regel ASC"; $r = $db->sql_query($sql); -if(!$r){ - st_die(SQL,"Could not select errors.","",__LINE__,__FILE__,$sql); -} + if(!$db->sql_numrows($r)){ $template->block("geen"); } Modified: trunk/version1.0/includes/functions.php =================================================================== --- trunk/version1.0/includes/functions.php 2006-04-22 20:57:50 UTC (rev 1809) +++ trunk/version1.0/includes/functions.php 2006-04-22 21:00:40 UTC (rev 1810) @@ -338,7 +338,7 @@ //chmod(RCTS_ROOT_PATH . "/config.php",0777); $o = fopen(RCTS_ROOT_PATH . "/includes/config.php","w"); if(!$o){ - st_die(RCTS_CRITICAL_ERROR,"Could not open config.php for writing!" ); + trigger_error("Could not open config.php for writing!",E_USER_ERROR); } fwrite($o,$file); fclose($o); @@ -353,19 +353,6 @@ $ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ? $_SERVER['REMOTE_ADDR'] : ( ( !empty($_ENV['REMOTE_ADDR']) ) ? $_ENV['REMOTE_ADDR'] : getenv('REMOTE_ADDR') ); return $ip; } - -if(!function_exists("file_get_contents")){ - /* - Replacement of the php file_get_contents function. - @param file to get the contents. - @return content of $file. - */ - function file_get_contents($file){ - $file = file($file); - $file = implode("\n",$file); - return $file; - } -} function install_statsJS(){} function check_for_exploits() { $wrong = array( Modified: trunk/version1.0/includes/start.php =================================================================== --- trunk/version1.0/includes/start.php 2006-04-22 20:57:50 UTC (rev 1809) +++ trunk/version1.0/includes/start.php 2006-04-22 21:00:40 UTC (rev 1810) @@ -147,7 +147,4 @@ )); $modes[] = $info['mode']; } -if((file_exists(RCTS_ROOT_PATH . "/developer") && file_exists(RCTS_ROOT_PATH . '/install') && !defined('IN_INSTALL')) || (file_exists(RCTS_ROOT_PATH . '/update') && !defined('UPDATOR'))){ -// trigger_error("Please delete the install and developer directory."); -} ?> Modified: trunk/version1.0/rss.php =================================================================== --- trunk/version1.0/rss.php 2006-04-22 20:57:50 UTC (rev 1809) +++ trunk/version1.0/rss.php 2006-04-22 21:00:40 UTC (rev 1810) @@ -41,7 +41,7 @@ function start_rss(){ global $id,$db,$core; //Start RSS feed - $link = (string) 'http://rc.paulscripts.nl'; + $link = (string) 'http://reallycoding.nl'; $title = (string) $id. $core->lang['site_stats']; $description = (string) $core->lang['stats_from']; $image_link = (string) ''; @@ -57,7 +57,7 @@ $taal = "en"; } $coreuage = (string) $taal; - $rights = (string) 'Copyright \xA9 2005 rc.paulscripts.nl'; + $rights = (string) 'Copyright \xA9 2005 reallycoding.nl'; $coverage = (string) ''; // spatial location , temporal period or jurisdiction $contributor = (string) 'rc.paulscripts'; // person, an organization, or a service header('Cache-control: no-cache, no-store'); @@ -88,7 +88,7 @@ } function add_rss_item($description,$title,$link) { - $author = (string) 'rc.paulscripts.nl'; // author of item + $author = (string) 'reallycoding.nl'; // author of item $comments = (string) ''; // url to comment page rss 2.0 value $about = $link; ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-05-14 17:00:05
|
Revision: 1839 Author: paulsohier Date: 2006-05-14 09:59:50 -0700 (Sun, 14 May 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1839&view=rev Log Message: ----------- Again some changes to error handler Lang changes Forgotten tpl file Removed rcts_error table, because we don't use him (And rcts_sessions?!?) Removed error.php, old things must be deleted ;) Modified Paths: -------------- trunk/version1.0/includes/classes/class.core.php trunk/version1.0/install/install.sql trunk/version1.0/lang/nl/main.php trunk/version1.0/templates/rcts/error.html Removed Paths: ------------- trunk/version1.0/error.php Deleted: trunk/version1.0/error.php =================================================================== --- trunk/version1.0/error.php 2006-05-14 16:58:05 UTC (rev 1838) +++ trunk/version1.0/error.php 2006-05-14 16:59:50 UTC (rev 1839) @@ -1,48 +0,0 @@ -<?php -/****************************************************************** -* Really Coding Traffic Statistics 2 -* Begin: October, 3rd 2005 -* Copyright: Copyright 2005 by Really coding Group -****************************************************************** -* statsGetJS.php -* **************** -* $Id$ -******************************************************************/ - -/******************************************************************* -* -* 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, or -* (at your option) any later version. -* -*******************************************************************/ -session_start(); -define('IN_STATS', true); -define('RCTS_ROOT_PATH', dirname(__FILE__)); -include(RCTS_ROOT_PATH.'/includes/start.php'); -pageHeader("Mysql fouten."); -$template->add_file(array("body"=>"errors.html")); -$template->assign(array( - "L_FILE" => $core->lang['file'], - "L_LINE" => $core->lang['line'], - "L_ERROR" => $core->lang['error'], - "L_SQL" => $core->lang['sql'], - "L_NO_RESULT" => $core->lang['no_result'] -)); -$sql = "SELECT * FROM ".RCTS_ERROR_TABLE." ORDER BY bestand DESC, regel ASC"; -$r = $db->sql_query($sql); - -if(!$db->sql_numrows($r)){ - $template->block("geen"); -} -while($g = $db->sql_fetchrow($r)){ - $template->block("error",array( - "file"=>$g['bestand'], - "line"=>$g['regel'], - "error"=>$g['fout'], - "sql"=>$g['query'] - )); -} -$template->parse("body"); -?> Modified: trunk/version1.0/includes/classes/class.core.php =================================================================== --- trunk/version1.0/includes/classes/class.core.php 2006-05-14 16:58:05 UTC (rev 1838) +++ trunk/version1.0/includes/classes/class.core.php 2006-05-14 16:59:50 UTC (rev 1839) @@ -635,15 +635,19 @@ case E_USER_ERROR: //There is an error, we cannot continue; $DIE = true; + $array['caption'] = $lang['crit']; break; case E_USER_WARNING: //There is a warning, but we CAN continue; + $array['caption'] = $lang['alg'] break; case E_USER_NOTICE: //We want to display information. //After add, we don't continue (Used at configuration etc.) $DIE = true; + $array['caption'] = $lang['informatie']; + break; @@ -717,22 +721,35 @@ } $txt = ''; if($dbt){ - $txt .= '<b>Database error [LAYER '.$err[3].']</b><br />'; - $txt .= 'SQL error: ' . $err[0]; - $txt .= '<br />SQL error nr: ' . $err[1]; - $txt .= '<br />SQL query: ' . $err[2]; + $db_err = '<b>%s [%s %s]</b><br />%s<br />%s: %s<br />%s: %s<br />%s: %s'; + + $txt .= sprintf($db_error, + $lang->lang['sql'], + $lang->lang['db_layer'], + $err[3], + (isset($lang->lang[$errmsg]) ? $lang->lang[$errmsg] : $errmsg), + $lang->lang['serror'], + $err[0], + $lang->lang['serrornr'], + $err[1], + $lang->lang['query'], + $err[2] + ); + }else{ if(isset($this->lang[$errmsg])){ $errmsg = $this->lang[$errmsg]; } $txt .= $errmsg; - } - $txt .= '<br />File: ' . $filename; - $txt .= '<br />Line: ' . $linenum; - $txt .= '<br />Backtrace'; - $txt .= $this->get_backtrace(); + } + if(defined('CRITICAL') || $this->is_login()){ + $txt .= sprintf('<br />%s:%s',((defined('CRITICAL')) ? 'file' : $lang->lang['file']),$filename); + $txt .= sprintf('<br />%s:%s',((defined('CRITICAL')) ? 'line' : $lang->lang['line']),$linenum); + $txt .= sprintf('<br />%s:%s',((defined('CRITICAL')) ? 'backtrace' : $lang->lang['backtrace']),$this->get_backtrace()); + } if(defined('CRITICAL')){ - print "<html><head><title>Critical error</title></head><body>$txt</body></html>"; + //Maybe we must here make a nice look to it. + print sprintf('<html><head><title>Critical error</title></head><body>%s</body></html>',$txt); //By a critical we allways die. die; }else{ Modified: trunk/version1.0/install/install.sql =================================================================== --- trunk/version1.0/install/install.sql 2006-05-14 16:58:05 UTC (rev 1838) +++ trunk/version1.0/install/install.sql 2006-05-14 16:59:50 UTC (rev 1839) @@ -7,12 +7,12 @@ # USE ALWAYS AS PREFIX rcts !!! # After every query must be come a ; -CREATE TABLE `rcts_sessions` ( - `sid` varchar(32) NOT NULL default '', - `tijd` int(10) NOT NULL default '0', - `counted` int(1) NOT NULL default '0', - UNIQUE KEY `sid` (`sid`) -); +#CREATE TABLE `rcts_sessions` ( +# `sid` varchar(32) NOT NULL default '', +# `tijd` int(10) NOT NULL default '0', +# `counted` int(1) NOT NULL default '0', +# UNIQUE KEY `sid` (`sid`) +#); CREATE TABLE `rcts_indentifer` ( `id` int(10) NOT NULL auto_increment, `indentifer` varchar(255) NOT NULL default '', @@ -30,14 +30,6 @@ waarde TEXT NOT NULL, UNIQUE(naam) ); -CREATE TABLE `rcts_error` ( -`id` INT( 10 ) NOT NULL AUTO_INCREMENT , -`bestand` VARCHAR( 255 ) NOT NULL , -`regel` INT( 10 ) NOT NULL , -`query` TEXT NOT NULL , -`fout` TEXT NOT NULL , -PRIMARY KEY ( `id` ) -); INSERT INTO `rcts_config` VALUES ('stats_open', '1'); INSERT INTO `rcts_config` VALUES ('cache', '0'); INSERT INTO `rcts_config` VALUES ('image_catch', '60'); Modified: trunk/version1.0/lang/nl/main.php =================================================================== --- trunk/version1.0/lang/nl/main.php 2006-05-14 16:58:05 UTC (rev 1838) +++ trunk/version1.0/lang/nl/main.php 2006-05-14 16:59:50 UTC (rev 1839) @@ -25,21 +25,19 @@ $langname = 'Nederlands'; $lang['informatie'] = 'Informatie'; -$lang['sql'] = 'SQL fout'; +$lang['sql'] = 'Database fout'; $lang['crit'] = 'Fatale fout'; $lang['alg'] = 'Algemene fout'; -$lang['fout_ontstaan'] = "Er is een fout ontstaan:"; -$lang['line'] = 'Regel:'; -$lang['file'] = 'Bestand:'; +$lang['line'] = 'Regel'; +$lang['file'] = 'Bestand'; $lang['query'] = 'SQL-query:'; $lang['serror'] = 'SQL-foutmelding:'; +$lang['serrornr'] = 'SQL-foutnummer:'; +$lang['backtrace'] = 'Backtrace'; +$lang['db_layer'] = 'LAYER'; //Added for error.php -$lang['file'] = 'Bestand'; -$lang['line'] = 'Regel'; -$lang['error'] = 'Fout'; -$lang['sql'] = 'SQL-query'; $lang['no_result'] = 'Geen resultaat'; $lang['old_version'] = 'Je gebruikt een te oude versie van RCTS. Daarom is deze automatisch uitgeschakeld.<br /> Bezoek <a href="http://www.reallycoding.nl/">www.reallycoding.nl</a> voor informatie over hoe je moet updaten.'; $lang['old_check'] = '%sHercontroleer je versie!%s'; Modified: trunk/version1.0/templates/rcts/error.html =================================================================== --- trunk/version1.0/templates/rcts/error.html 2006-05-14 16:58:05 UTC (rev 1838) +++ trunk/version1.0/templates/rcts/error.html 2006-05-14 16:59:50 UTC (rev 1839) @@ -1,10 +1,12 @@ - <div class="menu"> +<!-- BEGIN errors --> + <div class="menu"> <table width="100%" cellpadding="0" cellspacing="0"> <tr class="tr_kop"> <td class="td_kop">{L_ERROR}</td> </tr> </table> <div class="menu_content"> - {errortxt} + {errors.errortxt} </div> </div> +<!-- END errors --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bas...@us...> - 2006-05-16 14:46:09
|
Revision: 1841 Author: bastimmer Date: 2006-05-16 07:45:49 -0700 (Tue, 16 May 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1841&view=rev Log Message: ----------- Fixing some of paal's stuff, and other stuff. Modified Paths: -------------- trunk/version1.0/includes/classes/class.core.php trunk/version1.0/includes/classes/class.mailer.php trunk/version1.0/includes/classes/class.template.php trunk/version1.0/includes/functions.php trunk/version1.0/templates/rcts/error.html Added Paths: ----------- trunk/version1.0/.project Added: trunk/version1.0/.project =================================================================== --- trunk/version1.0/.project (rev 0) +++ trunk/version1.0/.project 2006-05-16 14:45:49 UTC (rev 1841) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>RCTS2</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>net.sourceforge.phpeclipse.parserbuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>net.sourceforge.phpeclipse.phpnature</nature> + </natures> +</projectDescription> Modified: trunk/version1.0/includes/classes/class.core.php =================================================================== --- trunk/version1.0/includes/classes/class.core.php 2006-05-16 13:35:45 UTC (rev 1840) +++ trunk/version1.0/includes/classes/class.core.php 2006-05-16 14:45:49 UTC (rev 1841) @@ -102,7 +102,7 @@ "cron" => "cron", //"session" => "session", "pluginsClass" => "RCPlugins", - "mailer" => "mailer", + //"mailer" => "mailer", "browser" => "browser", "calendar" => "calendar", "cache" => "cache", @@ -615,7 +615,7 @@ $filename = basename($filename); $DIE = false; - + if($errno == E_USER_ERROR || $errno == E_USER_WARNING || E_USER_NOTICE){ //trigger_error $array = array( @@ -631,27 +631,7 @@ $dis = true; $user = true; $this->DW($array); - switch($errno){ - case E_USER_ERROR: - //There is an error, we cannot continue; - $DIE = true; - $array['caption'] = $lang['crit']; - break; - case E_USER_WARNING: - //There is a warning, but we CAN continue; - $array['caption'] = $lang['alg']; - break; - case E_USER_NOTICE: - //We want to display information. - //After add, we don't continue (Used at configuration etc.) - $DIE = true; - $array['caption'] = $lang['informatie']; - - - break; - - - } + }else{ $array = array( "errno" => $errno, @@ -715,27 +695,50 @@ $template = new tpl('templates/rcts/'); } } - if(!count($this->lang)){ + if(!isset($this->lang) || !count($this->lang)){ $this->loadlang(); } } + // Moved here, because of lang just loaded here. + if($errno == E_USER_ERROR || $errno == E_USER_WARNING || E_USER_NOTICE){ + switch($errno){ + case E_USER_ERROR: + //There is an error, we cannot continue; + $DIE = true; + $array['caption'] = $this->lang['crit']; + break; + case E_USER_WARNING: + //There is a warning, but we CAN continue; + $array['caption'] = $this->lang['alg']; + break; + case E_USER_NOTICE: + //We want to display information. + //After add, we don't continue (Used at configuration etc.) + $DIE = true; + $array['caption'] = $this->lang['informatie']; + + + break; + + + } + } $txt = ''; if($dbt){ $db_err = '<b>%s [%s %s]</b><br />%s<br />%s: %s<br />%s: %s<br />%s: %s'; - $txt .= sprintf($db_error, - $lang->lang['sql'], - $lang->lang['db_layer'], + $txt .= sprintf($db_err, + $this->lang['sql'], + $this->lang['db_layer'], $err[3], - (isset($lang->lang[$errmsg]) ? $lang->lang[$errmsg] : $errmsg), - $lang->lang['serror'], + (isset($this->lang[$errmsg]) ? $this->lang[$errmsg] : $errmsg), + $this->lang['serror'], $err[0], - $lang->lang['serrornr'], + $this->lang['serrornr'], $err[1], - $lang->lang['query'], + $this->lang['query'], $err[2] ); - }else{ if(isset($this->lang[$errmsg])){ $errmsg = $this->lang[$errmsg]; @@ -747,23 +750,25 @@ $txt .= sprintf('<br />%s:%s',((defined('CRITICAL')) ? 'line' : $lang->lang['line']),$linenum); $txt .= sprintf('<br />%s:%s',((defined('CRITICAL')) ? 'backtrace' : $lang->lang['backtrace']),$this->get_backtrace()); } + if(defined('CRITICAL')){ //Maybe we must here make a nice look to it. print sprintf('<html><head><title>Critical error</title></head><body>%s</body></html>',$txt); //By a critical we allways die. die; }else{ - if(!defined("IN_ADMIN")){ - pageHeader($this->lang['error']); + if(!defined("IN_ADMIN")){ // Change these. :) + pageHeader($this->lang['alg']); }else{ - $this->adminheader($this->lang['error']); + $this->adminheader($this->lang['alg']); } if(!$template->is_reg('error_body')){ $template->add_file(array('error_body' => 'error.html')); } $template->block('errors',array( 'errortxt' => $txt - )); + )); + if($DIE){ if(!defined('IN_ADMIN')){ pageFooter(); Modified: trunk/version1.0/includes/classes/class.mailer.php =================================================================== --- trunk/version1.0/includes/classes/class.mailer.php 2006-05-16 13:35:45 UTC (rev 1840) +++ trunk/version1.0/includes/classes/class.mailer.php 2006-05-16 14:45:49 UTC (rev 1841) @@ -43,7 +43,7 @@ function send(){ global $mail; //Connect to smtp server. - self::connect(); + $this->connect(); $headers = $mail->CreateHeader(); //var_dump($headers); @@ -106,26 +106,26 @@ unset($to2); - if($mail->$auth){ + if($mail->auth){ //Send EHLO - self::sendLine("EHLO " . self::$host); - self::parse('250',__LINE__,__FILE__); - self::sendLine("AUTH LOGIN"); - self::parse('334',__LINE__,__FILE__); - self::sendLine(base64_encode($mail->user)); - self::parse('334',__LINE__,__FILE__); - self::sendLine(base64_encode($mail->pass)); - self::parse('235',__LINE__,__FILE__); + $this->sendLine("EHLO " . $this->host); + $this->parse('250',__LINE__,__FILE__); + $this->sendLine("AUTH LOGIN"); + $this->parse('334',__LINE__,__FILE__); + $this->sendLine(base64_encode($mail->user)); + $this->parse('334',__LINE__,__FILE__); + $this->sendLine(base64_encode($mail->pass)); + $this->parse('235',__LINE__,__FILE__); }else{ //Send HELO - self::sendLine("HELO " . self::$host); - self::parse('250',__LINE__,__FILE__); + $this->sendLine("HELO " . $this->host); + $this->parse('250',__LINE__,__FILE__); } //Okay connected. //Send from - self::sendLine("MAIL FROM: <" . $mail->from . ">"); - self::parse('250',__LINE__,__FILE__); + $this->sendLine("MAIL FROM: <" . $mail->from . ">"); + $this->parse('250',__LINE__,__FILE__); $to2 = explode(", ",$to); @@ -135,8 +135,8 @@ $to_address = trim($to_address); if (preg_match('#[^ ]+\@[^ ]+#', $to_address)) { - self::sendline( "RCPT TO: <$to_address>"); - self::parse( "250", __LINE__,__FILE__); + $this->sendline( "RCPT TO: <$to_address>"); + $this->parse( "250", __LINE__,__FILE__); } } reset($bcc); @@ -146,8 +146,8 @@ $bcc_address = trim($bcc_address); if (preg_match('#[^ ]+\@[^ ]+#', $bcc_address)) { - self::sendline( "RCPT TO: <$bcc_address>"); - self::parse( "250", __LINE__,__FILE__); + $this->sendline( "RCPT TO: <$bcc_address>"); + $this->parse( "250", __LINE__,__FILE__); } } reset($cc); @@ -156,29 +156,29 @@ $cc_address = trim($cc_address); if (preg_match('#[^ ]+\@[^ ]+#', $cc_address)) { - self::sendline( "RCPT TO: <$cc_address>"); - self::parse( "250", __LINE__,__FILE__); + $this->sendline( "RCPT TO: <$cc_address>"); + $this->parse( "250", __LINE__,__FILE__); } } //Receipts send. - self::sendLine("DATA"); - self::parse("354", __LINE__,__FILE__); + $this->sendLine("DATA"); + $this->parse("354", __LINE__,__FILE__); - self::sendLine("Subject: " . $mail->subject); - self::sendLine("To: " . $to); + $this->sendLine("Subject: " . $mail->subject); + $this->sendLine("To: " . $to); - self::sendLine($headers . "\r\n"); + $this->sendLine($headers . "\r\n"); - self::sendLine($mail->CreateBody()); - self::sendLine("."); + $this->sendLine($mail->CreateBody()); + $this->sendLine("."); //And the latest check. - self::parse('250',__LINE__,__FILE__ ); + $this->parse('250',__LINE__,__FILE__ ); //Close connection :) - self::sendLine('QUIT'); - self::parse('221',__LINE__,__FILE__ ); - fclose(self::$connection); + $this->sendLine('QUIT'); + $this->parse('221',__LINE__,__FILE__ ); + fclose($this->connection); return true; } //Private functions: @@ -187,7 +187,7 @@ * @acces private **/ function sendLine($command){ - fputs(self::$connection, $command . "\r\n"); + fputs($this->connection, $command . "\r\n"); } /** * Function to connect to the smtp server. @@ -195,24 +195,24 @@ * @acces private **/ function connect(){ - $host = self::$host = $mail->smtp_host; - $port = self::$port = $mail->smtp_port; + $host = $this->host = $mail->smtp_host; + $port = $this->port = $mail->smtp_port; $tval = 10; - self::$connection = @fsockopen($host,$port, $errno, $errstr, $tval); + $this->connection = @fsockopen($host,$port, $errno, $errstr, $tval); - if(empty(self::$connection)) { + if(empty($this->connection)) { trigger_error('Could not connect to smtp server.',E_USER_WARNING); return; } if(function_exists("socket_set_timeout")){ - socket_set_timeout(self::$connection, $tval, 0); + socket_set_timeout($this->connection, $tval, 0); } - // print (int)self::$connection; + // print (int)$this->connection; //$announce = $this->get_lines(); - self::parse('220',__LINE__,__FILE__ ); + $this->parse('220',__LINE__,__FILE__ ); } /** * Function to parse server reaction @@ -226,7 +226,7 @@ while (substr($server_response, 3, 1) != ' ') { - if (!($server_response = fgets(self::$connection, 1024))) + if (!($server_response = fgets($this->connection, 1024))) { trigger_error('Could not read smtp response',E_USER_WARNING); } Modified: trunk/version1.0/includes/classes/class.template.php =================================================================== --- trunk/version1.0/includes/classes/class.template.php 2006-05-16 13:35:45 UTC (rev 1840) +++ trunk/version1.0/includes/classes/class.template.php 2006-05-16 14:45:49 UTC (rev 1841) @@ -87,7 +87,7 @@ trigger_error("\$file isn't a array.",E_USER_WARNING); } while(list($el,$wa) = each($file)){ - if(!$this->is_reg($this->files[$el])){ + if(!$this->is_reg($el)){ $this->files[$el] = $wa; }else{ //Throw an error Modified: trunk/version1.0/includes/functions.php =================================================================== --- trunk/version1.0/includes/functions.php 2006-05-16 13:35:45 UTC (rev 1840) +++ trunk/version1.0/includes/functions.php 2006-05-16 14:45:49 UTC (rev 1841) @@ -137,7 +137,7 @@ 'L_TIME_RUN' => $core->lang['time_run'], 'L_SEC' => $core->lang['Sec'], //More lang :P - 'L_ERROR' => $core->lang['error'], + 'L_ERROR' => $core->lang['alg'], 'L_CALENDAR' => $core->lang['calendar'], 'HEADER_ICON' => (!empty($image)) ? '<img src="images/header_icons/'.$image.'.png" alt="'.$title.'" title="'.$title.'" />' : '', 'NOTICES' => $notices, Modified: trunk/version1.0/templates/rcts/error.html =================================================================== --- trunk/version1.0/templates/rcts/error.html 2006-05-16 13:35:45 UTC (rev 1840) +++ trunk/version1.0/templates/rcts/error.html 2006-05-16 14:45:49 UTC (rev 1841) @@ -1,4 +1,4 @@ -<!-- BEGIN errors --> +<!-- START errors --> <div class="menu"> <table width="100%" cellpadding="0" cellspacing="0"> <tr class="tr_kop"> @@ -9,4 +9,4 @@ {errors.errortxt} </div> </div> -<!-- END errors --> +<!-- STOP errors --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pau...@us...> - 2006-05-16 17:40:45
|
Revision: 1849 Author: paulsohier Date: 2006-05-16 10:40:32 -0700 (Tue, 16 May 2006) ViewCVS: http://svn.sourceforge.net/rcts/?rev=1849&view=rev Log Message: ----------- More config :D (And more killing things :D) Modified Paths: -------------- trunk/version1.0/cache/config.php trunk/version1.0/includes/classes/class.browser.php trunk/version1.0/includes/classes/class.calendar.php trunk/version1.0/includes/classes/class.core.php trunk/version1.0/includes/classes/class.template.php trunk/version1.0/includes/functions.php trunk/version1.0/includes/start.php trunk/version1.0/stats.php Modified: trunk/version1.0/cache/config.php =================================================================== --- trunk/version1.0/cache/config.php 2006-05-16 17:21:25 UTC (rev 1848) +++ trunk/version1.0/cache/config.php 2006-05-16 17:40:32 UTC (rev 1849) @@ -1 +1 @@ -<?php $this->config = array();?> \ No newline at end of file +<?php $this->config = array('installid'=>'1DD45FF6-E5D9-A98F-8044-B20EC798CF3E');?> \ No newline at end of file Modified: trunk/version1.0/includes/classes/class.browser.php =================================================================== --- trunk/version1.0/includes/classes/class.browser.php 2006-05-16 17:21:25 UTC (rev 1848) +++ trunk/version1.0/includes/classes/class.browser.php 2006-05-16 17:40:32 UTC (rev 1849) @@ -59,7 +59,7 @@ * Return the source. * @return string source of the posting page */ - function showContents() { + function showContents($md5 = false) { if(strlen($this -> data) > 0) { list($header) = explode("\r\n\r\n", $this -> data); list( , $content) = explode($header, $this -> data); Modified: trunk/version1.0/includes/classes/class.calendar.php =================================================================== --- trunk/version1.0/includes/classes/class.calendar.php 2006-05-16 17:21:25 UTC (rev 1848) +++ trunk/version1.0/includes/classes/class.calendar.php 2006-05-16 17:40:32 UTC (rev 1849) @@ -588,7 +588,7 @@ $prev = $this -> get_prev_month_time($current); $mode = get_var('mode'); - if($prev <= $config->config['startdate']) + if($prev <= $core->config_Get('startdate')) { $u_prev = ''; } Modified: trunk/version1.0/includes/classes/class.core.php =================================================================== --- trunk/version1.0/includes/classes/class.core.php 2006-05-16 17:21:25 UTC (rev 1848) +++ trunk/version1.0/includes/classes/class.core.php 2006-05-16 17:40:32 UTC (rev 1849) @@ -29,6 +29,7 @@ var $IP = '127.0.0.1'; var $unset = array("ftp_ww","smtp_ww","username","password"); var $crypt = ''; + /** * Load all needed things by rcts * @access public @@ -57,7 +58,6 @@ "includes/classes/class.viewer.php", "includes/classes/class.getstats.php", "includes/classes/class.3dbargraph.php", - "includes/classes/class.config.php", "includes/classes/class.cron.php", "includes/classes/class.graph.php", "includes/classes/class.layout.php", @@ -91,14 +91,11 @@ unset_global($_SERVER); unset_global($_REQUEST); } - //The next thing requires php 4.3.0 :) - $old = set_error_handler(array($this, 'trigger')); if(!defined('STATS_INSTALLED') && !defined('IN_INSTALL') && !defined("UPDATOR")){ trigger_error('You cannot run this application without install it with the netinstall.'); } $class = array( "db" => array("db",$host,$username,$password,$database), - "config" => "config", "cron" => "cron", //"session" => "session", "pluginsClass" => "RCPlugins", @@ -402,12 +399,12 @@ return substr($raw,0,8).'-'.substr($raw,8,4).'-'.substr($raw,12,4).'-'.substr($raw,16,4).'-'.substr($raw,20); } function checkguid() { - global $config,$browser; + global $cache,$browser; if(defined("IN_INSTALL")){ return; } - if (isset($config->config['installid'])) { + if ($this->config_isset('installid')) { return; } $this->getGuid(); @@ -432,7 +429,7 @@ $this->verstuurd = false; } if ($this->verstuurd) { - $config->update('installid', $this->toString()); + $cache->upd_config('installid', $this->toString()); } } function adminheader(){ @@ -549,34 +546,30 @@ @return: Nothing. */ function DW($array){ - global $config,$browser; + global $cache,$browser; + if(!is_object($cache)){ + if(!class_Exists('cache')){ + require(RCTS_ROOT_PATH . '/includes/classes/class.cache.php'); + $cache = new cache; + } + } - if($config){ - $guid = $config->config['installid']; - if(!$guid && !defined("IN_INSTALL")){ - $this->checkcheck(); - $guid = $config->config['installid']; - - } - if(!$config->config['use_dw']){ - return; - } - $array['version'] = $config->config['version']; - $array['config'] = $config->config; - //Unset some vars. - for($i = 0; $i < count($this->unset);$i++){ - unset($array['config'][$this->unset[$i]]); - } - }else{ - if(defined("IN_INSTALL")){ - return; - }else{ - include_once(RCTS_ROOT_PATH . "/includes/classes/class.config.php"); - $config = new config; - $config->load(); - return $this->DW($array); - } + $guid = $this->config_get('installid'); + if(!$guid && !defined("IN_INSTALL")){ + $this->checkguid(); + $guid = $this->config_get('installid'); + } + if(!$this->config_get('use_dw')){ + return; + } + $array['version'] = $config->config['version']; + $array['config'] = $config->config; + //Unset some vars. + for($i = 0; $i < count($this->unset);$i++){ + unset($array['config'][$this->unset[$i]]); + } + if(!is_object($browser)){ $browser = new browser(); } @@ -631,7 +624,9 @@ "line" => $linenum, "error2" => $errmsg, "linenum" => $linenum, - "trigger" => "trigger_error" + "trigger" => "trigger_error", + "caption" => "" + ); $dis = true; $user = true; @@ -988,6 +983,10 @@ }else{ trigger_error(sprintf($this->lang['c_option_no'],htmlspecialchars($el)),E_USER_WARNING); } + } + function config_isset($el){ + global $cache; + return (isset($cache->config[$el])); } } ?> Modified: trunk/version1.0/includes/classes/class.template.php =================================================================== --- trunk/version1.0/includes/classes/class.template.php 2006-05-16 17:21:25 UTC (rev 1848) +++ trunk/version1.0/includes/classes/class.template.php 2006-05-16 17:40:32 UTC (rev 1849) @@ -65,7 +65,7 @@ } if(!file_exists($themeFile) && !defined("IN_INSTALL")){//At the instal map, they DON't exists! global $error; - trigger_error("Template file doesn't exists.",E_USER_WARNING); + trigger_error("Template file($themeFile) doesn't exists.",E_USER_WARNING); } }else{ if(!file_exists($dir)){ @@ -171,7 +171,7 @@ } function parse($mode,$no_eval = false){ //var_dump($this);die; - global $config; + global $core; if(!isset($this->files[$mode])){ trigger_error("$mode doesn't exists.",E_USER_WARNING); } @@ -205,7 +205,7 @@ $modes = get_var('mode'); $day = get_var('day'); - if($config->is()) + if($core->is_login()) { $array = array(); preg_match_all("#\[\[ START NAVROW \]\](.*?)\[\[ STOP NAVROW \]\]#si",$row,$array); Modified: trunk/version1.0/includes/functions.php =================================================================== --- trunk/version1.0/includes/functions.php 2006-05-16 17:21:25 UTC (rev 1848) +++ trunk/version1.0/includes/functions.php 2006-05-16 17:40:32 UTC (rev 1849) @@ -117,7 +117,7 @@ 'L_CONF' => $core->lang['configu'], 'L_LOGIN' => $core->lang['login'], 'SQL_Q' => $core->lang['sql_q'], - 'TEMPLATE' => (isset($config->config['default_tpl']) && $config->config['default_tpl']) ? $config->config['default_tpl'] : 'standaard', + 'TEMPLATE' => ($core->config_isset('default_tpl') && $core->config_get('default_tpl')) ? $core->config_get('default_tpl') : 'standaard', 'L_STATS_MAIN' => $core->lang['stats_main'], 'L_LOAD_STATS' => $core->lang['stats_load'], 'L_TIME_STATS' => $core->lang['stats_time'], @@ -131,7 +131,7 @@ 'L_SELECT2' => $core->lang['select_lang'], 'L_CHANGE_LANG' => $core->lang['change_lang'], //Version - 'VERSION' => $config->config['version'], + 'VERSION' => $core->config_get('version'), 'L_VERSION' => $core->lang['version'], 'YEAR' => date("Y"), 'L_TIME_RUN' => $core->lang['time_run'], Modified: trunk/version1.0/includes/start.php =================================================================== --- trunk/version1.0/includes/start.php 2006-05-16 17:21:25 UTC (rev 1848) +++ trunk/version1.0/includes/start.php 2006-05-16 17:40:32 UTC (rev 1849) @@ -53,6 +53,8 @@ //Included core class require(RCTS_ROOT_PATH . "/includes/classes/class.core.php"); $core = new core; +//The next thing requires php 4.3.0 :) +$old = set_error_handler(array($core, 'trigger')); $core->run(); if($config->config['mod_rewrite']){ Modified: trunk/version1.0/stats.php =================================================================== --- trunk/version1.0/stats.php 2006-05-16 17:21:25 UTC (rev 1848) +++ trunk/version1.0/stats.php 2006-05-16 17:40:32 UTC (rev 1849) @@ -31,11 +31,11 @@ $mode = $layout->getMode(); $title = ''; //If you set at config that the stats are closed for guest, you must login! -if($config->config['stats_open'] == 0) +if($core->config['stats_open'] == 0) { - if(!$config->is()) + if(!$core->is_login()) { - $config->form("stats.php"); + $core->login_form("stats.php"); } } // This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |