YourWBB


yourWBB » WoltLab Burning Board Generation 2 * » Alles von und für das WBB 2.3.x » [WBB 2.3.x] Allg. Fragen und Probleme » was heisst diese meldung ?? » Hallo Gast [Anmelden|Registrieren]
Letzter Beitrag | Erster ungelesener Beitrag 2.334 Views | | Thema zu Favoriten hinzufügen

Neues Thema erstellen Antwort erstellen

Dieses Thema wurde als unerledigt markiert. Thread unerledigt

Zum Ende der Seite springen was heisst diese meldung ??
Autor
Beitrag « Vorheriges Thema | Nächstes Thema »
NitroX
Mitglied


Dabei seit: 16.01.04
Beiträge: 73

 was heisst diese meldung ?? Antworten Zitieren Editieren Melden       UP

Hey,

ich bin im besitz vom wbb 2.3.4, wollte heute das "täglichbackup" script einbauen....aber bekomme dauernt diese Meldung:

Parse error: syntax error, unexpected T_STRING in /opt/****/htdocs/*****/index.php on line 238

könnt ihr mir sagen was da nicht stimmt o.O komme nicht zurecht unglücklich
25.03.06 14:17 NitroX ist offline E-Mail Finden Als Freund hinzufügen
KleenMicha KleenMicha ist männlich
Webentwickler


images/avatars/avatar-5745.jpg

Dabei seit: 16.01.04
Beiträge: 2.592
Fähigkeiten: WBB3 Fortgeschritten; WBB2 Profi

 RE: was heisst diese meldung ?? Antworten Zitieren Editieren Melden       UP

Hast du Änderungen an der besagten Datei vorgenommen?

Kopiere mal folgende Zeilen hierherein:
233-243

__________________
Gruß Micha
25.03.06 14:20 KleenMicha ist offline E-Mail WWW Finden Als Freund hinzufügen Füge KleenMicha in deine Kontaktliste ein MSN Passport-Profil von KleenMicha anzeigen
MrMind MrMind ist männlich
Sklave des Supportes


images/avatars/avatar-2822.gif

Dabei seit: 19.01.04
Beiträge: 3.349
Herkunft: Darmstadt/Odw.

Antworten Zitieren Editieren Melden       UP

Wir könnten es dir sagen wenn du uns die Zeilen 230 bis 240 mal aus der index.php posten würdest.

Die Zeilen findest du mit jedem simplen Texteditor (Gehe zu) oder einem Editor mit Funktion der Zeihlennummernanzeige (wie Waverslave, PHPEdit etc.)

Mfg
MrMind

__________________
Selbst ist der Coder
Coder under Linux

Ubuntu 5.10 Nutzer.

Meine Hacks

25.03.06 14:21 MrMind ist offline E-Mail Finden Als Freund hinzufügen
NitroX
Mitglied


Dabei seit: 16.01.04
Beiträge: 73

Themenstarter Thema begonnen von NitroX
Antworten Zitieren Editieren Melden       UP

hey,

es geht um dieses Script....es soll vor das ?> in die index.php

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
DB Script : start
$optim   = "1";    // 1 = true ; 0 = false (Datenbankoptimierung)
$repair  = "1";    // 1 = true ; 0 = false (Datenbankoptimierung)
$abackup = "1";    // 1 = true ; 0 = false (Autobackup mit mysqldump)
$difer = "86400";   // Zeitdifferenz zwischen den einzelnen Optionen (in Sekunden, Ganzzahl)
$time    = time();
$username="SQL User"; // mysqluser
$pass="PW"; //mysqlpasswort
$datenbank="DB"; //mysql datenbank
$today=date("d.m.y.h.i.s");
$pfad="./db/$today.sql"; //pfad zum backup 

if ($optim=="1") 
{
$result = $db->query_first("SELECT * FROM bb".$n."_db WHERE cat='opt'");
     if ($result['timestamp'] < $time-$difer)
     {
            $result_opt = $db->query("OPTIMIZE TABLE bb".$n."_access , bb".$n."_acpmenuitemgroups , bb".$n."_acpmenuitemgroupscount , bb".$n."_acpmenuitems , bb".$n."_acpmenuitemscount , bb".$n."_adminsessions , bb".$n."_announcements , bb".$n."_applications , bb".$n."_attachments , bb".$n."_avatars , bb".$n."_bbcodes , bb".$n."_boards , bb".$n."_boardvisit , bb".$n."_designelements , bb".$n."_designpacks , bb".$n."_events , bb".$n."_folders , bb".$n."_groupcombinations , bb".$n."_groupleaders , bb".$n."_groups , bb".$n."_groupvalues , bb".$n."_groupvariablegroups , bb".$n."_groupvariables , bb".$n."_icons , bb".$n."_languagecats , bb".$n."_languagepacks , bb".$n."_languages , bb".$n."_moderators , bb".$n."_optiongroups , bb".$n."_options , bb".$n."_permissions , bb".$n."_polloptions , bb".$n."_polls , bb".$n."_posts , bb".$n."_privatemessage , bb".$n."_profilefields , bb".$n."_ranks , bb".$n."_searchs , bb".$n."_sessions , bb".$n."_smilies , bb".$n."_stats , bb".$n."_styles , bb".$n."_subscribeboards , bb".$n."_subscribethreads , bb".$n."_templatepacks , bb".$n."_templates , bb".$n."_threads , bb".$n."_threadvisit , bb".$n."_user2groups , bb".$n."_userfields , bb".$n."_users , bb".$n."_votes , bb".$n."_wordlist , bb".$n."_wordmatch");
            $result_upt = $db->unbuffered_query("UPDATE bb".$n."_db SET timestamp='$time' WHERE cat='opt'",1);
     } 
}


if ($repair=="1") {
    $result = $db->query_first("SELECT * FROM bb".$n."_db WHERE cat='rep'");
      if ($result['timestamp'] < $time-$difer)
      {
        $result = $db->query("REPAIR TABLE bb".$n."_access , bb".$n."_acpmenuitemgroups , bb".$n."_acpmenuitemgroupscount , bb".$n."_acpmenuitems , bb".$n."_acpmenuitemscount , bb".$n."_adminsessions , bb".$n."_announcements , bb".$n."_applications , bb".$n."_attachments , bb".$n."_avatars , bb".$n."_bbcodes , bb".$n."_boards , bb".$n."_boardvisit , bb".$n."_designelements , bb".$n."_designpacks , bb".$n."_events , bb".$n."_folders , bb".$n."_groupcombinations , bb".$n."_groupleaders , bb".$n."_groups , bb".$n."_groupvalues , bb".$n."_groupvariablegroups , bb".$n."_groupvariables , bb".$n."_icons , bb".$n."_languagecats , bb".$n."_languagepacks , bb".$n."_languages , bb".$n."_moderators , bb".$n."_optiongroups , bb".$n."_options , bb".$n."_permissions , bb".$n."_polloptions , bb".$n."_polls , bb".$n."_posts , bb".$n."_privatemessage , bb".$n."_profilefields , bb".$n."_ranks , bb".$n."_searchs , bb".$n."_sessions , bb".$n."_smilies , bb".$n."_stats , bb".$n."_styles , bb".$n."_subscribeboards , bb".$n."_subscribethreads , bb".$n."_templatepacks , bb".$n."_templates , bb".$n."_threads , bb".$n."_threadvisit , bb".$n."_user2groups , bb".$n."_userfields , bb".$n."_users , bb".$n."_votes , bb".$n."_wordlist , bb".$n."_wordmatch");
        $result = $db->unbuffered_query("UPDATE bb".$n."_db SET timestamp='$time' WHERE cat='rep'",1);
    } 
} 


if ($abackup=="1") 
{
$result = $db->query_first("SELECT * FROM bb".$n."_db WHERE cat='auto_backup'");
     if ($result['timestamp'] < $time-$difer)
     {
      system("mysqldump --all -c -C -q -e -l --add-drop-table --host=localhost --user=$username --password=$pass $datenbank > $pfad");
      system("gzip $pfad"); 
            $result_upt = $db->unbuffered_query("UPDATE bb".$n."_db SET timestamp='$time' WHERE cat='auto_backup'",1);
     } 
} 


hab das script früher im wbb 2.2 genutzt und da ging alles....nur im 2.3 nicht o.O sobald es eingebaut ist kommt der fehler....
25.03.06 15:37 NitroX ist offline E-Mail Finden Als Freund hinzufügen
KorbanDallas KorbanDallas ist männlich
Mitglied


Dabei seit: 08.04.05
Beiträge: 612

Antworten Zitieren Editieren Melden       UP

hm, wieso nutzt du sowas, das ist doch unter SQL Abfragen schon drin, die Optimierung der Tabellen.
25.03.06 15:39 KorbanDallas ist offline Finden Als Freund hinzufügen
MrMind MrMind ist männlich
Sklave des Supportes


images/avatars/avatar-2822.gif

Dabei seit: 19.01.04
Beiträge: 3.349
Herkunft: Darmstadt/Odw.

Antworten Zitieren Editieren Melden       UP

Wäre noch hilfreich, wenn man wüsste wo die betroffene Zeile nun ist.

Mfg
MrMind

__________________
Selbst ist der Coder
Coder under Linux

Ubuntu 5.10 Nutzer.

Meine Hacks

25.03.06 15:45 MrMind ist offline E-Mail Finden Als Freund hinzufügen
NitroX
Mitglied


Dabei seit: 16.01.04
Beiträge: 73

Themenstarter Thema begonnen von NitroX
Antworten Zitieren Editieren Melden       UP

hier die zeile 233 - 240

code:
1:
2:
3:
4:
5:
6:
7:

////// para-scripts.de Verwarn-Hack START //////
require("acp/lib/ver_index.inc.php");
////// para-scripts.de Verwarn-Hack ENDE //////

?>


und vor dem ?> schreib ich halt das script rein smile

Dieser Beitrag wurde 2 mal editiert, zum letzten Mal von NitroX: 25.03.06 19:12.

25.03.06 19:09 NitroX ist offline E-Mail Finden Als Freund hinzufügen
KorbanDallas KorbanDallas ist männlich
Mitglied


Dabei seit: 08.04.05
Beiträge: 612

Antworten Zitieren Editieren Melden       UP

da würde ich mal schauen ob du die ver_index.inc.php im acp/lib verzeichnis drin hast
25.03.06 19:12 KorbanDallas ist offline Finden Als Freund hinzufügen
KleenMicha KleenMicha ist männlich
Webentwickler


images/avatars/avatar-5745.jpg

Dabei seit: 16.01.04
Beiträge: 2.592
Fähigkeiten: WBB3 Fortgeschritten; WBB2 Profi

Antworten Zitieren Editieren Melden       UP

@Korban: Versagt , der fehler besagt nicht dass etwas fehlt, sondern dass ein Zeichen oder Sonstiges zu viel ist, daher mein folgender Hinweis.

@threadersteller bitte häng die gesamte Datei: -/index.php hier an mit einem Hinweis, bitte, welchen Verwarnhack, du von wo genutzt hast. Freude

__________________
Gruß Micha
25.03.06 19:53 KleenMicha ist offline E-Mail WWW Finden Als Freund hinzufügen Füge KleenMicha in deine Kontaktliste ein MSN Passport-Profil von KleenMicha anzeigen
KorbanDallas KorbanDallas ist männlich
Mitglied


Dabei seit: 08.04.05
Beiträge: 612

Antworten Zitieren Editieren Melden       UP

@KleenMicha, zu dem Zeitpunkt als er die Antwort erstellt hat, hatte er die komplette index.php angehangen und die Zeile 238 besagte dann genau dieses

code:
1:
require("acp/lib/ver_index.inc.php");


er hat genau diesen Hack: Verwarnhack 1.2.8

und dort ist in der Install die Einzige Änderung das über

code:
1:
2:
3:
eval("\$tpl->output(\"".$tpl->get("index")."\");");


dieses eingefügt werden soll

code:
1:
2:
3:
4:
5:
////// para-scripts.de Verwarn-Hack START //////
require("acp/lib/ver_index.inc.php");
////// para-scripts.de Verwarn-Hack ENDE //////


deswegen meine Annahme das er die Dateien nicht drauf hat
25.03.06 20:00 KorbanDallas ist offline Finden Als Freund hinzufügen
NitroX
Mitglied


Dabei seit: 16.01.04
Beiträge: 73

Themenstarter Thema begonnen von NitroX
Antworten Zitieren Editieren Melden       UP

hey,

hier die komplette

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
<?php
// ************************************************************************************//
// * WoltLab Burning Board 2
// ************************************************************************************//
// * Copyright (c) 2001-2004 WoltLab GmbH
// * Web           http://www.woltlab.de/
// * License       http://www.woltlab.de/products/burning_board/license_en.php
// *               http://www.woltlab.de/products/burning_board/license.php
// ************************************************************************************//
// * WoltLab Burning Board 2 is NOT free software.
// * You may not redistribute this package or any of it's files.
// ************************************************************************************//
// * $Date: 2005-06-16 14:28:46 +0200 (Thu, 16 Jun 2005) $
// * $Author: Burntime $
// * $Rev: 1618 $
// ************************************************************************************//


$filename = 'index.php';

require('./global.php');
$lang->load('START');

require('./acp/lib/class_useronline.php');

if (isset($_COOKIE[$cookieprefix.'hidecats'])) $hidecats = decode_cookie($_COOKIE[$cookieprefix.'hidecats']);
else $hidecats = array();

if (isset($_GET['hidecat'])) {
	$hidecats[$_GET['hidecat']] = 1;
	if ($wbbuserdata['usecookies'] == 1) encode_cookie("hidecats", time() + 3600 * 24 * 365);
	else encode_cookie("hidecats");
}
if (isset($_GET['showcat'])) {
	$hidecats[$_GET['showcat']] = 0;
	if ($wbbuserdata['usecookies'] == 1) encode_cookie("hidecats", time() + 3600 * 24 * 365);
	else encode_cookie("hidecats");
}

$boardcache = array();
$permissioncache = array();
$modcache = array();

switch ($boardordermode) {
	case 1: $boardorder = 'b.title ASC'; break;
	case 2: $boardorder = 'b.title DESC'; break;
	case 3: $boardorder = 'b.lastposttime DESC'; break;
	default: $boardorder = 'b.boardorder ASC'; break;
}
$activtime = time() - 60 * $useronlinetimeout;

$boardvisit = array();
$result = $db->unbuffered_query("
 SELECT
 b.*".(($showlastposttitle == 1) ? (", t.topic, t.prefix AS threadprefix, i.*") : (""))."
 ".(($showuseronlineinboard == 1) ? (", COUNT(s.sessionhash) AS useronline") : (""))."
 ".(($wbbuserdata['userid']) ? (", bv.lastvisit") : (""))."
 FROM bb".$n."_boards b
 ".(($showlastposttitle == 1) ? ("LEFT JOIN bb".$n."_threads t ON (t.threadid=b.lastthreadid)
 LEFT JOIN bb".$n."_icons i USING (iconid)") : (""))."
 ".(($showuseronlineinboard == 1) ? ("LEFT JOIN bb".$n."_sessions s ON (s.boardid=b.boardid AND s.lastactivity>='$activtime')") : (""))."
 ".(($wbbuserdata['userid']) ? (" LEFT JOIN bb".$n."_boardvisit bv ON (bv.boardid=b.boardid AND bv.userid='".$wbbuserdata['userid']."')") : (""))."
 ".(($showuseronlineinboard == 1) ? ("GROUP BY b.boardid") : (""))."
 ORDER by b.parentid ASC, $boardorder");
while ($row = $db->fetch_array($result)) {
	$boardcache[$row['parentid']][$row['boardorder']][$row['boardid']] = $row;
	$boardvisit[$row['boardid']] = $row['lastvisit'];
}

if ($showuseronlineinboard == 2) {
	$userinboard = array();
	$online = &new useronline($wbbuserdata['a_can_view_ghosts'], $wbbuserdata['buddylist']);
	$result = $db->unbuffered_query("SELECT s.userid, s.boardid, u.username, u.useronlinegroupid,g.useronlinemarking, u.invisible FROM bb".$n."_sessions s LEFT JOIN bb".$n."_users u USING (userid) LEFT JOIN bb".$n."_groups g ON g.groupid=u.useronlinegroupid WHERE s.lastactivity>='$activtime'".(($wbbuserdata['ignorelist']) ? (" AND s.userid NOT IN (".str_replace(" ", ",", $wbbuserdata['ignorelist']).")") : (""))." ORDER BY u.username ASC");	
	while ($row = $db->fetch_array($result)) $userinboard[$row['boardid']][] = $row;	
}

$result = $db->unbuffered_query("SELECT t.boardid, t.threadid, t.lastposttime".(($wbbuserdata['userid']) ? (", tv.lastvisit") : (""))." FROM bb".$n."_threads t".(($wbbuserdata['userid']) ? (" LEFT JOIN bb".$n."_threadvisit tv ON (tv.threadid=t.threadid AND tv.userid='".$wbbuserdata['userid']."')") : (""))." WHERE t.visible = 1 AND t.lastposttime > '$wbbuserdata[lastvisit]' AND t.closed <> 3");
while ($row = $db->fetch_array($result)) {
	if ($row['lastposttime'] > $row['lastvisit']) $visitcache[$row['boardid']][$row['threadid']] = $row['lastposttime'];
}

// read permissions
$permissioncache = getPermissions();

if ($hide_modcell == 0) {
	$result = $db->unbuffered_query("SELECT bb".$n."_moderators.*, username FROM bb".$n."_moderators LEFT JOIN bb".$n."_users USING (userid) ORDER BY username ASC");
	while ($row = $db->fetch_array($result)) $modcache[$row['boardid']][] = $row;
}

$boardbit = makeboardbit(0);

$index_pms = '';
$quicklogin = '';
$index_showevents = '';
$index_useronline = '';
$index_stats = '';

/* ############## STATS ############## */
if ($showstats == 1) {
	$stats = $db->query_first("SELECT s.*, u.username FROM bb".$n."_stats s LEFT JOIN bb".$n."_users u ON(u.userid=s.lastuserid)");
	$stats['username'] = htmlconverter($stats['username']);
	
	$installdays = (time() - $installdate) / 86400;
	if ($installdays < 1) $postperday = $stats['postcount'];
	else $postperday = $stats['postcount'] / $installdays; 
	
	$postperday = number_format($postperday, 2, $lang->get("LANG_GLOBAL_DEC_POINT"), $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	
	if ($stats['usercount'] >= 1000) $stats['usercount'] = number_format($stats['usercount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($stats['threadcount'] >= 1000) $stats['threadcount'] = number_format($stats['threadcount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($stats['postcount'] >= 1000) $stats['postcount'] = number_format($stats['postcount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
}
/* ############## USERONLINE ############## */
if ($showuseronline == 1) {
	$guestcount = 0;
	$membercount = 0;
	$invisiblecount = 0;
	$online = &new useronline($wbbuserdata['a_can_view_ghosts'], $wbbuserdata['buddylist']);
	$result = $db->unbuffered_query("SELECT s.userid, username, useronlinegroupid, useronlinemarking, invisible FROM bb".$n."_sessions s LEFT JOIN bb".$n."_users u USING (userid) LEFT JOIN bb".$n."_groups g ON g.groupid=u.useronlinegroupid WHERE s.lastactivity >= '".(time() - 60 * $useronlinetimeout)."'".(($wbbuserdata['ignorelist']) ? (" AND s.userid NOT IN (".str_replace(" ", ",", $wbbuserdata['ignorelist']).")") : (""))." ORDER BY u.username ASC"); 
	while ($row = $db->fetch_array($result)) {
		if ($row['userid'] == 0) {
			$guestcount++;
			continue;	
		}
		$membercount++;
		if ($row['invisible'] == 1) $invisiblecount++;
		$online->user($row['userid'], htmlconverter($row['username']), $row['useronlinemarking'], $row['invisible']);
	}
	$useronline = $online->useronlinebit;
	$totaluseronline = $membercount + $guestcount;
	if ($totaluseronline > $rekord) {
		$rekord = $totaluseronline;
		$rekordtime = time();
		$db->unbuffered_query("UPDATE bb".$n."_options SET value='$rekord' WHERE varname='rekord'", 1);
		$db->unbuffered_query("UPDATE bb".$n."_options SET value='$rekordtime' WHERE varname='rekordtime'", 1);
		require("./acp/lib/class_options.php");
		$option = &new options("acp/lib");
		$option->write();
	}
	$rekorddate = formatdate($wbbuserdata['dateformat'], $rekordtime);
	$rekordtime = formatdate($wbbuserdata['timeformat'], $rekordtime);
	
	// format figures
	if ($guestcount >= 1000) $guestcount = number_format($guestcount, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($membercount >= 1000) $membercount = number_format($membercount, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($invisiblecount >= 1000) $invisiblecount = number_format($invisiblecount, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($totaluseronline >= 1000) $totaluseronline = number_format($totaluseronline, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($rekord >= 1000) $rekord = number_format($rekord, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	
	if ($totaluseronline == 1) {
		$useronline_BE = $lang->items['LANG_START_USERONLINE_BE_ONE'];
		$useronline_USER = $lang->items['LANG_START_USERONLINE_USER_ONE'];
	}
	else {
		$useronline_BE = $lang->items['LANG_START_USERONLINE_BE'];
		$useronline_USER = $lang->items['LANG_START_USERONLINE_USER'];
	}
	
	if ($guestcount == 1) $useronline_GUEST = $lang->items['LANG_START_USERONLINE_GUEST_ONE'];
	elseif ($guestcount > 1) $useronline_GUEST = $lang->items['LANG_START_USERONLINE_GUEST'];
	else {
		$useronline_GUEST = '';
		$guestcount = '';
	}
	
	if ($membercount == 1) $useronline_MEMBERS = $lang->items['LANG_START_USERONLINE_MEMBERS_ONE'];
	elseif ($membercount > 1) $useronline_MEMBERS = $lang->items['LANG_START_USERONLINE_MEMBERS'];
	else {
		$useronline_MEMBERS = '';
		$membercount = '';
	}
	
	if ($invisiblecount == 1) $useronline_GHOSTS = $lang->items['LANG_START_USERONLINE_GHOSTS_ONE'];
	elseif ($invisiblecount > 1) $useronline_GHOSTS = $lang->get("LANG_START_USERONLINE_GHOSTS", array('$invisiblecount' => $invisiblecount));
	else $useronline_GHOSTS = '';
	
	if ($guestcount > 0 && $membercount > 0) $useronline_AND = $lang->items['LANG_START_USERONLINE_AND'];
	else $useronline_AND = '';
	
	$lang->items['LANG_START_USERONLINE'] = $lang->get("LANG_START_USERONLINE", array('$useronline_BE' => $useronline_BE, '$membercount' => $membercount, '$useronline_MEMBERS' => $useronline_MEMBERS, '$useronline_GHOSTS' => $useronline_GHOSTS, '$useronline_AND' => $useronline_AND, '$guestcount' => $guestcount, '$useronline_GUEST' => $useronline_GUEST, '$rekord' => $rekord, '$useronline_USER' => $useronline_USER, '$rekorddate' => $rekorddate, '$rekordtime' => $rekordtime));
	$lang->items['LANG_START_SHOWUSERONLINE'] = $lang->get("LANG_START_SHOWUSERONLINE", array('$useronline_BE' => $useronline_BE, '$totaluseronline' => $totaluseronline, '$useronline_USER' => $useronline_USER));
}
/* ############## BIRTHDAYS ############## */
unset($birthdaybit);
if ($showbirthdays == 1  && $wbbuserdata['can_view_calendar'] != 0) {
	$currentdate = formatdate("m-d", time());
	$currentyear = intval(formatdate("Y", time()));
	$result = $db->unbuffered_query("SELECT userid, username, birthday FROM bb".$n."_users WHERE birthday LIKE '%-$currentdate' ORDER BY username ASC");
	while ($row = $db->fetch_array($result)) {
		$row['username'] = htmlconverter($row['username']);
		$birthyear = intval(wbb_substr($row['birthday'], 0, 4));
		$age = $currentyear - $birthyear;
		if ($age < 1 || $age > 200) $age = '';
		else $age = "&nbsp;($age)";
		if (isset($birthdaybit)) eval("\$birthdaybit .= \"".$tpl->get("index_birthdaybit")."\";");
		else eval("\$birthdaybit = \"".$tpl->get("index_birthdaybit")."\";");
	}
}

/* ############## EVENTS ############## */
unset($eventbit);
if ($showevents == 1 && $wbbuserdata['can_view_calendar'] != 0) {
	$currentdate = date("Y-m-d"); 
	$result = $db->unbuffered_query("SELECT eventid, subject, public FROM bb".$n."_events WHERE eventdate = '$currentdate' AND (public=2 OR (public=0 AND userid = '$wbbuserdata[userid]')) ORDER BY public ASC, subject ASC");
	while ($row = $db->fetch_array($result)) {
		$row['subject'] = htmlconverter($row['subject']);
		if (isset($eventbit)) eval("\$eventbit .= \"".$tpl->get("index_eventbit")."\";");
		else eval("\$eventbit = \"".$tpl->get("index_eventbit")."\";");
	}
}

if (!$wbbuserdata['userid']) {
	$lang->items['LANG_START_WELCOME_TITLE'] = $lang->get("LANG_START_WELCOME_TITLE", array('$master_board_name' => $master_board_name));
	$lang->items['LANG_START_WELCOME'] = $lang->get("LANG_START_WELCOME", array('$SID_ARG_2ND' => $SID_ARG_2ND, '$SID_ARG_1ST' => $SID_ARG_1ST));
}
else {
	$currenttime = formatdate($wbbuserdata['timeformat'], time());
	$toffset = (($wbbuserdata['timezoneoffset'] >= 0) ? ("+") : ("")).$wbbuserdata['timezoneoffset'];
	$lang->items['LANG_START_TIMEZONE'] = $lang->get("LANG_START_TIMEZONE", array('$toffset' => $toffset));
	$lastvisitdate = formatdate($wbbuserdata['dateformat'], $wbbuserdata['lastvisit'], 1);
	$lastvisittime = formatdate($wbbuserdata['timeformat'], $wbbuserdata['lastvisit']);
	if ($showpmonindex == 1 && $wbbuserdata['can_use_pms'] == 1 && $wbbuserdata['receivepm'] == 1) {
		$counttotal = $wbbuserdata['pminboxcount'];
		$countunread = $wbbuserdata['pmunreadcount'];
		$countnew = $wbbuserdata['pmnewcount'];
		if ($countnew == 1) $pms_NEWMESSAGE = $lang->items['LANG_START_PMS_MESSAGE'];
		else $pms_NEWMESSAGE = $lang->items['LANG_START_PMS_MESSAGES'];
		
		if ($counttotal == 1) $pms_TOTALMESSAGE = $lang->items['LANG_START_PMS_MESSAGE'];
		else $pms_TOTALMESSAGE = $lang->items['LANG_START_PMS_MESSAGES'];
		
		$lang->items['LANG_START_PMS'] = $lang->get("LANG_START_PMS", array('$countnew' => $countnew, '$pms_NEWMESSAGE' => $pms_NEWMESSAGE, '$countunread' => $countunread, '$counttotal' => $counttotal, '$pms_TOTALMESSAGE' => $pms_TOTALMESSAGE));
	}
}
eval("\$tpl->output(\"".$tpl->get("index")."\");"); 

////// para-scripts.de Verwarn-Hack START //////
require("acp/lib/ver_index.inc.php");
////// para-scripts.de Verwarn-Hack ENDE //////

?>


ansonsten hab ich den verwarnhack wie Korban sagte smile
25.03.06 20:37 NitroX ist offline E-Mail Finden Als Freund hinzufügen
KorbanDallas KorbanDallas ist männlich
Mitglied


Dabei seit: 08.04.05
Beiträge: 612

Antworten Zitieren Editieren Melden       UP

ersetze durch

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
<?php
// ************************************************************************************//
// * WoltLab Burning Board 2
// ************************************************************************************//
// * Copyright (c) 2001-2004 WoltLab GmbH
// * Web           http://www.woltlab.de/
// * License       http://www.woltlab.de/products/burning_board/license_en.php
// *               http://www.woltlab.de/products/burning_board/license.php
// ************************************************************************************//
// * WoltLab Burning Board 2 is NOT free software.
// * You may not redistribute this package or any of it's files.
// ************************************************************************************//
// * $Date: 2005-06-16 14:28:46 +0200 (Thu, 16 Jun 2005) $
// * $Author: Burntime $
// * $Rev: 1618 $
// ************************************************************************************//


$filename = 'index.php';

require('./global.php');
$lang->load('START');

require('./acp/lib/class_useronline.php');

if (isset($_COOKIE[$cookieprefix.'hidecats'])) $hidecats = decode_cookie($_COOKIE[$cookieprefix.'hidecats']);
else $hidecats = array();

if (isset($_GET['hidecat'])) {
	$hidecats[$_GET['hidecat']] = 1;
	if ($wbbuserdata['usecookies'] == 1) encode_cookie("hidecats", time() + 3600 * 24 * 365);
	else encode_cookie("hidecats");
}
if (isset($_GET['showcat'])) {
	$hidecats[$_GET['showcat']] = 0;
	if ($wbbuserdata['usecookies'] == 1) encode_cookie("hidecats", time() + 3600 * 24 * 365);
	else encode_cookie("hidecats");
}

$boardcache = array();
$permissioncache = array();
$modcache = array();

switch ($boardordermode) {
	case 1: $boardorder = 'b.title ASC'; break;
	case 2: $boardorder = 'b.title DESC'; break;
	case 3: $boardorder = 'b.lastposttime DESC'; break;
	default: $boardorder = 'b.boardorder ASC'; break;
}
$activtime = time() - 60 * $useronlinetimeout;

$boardvisit = array();
$result = $db->unbuffered_query("
 SELECT
 b.*".(($showlastposttitle == 1) ? (", t.topic, t.prefix AS threadprefix, i.*") : (""))."
 ".(($showuseronlineinboard == 1) ? (", COUNT(s.sessionhash) AS useronline") : (""))."
 ".(($wbbuserdata['userid']) ? (", bv.lastvisit") : (""))."
 FROM bb".$n."_boards b
 ".(($showlastposttitle == 1) ? ("LEFT JOIN bb".$n."_threads t ON (t.threadid=b.lastthreadid)
 LEFT JOIN bb".$n."_icons i USING (iconid)") : (""))."
 ".(($showuseronlineinboard == 1) ? ("LEFT JOIN bb".$n."_sessions s ON (s.boardid=b.boardid AND s.lastactivity>='$activtime')") : (""))."
 ".(($wbbuserdata['userid']) ? (" LEFT JOIN bb".$n."_boardvisit bv ON (bv.boardid=b.boardid AND bv.userid='".$wbbuserdata['userid']."')") : (""))."
 ".(($showuseronlineinboard == 1) ? ("GROUP BY b.boardid") : (""))."
 ORDER by b.parentid ASC, $boardorder");
while ($row = $db->fetch_array($result)) {
	$boardcache[$row['parentid']][$row['boardorder']][$row['boardid']] = $row;
	$boardvisit[$row['boardid']] = $row['lastvisit'];
}

if ($showuseronlineinboard == 2) {
	$userinboard = array();
	$online = &new useronline($wbbuserdata['a_can_view_ghosts'], $wbbuserdata['buddylist']);
	$result = $db->unbuffered_query("SELECT s.userid, s.boardid, u.username, u.useronlinegroupid,g.useronlinemarking, u.invisible FROM bb".$n."_sessions s LEFT JOIN bb".$n."_users u USING (userid) LEFT JOIN bb".$n."_groups g ON g.groupid=u.useronlinegroupid WHERE s.lastactivity>='$activtime'".(($wbbuserdata['ignorelist']) ? (" AND s.userid NOT IN (".str_replace(" ", ",", $wbbuserdata['ignorelist']).")") : (""))." ORDER BY u.username ASC");	
	while ($row = $db->fetch_array($result)) $userinboard[$row['boardid']][] = $row;	
}

$result = $db->unbuffered_query("SELECT t.boardid, t.threadid, t.lastposttime".(($wbbuserdata['userid']) ? (", tv.lastvisit") : (""))." FROM bb".$n."_threads t".(($wbbuserdata['userid']) ? (" LEFT JOIN bb".$n."_threadvisit tv ON (tv.threadid=t.threadid AND tv.userid='".$wbbuserdata['userid']."')") : (""))." WHERE t.visible = 1 AND t.lastposttime > '$wbbuserdata[lastvisit]' AND t.closed <> 3");
while ($row = $db->fetch_array($result)) {
	if ($row['lastposttime'] > $row['lastvisit']) $visitcache[$row['boardid']][$row['threadid']] = $row['lastposttime'];
}

// read permissions
$permissioncache = getPermissions();

if ($hide_modcell == 0) {
	$result = $db->unbuffered_query("SELECT bb".$n."_moderators.*, username FROM bb".$n."_moderators LEFT JOIN bb".$n."_users USING (userid) ORDER BY username ASC");
	while ($row = $db->fetch_array($result)) $modcache[$row['boardid']][] = $row;
}

$boardbit = makeboardbit(0);

$index_pms = '';
$quicklogin = '';
$index_showevents = '';
$index_useronline = '';
$index_stats = '';

/* ############## STATS ############## */
if ($showstats == 1) {
	$stats = $db->query_first("SELECT s.*, u.username FROM bb".$n."_stats s LEFT JOIN bb".$n."_users u ON(u.userid=s.lastuserid)");
	$stats['username'] = htmlconverter($stats['username']);
	
	$installdays = (time() - $installdate) / 86400;
	if ($installdays < 1) $postperday = $stats['postcount'];
	else $postperday = $stats['postcount'] / $installdays; 
	
	$postperday = number_format($postperday, 2, $lang->get("LANG_GLOBAL_DEC_POINT"), $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	
	if ($stats['usercount'] >= 1000) $stats['usercount'] = number_format($stats['usercount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($stats['threadcount'] >= 1000) $stats['threadcount'] = number_format($stats['threadcount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($stats['postcount'] >= 1000) $stats['postcount'] = number_format($stats['postcount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
}
/* ############## USERONLINE ############## */
if ($showuseronline == 1) {
	$guestcount = 0;
	$membercount = 0;
	$invisiblecount = 0;
	$online = &new useronline($wbbuserdata['a_can_view_ghosts'], $wbbuserdata['buddylist']);
	$result = $db->unbuffered_query("SELECT s.userid, username, useronlinegroupid, useronlinemarking, invisible FROM bb".$n."_sessions s LEFT JOIN bb".$n."_users u USING (userid) LEFT JOIN bb".$n."_groups g ON g.groupid=u.useronlinegroupid WHERE s.lastactivity >= '".(time() - 60 * $useronlinetimeout)."'".(($wbbuserdata['ignorelist']) ? (" AND s.userid NOT IN (".str_replace(" ", ",", $wbbuserdata['ignorelist']).")") : (""))." ORDER BY u.username ASC"); 
	while ($row = $db->fetch_array($result)) {
		if ($row['userid'] == 0) {
			$guestcount++;
			continue;	
		}
		$membercount++;
		if ($row['invisible'] == 1) $invisiblecount++;
		$online->user($row['userid'], htmlconverter($row['username']), $row['useronlinemarking'], $row['invisible']);
	}
	$useronline = $online->useronlinebit;
	$totaluseronline = $membercount + $guestcount;
	if ($totaluseronline > $rekord) {
		$rekord = $totaluseronline;
		$rekordtime = time();
		$db->unbuffered_query("UPDATE bb".$n."_options SET value='$rekord' WHERE varname='rekord'", 1);
		$db->unbuffered_query("UPDATE bb".$n."_options SET value='$rekordtime' WHERE varname='rekordtime'", 1);
		require("./acp/lib/class_options.php");
		$option = &new options("acp/lib");
		$option->write();
	}
	$rekorddate = formatdate($wbbuserdata['dateformat'], $rekordtime);
	$rekordtime = formatdate($wbbuserdata['timeformat'], $rekordtime);
	
	// format figures
	if ($guestcount >= 1000) $guestcount = number_format($guestcount, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($membercount >= 1000) $membercount = number_format($membercount, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($invisiblecount >= 1000) $invisiblecount = number_format($invisiblecount, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($totaluseronline >= 1000) $totaluseronline = number_format($totaluseronline, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($rekord >= 1000) $rekord = number_format($rekord, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	
	if ($totaluseronline == 1) {
		$useronline_BE = $lang->items['LANG_START_USERONLINE_BE_ONE'];
		$useronline_USER = $lang->items['LANG_START_USERONLINE_USER_ONE'];
	}
	else {
		$useronline_BE = $lang->items['LANG_START_USERONLINE_BE'];
		$useronline_USER = $lang->items['LANG_START_USERONLINE_USER'];
	}
	
	if ($guestcount == 1) $useronline_GUEST = $lang->items['LANG_START_USERONLINE_GUEST_ONE'];
	elseif ($guestcount > 1) $useronline_GUEST = $lang->items['LANG_START_USERONLINE_GUEST'];
	else {
		$useronline_GUEST = '';
		$guestcount = '';
	}
	
	if ($membercount == 1) $useronline_MEMBERS = $lang->items['LANG_START_USERONLINE_MEMBERS_ONE'];
	elseif ($membercount > 1) $useronline_MEMBERS = $lang->items['LANG_START_USERONLINE_MEMBERS'];
	else {
		$useronline_MEMBERS = '';
		$membercount = '';
	}
	
	if ($invisiblecount == 1) $useronline_GHOSTS = $lang->items['LANG_START_USERONLINE_GHOSTS_ONE'];
	elseif ($invisiblecount > 1) $useronline_GHOSTS = $lang->get("LANG_START_USERONLINE_GHOSTS", array('$invisiblecount' => $invisiblecount));
	else $useronline_GHOSTS = '';
	
	if ($guestcount > 0 && $membercount > 0) $useronline_AND = $lang->items['LANG_START_USERONLINE_AND'];
	else $useronline_AND = '';
	
	$lang->items['LANG_START_USERONLINE'] = $lang->get("LANG_START_USERONLINE", array('$useronline_BE' => $useronline_BE, '$membercount' => $membercount, '$useronline_MEMBERS' => $useronline_MEMBERS, '$useronline_GHOSTS' => $useronline_GHOSTS, '$useronline_AND' => $useronline_AND, '$guestcount' => $guestcount, '$useronline_GUEST' => $useronline_GUEST, '$rekord' => $rekord, '$useronline_USER' => $useronline_USER, '$rekorddate' => $rekorddate, '$rekordtime' => $rekordtime));
	$lang->items['LANG_START_SHOWUSERONLINE'] = $lang->get("LANG_START_SHOWUSERONLINE", array('$useronline_BE' => $useronline_BE, '$totaluseronline' => $totaluseronline, '$useronline_USER' => $useronline_USER));
}
/* ############## BIRTHDAYS ############## */
unset($birthdaybit);
if ($showbirthdays == 1  && $wbbuserdata['can_view_calendar'] != 0) {
	$currentdate = formatdate("m-d", time());
	$currentyear = intval(formatdate("Y", time()));
	$result = $db->unbuffered_query("SELECT userid, username, birthday FROM bb".$n."_users WHERE birthday LIKE '%-$currentdate' ORDER BY username ASC");
	while ($row = $db->fetch_array($result)) {
		$row['username'] = htmlconverter($row['username']);
		$birthyear = intval(wbb_substr($row['birthday'], 0, 4));
		$age = $currentyear - $birthyear;
		if ($age < 1 || $age > 200) $age = '';
		else $age = "&nbsp;($age)";
		if (isset($birthdaybit)) eval("\$birthdaybit .= \"".$tpl->get("index_birthdaybit")."\";");
		else eval("\$birthdaybit = \"".$tpl->get("index_birthdaybit")."\";");
	}
}

/* ############## EVENTS ############## */
unset($eventbit);
if ($showevents == 1 && $wbbuserdata['can_view_calendar'] != 0) {
	$currentdate = date("Y-m-d"); 
	$result = $db->unbuffered_query("SELECT eventid, subject, public FROM bb".$n."_events WHERE eventdate = '$currentdate' AND (public=2 OR (public=0 AND userid = '$wbbuserdata[userid]')) ORDER BY public ASC, subject ASC");
	while ($row = $db->fetch_array($result)) {
		$row['subject'] = htmlconverter($row['subject']);
		if (isset($eventbit)) eval("\$eventbit .= \"".$tpl->get("index_eventbit")."\";");
		else eval("\$eventbit = \"".$tpl->get("index_eventbit")."\";");
	}
}

if (!$wbbuserdata['userid']) {
	$lang->items['LANG_START_WELCOME_TITLE'] = $lang->get("LANG_START_WELCOME_TITLE", array('$master_board_name' => $master_board_name));
	$lang->items['LANG_START_WELCOME'] = $lang->get("LANG_START_WELCOME", array('$SID_ARG_2ND' => $SID_ARG_2ND, '$SID_ARG_1ST' => $SID_ARG_1ST));
}
else {
	$currenttime = formatdate($wbbuserdata['timeformat'], time());
	$toffset = (($wbbuserdata['timezoneoffset'] >= 0) ? ("+") : ("")).$wbbuserdata['timezoneoffset'];
	$lang->items['LANG_START_TIMEZONE'] = $lang->get("LANG_START_TIMEZONE", array('$toffset' => $toffset));
	$lastvisitdate = formatdate($wbbuserdata['dateformat'], $wbbuserdata['lastvisit'], 1);
	$lastvisittime = formatdate($wbbuserdata['timeformat'], $wbbuserdata['lastvisit']);
	if ($showpmonindex == 1 && $wbbuserdata['can_use_pms'] == 1 && $wbbuserdata['receivepm'] == 1) {
		$counttotal = $wbbuserdata['pminboxcount'];
		$countunread = $wbbuserdata['pmunreadcount'];
		$countnew = $wbbuserdata['pmnewcount'];
		if ($countnew == 1) $pms_NEWMESSAGE = $lang->items['LANG_START_PMS_MESSAGE'];
		else $pms_NEWMESSAGE = $lang->items['LANG_START_PMS_MESSAGES'];
		
		if ($counttotal == 1) $pms_TOTALMESSAGE = $lang->items['LANG_START_PMS_MESSAGE'];
		else $pms_TOTALMESSAGE = $lang->items['LANG_START_PMS_MESSAGES'];
		
		$lang->items['LANG_START_PMS'] = $lang->get("LANG_START_PMS", array('$countnew' => $countnew, '$pms_NEWMESSAGE' => $pms_NEWMESSAGE, '$countunread' => $countunread, '$counttotal' => $counttotal, '$pms_TOTALMESSAGE' => $pms_TOTALMESSAGE));
	}
}

////// para-scripts.de Verwarn-Hack START //////
require("acp/lib/ver_index.inc.php");
////// para-scripts.de Verwarn-Hack ENDE //////

eval("\$tpl->output(\"".$tpl->get("index")."\");"); 
?>
25.03.06 20:44 KorbanDallas ist offline Finden Als Freund hinzufügen
NitroX
Mitglied


Dabei seit: 16.01.04
Beiträge: 73

Themenstarter Thema begonnen von NitroX
Antworten Zitieren Editieren Melden       UP

hab das nun so drin, und er sagt nun in zeile 242 is en fehler o.O

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
<?php
// ************************************************************************************//
// * WoltLab Burning Board 2
// ************************************************************************************//
// * Copyright (c) 2001-2004 WoltLab GmbH
// * Web           http://www.woltlab.de/
// * License       http://www.woltlab.de/products/burning_board/license_en.php
// *               http://www.woltlab.de/products/burning_board/license.php
// ************************************************************************************//
// * WoltLab Burning Board 2 is NOT free software.
// * You may not redistribute this package or any of it's files.
// ************************************************************************************//
// * $Date: 2005-06-16 14:28:46 +0200 (Thu, 16 Jun 2005) $
// * $Author: Burntime $
// * $Rev: 1618 $
// ************************************************************************************//


$filename = 'index.php';

require('./global.php');
$lang->load('START');

require('./acp/lib/class_useronline.php');

if (isset($_COOKIE[$cookieprefix.'hidecats'])) $hidecats = decode_cookie($_COOKIE[$cookieprefix.'hidecats']);
else $hidecats = array();

if (isset($_GET['hidecat'])) {
	$hidecats[$_GET['hidecat']] = 1;
	if ($wbbuserdata['usecookies'] == 1) encode_cookie("hidecats", time() + 3600 * 24 * 365);
	else encode_cookie("hidecats");
}
if (isset($_GET['showcat'])) {
	$hidecats[$_GET['showcat']] = 0;
	if ($wbbuserdata['usecookies'] == 1) encode_cookie("hidecats", time() + 3600 * 24 * 365);
	else encode_cookie("hidecats");
}

$boardcache = array();
$permissioncache = array();
$modcache = array();

switch ($boardordermode) {
	case 1: $boardorder = 'b.title ASC'; break;
	case 2: $boardorder = 'b.title DESC'; break;
	case 3: $boardorder = 'b.lastposttime DESC'; break;
	default: $boardorder = 'b.boardorder ASC'; break;
}
$activtime = time() - 60 * $useronlinetimeout;

$boardvisit = array();
$result = $db->unbuffered_query("
 SELECT
 b.*".(($showlastposttitle == 1) ? (", t.topic, t.prefix AS threadprefix, i.*") : (""))."
 ".(($showuseronlineinboard == 1) ? (", COUNT(s.sessionhash) AS useronline") : (""))."
 ".(($wbbuserdata['userid']) ? (", bv.lastvisit") : (""))."
 FROM bb".$n."_boards b
 ".(($showlastposttitle == 1) ? ("LEFT JOIN bb".$n."_threads t ON (t.threadid=b.lastthreadid)
 LEFT JOIN bb".$n."_icons i USING (iconid)") : (""))."
 ".(($showuseronlineinboard == 1) ? ("LEFT JOIN bb".$n."_sessions s ON (s.boardid=b.boardid AND s.lastactivity>='$activtime')") : (""))."
 ".(($wbbuserdata['userid']) ? (" LEFT JOIN bb".$n."_boardvisit bv ON (bv.boardid=b.boardid AND bv.userid='".$wbbuserdata['userid']."')") : (""))."
 ".(($showuseronlineinboard == 1) ? ("GROUP BY b.boardid") : (""))."
 ORDER by b.parentid ASC, $boardorder");
while ($row = $db->fetch_array($result)) {
	$boardcache[$row['parentid']][$row['boardorder']][$row['boardid']] = $row;
	$boardvisit[$row['boardid']] = $row['lastvisit'];
}

if ($showuseronlineinboard == 2) {
	$userinboard = array();
	$online = &new useronline($wbbuserdata['a_can_view_ghosts'], $wbbuserdata['buddylist']);
	$result = $db->unbuffered_query("SELECT s.userid, s.boardid, u.username, u.useronlinegroupid,g.useronlinemarking, u.invisible FROM bb".$n."_sessions s LEFT JOIN bb".$n."_users u USING (userid) LEFT JOIN bb".$n."_groups g ON g.groupid=u.useronlinegroupid WHERE s.lastactivity>='$activtime'".(($wbbuserdata['ignorelist']) ? (" AND s.userid NOT IN (".str_replace(" ", ",", $wbbuserdata['ignorelist']).")") : (""))." ORDER BY u.username ASC");	
	while ($row = $db->fetch_array($result)) $userinboard[$row['boardid']][] = $row;	
}

$result = $db->unbuffered_query("SELECT t.boardid, t.threadid, t.lastposttime".(($wbbuserdata['userid']) ? (", tv.lastvisit") : (""))." FROM bb".$n."_threads t".(($wbbuserdata['userid']) ? (" LEFT JOIN bb".$n."_threadvisit tv ON (tv.threadid=t.threadid AND tv.userid='".$wbbuserdata['userid']."')") : (""))." WHERE t.visible = 1 AND t.lastposttime > '$wbbuserdata[lastvisit]' AND t.closed <> 3");
while ($row = $db->fetch_array($result)) {
	if ($row['lastposttime'] > $row['lastvisit']) $visitcache[$row['boardid']][$row['threadid']] = $row['lastposttime'];
}

// read permissions
$permissioncache = getPermissions();

if ($hide_modcell == 0) {
	$result = $db->unbuffered_query("SELECT bb".$n."_moderators.*, username FROM bb".$n."_moderators LEFT JOIN bb".$n."_users USING (userid) ORDER BY username ASC");
	while ($row = $db->fetch_array($result)) $modcache[$row['boardid']][] = $row;
}

$boardbit = makeboardbit(0);

$index_pms = '';
$quicklogin = '';
$index_showevents = '';
$index_useronline = '';
$index_stats = '';

/* ############## STATS ############## */
if ($showstats == 1) {
	$stats = $db->query_first("SELECT s.*, u.username FROM bb".$n."_stats s LEFT JOIN bb".$n."_users u ON(u.userid=s.lastuserid)");
	$stats['username'] = htmlconverter($stats['username']);
	
	$installdays = (time() - $installdate) / 86400;
	if ($installdays < 1) $postperday = $stats['postcount'];
	else $postperday = $stats['postcount'] / $installdays; 
	
	$postperday = number_format($postperday, 2, $lang->get("LANG_GLOBAL_DEC_POINT"), $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	
	if ($stats['usercount'] >= 1000) $stats['usercount'] = number_format($stats['usercount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($stats['threadcount'] >= 1000) $stats['threadcount'] = number_format($stats['threadcount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($stats['postcount'] >= 1000) $stats['postcount'] = number_format($stats['postcount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
}
/* ############## USERONLINE ############## */
if ($showuseronline == 1) {
	$guestcount = 0;
	$membercount = 0;
	$invisiblecount = 0;
	$online = &new useronline($wbbuserdata['a_can_view_ghosts'], $wbbuserdata['buddylist']);
	$result = $db->unbuffered_query("SELECT s.userid, username, useronlinegroupid, useronlinemarking, invisible FROM bb".$n."_sessions s LEFT JOIN bb".$n."_users u USING (userid) LEFT JOIN bb".$n."_groups g ON g.groupid=u.useronlinegroupid WHERE s.lastactivity >= '".(time() - 60 * $useronlinetimeout)."'".(($wbbuserdata['ignorelist']) ? (" AND s.userid NOT IN (".str_replace(" ", ",", $wbbuserdata['ignorelist']).")") : (""))." ORDER BY u.username ASC"); 
	while ($row = $db->fetch_array($result)) {
		if ($row['userid'] == 0) {
			$guestcount++;
			continue;	
		}
		$membercount++;
		if ($row['invisible'] == 1) $invisiblecount++;
		$online->user($row['userid'], htmlconverter($row['username']), $row['useronlinemarking'], $row['invisible']);
	}
	$useronline = $online->useronlinebit;
	$totaluseronline = $membercount + $guestcount;
	if ($totaluseronline > $rekord) {
		$rekord = $totaluseronline;
		$rekordtime = time();
		$db->unbuffered_query("UPDATE bb".$n."_options SET value='$rekord' WHERE varname='rekord'", 1);
		$db->unbuffered_query("UPDATE bb".$n."_options SET value='$rekordtime' WHERE varname='rekordtime'", 1);
		require("./acp/lib/class_options.php");
		$option = &new options("acp/lib");
		$option->write();
	}
	$rekorddate = formatdate($wbbuserdata['dateformat'], $rekordtime);
	$rekordtime = formatdate($wbbuserdata['timeformat'], $rekordtime);
	
	// format figures
	if ($guestcount >= 1000) $guestcount = number_format($guestcount, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($membercount >= 1000) $membercount = number_format($membercount, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($invisiblecount >= 1000) $invisiblecount = number_format($invisiblecount, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($totaluseronline >= 1000) $totaluseronline = number_format($totaluseronline, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($rekord >= 1000) $rekord = number_format($rekord, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	
	if ($totaluseronline == 1) {
		$useronline_BE = $lang->items['LANG_START_USERONLINE_BE_ONE'];
		$useronline_USER = $lang->items['LANG_START_USERONLINE_USER_ONE'];
	}
	else {
		$useronline_BE = $lang->items['LANG_START_USERONLINE_BE'];
		$useronline_USER = $lang->items['LANG_START_USERONLINE_USER'];
	}
	
	if ($guestcount == 1) $useronline_GUEST = $lang->items['LANG_START_USERONLINE_GUEST_ONE'];
	elseif ($guestcount > 1) $useronline_GUEST = $lang->items['LANG_START_USERONLINE_GUEST'];
	else {
		$useronline_GUEST = '';
		$guestcount = '';
	}
	
	if ($membercount == 1) $useronline_MEMBERS = $lang->items['LANG_START_USERONLINE_MEMBERS_ONE'];
	elseif ($membercount > 1) $useronline_MEMBERS = $lang->items['LANG_START_USERONLINE_MEMBERS'];
	else {
		$useronline_MEMBERS = '';
		$membercount = '';
	}
	
	if ($invisiblecount == 1) $useronline_GHOSTS = $lang->items['LANG_START_USERONLINE_GHOSTS_ONE'];
	elseif ($invisiblecount > 1) $useronline_GHOSTS = $lang->get("LANG_START_USERONLINE_GHOSTS", array('$invisiblecount' => $invisiblecount));
	else $useronline_GHOSTS = '';
	
	if ($guestcount > 0 && $membercount > 0) $useronline_AND = $lang->items['LANG_START_USERONLINE_AND'];
	else $useronline_AND = '';
	
	$lang->items['LANG_START_USERONLINE'] = $lang->get("LANG_START_USERONLINE", array('$useronline_BE' => $useronline_BE, '$membercount' => $membercount, '$useronline_MEMBERS' => $useronline_MEMBERS, '$useronline_GHOSTS' => $useronline_GHOSTS, '$useronline_AND' => $useronline_AND, '$guestcount' => $guestcount, '$useronline_GUEST' => $useronline_GUEST, '$rekord' => $rekord, '$useronline_USER' => $useronline_USER, '$rekorddate' => $rekorddate, '$rekordtime' => $rekordtime));
	$lang->items['LANG_START_SHOWUSERONLINE'] = $lang->get("LANG_START_SHOWUSERONLINE", array('$useronline_BE' => $useronline_BE, '$totaluseronline' => $totaluseronline, '$useronline_USER' => $useronline_USER));
}
/* ############## BIRTHDAYS ############## */
unset($birthdaybit);
if ($showbirthdays == 1  && $wbbuserdata['can_view_calendar'] != 0) {
	$currentdate = formatdate("m-d", time());
	$currentyear = intval(formatdate("Y", time()));
	$result = $db->unbuffered_query("SELECT userid, username, birthday FROM bb".$n."_users WHERE birthday LIKE '%-$currentdate' ORDER BY username ASC");
	while ($row = $db->fetch_array($result)) {
		$row['username'] = htmlconverter($row['username']);
		$birthyear = intval(wbb_substr($row['birthday'], 0, 4));
		$age = $currentyear - $birthyear;
		if ($age < 1 || $age > 200) $age = '';
		else $age = "&nbsp;($age)";
		if (isset($birthdaybit)) eval("\$birthdaybit .= \"".$tpl->get("index_birthdaybit")."\";");
		else eval("\$birthdaybit = \"".$tpl->get("index_birthdaybit")."\";");
	}
}

/* ############## EVENTS ############## */
unset($eventbit);
if ($showevents == 1 && $wbbuserdata['can_view_calendar'] != 0) {
	$currentdate = date("Y-m-d"); 
	$result = $db->unbuffered_query("SELECT eventid, subject, public FROM bb".$n."_events WHERE eventdate = '$currentdate' AND (public=2 OR (public=0 AND userid = '$wbbuserdata[userid]')) ORDER BY public ASC, subject ASC");
	while ($row = $db->fetch_array($result)) {
		$row['subject'] = htmlconverter($row['subject']);
		if (isset($eventbit)) eval("\$eventbit .= \"".$tpl->get("index_eventbit")."\";");
		else eval("\$eventbit = \"".$tpl->get("index_eventbit")."\";");
	}
}

if (!$wbbuserdata['userid']) {
	$lang->items['LANG_START_WELCOME_TITLE'] = $lang->get("LANG_START_WELCOME_TITLE", array('$master_board_name' => $master_board_name));
	$lang->items['LANG_START_WELCOME'] = $lang->get("LANG_START_WELCOME", array('$SID_ARG_2ND' => $SID_ARG_2ND, '$SID_ARG_1ST' => $SID_ARG_1ST));
}
else {
	$currenttime = formatdate($wbbuserdata['timeformat'], time());
	$toffset = (($wbbuserdata['timezoneoffset'] >= 0) ? ("+") : ("")).$wbbuserdata['timezoneoffset'];
	$lang->items['LANG_START_TIMEZONE'] = $lang->get("LANG_START_TIMEZONE", array('$toffset' => $toffset));
	$lastvisitdate = formatdate($wbbuserdata['dateformat'], $wbbuserdata['lastvisit'], 1);
	$lastvisittime = formatdate($wbbuserdata['timeformat'], $wbbuserdata['lastvisit']);
	if ($showpmonindex == 1 && $wbbuserdata['can_use_pms'] == 1 && $wbbuserdata['receivepm'] == 1) {
		$counttotal = $wbbuserdata['pminboxcount'];
		$countunread = $wbbuserdata['pmunreadcount'];
		$countnew = $wbbuserdata['pmnewcount'];
		if ($countnew == 1) $pms_NEWMESSAGE = $lang->items['LANG_START_PMS_MESSAGE'];
		else $pms_NEWMESSAGE = $lang->items['LANG_START_PMS_MESSAGES'];
		
		if ($counttotal == 1) $pms_TOTALMESSAGE = $lang->items['LANG_START_PMS_MESSAGE'];
		else $pms_TOTALMESSAGE = $lang->items['LANG_START_PMS_MESSAGES'];
		
		$lang->items['LANG_START_PMS'] = $lang->get("LANG_START_PMS", array('$countnew' => $countnew, '$pms_NEWMESSAGE' => $pms_NEWMESSAGE, '$countunread' => $countunread, '$counttotal' => $counttotal, '$pms_TOTALMESSAGE' => $pms_TOTALMESSAGE));
	}
}

////// para-scripts.de Verwarn-Hack START //////
require("acp/lib/ver_index.inc.php");
////// para-scripts.de Verwarn-Hack ENDE //////

eval("\$tpl->output(\"".$tpl->get("index")."\");"); 

DB Script : start
$optim   = "1";    // 1 = true ; 0 = false (Datenbankoptimierung)
$repair  = "1";    // 1 = true ; 0 = false (Datenbankoptimierung)
$abackup = "1";    // 1 = true ; 0 = false (Autobackup mit mysqldump)
$difer = "86400";   // Zeitdifferenz zwischen den einzelnen Optionen (in Sekunden, Ganzzahl)
$time    = time();
$username="KA::::"; // mysqluser
$pass="KA::::"; //mysqlpasswort
$datenbank="KA::::"; //mysql datenbank
$today=date("d.m.y.h.i.s");
$pfad="./db/$today.sql"; //pfad zum backup 

if ($optim=="1") 
{
$result = $db->query_first("SELECT * FROM bb".$n."_db WHERE cat='opt'");
     if ($result['timestamp'] < $time-$difer)
     {
            $result_opt = $db->query("OPTIMIZE TABLE bb".$n."_access , bb".$n."_acpmenuitemgroups , bb".$n."_acpmenuitemgroupscount , bb".$n."_acpmenuitems , bb".$n."_acpmenuitemscount , bb".$n."_adminsessions , bb".$n."_announcements , bb".$n."_applications , bb".$n."_attachments , bb".$n."_avatars , bb".$n."_bbcodes , bb".$n."_boards , bb".$n."_boardvisit , bb".$n."_designelements , bb".$n."_designpacks , bb".$n."_events , bb".$n."_folders , bb".$n."_groupcombinations , bb".$n."_groupleaders , bb".$n."_groups , bb".$n."_groupvalues , bb".$n."_groupvariablegroups , bb".$n."_groupvariables , bb".$n."_icons , bb".$n."_languagecats , bb".$n."_languagepacks , bb".$n."_languages , bb".$n."_moderators , bb".$n."_optiongroups , bb".$n."_options , bb".$n."_permissions , bb".$n."_polloptions , bb".$n."_polls , bb".$n."_posts , bb".$n."_privatemessage , bb".$n."_profilefields , bb".$n."_ranks , bb".$n."_searchs , bb".$n."_sessions , bb".$n."_smilies , bb".$n."_stats , bb".$n."_styles , bb".$n."_subscribeboards , bb".$n."_subscribethreads , bb".$n."_templatepacks , bb".$n."_templates , bb".$n."_threads , bb".$n."_threadvisit , bb".$n."_user2groups , bb".$n."_userfields , bb".$n."_users , bb".$n."_votes , bb".$n."_wordlist , bb".$n."_wordmatch");
            $result_upt = $db->unbuffered_query("UPDATE bb".$n."_db SET timestamp='$time' WHERE cat='opt'",1);
     } 
}


if ($repair=="1") {
    $result = $db->query_first("SELECT * FROM bb".$n."_db WHERE cat='rep'");
      if ($result['timestamp'] < $time-$difer)
      {
        $result = $db->query("REPAIR TABLE bb".$n."_access , bb".$n."_acpmenuitemgroups , bb".$n."_acpmenuitemgroupscount , bb".$n."_acpmenuitems , bb".$n."_acpmenuitemscount , bb".$n."_adminsessions , bb".$n."_announcements , bb".$n."_applications , bb".$n."_attachments , bb".$n."_avatars , bb".$n."_bbcodes , bb".$n."_boards , bb".$n."_boardvisit , bb".$n."_designelements , bb".$n."_designpacks , bb".$n."_events , bb".$n."_folders , bb".$n."_groupcombinations , bb".$n."_groupleaders , bb".$n."_groups , bb".$n."_groupvalues , bb".$n."_groupvariablegroups , bb".$n."_groupvariables , bb".$n."_icons , bb".$n."_languagecats , bb".$n."_languagepacks , bb".$n."_languages , bb".$n."_moderators , bb".$n."_optiongroups , bb".$n."_options , bb".$n."_permissions , bb".$n."_polloptions , bb".$n."_polls , bb".$n."_posts , bb".$n."_privatemessage , bb".$n."_profilefields , bb".$n."_ranks , bb".$n."_searchs , bb".$n."_sessions , bb".$n."_smilies , bb".$n."_stats , bb".$n."_styles , bb".$n."_subscribeboards , bb".$n."_subscribethreads , bb".$n."_templatepacks , bb".$n."_templates , bb".$n."_threads , bb".$n."_threadvisit , bb".$n."_user2groups , bb".$n."_userfields , bb".$n."_users , bb".$n."_votes , bb".$n."_wordlist , bb".$n."_wordmatch");
        $result = $db->unbuffered_query("UPDATE bb".$n."_db SET timestamp='$time' WHERE cat='rep'",1);
    } 
} 


if ($abackup=="1") 
{
$result = $db->query_first("SELECT * FROM bb".$n."_db WHERE cat='auto_backup'");
     if ($result['timestamp'] < $time-$difer)
     {
      system("mysqldump --all -c -C -q -e -l --add-drop-table --host=localhost --user=$username --password=$pass $datenbank > $pfad");
      system("gzip $pfad"); 
            $result_upt = $db->unbuffered_query("UPDATE bb".$n."_db SET timestamp='$time' WHERE cat='auto_backup'",1);
     } 
} 
?>
26.03.06 20:49 NitroX ist offline E-Mail Finden Als Freund hinzufügen
KorbanDallas KorbanDallas ist männlich
Mitglied


Dabei seit: 08.04.05
Beiträge: 612

Antworten Zitieren Editieren Melden       UP

also erstens sollten in der index.php keine Änderungen nach

code:
1:
2:
3:
eval("\$tpl->output(\"".$tpl->get("index")."\");"); 


eingefügt werden, sondern vor diesen Code, deswegen wird der Fehler kommen, wenn du dieses DB Script vor diesen Teil setzt, sollte es gehen
26.03.06 21:21 KorbanDallas ist offline Finden Als Freund hinzufügen
NitroX
Mitglied


Dabei seit: 16.01.04
Beiträge: 73

Themenstarter Thema begonnen von NitroX
Antworten Zitieren Editieren Melden       UP

hab ich gemacht, kommt dann in line 240 ist ein fehler....sieht nun so aus :

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
<?php
// ************************************************************************************//
// * WoltLab Burning Board 2
// ************************************************************************************//
// * Copyright (c) 2001-2004 WoltLab GmbH
// * Web           http://www.woltlab.de/
// * License       http://www.woltlab.de/products/burning_board/license_en.php
// *               http://www.woltlab.de/products/burning_board/license.php
// ************************************************************************************//
// * WoltLab Burning Board 2 is NOT free software.
// * You may not redistribute this package or any of it's files.
// ************************************************************************************//
// * $Date: 2005-06-16 14:28:46 +0200 (Thu, 16 Jun 2005) $
// * $Author: Burntime $
// * $Rev: 1618 $
// ************************************************************************************//


$filename = 'index.php';

require('./global.php');
$lang->load('START');

require('./acp/lib/class_useronline.php');

if (isset($_COOKIE[$cookieprefix.'hidecats'])) $hidecats = decode_cookie($_COOKIE[$cookieprefix.'hidecats']);
else $hidecats = array();

if (isset($_GET['hidecat'])) {
	$hidecats[$_GET['hidecat']] = 1;
	if ($wbbuserdata['usecookies'] == 1) encode_cookie("hidecats", time() + 3600 * 24 * 365);
	else encode_cookie("hidecats");
}
if (isset($_GET['showcat'])) {
	$hidecats[$_GET['showcat']] = 0;
	if ($wbbuserdata['usecookies'] == 1) encode_cookie("hidecats", time() + 3600 * 24 * 365);
	else encode_cookie("hidecats");
}

$boardcache = array();
$permissioncache = array();
$modcache = array();

switch ($boardordermode) {
	case 1: $boardorder = 'b.title ASC'; break;
	case 2: $boardorder = 'b.title DESC'; break;
	case 3: $boardorder = 'b.lastposttime DESC'; break;
	default: $boardorder = 'b.boardorder ASC'; break;
}
$activtime = time() - 60 * $useronlinetimeout;

$boardvisit = array();
$result = $db->unbuffered_query("
 SELECT
 b.*".(($showlastposttitle == 1) ? (", t.topic, t.prefix AS threadprefix, i.*") : (""))."
 ".(($showuseronlineinboard == 1) ? (", COUNT(s.sessionhash) AS useronline") : (""))."
 ".(($wbbuserdata['userid']) ? (", bv.lastvisit") : (""))."
 FROM bb".$n."_boards b
 ".(($showlastposttitle == 1) ? ("LEFT JOIN bb".$n."_threads t ON (t.threadid=b.lastthreadid)
 LEFT JOIN bb".$n."_icons i USING (iconid)") : (""))."
 ".(($showuseronlineinboard == 1) ? ("LEFT JOIN bb".$n."_sessions s ON (s.boardid=b.boardid AND s.lastactivity>='$activtime')") : (""))."
 ".(($wbbuserdata['userid']) ? (" LEFT JOIN bb".$n."_boardvisit bv ON (bv.boardid=b.boardid AND bv.userid='".$wbbuserdata['userid']."')") : (""))."
 ".(($showuseronlineinboard == 1) ? ("GROUP BY b.boardid") : (""))."
 ORDER by b.parentid ASC, $boardorder");
while ($row = $db->fetch_array($result)) {
	$boardcache[$row['parentid']][$row['boardorder']][$row['boardid']] = $row;
	$boardvisit[$row['boardid']] = $row['lastvisit'];
}

if ($showuseronlineinboard == 2) {
	$userinboard = array();
	$online = &new useronline($wbbuserdata['a_can_view_ghosts'], $wbbuserdata['buddylist']);
	$result = $db->unbuffered_query("SELECT s.userid, s.boardid, u.username, u.useronlinegroupid,g.useronlinemarking, u.invisible FROM bb".$n."_sessions s LEFT JOIN bb".$n."_users u USING (userid) LEFT JOIN bb".$n."_groups g ON g.groupid=u.useronlinegroupid WHERE s.lastactivity>='$activtime'".(($wbbuserdata['ignorelist']) ? (" AND s.userid NOT IN (".str_replace(" ", ",", $wbbuserdata['ignorelist']).")") : (""))." ORDER BY u.username ASC");	
	while ($row = $db->fetch_array($result)) $userinboard[$row['boardid']][] = $row;	
}

$result = $db->unbuffered_query("SELECT t.boardid, t.threadid, t.lastposttime".(($wbbuserdata['userid']) ? (", tv.lastvisit") : (""))." FROM bb".$n."_threads t".(($wbbuserdata['userid']) ? (" LEFT JOIN bb".$n."_threadvisit tv ON (tv.threadid=t.threadid AND tv.userid='".$wbbuserdata['userid']."')") : (""))." WHERE t.visible = 1 AND t.lastposttime > '$wbbuserdata[lastvisit]' AND t.closed <> 3");
while ($row = $db->fetch_array($result)) {
	if ($row['lastposttime'] > $row['lastvisit']) $visitcache[$row['boardid']][$row['threadid']] = $row['lastposttime'];
}

// read permissions
$permissioncache = getPermissions();

if ($hide_modcell == 0) {
	$result = $db->unbuffered_query("SELECT bb".$n."_moderators.*, username FROM bb".$n."_moderators LEFT JOIN bb".$n."_users USING (userid) ORDER BY username ASC");
	while ($row = $db->fetch_array($result)) $modcache[$row['boardid']][] = $row;
}

$boardbit = makeboardbit(0);

$index_pms = '';
$quicklogin = '';
$index_showevents = '';
$index_useronline = '';
$index_stats = '';

/* ############## STATS ############## */
if ($showstats == 1) {
	$stats = $db->query_first("SELECT s.*, u.username FROM bb".$n."_stats s LEFT JOIN bb".$n."_users u ON(u.userid=s.lastuserid)");
	$stats['username'] = htmlconverter($stats['username']);
	
	$installdays = (time() - $installdate) / 86400;
	if ($installdays < 1) $postperday = $stats['postcount'];
	else $postperday = $stats['postcount'] / $installdays; 
	
	$postperday = number_format($postperday, 2, $lang->get("LANG_GLOBAL_DEC_POINT"), $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	
	if ($stats['usercount'] >= 1000) $stats['usercount'] = number_format($stats['usercount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($stats['threadcount'] >= 1000) $stats['threadcount'] = number_format($stats['threadcount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($stats['postcount'] >= 1000) $stats['postcount'] = number_format($stats['postcount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
}
/* ############## USERONLINE ############## */
if ($showuseronline == 1) {
	$guestcount = 0;
	$membercount = 0;
	$invisiblecount = 0;
	$online = &new useronline($wbbuserdata['a_can_view_ghosts'], $wbbuserdata['buddylist']);
	$result = $db->unbuffered_query("SELECT s.userid, username, useronlinegroupid, useronlinemarking, invisible FROM bb".$n."_sessions s LEFT JOIN bb".$n."_users u USING (userid) LEFT JOIN bb".$n."_groups g ON g.groupid=u.useronlinegroupid WHERE s.lastactivity >= '".(time() - 60 * $useronlinetimeout)."'".(($wbbuserdata['ignorelist']) ? (" AND s.userid NOT IN (".str_replace(" ", ",", $wbbuserdata['ignorelist']).")") : (""))." ORDER BY u.username ASC"); 
	while ($row = $db->fetch_array($result)) {
		if ($row['userid'] == 0) {
			$guestcount++;
			continue;	
		}
		$membercount++;
		if ($row['invisible'] == 1) $invisiblecount++;
		$online->user($row['userid'], htmlconverter($row['username']), $row['useronlinemarking'], $row['invisible']);
	}
	$useronline = $online->useronlinebit;
	$totaluseronline = $membercount + $guestcount;
	if ($totaluseronline > $rekord) {
		$rekord = $totaluseronline;
		$rekordtime = time();
		$db->unbuffered_query("UPDATE bb".$n."_options SET value='$rekord' WHERE varname='rekord'", 1);
		$db->unbuffered_query("UPDATE bb".$n."_options SET value='$rekordtime' WHERE varname='rekordtime'", 1);
		require("./acp/lib/class_options.php");
		$option = &new options("acp/lib");
		$option->write();
	}
	$rekorddate = formatdate($wbbuserdata['dateformat'], $rekordtime);
	$rekordtime = formatdate($wbbuserdata['timeformat'], $rekordtime);
	
	// format figures
	if ($guestcount >= 1000) $guestcount = number_format($guestcount, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($membercount >= 1000) $membercount = number_format($membercount, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($invisiblecount >= 1000) $invisiblecount = number_format($invisiblecount, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($totaluseronline >= 1000) $totaluseronline = number_format($totaluseronline, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	if ($rekord >= 1000) $rekord = number_format($rekord, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
	
	if ($totaluseronline == 1) {
		$useronline_BE = $lang->items['LANG_START_USERONLINE_BE_ONE'];
		$useronline_USER = $lang->items['LANG_START_USERONLINE_USER_ONE'];
	}
	else {
		$useronline_BE = $lang->items['LANG_START_USERONLINE_BE'];
		$useronline_USER = $lang->items['LANG_START_USERONLINE_USER'];
	}
	
	if ($guestcount == 1) $useronline_GUEST = $lang->items['LANG_START_USERONLINE_GUEST_ONE'];
	elseif ($guestcount > 1) $useronline_GUEST = $lang->items['LANG_START_USERONLINE_GUEST'];
	else {
		$useronline_GUEST = '';
		$guestcount = '';
	}
	
	if ($membercount == 1) $useronline_MEMBERS = $lang->items['LANG_START_USERONLINE_MEMBERS_ONE'];
	elseif ($membercount > 1) $useronline_MEMBERS = $lang->items['LANG_START_USERONLINE_MEMBERS'];
	else {
		$useronline_MEMBERS = '';
		$membercount = '';
	}
	
	if ($invisiblecount == 1) $useronline_GHOSTS = $lang->items['LANG_START_USERONLINE_GHOSTS_ONE'];
	elseif ($invisiblecount > 1) $useronline_GHOSTS = $lang->get("LANG_START_USERONLINE_GHOSTS", array('$invisiblecount' => $invisiblecount));
	else $useronline_GHOSTS = '';
	
	if ($guestcount > 0 && $membercount > 0) $useronline_AND = $lang->items['LANG_START_USERONLINE_AND'];
	else $useronline_AND = '';
	
	$lang->items['LANG_START_USERONLINE'] = $lang->get("LANG_START_USERONLINE", array('$useronline_BE' => $useronline_BE, '$membercount' => $membercount, '$useronline_MEMBERS' => $useronline_MEMBERS, '$useronline_GHOSTS' => $useronline_GHOSTS, '$useronline_AND' => $useronline_AND, '$guestcount' => $guestcount, '$useronline_GUEST' => $useronline_GUEST, '$rekord' => $rekord, '$useronline_USER' => $useronline_USER, '$rekorddate' => $rekorddate, '$rekordtime' => $rekordtime));
	$lang->items['LANG_START_SHOWUSERONLINE'] = $lang->get("LANG_START_SHOWUSERONLINE", array('$useronline_BE' => $useronline_BE, '$totaluseronline' => $totaluseronline, '$useronline_USER' => $useronline_USER));
}
/* ############## BIRTHDAYS ############## */
unset($birthdaybit);
if ($showbirthdays == 1  && $wbbuserdata['can_view_calendar'] != 0) {
	$currentdate = formatdate("m-d", time());
	$currentyear = intval(formatdate("Y", time()));
	$result = $db->unbuffered_query("SELECT userid, username, birthday FROM bb".$n."_users WHERE birthday LIKE '%-$currentdate' ORDER BY username ASC");
	while ($row = $db->fetch_array($result)) {
		$row['username'] = htmlconverter($row['username']);
		$birthyear = intval(wbb_substr($row['birthday'], 0, 4));
		$age = $currentyear - $birthyear;
		if ($age < 1 || $age > 200) $age = '';
		else $age = "&nbsp;($age)";
		if (isset($birthdaybit)) eval("\$birthdaybit .= \"".$tpl->get("index_birthdaybit")."\";");
		else eval("\$birthdaybit = \"".$tpl->get("index_birthdaybit")."\";");
	}
}

/* ############## EVENTS ############## */
unset($eventbit);
if ($showevents == 1 && $wbbuserdata['can_view_calendar'] != 0) {
	$currentdate = date("Y-m-d"); 
	$result = $db->unbuffered_query("SELECT eventid, subject, public FROM bb".$n."_events WHERE eventdate = '$currentdate' AND (public=2 OR (public=0 AND userid = '$wbbuserdata[userid]')) ORDER BY public ASC, subject ASC");
	while ($row = $db->fetch_array($result)) {
		$row['subject'] = htmlconverter($row['subject']);
		if (isset($eventbit)) eval("\$eventbit .= \"".$tpl->get("index_eventbit")."\";");
		else eval("\$eventbit = \"".$tpl->get("index_eventbit")."\";");
	}
}

if (!$wbbuserdata['userid']) {
	$lang->items['LANG_START_WELCOME_TITLE'] = $lang->get("LANG_START_WELCOME_TITLE", array('$master_board_name' => $master_board_name));
	$lang->items['LANG_START_WELCOME'] = $lang->get("LANG_START_WELCOME", array('$SID_ARG_2ND' => $SID_ARG_2ND, '$SID_ARG_1ST' => $SID_ARG_1ST));
}
else {
	$currenttime = formatdate($wbbuserdata['timeformat'], time());
	$toffset = (($wbbuserdata['timezoneoffset'] >= 0) ? ("+") : ("")).$wbbuserdata['timezoneoffset'];
	$lang->items['LANG_START_TIMEZONE'] = $lang->get("LANG_START_TIMEZONE", array('$toffset' => $toffset));
	$lastvisitdate = formatdate($wbbuserdata['dateformat'], $wbbuserdata['lastvisit'], 1);
	$lastvisittime = formatdate($wbbuserdata['timeformat'], $wbbuserdata['lastvisit']);
	if ($showpmonindex == 1 && $wbbuserdata['can_use_pms'] == 1 && $wbbuserdata['receivepm'] == 1) {
		$counttotal = $wbbuserdata['pminboxcount'];
		$countunread = $wbbuserdata['pmunreadcount'];
		$countnew = $wbbuserdata['pmnewcount'];
		if ($countnew == 1) $pms_NEWMESSAGE = $lang->items['LANG_START_PMS_MESSAGE'];
		else $pms_NEWMESSAGE = $lang->items['LANG_START_PMS_MESSAGES'];
		
		if ($counttotal == 1) $pms_TOTALMESSAGE = $lang->items['LANG_START_PMS_MESSAGE'];
		else $pms_TOTALMESSAGE = $lang->items['LANG_START_PMS_MESSAGES'];
		
		$lang->items['LANG_START_PMS'] = $lang->get("LANG_START_PMS", array('$countnew' => $countnew, '$pms_NEWMESSAGE' => $pms_NEWMESSAGE, '$countunread' => $countunread, '$counttotal' => $counttotal, '$pms_TOTALMESSAGE' => $pms_TOTALMESSAGE));
	}
}

////// para-scripts.de Verwarn-Hack START //////
require("acp/lib/ver_index.inc.php");
////// para-scripts.de Verwarn-Hack ENDE //////

DB Script : start
$optim   = "1";    // 1 = true ; 0 = false (Datenbankoptimierung)
$repair  = "1";    // 1 = true ; 0 = false (Datenbankoptimierung)
$abackup = "1";    // 1 = true ; 0 = false (Autobackup mit mysqldump)
$difer = "86400";   // Zeitdifferenz zwischen den einzelnen Optionen (in Sekunden, Ganzzahl)
$time    = time();
$username="KA:::"; // mysqluser
$pass="KA::::"; //mysqlpasswort
$datenbank="KA::::"; //mysql datenbank
$today=date("d.m.y.h.i.s");
$pfad="./db/$today.sql"; //pfad zum backup 

if ($optim=="1") 
{
$result = $db->query_first("SELECT * FROM bb".$n."_db WHERE cat='opt'");
     if ($result['timestamp'] < $time-$difer)
     {
            $result_opt = $db->query("OPTIMIZE TABLE bb".$n."_access , bb".$n."_acpmenuitemgroups , bb".$n."_acpmenuitemgroupscount , bb".$n."_acpmenuitems , bb".$n."_acpmenuitemscount , bb".$n."_adminsessions , bb".$n."_announcements , bb".$n."_applications , bb".$n."_attachments , bb".$n."_avatars , bb".$n."_bbcodes , bb".$n."_boards , bb".$n."_boardvisit , bb".$n."_designelements , bb".$n."_designpacks , bb".$n."_events , bb".$n."_folders , bb".$n."_groupcombinations , bb".$n."_groupleaders , bb".$n."_groups , bb".$n."_groupvalues , bb".$n."_groupvariablegroups , bb".$n."_groupvariables , bb".$n."_icons , bb".$n."_languagecats , bb".$n."_languagepacks , bb".$n."_languages , bb".$n."_moderators , bb".$n."_optiongroups , bb".$n."_options , bb".$n."_permissions , bb".$n."_polloptions , bb".$n."_polls , bb".$n."_posts , bb".$n."_privatemessage , bb".$n."_profilefields , bb".$n."_ranks , bb".$n."_searchs , bb".$n."_sessions , bb".$n."_smilies , bb".$n."_stats , bb".$n."_styles , bb".$n."_subscribeboards , bb".$n."_subscribethreads , bb".$n."_templatepacks , bb".$n."_templates , bb".$n."_threads , bb".$n."_threadvisit , bb".$n."_user2groups , bb".$n."_userfields , bb".$n."_users , bb".$n."_votes , bb".$n."_wordlist , bb".$n."_wordmatch");
            $result_upt = $db->unbuffered_query("UPDATE bb".$n."_db SET timestamp='$time' WHERE cat='opt'",1);
     } 
}


if ($repair=="1") {
    $result = $db->query_first("SELECT * FROM bb".$n."_db WHERE cat='rep'");
      if ($result['timestamp'] < $time-$difer)
      {
        $result = $db->query("REPAIR TABLE bb".$n."_access , bb".$n."_acpmenuitemgroups , bb".$n."_acpmenuitemgroupscount , bb".$n."_acpmenuitems , bb".$n."_acpmenuitemscount , bb".$n."_adminsessions , bb".$n."_announcements , bb".$n."_applications , bb".$n."_attachments , bb".$n."_avatars , bb".$n."_bbcodes , bb".$n."_boards , bb".$n."_boardvisit , bb".$n."_designelements , bb".$n."_designpacks , bb".$n."_events , bb".$n."_folders , bb".$n."_groupcombinations , bb".$n."_groupleaders , bb".$n."_groups , bb".$n."_groupvalues , bb".$n."_groupvariablegroups , bb".$n."_groupvariables , bb".$n."_icons , bb".$n."_languagecats , bb".$n."_languagepacks , bb".$n."_languages , bb".$n."_moderators , bb".$n."_optiongroups , bb".$n."_options , bb".$n."_permissions , bb".$n."_polloptions , bb".$n."_polls , bb".$n."_posts , bb".$n."_privatemessage , bb".$n."_profilefields , bb".$n."_ranks , bb".$n."_searchs , bb".$n."_sessions , bb".$n."_smilies , bb".$n."_stats , bb".$n."_styles , bb".$n."_subscribeboards , bb".$n."_subscribethreads , bb".$n."_templatepacks , bb".$n."_templates , bb".$n."_threads , bb".$n."_threadvisit , bb".$n."_user2groups , bb".$n."_userfields , bb".$n."_users , bb".$n."_votes , bb".$n."_wordlist , bb".$n."_wordmatch");
        $result = $db->unbuffered_query("UPDATE bb".$n."_db SET timestamp='$time' WHERE cat='rep'",1);
    } 
} 


if ($abackup=="1") 
{
$result = $db->query_first("SELECT * FROM bb".$n."_db WHERE cat='auto_backup'");
     if ($result['timestamp'] < $time-$difer)
     {
      system("mysqldump --all -c -C -q -e -l --add-drop-table --host=localhost --user=$username --password=$pass $datenbank > $pfad");
      system("gzip $pfad"); 
            $result_upt = $db->unbuffered_query("UPDATE bb".$n."_db SET timestamp='$time' WHERE cat='auto_backup'",1);
     } 
}

eval("\$tpl->output(\"".$tpl->get("index")."\");"); 
 
?>



LAG glaub ich an diesem hier "DB Script : start" ist in line 240....ich denke das ist kein befehl oder o.O hab das nun so hingeschrieben //// DB Script : start /// nun funktioniert alles....

Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von NitroX: 26.03.06 22:03.

26.03.06 21:58 NitroX ist offline E-Mail Finden Als Freund hinzufügen
KorbanDallas KorbanDallas ist männlich
Mitglied


Dabei seit: 08.04.05
Beiträge: 612

Antworten Zitieren Editieren Melden       UP

okay, dann ists ja endlich geschafft.

das mit DB ist richtig, musste man auskommentieren oder wegmachen. hasts ja geschafft.
26.03.06 22:08 KorbanDallas ist offline Finden Als Freund hinzufügen
Baumstruktur | Brettstruktur
Gehe zu:

Neues Thema erstellen Antwort erstellen

yourWBB » WoltLab Burning Board Generation 2 * » Alles von und für das WBB 2.3.x » [WBB 2.3.x] Allg. Fragen und Probleme » was heisst diese meldung ??