Poprawne dodanie statystyk stat24, stat4u i innych tego typu
|
lukeboss |
Dodany dnia 14.06.2010 23:21:55
|
Przedszkolak
Postów: 25 Ostrzeżeń: 1
Data rejestracji: 29.01.2010 11:38
|
Staram się robić wszystko czytajać temat od pierwszego posta i stąd }. Cały plik footer.php
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: footer.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
require_once INCLUDES."footer_includes.php";
define("CONTENT", ob_get_contents());
ob_end_clean();
render_page(false);
if (eregi($settings['opening_page'], $_SERVER['PHP_SELF'])) {
echo"
<!-- (C) stat24.com / Strona glowna -->
<script type=\"text/javascript\">
<!--
document.writeln(\"<'+'scr'+'ipt type=\"text/javascript\" src=\"http://s3.hit.stat24.com/_'+(new Date()).getTime()+'/script.js?id=0sg70mbauBuMDbQAu3vgm9T473xB4M9_ZLHvvhcCfKj.I7/l=11\"></'+'scr'+'ipt>\");
//-->
</script>";
} else {
//kod dla podstron
echo"
<!-- (C) stat24.com / podstrony -->
<script type=\"text/javascript\">
<!--
document.writeln(\"<'+'scr'+'ipt type=\"text/javascript\" src=\"http://s4.hit.stat24.com/_'+(new Date()).getTime()+'/script.js?id=ciiV9oe0bSYctNrPM8fsg8chzbrkPCeW6eqnLnZF_qz.57/l=11\"></'+'scr'+'ipt>\");
//-->
</script>";
}
echo "</body>\n</html>\n";
if (iADMIN) {
$result = dbquery("DELETE FROM ".DB_FLOOD_CONTROL." WHERE flood_timestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_THREAD_NOTIFY." WHERE notify_datestamp < '".(time()-1209600)."'");
$result = dbquery("DELETE FROM ".DB_CAPTCHA." WHERE captcha_datestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_NEW_USERS." WHERE user_datestamp < '".(time()-86400)."'");
}
$output = ob_get_contents();
ob_end_clean();
echo handle_output($output);
if(ob_get_length () !== FALSE){
ob_end_flush();
}
mysql_close();
?>
Wiadomość doklejona:
i co wie ktoś jak pomóc?
Edytowane przez lukeboss dnia 15.06.2010 13:54:25
|
|
|
|
Wścibski Gość |
Dodany dnia 24.11.2024 18:45:32
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
fisiuxxx |
Dodany dnia 18.09.2010 15:36:48
|
Przedszkolak
Postów: 13
Data rejestracji: 28.12.2009 15:53
|
Eh, wkleiłem swój kod do stopki przez panel, i mi nie nalicza.. mój kod:
<!-- stat.4u.pl NiE KaSoWaC -->
<a target=_top href='http://stat.4u.pl/?fisiuxxx' title='statystyki stron WWW'><img alt='stat4u' src='http://adstat.4u.pl/s4u.gif' border='0'></a>
<!--
function s4upl() { return '&r=er';}
//-->
<!--
s4uext=s4upl();
document.write('<img alt='stat4u' src='http://stat.4u.pl/cgi-bin/s.cgi?i=fisiuxxx'+s4uext+'' width='1' height='1'>')
//-->
<noscript><img alt='stat4u' src='http://stat.4u.pl/cgi-bin/s.cgi?i=fisiuxxx&r=ns' width='1' height='1'></noscript>
<!-- stat.4u.pl KoNiEc -->
Edytowane przez khaman dnia 18.09.2010 15:39:08
|
|
|
|
khaman |
Dodany dnia 18.09.2010 15:42:00
|
Postów: 2507 Pomógł: 78
Data rejestracji: 26.06.2007 12:11
|
A co ty mistrzu robisz w dziale v7? Podobno masz EF? To jest wsparcie PHP-Fusion, EF tylko dodatkowo. Trzymaj się swojego działu. PF7 to nie EF.
http://www.php-fu...d_id=25310
PS .Strona, której dotyczy problem?
Edytowane przez khaman dnia 18.09.2010 16:24:25
Posty pomocne oznaczaj jako pomógł Nie pomagam na PW/GG | Brak stopki = brak pomocy
|
|
|
|
Imrahil |
Dodany dnia 16.11.2010 20:35:13
|
Początkujący
Postów: 168 Ostrzeżeń: 3
Data rejestracji: 10.09.2007 18:50
|
W walidatorze stat24 stale wywala mi błąd...
Mój footer:
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: footer.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
require_once INCLUDES."footer_includes.php";
define("CONTENT", ob_get_contents());
ob_end_clean();
render_page(false);
if (eregi($settings['opening_page'], $_SERVER['PHP_SELF'])) {
//kod dla strony glownej
echo "<!-- (C) stat24 / Strona glowna -->
<script type=\"text/javascript\">
<!--
document.writeln(\"<'+'scr'+'ipt type=\"text/javascript\" src=\"http://s2.hit.stat24.com/_'+(new Date()).getTime()+'/script.js?id=ourrEnssQ.b4oahM8ThprZR7DqriMYM8WBLh49o2uhn.37/l=11\"></'+'scr'+'ipt>\");
//-->
</script>";
} else {
//kod dla podstron
echo "<!-- (C) stat24 / podstrony -->
<script type=\"text/javascript\">
<!--
document.writeln(\"<'+'scr'+'ipt type=\"text/javascript\" src=\"http://s2.hit.stat24.com/_'+(new Date()).getTime()+'/script.js?id=..tFNLPE9QLXGFlpC_yyHJPZrhbiXcMiWEVH2Nq_ymv.h7/l=11\"></'+'scr'+'ipt>\");
//-->
</script>";
}
echo "</body>\n</html>\n";
if (iADMIN) {
$result = dbquery("DELETE FROM ".DB_FLOOD_CONTROL." WHERE flood_timestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_THREAD_NOTIFY." WHERE notify_datestamp < '".(time()-1209600)."'");
$result = dbquery("DELETE FROM ".DB_CAPTCHA." WHERE captcha_datestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_NEW_USERS." WHERE user_datestamp < '".(time()-86400)."'");
}
$output = ob_get_contents();
ob_end_clean();
echo handle_output($output);
if(ob_get_length () !== FALSE){
ob_end_flush();
}
mysql_close();
?>
|
|
|
|
Kazimierz |
Dodany dnia 25.01.2011 17:45:47
|
Przedszkolak
Postów: 29
Data rejestracji: 24.10.2006 12:29
|
Witajcie.
Szukam czegoś na temat poprawnego dodania kodu statystyk stat24, ale to są jakieś inne wersje.
Ja dostałem takie coś:
<!--
document.writeln('<'+'scr'+'ipt type="text/javascript" src="http://s3.hit.stat.pl/_'+(new
Date()).getTime()+'/script.js?id=.kod"></'+'scr'+'ipt>');
//-->
Zastąpiłem id - w oryginale mam go oczywiście.
Co z tym zrobić? Próbowałem już wszystkiego, co znalazłem na forum i albo wyrzuca błąd i rozwala stronę, albo nie robi nic. Jak to wrzucić na stronę główną (wiem, że footer.php) i jak na pozostałe strony?
Dziękuję za pomoc.
---
Po przestudiowaniu kilku wątków zrobiłem coś takiego i umieściłem w ../templates/footer.php.
echo "<script type=\"text/javascript\">
<!--
document.writeln('<'+'scr'+'ipt type=\"text/javascript\"
src=\"http://s3.hit.stat.pl/_'+(new
Date()).getTime()+'/script.js?id=.kod\"></'+'scr'+'ipt>');
//-->
</script>";
Walidator podaje komunikat: W kodzie podanej strony wykryto nieprawidłowe skrypty.
Skrypt coś zlicza, bo zwiększa się np. liczba odsłon strony, ale nie ma danych dotyczących np. lokalizacji czy danych OS, itp. Co tu jest nie tak?
---
Ludzie pomóżcie, bo zaczynam tu pisać bloga :)
Doprowadziłem mój skrypt do identycznej postaci jak w poście 38 i walidator stat24 dalej stwierdza, że skrypt jest wadliwy.
Niestety, ze strony stat24 nie otrzymałem jak dotąd żadnej pomocy. Help!
---
No dobra, kończę pisanie tego mikrobloga :)
Statystyk stat24 nie udało mi się poprawnie zainstalować. Mój mail do stat24 pozostał bez odpowiedzi. Znacznie więcej zaangażowania wykazała pomoc techniczna mojego hostingu.
W tzw. międzyczasie spróbowałem zainstalować Google Analytics posiłkując się wskazówkami zamieszczonymi na tym forum i instalacja GA przebiegła bez żadnych zakłóceń - wszystko działa jak trzeba.
To tyle w temacie :)
Edytowane przez Kazimierz dnia 30.01.2011 20:04:04
|
|
|
|
MWHarry |
Dodany dnia 21.02.2011 15:03:31
|
Przedszkolak
Postów: 10
Data rejestracji: 16.02.2011 11:21
|
Panowie mogę liczyć na waszą pomoc. Próbuje gdzieś upchać kod do statystyk w pliku footer.php ale nic mi nie wychodzi.
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2010 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: footer.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
require_once INCLUDES."footer_includes.php";
define("CONTENT", ob_get_contents());
ob_end_clean();
render_page(false);
echo "</body>\n</html>\n";
// Cron Job (6 MIN)
if ($settings['cronjob_hour'] < (time()-360)) {
$result = dbquery("DELETE FROM ".DB_FLOOD_CONTROL." WHERE flood_timestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_CAPTCHA." WHERE captcha_datestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_USERS." WHERE user_joined='0' AND user_ip='0.0.0.0' and user_level='103'");
$result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value='".time()."' WHERE settings_name='cronjob_hour'");
}
// Cron Job (24 HOUR)
if ($settings['cronjob_day'] < (time()-86400)) {
$new_time = time();
$result = dbquery("DELETE FROM ".DB_THREAD_NOTIFY." WHERE notify_datestamp < '".(time()-1209600)."'");
$result = dbquery("DELETE FROM ".DB_NEW_USERS." WHERE user_datestamp < '".(time()-86400)."'");
$usr_inactive = dbcount("(user_id)", DB_USERS, "user_status='3' AND user_actiontime!='0' AND user_actiontime < '".time()."'");
if ($usr_inactive) {
require_once INCLUDES."sendmail_include.php";
$result = dbquery(
"SELECT user_id, user_name, user_email FROM ".DB_USERS."
WHERE user_status='3' AND user_actiontime!='0' AND user_actiontime < '".time()."'
LIMIT 10"
);
while ($data = dbarray($result)) {
$result2 = dbquery("UPDATE ".DB_USERS." SET user_status='0', user_actiontime='0' WHERE user_id='".$data['user_id']."'");
$subject = $locale['global_451'];
$message = str_replace("USER_NAME", $data['user_name'], $locale['global_452']);
$message = str_replace("LOST_PASSWORD", $settings['siteurl']."lostpassword.php", $message);
sendemail($data['user_name'], $data['user_email'], $settings['siteusername'], $settings['siteemail'], $subject, $message);
}
if ($usr_inactive > 10) { $new_time = $settings['cronjob_day']; }
}
$usr_deactivate = dbcount("(user_id)", DB_USERS, "user_actiontime < '".time()."' AND user_actiontime!='0' AND user_status='7'");
if ($usr_deactivate) {
$result = dbquery(
"SELECT user_id FROM ".DB_USERS."
WHERE user_actiontime < '".time()."' AND user_actiontime!='0' AND user_status='0'
LIMIT 10"
);
if ($settings['deactivation_action'] == 0) {
while ($data = dbarray($result)) {
$result = dbquery("UPDATE ".DB_USERS." SET user_actiontime='0', user_status='6' WHERE user_id='".$data['user_id']."'");
}
} else {
while ($data = dbarray($result)) {
$result = dbquery("DELETE FROM ".DB_USERS." WHERE user_id='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_ARTICLES." WHERE article_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_COMMENTS." WHERE comment_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_MESSAGES." WHERE message_to='".$data['user_id']."' OR message_from='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_NEWS." WHERE news_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_POLL_VOTES." WHERE vote_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_RATINGS." WHERE rating_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_SHOUTBOX." WHERE shout_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_SUSPENDS." WHERE suspended_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_THREADS." WHERE thread_author='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_POSTS." WHERE post_author='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_THREAD_NOTIFY." WHERE notify_user='".$data['user_id']."'");
}
}
if ($usr_deactivate > 10) { $new_time = $settings['cronjob_day']; }
}
$result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value='$new_time' WHERE settings_name='cronjob_day'");
}
$output = ob_get_contents();
if (ob_get_length() !== FALSE){
ob_end_clean();
}
echo handle_output($output);
if (ob_get_length() !== FALSE){
ob_end_flush();
}
if ($settings['login_method'] == "sessions") {
session_write_close();
}
mysql_close($db_connect);
?>
A oto kod do statystyk:
<!-- stat.4u.pl NiE KaSoWaC -->
<a target=_top href="http://stat.4u.pl/?u1bator"; title="statystyki"><img
src="http://adstat.4u.pl/s4u.gif"; border="0"></a>
<script language="javascript" type="text/javascript">
<!--
function s4upl() { return "&r=er";}
//-->
</script>
<script language="JavaScript" type="text/javascript"
src="http://adstat.4u.pl/s.js?u1bator"></script>;
<script language="JavaScript" type="text/javascript">
<!--
s4uext=s4upl();
document.write('<img
src="http://stat.4u.pl/cgi-bin/s.cgi?i=u1bator'+s4uext+'"; width=1
height=1>')
//-->
</script>
<noscript><img src="http://stat.4u.pl/cgi-bin/s.cgi?i=u1bator&r=ns";
width="1" height="1"></noscript>
<!-- stat.4u.pl KoNiEc -->
Edytowane przez MWHarry dnia 21.02.2011 15:05:31
|
|
|
|
ragez69 |
Dodany dnia 04.04.2011 20:19:17
|
Przedszkolak
Postów: 18
Data rejestracji: 10.01.2008 17:30
|
Odnośnie statystyk stat4u to raczej na forum nic nie znajdziesz. Przekopałem wszystko i nic. W wygenerowanych statystykach można pozamieniać wszystkie " na ' lub dodawać \ przd " i wtedy obrazek się pojawia, błędów nie ma, ale naliczanie nie działa.
Dokopałem się wiec do pomocy stat4u http://stat.4u.pl... i wygenerowałem sobie kod dla PHP/PERL i do wstawienia np: w PHP (a nie dla HTML) wkleiłem w panel i wreszcie działa! |
|
|
|
bogdan |
Dodany dnia 04.04.2011 20:25:13
|
Ekspert
Postów: 2451 Pomógł: 164
v7.02.07 Data rejestracji: 21.07.2009 12:55
|
U mnie "stat4u" działa w panelu zainstalowany w ten sposób:
@openside("STAT4");
?>
KOD_STAT4
<?
@closeside();
Może się przyda ;)
Edytowane przez bogdan dnia 04.04.2011 20:27:37
Nie szukaj Szczęścia, lecz dawaj Je innym, a wtedy samo do Ciebie przyjdzie.
Nie ma mnie na GG.
|
|
|
|
tekner |
Dodany dnia 23.06.2011 15:16:38
|
Przedszkolak
Postów: 4 Ostrzeżeń: 1
v7.01.04 Data rejestracji: 23.06.2011 14:00
|
Witam,
obserwuję ten wątek, ale jestem totalnym laikiem i nie potrafię poprawnie zamieścić kodu statystyk w footer.php.
Wcześniej zamieściłem kod w panel administratora -> ustawienia -> główne -> stopka. W stopce pojawiało się logo z linkiem do STAT4U.PL, ale statystyki nie działały.
Proszę o pomoc:
1. korzystam z PHP Fusion v7.01.04
2. zamieszczam kod footer.php
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2010 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: footer.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
require_once INCLUDES."footer_includes.php";
define("CONTENT", ob_get_contents());
ob_end_clean();
render_page(false);
echo "</body>\n</html>\n";
// Cron Job (6 MIN)
if ($settings['cronjob_hour'] < (time()-360)) {
$result = dbquery("DELETE FROM ".DB_FLOOD_CONTROL." WHERE flood_timestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_CAPTCHA." WHERE captcha_datestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_USERS." WHERE user_joined='0' AND user_ip='0.0.0.0' and user_level='103'");
$result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value='".time()."' WHERE settings_name='cronjob_hour'");
}
// Cron Job (24 HOUR)
if ($settings['cronjob_day'] < (time()-86400)) {
$new_time = time();
$result = dbquery("DELETE FROM ".DB_THREAD_NOTIFY." WHERE notify_datestamp < '".(time()-1209600)."'");
$result = dbquery("DELETE FROM ".DB_NEW_USERS." WHERE user_datestamp < '".(time()-86400)."'");
$usr_inactive = dbcount("(user_id)", DB_USERS, "user_status='3' AND user_actiontime!='0' AND user_actiontime < '".time()."'");
if ($usr_inactive) {
require_once INCLUDES."sendmail_include.php";
$result = dbquery(
"SELECT user_id, user_name, user_email FROM ".DB_USERS."
WHERE user_status='3' AND user_actiontime!='0' AND user_actiontime < '".time()."'
LIMIT 10"
);
while ($data = dbarray($result)) {
$result2 = dbquery("UPDATE ".DB_USERS." SET user_status='0', user_actiontime='0' WHERE user_id='".$data['user_id']."'");
$subject = $locale['global_451'];
$message = str_replace("USER_NAME", $data['user_name'], $locale['global_452']);
$message = str_replace("LOST_PASSWORD", $settings['siteurl']."lostpassword.php", $message);
sendemail($data['user_name'], $data['user_email'], $settings['siteusername'], $settings['siteemail'], $subject, $message);
}
if ($usr_inactive > 10) { $new_time = $settings['cronjob_day']; }
}
$usr_deactivate = dbcount("(user_id)", DB_USERS, "user_actiontime < '".time()."' AND user_actiontime!='0' AND user_status='7'");
if ($usr_deactivate) {
$result = dbquery(
"SELECT user_id FROM ".DB_USERS."
WHERE user_actiontime < '".time()."' AND user_actiontime!='0' AND user_status='0'
LIMIT 10"
);
if ($settings['deactivation_action'] == 0) {
while ($data = dbarray($result)) {
$result = dbquery("UPDATE ".DB_USERS." SET user_actiontime='0', user_status='6' WHERE user_id='".$data['user_id']."'");
}
} else {
while ($data = dbarray($result)) {
$result = dbquery("DELETE FROM ".DB_USERS." WHERE user_id='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_ARTICLES." WHERE article_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_COMMENTS." WHERE comment_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_MESSAGES." WHERE message_to='".$data['user_id']."' OR message_from='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_NEWS." WHERE news_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_POLL_VOTES." WHERE vote_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_RATINGS." WHERE rating_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_SHOUTBOX." WHERE shout_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_SUSPENDS." WHERE suspended_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_THREADS." WHERE thread_author='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_POSTS." WHERE post_author='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_THREAD_NOTIFY." WHERE notify_user='".$data['user_id']."'");
}
}
if ($usr_deactivate > 10) { $new_time = $settings['cronjob_day']; }
}
$result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value='$new_time' WHERE settings_name='cronjob_day'");
}
$output = ob_get_contents();
if (ob_get_length() !== FALSE){
ob_end_clean();
}
echo handle_output($output);
$del = ob_get_status();
if(ob_get_length () !== FALSE AND $del['del'] != ""){
ob_end_flush();
}
if ($settings['login_method'] == "sessions") {
session_write_close();
}
mysql_close($db_connect);
?>
3. zamieszczam kod stat4u
<!-- stat.4u.pl NiE KaSoWaC -->
<a target=_top href="http://stat.4u.pl/?parafiasaczow" title="statystyki stron WWW"><img alt="stat4u" src="http://adstat.4u.pl/s4u.gif" border="0"></a>
<script language="JavaScript" type="text/javascript">
<!--
function s4upl() { return "&r=er";}
//-->
</script>
<script language="JavaScript" type="text/javascript" src="http://adstat.4u.pl/s.js?parafiasaczow"></script>
<script language="JavaScript" type="text/javascript">
<!--
s4uext=s4upl();
document.write('<img alt="stat4u" src="http://stat.4u.pl/cgi-bin/s.cgi?i=parafiasaczow'+s4uext+'" width="1" height="1">')
//-->
</script>
<noscript><img alt="stat4u" src="http://stat.4u.pl/cgi-bin/s.cgi?i=parafiasaczow&r=ns" width="1" height="1"></noscript>
<!-- stat.4u.pl KoNiEc -->
Chciałbym monitorować ilość wejść na stronę główną i podstrony.
Jeśli umieściłem post w nieprawidłowym dziale, przepraszam - to jest mój pierwszy post na tym forum. Z góry dziękuję za pomoc :)! |
|
|
|
emil90ck |
Dodany dnia 23.06.2011 15:40:15
|
Bywalec
Postów: 376 Pomógł: 30 Ostrzeżeń: 3
v7.00.05 Data rejestracji: 25.07.2008 13:11
|
Spróbuj tak:
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2010 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: footer.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
require_once INCLUDES."footer_includes.php";
define("CONTENT", ob_get_contents());
ob_end_clean();
render_page(false);
// stat.4u.pl NiE KaSoWaC
echo "<a target=_top href=\"http://stat.4u.pl/?parafiasaczow\" title=\"statystyki stron WWW\"><img alt=\"stat4u\" src=\"http://adstat.4u.pl/s4u.gif\" border=\"0\"></a>
<script language=\"JavaScript\" type=\"text/javascript\">
<!--
function s4upl() { return \"&r=er\";}
//-->
</script>
<script language=\"JavaScript\" type=\"text/javascript\" src=\"http://adstat.4u.pl/s.js?parafiasaczow\"></script>
<script language=\"JavaScript\" type=\"text/javascript\">
<!--
s4uext=s4upl();
document.write('<img alt=\"stat4u\" src=\"http://stat.4u.pl/cgi-bin/s.cgi?i=parafiasaczow'+s4uext+'\" width=\"1\" height=\"1\">')
//-->
</script>
<noscript><img alt=\"stat4u\" src=\"http://stat.4u.pl/cgi-bin/s.cgi?i=parafiasaczow&r=ns\" width=\"1\" height=\"1\"></noscript>";
// stat.4u.pl KoNiEc
echo "</body>\n</html>\n";
// Cron Job (6 MIN)
if ($settings['cronjob_hour'] < (time()-360)) {
$result = dbquery("DELETE FROM ".DB_FLOOD_CONTROL." WHERE flood_timestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_CAPTCHA." WHERE captcha_datestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_USERS." WHERE user_joined='0' AND user_ip='0.0.0.0' and user_level='103'");
$result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value='".time()."' WHERE settings_name='cronjob_hour'");
}
// Cron Job (24 HOUR)
if ($settings['cronjob_day'] < (time()-86400)) {
$new_time = time();
$result = dbquery("DELETE FROM ".DB_THREAD_NOTIFY." WHERE notify_datestamp < '".(time()-1209600)."'");
$result = dbquery("DELETE FROM ".DB_NEW_USERS." WHERE user_datestamp < '".(time()-86400)."'");
$usr_inactive = dbcount("(user_id)", DB_USERS, "user_status='3' AND user_actiontime!='0' AND user_actiontime < '".time()."'");
if ($usr_inactive) {
require_once INCLUDES."sendmail_include.php";
$result = dbquery(
"SELECT user_id, user_name, user_email FROM ".DB_USERS."
WHERE user_status='3' AND user_actiontime!='0' AND user_actiontime < '".time()."'
LIMIT 10"
);
while ($data = dbarray($result)) {
$result2 = dbquery("UPDATE ".DB_USERS." SET user_status='0', user_actiontime='0' WHERE user_id='".$data['user_id']."'");
$subject = $locale['global_451'];
$message = str_replace("USER_NAME", $data['user_name'], $locale['global_452']);
$message = str_replace("LOST_PASSWORD", $settings['siteurl']."lostpassword.php", $message);
sendemail($data['user_name'], $data['user_email'], $settings['siteusername'], $settings['siteemail'], $subject, $message);
}
if ($usr_inactive > 10) { $new_time = $settings['cronjob_day']; }
}
$usr_deactivate = dbcount("(user_id)", DB_USERS, "user_actiontime < '".time()."' AND user_actiontime!='0' AND user_status='7'");
if ($usr_deactivate) {
$result = dbquery(
"SELECT user_id FROM ".DB_USERS."
WHERE user_actiontime < '".time()."' AND user_actiontime!='0' AND user_status='0'
LIMIT 10"
);
if ($settings['deactivation_action'] == 0) {
while ($data = dbarray($result)) {
$result = dbquery("UPDATE ".DB_USERS." SET user_actiontime='0', user_status='6' WHERE user_id='".$data['user_id']."'");
}
} else {
while ($data = dbarray($result)) {
$result = dbquery("DELETE FROM ".DB_USERS." WHERE user_id='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_ARTICLES." WHERE article_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_COMMENTS." WHERE comment_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_MESSAGES." WHERE message_to='".$data['user_id']."' OR message_from='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_NEWS." WHERE news_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_POLL_VOTES." WHERE vote_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_RATINGS." WHERE rating_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_SHOUTBOX." WHERE shout_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_SUSPENDS." WHERE suspended_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_THREADS." WHERE thread_author='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_POSTS." WHERE post_author='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_THREAD_NOTIFY." WHERE notify_user='".$data['user_id']."'");
}
}
if ($usr_deactivate > 10) { $new_time = $settings['cronjob_day']; }
}
$result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value='$new_time' WHERE settings_name='cronjob_day'");
}
$output = ob_get_contents();
if (ob_get_length() !== FALSE){
ob_end_clean();
}
echo handle_output($output);
$del = ob_get_status();
if(ob_get_length () !== FALSE AND $del['del'] != ""){
ob_end_flush();
}
if ($settings['login_method'] == "sessions") {
session_write_close();
}
mysql_close($db_connect);
?>
|
|
|
|
tekner |
Dodany dnia 23.06.2011 22:25:09
|
Przedszkolak
Postów: 4 Ostrzeżeń: 1
v7.01.04 Data rejestracji: 23.06.2011 14:00
|
emil90ck,
statystyka działa, dziękuję:). Mam jeszcze jedno pytanie: czy logo stat4u może być umieszczone z prawej strony tekstu "... unikalnych wizyt" (stopka)
Adres strony: www.parafiasaczow.pl
Z góry dziękuję za pomoc...
Edytowane przez tekner dnia 23.06.2011 22:26:48
|
|
|
|
emil90ck |
Dodany dnia 23.06.2011 22:45:44
|
Bywalec
Postów: 376 Pomógł: 30 Ostrzeżeń: 3
v7.00.05 Data rejestracji: 25.07.2008 13:11
|
Wszystko się da :) Z pliku footer.php proszę usunąć poniższy fragment:
<a target=_top href=\"http://stat.4u.pl/?parafiasaczow\" title=\"statystyki stron WWW\"><img alt=\"stat4u\" src=\"http://adstat.4u.pl/s4u.gif\" border=\"0\"></a>
I wstawić go w pliku theme.php obok funki odpowiedzialnej za wyświetlanie unikalnych wizyt. By nie zaśmiecać tematy jak jesteś zainteresowany pomocą pisz an GG lub PW |
|
|
|
etomiib |
Dodany dnia 13.11.2011 19:07:42
|
Przedszkolak
Postów: 11 Ostrzeżeń: 1
v7.02.03 Data rejestracji: 13.11.2011 18:59
|
Przeczytałem i próbowałem wszystkiego co jest napisane w tym temacie i nic
Mój footer to:
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: footer.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
require_once INCLUDES."footer_includes.php";
define("CONTENT", ob_get_contents());
ob_end_clean();
render_page(false);
// Cron Job (6 MIN)
if ($settings['cronjob_hour'] < (time()-360)) {
$result = dbquery("DELETE FROM ".DB_FLOOD_CONTROL." WHERE flood_timestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_CAPTCHA." WHERE captcha_datestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_USERS." WHERE user_joined='0' AND user_ip='0.0.0.0' and user_level='103'");
$result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value='".time()."' WHERE settings_name='cronjob_hour'");
}
// Cron Job (24 HOUR)
if ($settings['cronjob_day'] < (time()-86400)) {
$new_time = time();
$result = dbquery("DELETE FROM ".DB_THREAD_NOTIFY." WHERE notify_datestamp < '".(time()-1209600)."'");
$result = dbquery("DELETE FROM ".DB_NEW_USERS." WHERE user_datestamp < '".(time()-86400)."'");
$result = dbquery("DELETE FROM ".DB_EMAIL_VERIFY." WHERE user_datestamp < '".(time()-86400)."'");
$usr_inactive = dbcount("(user_id)", DB_USERS, "user_status='3' AND user_actiontime!='0' AND user_actiontime < '".time()."'");
if ($usr_inactive) {
require_once INCLUDES."sendmail_include.php";
$result = dbquery(
"SELECT user_id, user_name, user_email FROM ".DB_USERS."
WHERE user_status='3' AND user_actiontime!='0' AND user_actiontime < '".time()."'
LIMIT 10"
);
while ($data = dbarray($result)) {
$result2 = dbquery("UPDATE ".DB_USERS." SET user_status='0', user_actiontime='0' WHERE user_id='".$data['user_id']."'");
$subject = $locale['global_451'];
$message = str_replace("USER_NAME", $data['user_name'], $locale['global_452']);
$message = str_replace("LOST_PASSWORD", $settings['siteurl']."lostpassword.php", $message);
sendemail($data['user_name'], $data['user_email'], $settings['siteusername'], $settings['siteemail'], $subject, $message);
}
if ($usr_inactive > 10) { $new_time = $settings['cronjob_day']; }
}
$usr_deactivate = dbcount("(user_id)", DB_USERS, "user_actiontime < '".time()."' AND user_actiontime!='0' AND user_status='7'");
if ($usr_deactivate) {
$result = dbquery(
"SELECT user_id FROM ".DB_USERS."
WHERE user_actiontime < '".time()."' AND user_actiontime!='0' AND user_status='0'
LIMIT 10"
);
if ($settings['deactivation_action'] == 0) {
while ($data = dbarray($result)) {
$result = dbquery("UPDATE ".DB_USERS." SET user_actiontime='0', user_status='6' WHERE user_id='".$data['user_id']."'");
}
} else {
while ($data = dbarray($result)) {
$result = dbquery("DELETE FROM ".DB_USERS." WHERE user_id='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_ARTICLES." WHERE article_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_COMMENTS." WHERE comment_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_MESSAGES." WHERE message_to='".$data['user_id']."' OR message_from='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_NEWS." WHERE news_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_POLL_VOTES." WHERE vote_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_RATINGS." WHERE rating_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_SUSPENDS." WHERE suspended_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_THREADS." WHERE thread_author='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_POSTS." WHERE post_author='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_THREAD_NOTIFY." WHERE notify_user='".$data['user_id']."'");
}
}
if ($usr_deactivate > 10) { $new_time = $settings['cronjob_day']; }
}
$result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value='".$new_time."' WHERE settings_name='cronjob_day'");
}
// Error handling
if (iADMIN && checkrights("ERRO") && count($_errorHandler) > 0) {
echo "<div class='admin-message'>".str_replace("[ERROR_LOG_URL]", ADMIN."errors.php".$aidlink, $locale['err_101'])."</div>\n";
}
echo "</body>\n</html>\n";
$output = ob_get_contents();
if (ob_get_length() !== FALSE){
ob_end_clean();
}
echo handle_output($output);
if (ob_get_length() !== FALSE){
ob_end_flush();
}
mysql_close($db_connect);
?>
Gdy wstawie kod tak jak piszecie czyli tak jak poniżej w kodzie to moja strona sie nie załadowuje. Otwiera się tylko tło strony.
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: footer.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
require_once INCLUDES."footer_includes.php";
define("CONTENT", ob_get_contents());
ob_end_clean();
render_page(false);
if (eregi($settings['opening_page'], $_SERVER['PHP_SELF'])) {
//kod dla głównej
echo '<!-- (C) stat24 / Strona główna -->
<script type="text/javascript">
<!--
document.writeln('<'+'scr'+'ipt type="text/javascript" src="http://s3.hit.stat24.com/_'+(new Date()).getTime()+'/script.js?id=B72V7WuHkc4BBxUCuDrIu5PcTDjubgP4sfNwyMsjcGz.D7/l=11"></'+'scr'+'ipt>');
//-->
</script>';
} else {
//kod dla podstron
echo '<!-- (C) stat24 / podstrony -->
<script type="text/javascript">
<!--
document.writeln('<'+'scr'+'ipt type="text/javascript" src="http://s3.hit.stat24.com/_'+(new Date()).getTime()+'/script.js?id=p4M7yXuG3MLb7.412HnTXoZR7O_RTkSnbYlgRlVg6BH.o7/l=11"></'+'scr'+'ipt>');
//-->
</script>';
// Cron Job (6 MIN)
if ($settings['cronjob_hour'] < (time()-360)) {
$result = dbquery("DELETE FROM ".DB_FLOOD_CONTROL." WHERE flood_timestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_CAPTCHA." WHERE captcha_datestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_USERS." WHERE user_joined='0' AND user_ip='0.0.0.0' and user_level='103'");
$result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value='".time()."' WHERE settings_name='cronjob_hour'");
}
// Cron Job (24 HOUR)
if ($settings['cronjob_day'] < (time()-86400)) {
$new_time = time();
$result = dbquery("DELETE FROM ".DB_THREAD_NOTIFY." WHERE notify_datestamp < '".(time()-1209600)."'");
$result = dbquery("DELETE FROM ".DB_NEW_USERS." WHERE user_datestamp < '".(time()-86400)."'");
$result = dbquery("DELETE FROM ".DB_EMAIL_VERIFY." WHERE user_datestamp < '".(time()-86400)."'");
$usr_inactive = dbcount("(user_id)", DB_USERS, "user_status='3' AND user_actiontime!='0' AND user_actiontime < '".time()."'");
if ($usr_inactive) {
require_once INCLUDES."sendmail_include.php";
$result = dbquery(
"SELECT user_id, user_name, user_email FROM ".DB_USERS."
WHERE user_status='3' AND user_actiontime!='0' AND user_actiontime < '".time()."'
LIMIT 10"
);
while ($data = dbarray($result)) {
$result2 = dbquery("UPDATE ".DB_USERS." SET user_status='0', user_actiontime='0' WHERE user_id='".$data['user_id']."'");
$subject = $locale['global_451'];
$message = str_replace("USER_NAME", $data['user_name'], $locale['global_452']);
$message = str_replace("LOST_PASSWORD", $settings['siteurl']."lostpassword.php", $message);
sendemail($data['user_name'], $data['user_email'], $settings['siteusername'], $settings['siteemail'], $subject, $message);
}
if ($usr_inactive > 10) { $new_time = $settings['cronjob_day']; }
}
$usr_deactivate = dbcount("(user_id)", DB_USERS, "user_actiontime < '".time()."' AND user_actiontime!='0' AND user_status='7'");
if ($usr_deactivate) {
$result = dbquery(
"SELECT user_id FROM ".DB_USERS."
WHERE user_actiontime < '".time()."' AND user_actiontime!='0' AND user_status='0'
LIMIT 10"
);
if ($settings['deactivation_action'] == 0) {
while ($data = dbarray($result)) {
$result = dbquery("UPDATE ".DB_USERS." SET user_actiontime='0', user_status='6' WHERE user_id='".$data['user_id']."'");
}
} else {
while ($data = dbarray($result)) {
$result = dbquery("DELETE FROM ".DB_USERS." WHERE user_id='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_ARTICLES." WHERE article_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_COMMENTS." WHERE comment_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_MESSAGES." WHERE message_to='".$data['user_id']."' OR message_from='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_NEWS." WHERE news_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_POLL_VOTES." WHERE vote_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_RATINGS." WHERE rating_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_SUSPENDS." WHERE suspended_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_THREADS." WHERE thread_author='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_POSTS." WHERE post_author='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_THREAD_NOTIFY." WHERE notify_user='".$data['user_id']."'");
}
}
if ($usr_deactivate > 10) { $new_time = $settings['cronjob_day']; }
}
$result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value='".$new_time."' WHERE settings_name='cronjob_day'");
}
// Error handling
if (iADMIN && checkrights("ERRO") && count($_errorHandler) > 0) {
echo "<div class='admin-message'>".str_replace("[ERROR_LOG_URL]", ADMIN."errors.php".$aidlink, $locale['err_101'])."</div>\n";
}
echo "</body>\n</html>\n";
$output = ob_get_contents();
if (ob_get_length() !== FALSE){
ob_end_clean();
}
echo handle_output($output);
if (ob_get_length() !== FALSE){
ob_end_flush();
}
mysql_close($db_connect);
?>
Co robie źle?
Mam też taki kod do statystyk też nie chce działać w tym miejscu :(
<script type="text/javascript">
<!--
document.writeln('<'+'scr'+'ipt type="text/javascript" src="http://s3.hit.stat.pl/_'+(new
Date()).getTime()+'/script.js?id=oqI1NnO9nRdANlGERZkbWdT4.KlBBORXNL8IqK16m_j._7&l=11"></'+'scr'+'ipt>');
//-->
</script>
|
|
|
|
bogdan |
Dodany dnia 13.11.2011 19:22:04
|
Ekspert
Postów: 2451 Pomógł: 164
v7.02.07 Data rejestracji: 21.07.2009 12:55
|
Chyba nie doczytałeś jednak dokładnie :)
Na mój rozum, to błąd był w:
echo "<!--.....";
Dawałeś same apostrofy, a powinny być tylko w kodzie.
Spróbuj ten poniżej, to Twój poprawiony.
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: footer.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
require_once INCLUDES."footer_includes.php";
define("CONTENT", ob_get_contents());
ob_end_clean();
render_page(false);
if (eregi($settings['opening_page'], $_SERVER['PHP_SELF'])) {
//kod dla głównej
echo "<!-- (C) stat24 / Strona główna -->
<script type='text/javascript'>
<!--
document.writeln('<'+'scr'+'ipt type='text/javascript' src='http://s3.hit.stat24.com/_'+(new Date()).getTime()+'/script.js?id=B72V7WuHkc4BBxUCuDrIu5PcTDjubgP4sfNwyMsjcGz.D7/l=11'></'+'scr'+'ipt>');
//-->
</script>";
} else {
//kod dla podstron
echo "<!-- (C) stat24 / podstrony -->
<script type='text/javascript'>
<!--
document.writeln('<'+'scr'+'ipt type='text/javascript' src='http://s3.hit.stat24.com/_'+(new Date()).getTime()+'/script.js?id=p4M7yXuG3MLb7.412HnTXoZR7O_RTkSnbYlgRlVg6BH.o7/l=11'></'+'scr'+'ipt>');
//-->
</script>";
// Cron Job (6 MIN)
if ($settings['cronjob_hour'] < (time()-360)) {
$result = dbquery("DELETE FROM ".DB_FLOOD_CONTROL." WHERE flood_timestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_CAPTCHA." WHERE captcha_datestamp < '".(time()-360)."'");
$result = dbquery("DELETE FROM ".DB_USERS." WHERE user_joined='0' AND user_ip='0.0.0.0' and user_level='103'");
$result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value='".time()."' WHERE settings_name='cronjob_hour'");
}
// Cron Job (24 HOUR)
if ($settings['cronjob_day'] < (time()-86400)) {
$new_time = time();
$result = dbquery("DELETE FROM ".DB_THREAD_NOTIFY." WHERE notify_datestamp < '".(time()-1209600)."'");
$result = dbquery("DELETE FROM ".DB_NEW_USERS." WHERE user_datestamp < '".(time()-86400)."'");
$result = dbquery("DELETE FROM ".DB_EMAIL_VERIFY." WHERE user_datestamp < '".(time()-86400)."'");
$usr_inactive = dbcount("(user_id)", DB_USERS, "user_status='3' AND user_actiontime!='0' AND user_actiontime < '".time()."'");
if ($usr_inactive) {
require_once INCLUDES."sendmail_include.php";
$result = dbquery(
"SELECT user_id, user_name, user_email FROM ".DB_USERS."
WHERE user_status='3' AND user_actiontime!='0' AND user_actiontime < '".time()."'
LIMIT 10"
);
while ($data = dbarray($result)) {
$result2 = dbquery("UPDATE ".DB_USERS." SET user_status='0', user_actiontime='0' WHERE user_id='".$data['user_id']."'");
$subject = $locale['global_451'];
$message = str_replace("USER_NAME", $data['user_name'], $locale['global_452']);
$message = str_replace("LOST_PASSWORD", $settings['siteurl']."lostpassword.php", $message);
sendemail($data['user_name'], $data['user_email'], $settings['siteusername'], $settings['siteemail'], $subject, $message);
}
if ($usr_inactive > 10) { $new_time = $settings['cronjob_day']; }
}
$usr_deactivate = dbcount("(user_id)", DB_USERS, "user_actiontime < '".time()."' AND user_actiontime!='0' AND user_status='7'");
if ($usr_deactivate) {
$result = dbquery(
"SELECT user_id FROM ".DB_USERS."
WHERE user_actiontime < '".time()."' AND user_actiontime!='0' AND user_status='0'
LIMIT 10"
);
if ($settings['deactivation_action'] == 0) {
while ($data = dbarray($result)) {
$result = dbquery("UPDATE ".DB_USERS." SET user_actiontime='0', user_status='6' WHERE user_id='".$data['user_id']."'");
}
} else {
while ($data = dbarray($result)) {
$result = dbquery("DELETE FROM ".DB_USERS." WHERE user_id='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_ARTICLES." WHERE article_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_COMMENTS." WHERE comment_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_MESSAGES." WHERE message_to='".$data['user_id']."' OR message_from='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_NEWS." WHERE news_name='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_POLL_VOTES." WHERE vote_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_RATINGS." WHERE rating_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_SUSPENDS." WHERE suspended_user='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_THREADS." WHERE thread_author='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_POSTS." WHERE post_author='".$data['user_id']."'");
$result = dbquery("DELETE FROM ".DB_THREAD_NOTIFY." WHERE notify_user='".$data['user_id']."'");
}
}
if ($usr_deactivate > 10) { $new_time = $settings['cronjob_day']; }
}
$result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value='".$new_time."' WHERE settings_name='cronjob_day'");
}
// Error handling
if (iADMIN && checkrights("ERRO") && count($_errorHandler) > 0) {
echo "<div class='admin-message'>".str_replace("[ERROR_LOG_URL]", ADMIN."errors.php".$aidlink, $locale['err_101'])."</div>\n";
}
echo "</body>\n</html>\n";
$output = ob_get_contents();
if (ob_get_length() !== FALSE){
ob_end_clean();
}
echo handle_output($output);
if (ob_get_length() !== FALSE){
ob_end_flush();
}
mysql_close($db_connect);
?>
Nie szukaj Szczęścia, lecz dawaj Je innym, a wtedy samo do Ciebie przyjdzie.
Nie ma mnie na GG.
|
|
|
|
etomiib |
Dodany dnia 13.11.2011 19:31:24
|
Przedszkolak
Postów: 11 Ostrzeżeń: 1
v7.02.03 Data rejestracji: 13.11.2011 18:59
|
Nadal to samo, gdy załadowuje Twój footer - ładuje się samo tło strony i nic więcej.
Edytowane przez Pieka dnia 13.11.2011 19:44:10
|
|
|
|
bogdan |
Dodany dnia 13.11.2011 19:38:56
|
Ekspert
Postów: 2451 Pomógł: 164
v7.02.07 Data rejestracji: 21.07.2009 12:55
|
To nie mój, tylko Twój.
Twój cały plik footer.php u mnie na testowej też nie działa.
Ale jak wklejam sam kod do mojego pliku, to hula.
Masz sam kod statystyk, który u mnie działa i poszukaj jeszcze błędu w reszcie pliku.
//kod dla głównej
echo "<!-- (C) stat24 / Strona główna -->
<script type='text/javascript'>
<!--
document.writeln('<'+'scr'+'ipt type='text/javascript' src='http://s3.hit.stat24.com/_'+(new Date()).getTime()+'/script.js?id=B72V7WuHkc4BBxUCuDrIu5PcTDjubgP4sfNwyMsjcGz.D7/l=11'></'+'scr'+'ipt>');
//-->
</script>";
} else {
//kod dla podstron
echo "<!-- (C) stat24 / podstrony -->
<script type='text/javascript'>
<!--
document.writeln('<'+'scr'+'ipt type='text/javascript' src='http://s3.hit.stat24.com/_'+(new Date()).getTime()+'/script.js?id=p4M7yXuG3MLb7.412HnTXoZR7O_RTkSnbYlgRlVg6BH.o7/l=11'></'+'scr'+'ipt>');
//-->
</script>";
Nie szukaj Szczęścia, lecz dawaj Je innym, a wtedy samo do Ciebie przyjdzie.
Nie ma mnie na GG.
|
|
|
|
etomiib |
Dodany dnia 13.11.2011 19:40:33
|
Przedszkolak
Postów: 11 Ostrzeżeń: 1
v7.02.03 Data rejestracji: 13.11.2011 18:59
|
No właśnie nie umiem znaleźć tego błędu ehh.
Edytowane przez Pieka dnia 13.11.2011 19:43:22
|
|
|
|
bogdan |
Dodany dnia 13.11.2011 19:42:43
|
Ekspert
Postów: 2451 Pomógł: 164
v7.02.07 Data rejestracji: 21.07.2009 12:55
|
Jeśli nie robiłeś jakiś modyfikacji pliku, to wgraj go jeszcze raz z nowej paczki Fusiona odpowiedniego dla Twojej wersji i wtedy dodaj ten kod.
Nie szukaj Szczęścia, lecz dawaj Je innym, a wtedy samo do Ciebie przyjdzie.
Nie ma mnie na GG.
|
|
|
|
etomiib |
Dodany dnia 13.11.2011 19:49:20
|
Przedszkolak
Postów: 11 Ostrzeżeń: 1
v7.02.03 Data rejestracji: 13.11.2011 18:59
|
No i sprawa wygląda skomplikowanie, oczywiście nie robiłem żadnej modyfikacji pliku. Zrobiłem jak napisałeś i na czystym pliku footer z nowej paczki serwis śmiga ale jak tylko dodam kod ze statystyk znów tylko tło :/ Jakieś jeszcze pomysły? |
|
|
|
bogdan |
Dodany dnia 13.11.2011 19:53:20
|
Ekspert
Postów: 2451 Pomógł: 164
v7.02.07 Data rejestracji: 21.07.2009 12:55
|
Sprawdź teraz.
//kod dla głównej
echo "<!-- (C) stat24 / Strona główna -->
<script type='text/javascript'>
<!--
document.writeln('<'+'scr'+'ipt type='text/javascript' src='http://s3.hit.stat24.com/_'+(new Date()).getTime()+'/script.js?id=B72V7WuHkc4BBxUCuDrIu5PcTDjubgP4sfNwyMsjcGz.D7/l=11'></'+'scr'+'ipt>');
//-->
</script>";
//kod dla podstron
echo "<!-- (C) stat24 / podstrony -->
<script type='text/javascript'>
<!--
document.writeln('<'+'scr'+'ipt type='text/javascript' src='http://s3.hit.stat24.com/_'+(new Date()).getTime()+'/script.js?id=p4M7yXuG3MLb7.412HnTXoZR7O_RTkSnbYlgRlVg6BH.o7/l=11'></'+'scr'+'ipt>');
//-->
</script>";
Nie szukaj Szczęścia, lecz dawaj Je innym, a wtedy samo do Ciebie przyjdzie.
Nie ma mnie na GG.
|
|
|