You are not logged in.

Sollte es probleme mit eurem passwortern geben dann nutzt bitte die Passwort vergessen funktion MFG Saugjunkie

crasy1977

Beginner

  • "crasy1977" started this thread

Posts: 1

wcf.user.option.userOption52: deutsch

  • Send private message

1

Tuesday, September 17th 2019, 5:54pm

Homepage nv Basic umbau auf mysli und php 7

Hallo zusammen ,
ich hab bei euch die Hompage auf nv basis gefunden und würde sie gern nutzen nur leider spielt der Parser nicht mit .Hoffe ihr könnt mir weiter helfen .Folgener fehler steht in den logs (PHP Parse error: syntax error, unexpected end of file in /var/www/html/nvhome/datas/function.php on line 785
Hier die Function.php und auf line 785 das ist ganz am ende muss irgend wo ne klammer fehlen ich find den fehler einfach nicht vielleicht wisst ihr weiter ich hab mich an das Treade von euch gehalten was ihr hier schon mal eröffnet habt . wünsche euch einen Schönen Abend mfg Crasy1977

Source 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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
?php
function local_user()
{
	global $HTTP_SERVER_VARS;	return $HTTP_SERVER_VARS["SERVER_ADDR"] == $HTTP_SERVER_VARS["REMOTE_ADDR"];
} if (!file_exists("datas/datasql.php") || !file_exists("datas/config.php"))
	die("<html><head><title>FEHLER</title></head><body><p>Die Seite wurde noch nicht konfiguriert.</p></body></html>");require_once("datas/datasql.php");
require_once("datas/config.php");
require_once("datas/cleanup.php");
require_once("datas/global.php");
require_once("datas/pmfunctions.php");/**
 * *** validip/getip courtesy of manolete <manolete@myway.com> ***
 */
// IP Validation
function validip($ip)
{
	if (!empty($ip) && ip2long($ip) != -1) {
    	// reserved IANA IPv4 addresses
    	// http://www.iana.org/assignments/ipv4-address-space
    	$reserved_ips = array (
        	array('0.0.0.0', '2.255.255.255'),
        	array('10.0.0.0', '10.255.255.255'),
        	array('127.0.0.0', '127.255.255.255'),
        	array('169.254.0.0', '169.254.255.255'),
        	array('172.16.0.0', '172.31.255.255'),
        	array('192.0.2.0', '192.0.2.255'),
        	array('192.168.0.0', '192.168.255.255'),
        	array('255.255.255.0', '255.255.255.255')
        	);    	foreach ($reserved_ips as $r) {
        	$min = ip2long($r[0]);
        	$max = ip2long($r[1]);
        	if ((ip2long($ip) >= $min) && (ip2long($ip) <= $max)) return false;
    	} 
    	return true;
	} else return false;
} 
// Patched function to detect REAL IP address if it's valid
function getip()
{
	if (validip($_SERVER['HTTP_CLIENT_IP']))
    	return $_SERVER['HTTP_CLIENT_IP'];
	elseif ($_SERVER['HTTP_X_FORWARDED_FOR'] != "") {
    	$forwarded = str_replace(",", "", $_SERVER['HTTP_X_FORWARDED_FOR']);
    	$forwarded_array = split(" ", $forwarded);
    	foreach($forwarded_array as $value) if (validip($value)) return $value;
	} 
	return $_SERVER['REMOTE_ADDR'];
} function dbconn($autoclean = false)
{
	global $mysql_host, $mysql_user, $mysql_pass, $mysql_db, $HTTP_SERVER_VARS;	if (!@mysql_connect($mysql_host, $mysql_user, $mysql_pass)) {
    	switch (mysql_errno()) {
        	case 1040:
        	case 2002:
            	if ($_SERVER["REQUEST_METHOD"] == "GET")
                	die("<html><head><meta http-equiv=refresh content=\"5 " . $_SERVER["REQUEST_URI"] . "\"></head>
                     	<body><table border=0 width=100% height=100%><tr><td><h3 align=center>Die Serverlast ist momentan zu hoch. Versuche es später noch einmal...</h3></td></tr></table></body></html>");
            	else
                	die("Zu viele Benutzer. Bitte benutze den Aktualisieren-Button Deines Browsers um es erneut zu versuchen.");
        	default:
            	die("[" . mysql_errno() . "] dbconn: mysql_connect: " . mysql_error());
    	} 
	} 
	mysql_select_db($mysql_db)
	or die('dbconn: mysql_select_db: ' + mysql_error());	userlogin();	if ($autoclean)
    	register_shutdown_function("autoclean");
} function userlogin()
{
	global $SITE_ONLINE;
	unset($GLOBALS["CURUSER"]);	$ip = getip();
	$nip = ip2long($ip);
	$res = mysql_query("SELECT * FROM bans WHERE $nip >= first AND $nip <= last") or sqlerr(__FILE__, __LINE__);
	if (mysql_num_rows($res) > 0) {
    	header("HTTP/1.0 403 Forbidden");
    	print("<html><body><h1>403 Forbidden</h1>Unauthorized IP address.</body></html>\n");
    	die;
	} 
	// Neues sessionbasiertes Login für bessere Performance und Anzeige neuer Torrents
	session_start();	if (!$SITE_ONLINE || (!isset($_SESSION["userdata"]) && (empty($_COOKIE["uid"]) || empty($_COOKIE["pass"]))))
    	return;	if (isset($_SESSION["userdata"])) {
    	// Aktivierungsstatus und IP prüfen (Session hijacking vermeiden)
    	$enabled = mysql_fetch_assoc(mysql_query("SELECT COUNT(*) AS `cnt` FROM `users` WHERE `id` = " . $_SESSION["userdata"]["id"] . " AND `enabled`='yes' AND `status` = 'confirmed'"));
    	if ($enabled["cnt"] != 1 || $_SESSION["userdata"]["ip"] != $ip) {
        	session_unset();
        	session_destroy();
        	return;
    	} 
    	$GLOBALS["CURUSER"] = $_SESSION["userdata"];
	} else {
    	// Keine Session aktiv, login via Cookie
    	$id = 0 + $_COOKIE["uid"];
    	if (!$id || strlen($_COOKIE["pass"]) != 32)
        	return;
    	$res = mysql_query("SELECT * FROM users WHERE id = $id AND enabled='yes' AND status = 'confirmed'"); // or die(mysql_error());
    	$row = mysql_fetch_array($res);
    	if (!$row)
        	return;
    	$sec = hash_pad($row["secret"]);
    	if ($_COOKIE["pass"] !== $row["passhash"])
        	return;    	$row['ip'] = $ip;
    	$GLOBALS["CURUSER"] = $row;
    	$_SESSION["userdata"] = $row;    	if (isset($_COOKIE["passhash"])) {
        	$res = mysql_query("SELECT * FROM `accounts` WHERE `userid`=" . $GLOBALS["CURUSER"]["id"] . " AND `chash`=" . sqlesc($_COOKIE["passhash"]));
        	if (mysql_num_rows($res))
            	mysql_query("UPDATE `accounts` SET `lastaccess`=NOW() WHERE `userid`=" . $GLOBALS["CURUSER"]["id"]);
        	else {
            	$res = mysql_query("SELECT * FROM `accounts` WHERE `chash`=" . sqlesc($_COOKIE["passhash"]));
            	if (mysql_num_rows($res)) {
                	$data = mysql_fetch_assoc($res);
                	$baduser = $data["baduser"];
            	} else {
                	$baduser = 0;
            	} 
            	mysql_query("INSERT INTO `accounts` (`userid`,`chash`,`lastaccess`,`username`,`email`,`baduser`) VALUES (" . $row["id"] . "," . sqlesc($_COOKIE["passhash"]) . ", NOW(), " . sqlesc($row["username"]) . ", " . sqlesc($row["email"]) . ", " . $baduser . ")");
        	} 
    	} else {
        	$res = mysql_query("SELECT * FROM `accounts` WHERE `userid`=" . $GLOBALS["CURUSER"]["id"]);
        	if (mysql_num_rows($res)) {
            	mysql_query("UPDATE `accounts` SET `lastaccess`=NOW() WHERE `userid`=" . $GLOBALS["CURUSER"]["id"]);
            	$data = mysql_fetch_assoc($res);
            	$hash = $data["chash"];
        	} else {
            	$hash = md5($row["username"] . mksecret() . $row["username"]);
            	mysql_query("INSERT INTO `accounts` (`userid`,`chash`,`lastaccess`,`username`,`email`,`baduser`) VALUES (" . $row["id"] . "," . sqlesc($hash) . ", NOW(), " . sqlesc($row["username"]) . ", " . sqlesc($row["email"]) . ", 0)");
        	} 
        	setcookie("passhash", $hash, 0x7fffffff, "/");
    	} 
	} 	if ($GLOBALS["CURUSER"]["id"] != 1010) 
    	// Letzten Zugriff aktualisieren
    	mysql_query("UPDATE users SET last_access='" . date("Y-m-d H:i:s") . "', ip='$ip' WHERE id=" . $GLOBALS["CURUSER"]["id"]); // or die(mysql_error());
} function logincookie($id, $passhash, $updatedb = 1, $expires = 0x7fffffff)
{
	setcookie("uid", $id, $expires, "/");
	setcookie("pass", $passhash, $expires, "/");	if ($updatedb)
    	mysql_query("UPDATE users SET last_login = NOW() WHERE id = $id");
} function logoutcookie()
{
	setcookie("uid", "", 0x7fffffff, "/");
	setcookie("pass", "", 0x7fffffff, "/");
	session_unset();
	session_destroy();
} function loggedinorreturn()
{
	global $CURUSER, $DEFAULTBASEURL;
	if (!$CURUSER) {
    	header("Location: login.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]));
    	exit();
	} 
} function autoclean()
{
	$now = time();
	$docleanup = 0;	$res = mysql_query("SELECT value_u FROM avps WHERE arg = 'lastcleantime'");
	$row = mysql_fetch_array($res);
	if (!$row) {
    	mysql_query("INSERT INTO avps (arg, value_u) VALUES ('lastcleantime',$now)");
    	return;
	} 
	$ts = $row[0];
	if ($ts + $GLOBALS["AUTOCLEAN_INTERVAL"] > $now)
    	return;
	mysql_query("UPDATE avps SET value_u=$now WHERE arg='lastcleantime' AND value_u = $ts");
	if (!mysql_affected_rows())
    	return;	docleanup();
} function unesc($x)
{
	if (get_magic_quotes_gpc())
    	return stripslashes($x);
	return $x;
} function mksize($bytes)
{
	if ($bytes < 1000 * 1024)
    	return number_format($bytes / 1024, 2, ",", ".") . " KB";
	elseif ($bytes < 1000 * 1048576)
    	return number_format($bytes / 1048576, 2, ",", ".") . " MB";
	elseif ($bytes < 1000 * 1073741824)
    	return number_format($bytes / 1073741824, 2, ",", ".") . " GB";
	elseif ($bytes < 1000 * 1099511627776)
    	return number_format($bytes / 1099511627776, 2, ",", ".") . " TB";
	else
    	return number_format($bytes / 1125899906842624, 2, ",", ".") . " PB";
} function mksizeint($bytes)
{
	$bytes = max(0, $bytes);
	if ($bytes < 1000)
    	return number_format(floor($bytes), 0, ",", ".") . " B";
	elseif ($bytes < 1000 * 1024)
    	return number_format(floor($bytes / 1024), 0, ",", ".") . " KB";
	elseif ($bytes < 1000 * 1048576)
    	return number_format(floor($bytes / 1048576), 0, ",", ".") . " MB";
	elseif ($bytes < 1000 * 1073741824)
    	return number_format(floor($bytes / 1073741824), 0, ",", ".") . " GB";
	elseif ($bytes < 1000 * 1099511627776)
    	return number_format(floor($bytes / 1099511627776), 0, ",", ".") . " TB";
	else
    	return number_format(floor($bytes / 1125899906842624), 0, ",", ".") . " PB";
} function mkprettytime($s)
{
	if ($s < 0)
    	$s = 0;
	$t = array();
	foreach (array("60:sec", "60:min", "24:hour", "0:day") as $x) {
    	$y = explode(":", $x);
    	if ($y[0] > 1) {
        	$v = $s % $y[0];
        	$s = floor($s / $y[0]);
    	} else
        	$v = $s;
    	$t[$y[1]] = $v;
	} 	if ($t["day"])
    	return $t["day"] . "d " . sprintf("%02d:%02d:%02d", $t["hour"], $t["min"], $t["sec"]);
	if ($t["hour"])
    	return sprintf("%d:%02d:%02d", $t["hour"], $t["min"], $t["sec"]); 
	// if ($t["min"])
	return sprintf("%d:%02d", $t["min"], $t["sec"]); 
	// return $t["sec"] . " secs";
} function mkglobal($vars)
{
	if (!is_array($vars))
    	$vars = explode(":", $vars);
	foreach ($vars as $v) {
    	if (isset($_GET[$v]))
        	$GLOBALS[$v] = unesc($_GET[$v]);
    	elseif (isset($_POST[$v]))
        	$GLOBALS[$v] = unesc($_POST[$v]);
    	else
        	return 0;
	} 
	return 1;
} function tr($x, $y, $noesc = 0)
{
	if ($noesc)
    	$a = $y;
	else {
    	$a = htmlspecialchars($y);
    	$a = str_replace("\n", "<br />\n", $a);
	} 
	print("<tr><td class=\"tableb\" valign=\"top\" align=\"left\">$x</td><td class=\"tablea\" valign=\"top\" align=left>$a</td></tr>\n");
} function validfilename($name)
{
	return preg_match('/^[^\0-\x1f:\\\\\/?*\xff#<>|]+$/si', $name);
} function validemail($email)
{
	return preg_match('/^[\w.-]+@([\w.-]+\.)+[a-z]{2,6}$/is', $email);
} function sqlesc($x)
{
	return "'" . mysql_real_escape_string($x) . "'";
} function sqlwildcardesc($x)
{
	return str_replace(array("%", "_"), array("\\%", "\\_"), mysql_real_escape_string($x));
} function urlparse($m)
{
	$t = $m[0];
	if (preg_match(',^\w+://,', $t))
    	return "<a href=\"$t\">$t</a>";
	return "<a href=\"http://$t\">$t</a>";
} function parsedescr($d, $html)
{
	if (!$html) {
    	$d = htmlspecialchars($d);
    	$d = str_replace("\n", "\n<br>", $d);
	} 
	return $d;
} function stdhead($title = "", $msgalert = true)
{
	global $CURUSER, $HTTP_SERVER_VARS, $PHP_SELF;	if (!$GLOBALS["SITE_ONLINE"])
    	die("Die Seite ist momentan aufgrund von Wartungsarbeiten nicht verfügbar.<br>");	header("Content-Type: text/html; charset=iso-8859-1");
	header("Pragma: No-cache");
	header("Expires: 300");
	header("Cache-Control: private");	if ($title == "")
    	$title = $GLOBALS["SITENAME"];
	else
    	$title = $GLOBALS["SITENAME"] . " :: " . htmlspecialchars($title);	if ($CURUSER) {
    	$ss_a = @mysql_fetch_assoc(@mysql_query("SELECT `uri` FROM `stylesheets` WHERE `id`=" . $CURUSER["stylesheet"]));
    	if ($ss_a) $GLOBALS["ss_uri"] = $ss_a["uri"];
	} 	if (!$GLOBALS["ss_uri"]) {
    	($r = mysql_query("SELECT `uri` FROM `stylesheets` WHERE `default`='yes'")) or die(mysql_error());
    	($a = mysql_fetch_assoc($r)) or die(mysql_error());
    	$GLOBALS["ss_uri"] = $a["uri"];
	} 	if ($msgalert && $CURUSER) {
    	$res = mysql_query("SELECT COUNT(*) FROM `messages` WHERE `folder_in`<>0 AND `receiver`=" . $CURUSER["id"] . " && `unread`='yes'") or die("OopppsY!");
    	$arr = mysql_fetch_row($res);
    	$unread = $arr[0];
    	if ($CURUSER["class"] >= UC_SYSOP) {
        	$res = mysql_query("SELECT COUNT(*) FROM `messages` WHERE `sender`=0 AND `receiver`=0 && `mod_flag`='open'") or die("OopppsY!");
        	$arr = mysql_fetch_row($res);
        	$unread_mod = $arr[0];
    	} 
	} 	$fn = substr($PHP_SELF, strrpos($PHP_SELF, "/") + 1);
	$logo_pic = $GLOBALS["PIC_BASE_URL"] . $GLOBALS["ss_uri"] . "/";
	if (file_exists($logo_pic . "logo.gif")) $logo_pic .= "logo.gif";
	if (file_exists($logo_pic . "logo_top.gif")) $logo_pic .= "logo_top.gif";
	if (file_exists($logo_pic . "logo.jpg")) $logo_pic .= "logo.jpg";
	if (file_exists($logo_pic . "logo_top.jpg")) $logo_pic .= "logo_top.jpg";
	if (file_exists($logo_pic . "logo.png")) $logo_pic .= "logo.png";
	if (file_exists($logo_pic . "logo_top.png")) $logo_pic .= "logo_top.png";
	if (file_exists("header.jpg")) $logo_pic .= "header.jpg";
	if (file_exists($logo_pic . "header.gif")) $logo_pic .= "header.gif";
	if (file_exists($logo_pic . "header.png")) $logo_pic .= "header.png";	?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    	"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><?=$title?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="300">
<meta http-equiv="cache-control" content="private">
<meta name="robots" content="noindex, nofollow, noarchive">
<meta name="MSSmartTagsPreventParsing" content="true">
<link rel="stylesheet" href="<?=$GLOBALS["PIC_BASE_URL"] . $GLOBALS["ss_uri"] . "/" . $GLOBALS["ss_uri"]?>.css" type="text/css"></head>
<body><table style="width:100%" cellpadding="0" cellspacing="1" align="center" border="0" class="tableoutborder">
  <tr>
	<td class="mainpage" align="center">
  	<table style="width:100%" border="0" cellspacing="0" cellpadding="0">
    	<tr> 
      	<td align="center" class="logobackground" align="left"><a href="index.php"><img src="<?=$logo_pic?>" width="990" border="0" alt="FC-Herringhausen" title="FC-Herringhausen"></a></td></tr>
<?
if ($CURUSER) {
          	print("<tr><td align=\"center\" class=\"topbuttons\">");
          	print("<a href=\"index.php\"><img src=\"".$GLOBALS["PIC_BASE_URL"] . $GLOBALS["ss_uri"]."/top_index.gif\" border=\"0\" alt=\"\" title=\"Startseite\"></a>");
          	print("<a href=\"my.php\"><img src=\"".$GLOBALS["PIC_BASE_URL"] . $GLOBALS["ss_uri"]."/top_usercp.gif\" border=\"0\" alt=\"\" title=\"Profil bearbeiten\"></a>");
          	print("<a href=\"messages.php\"><img src=\"".$GLOBALS["PIC_BASE_URL"] . $GLOBALS["ss_uri"]."/top_pms.gif\" border=\"0\" alt=\"\" title=\"Private Nachrichten\"></a>");
          	print("<a href=\"forums.php\"><img src=\"".$GLOBALS["PIC_BASE_URL"] . $GLOBALS["ss_uri"]."/top_forum.gif\" border=\"0\" alt=\"\" title=\"Zum Forum\"></a>");
          	print("</td></tr>");
}
?>
  	</table>  	<table style="width:100%" border="0" cellspacing="0" cellpadding="0">
    	<tr><td valign="top" align="left" style="padding: 5px;width:150px">
    	<?php
	if ($CURUSER) {
    	?>
          	<table cellpadding="0" cellspacing="1" border="0" style="width:150px" class="tableinborder">
          	<tr><td align="center" class="tabletitle" style="padding: 4px;"><b><?=htmlspecialchars($CURUSER["username"])?></b></td></tr>
          	<tr><td class="tablea" style="padding-left: 4px;">
   	<table cellspacing="0" cellpadding="2" border="0" style="width:140px;">
    	<?php
	if ($CURUSER["avatar"]) 
          	print("<tr><td align=\"center\"><img style=\"max-width:135px;max-height:135px;\" src=\"".htmlspecialchars($CURUSER["avatar"])."\"></td></tr>");
          	else
          	print("<tr><td align=\"center\"><img style=\"max-width:135px;max-height:135px;\" src=\"".$GLOBALS["PIC_BASE_URL"]."default_avatar.gif\"></td></tr>");
    	?>
           	</td></tr></table>
          	</td></tr></table><br>
    	<?php
	}
    	?>
          	<table cellpadding="0" cellspacing="1" border="0" style="width:150px" class="tableinborder">
          	<tr><td class="tabletitle" style="padding: 4px;"><b>FC-Herringhausen :.</b></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="impressum.php" title="Das Impressum dieser Seite">Impressum</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="index.php" title="Neuigkeiten und Umfragen">FCH News</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="verein.php" title="Alles rund um den Freizeitclub.">Der FCH</a></td></tr>
    	<?php
	if ($CURUSER) {
?>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="users.php" title="Liste aller Mitglieder, inkl. Suchfunktion">Mitglieder dieser Seite</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="forums.php" title="Das interne Forum dieser Seite">Forum</a></td></tr>
<?
}
?>
          	</table><br>    	<?php
	if ($CURUSER) {
	if (get_user_class() >= UC_USER) {
    	?>
          	<table cellpadding="0" cellspacing="1" border="0" style="width:150px" class="tableinborder">
          	<tr><td class="tabletitle" style="padding: 4px;"><b>FCH Intern :.</b></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="protokoll.php" title="Hier kannst Du alle Sitzungsprotokolle einsehen.">Sitzungsprotokolle</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="event.php" title="Hier findest du alle Infos zu unseren Veranstaltungen.">Veranstaltungen</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="picgallery.php" title="Hier findest du diverse Fotos.">Bilder Galerie</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="members.php" title="Hier findest du eine Liste aller Mitglieder.">Mitgliederliste</a></td></tr>
          	</table><br>
    	<?php
	}
    	?>
          	<table cellpadding="0" cellspacing="1" border="0" style="width:150px" class="tableinborder">
          	<tr><td class="tabletitle" style="padding: 4px;"><b>Mein Account :.</b></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="userdetails.php?id=<?=$CURUSER["id"]?>" title="Deine Statistik-Seite, die auch andere Benutzer sehen">Mein Profil</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="my.php" title="Hier kannst Du Deine Einstellungen &auml;ndern">Profil bearbeiten</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="friends.php" title="Eine Liste der User in deiner &quot;Freundesliste&quot;.">Buddyliste</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="messages.php" title="Pers&ouml;nliche Nachrichten lesen und beantworten">Nachrichten</a>
    	<?php
	if ($unread || $unread_mod)
          	echo "&nbsp;&nbsp;";	if ($unread) {
          	echo "<img src=\"" . $GLOBALS["PIC_BASE_URL"] . "multipage.gif\" border=\"0\"> <b>$unread</b>";
	if ($unread_mod)
          	echo "&nbsp;&nbsp;";
	}	if ($unread_mod) {
          	echo "<img src=\"" . $GLOBALS["PIC_BASE_URL"] . "multipagemod.gif\" border=\"0\"> <b>$unread_mod</b>";
	}   	?>
          	</td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="bitbucket.php" title="Hier kannst Du Avatare und andere Bilder ablegen">Meine Bilder</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="logout.php" title="Beendet Deine Sitzung und l&ouml;scht die Autologin-Cookies">Ausloggen</a></td></tr>
          	</table><br>    	<?php
	if (get_user_class() >= UC_SYSOP) {
    	?>
          	<table cellpadding="0" cellspacing="1" border="0" style="width:150px" class="tableinborder">
          	<tr><td class="tabletitle" style="padding: 4px;"><b>Administration :.</b></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="adduser.php" title="Hier k&ouml;nnen neue User erstellt werden.">Benutzer erstellen</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="bandel.php" title="Hier k&ouml;nnen User gel&ouml;scht werden.">Benutzer l&ouml;schen</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="usersearch.php" title="Suche nach Benutzern &uuml;ber diverse Angaben">Benutzersuche</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="staff.php?act=last" title="Liste aller Benutzer, nach Anmeldedatum sortiert">Neueste Benutzer</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="staff.php?act=ban" title="Hier kannst Du IP-Bereiche von der Seite aussperren">IPs sperren</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="forummanager.php" title="Hier wird das Forum verwaltet.">Forenmanager</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="bitbucket-gallery.php" title="Zeigt s&auml;mtliche BitBucket-Bilder an, nach Benutzern sortiert">BitBucket Gallerie</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="pichoster.php" title="Hier k&ouml;nnen Bilder in die Bilder-Galerie hochgeladen werden.">Bilder upload</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="makepoll.php" title="Hier k&ouml;nnen Umfragen erstellt werden.">Umfragen erstellen</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="polloverview.php" title="Eine Liste mit... wer hat wie gevotet.">Umfragen übersicht</a></td></tr>
          	</table>
    	<?
 	}
	} else {
    	?>
          	<table cellpadding="0" cellspacing="1" border="0" style="width:150px" class="tableinborder">
          	<tr><td class="tabletitle" style="padding: 4px;"><b>Account :.</b></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="signup.php">Registrieren</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="login.php">Einloggen</a></td></tr>
          	<tr><td class="tablea"><a style="display:block;padding:4px;" href="recover.php">PW vergessen?</a></td></tr>
          	</table>
    	<?php
	}
    	?>        	</td><td valign="top" align="center" style="padding: 5px;width:100%">
    	<?php
	}function stdfoot() {print("</td></tr>
   	</table>");print("<table align=\"center\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">
   	<tr><td align=\"center\" class=\"tablecat\" width=\"100%\"><b>Optimiert für <a href=\"http://www.mozilla-europe.org/de/firefox/\" target=\"blank\"><img src=\"".$GLOBALS["PIC_BASE_URL"]."/firefox.png\" width=\"16\" height=\"16\" alt=\"\" title=\"Firefox jetzt instalieren\" border=\"0\" style=\"vertical-align: middle;\"></a> Mozilla Firefox bei einer Auflösung von 1024x768 - By skydiver</b></td></tr>
   	</table>");print("</td></tr>
   	</table>");print("</body>
   	</html>");
}function genbark($x, $y)
{
	stdhead($y);	?>
<table cellpadding="4" cellspacing="1" border="0" width="100%" class="tableinborder">
 <tr><td align="center" class="tabletitle" colspan="10" width="100%"><span class="normalfont"><b> <?=htmlspecialchars($y)?> </b></span></td> 
 </tr><tr><td width="100%" class="tablea"><?=htmlspecialchars($x)?></td></tr></table><br>
<?php
	stdfoot();
	exit();
} function mksecret($len = 20)
{
	$ret = "";
	for ($i = 0; $i < $len; $i++)
	$ret .= chr(mt_rand(0, 255));
	return $ret;
} function httperr($code = 404)
{
	header("HTTP/1.0 404 Not found");
	print("<h1>Not Found</h1>\n");
	print("<p>Sorry pal :(</p>\n");
	exit();
} function gmtime()
{
	return strtotime(get_date_time());
} function pager($rpp, $count, $href, $opts = array())
{
	$pages = ceil($count / $rpp);	if (!$opts["lastpagedefault"])
    	$pagedefault = 0;
	else {
    	$pagedefault = floor(($count - 1) / $rpp);
    	if ($pagedefault < 0)
        	$pagedefault = 0;
	} 	if (isset($_GET["page"])) {
    	$page = 0 + $_GET["page"];
    	if ($page < 0)
        	$page = $pagedefault;
	} else
    	$page = $pagedefault;	$pager = "";	$mp = $pages - 1;
	$as = "<b>&lt;&lt;&nbsp;Zurück</b>";
	if ($page >= 1) {
    	$pager .= "<a href=\"{$href}page=" . ($page - 1) . "\">";
    	$pager .= $as;
    	$pager .= "</a>";
	} else
    	$pager .= $as;
	$pager .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
	$as = "<b>Weiter&nbsp;&gt;&gt;</b>";
	if ($page < $mp && $mp >= 0) {
    	$pager .= "<a href=\"{$href}page=" . ($page + 1) . "\">";
    	$pager .= $as;
    	$pager .= "</a>";
	} else
    	$pager .= $as;	if ($count) {
    	$pagerarr = array();
    	$dotted = 0;
    	$dotspace = 3;
    	$dotend = $pages - $dotspace;
    	$curdotend = $page - $dotspace;
    	$curdotstart = $page + $dotspace;
    	for ($i = 0; $i < $pages; $i++) {
        	if (($i >= $dotspace && $i <= $curdotend) || ($i >= $curdotstart && $i < $dotend)) {
            	if (!$dotted)
                	$pagerarr[] = "...";
            	$dotted = 1;
            	continue;
        	} 
        	$dotted = 0;
        	$start = $i * $rpp + 1;
        	$end = $start + $rpp - 1;
        	if ($end > $count)
            	$end = $count;
        	$text = "$start&nbsp;-&nbsp;$end";
        	if ($i != $page)
            	$pagerarr[] = "<a href=\"{$href}page=$i\"><b>$text</b></a>";
        	else
            	$pagerarr[] = "<b>$text</b>";
    	} 
    	$pagerstr = join(" | ", $pagerarr);
    	$pagertop = "<p align=\"center\">$pager<br />$pagerstr</p>\n";
    	$pagerbottom = "<p align=\"center\">$pagerstr<br />$pager</p>\n";
	} else {
    	$pagertop = "<p align=\"center\">$pager</p>\n";
    	$pagerbottom = $pagertop;
	} 	$start = $page * $rpp;	return array($pagertop, $pagerbottom, "LIMIT $start,$rpp");
}function searchfield($s)
{
	return preg_replace(array('/[^a-z0-9]/si', '/^\s*/s', '/\s*$/s', '/\s+/s'), array(" ", "", "", " "), $s);
} function linkcolor($num)
{
	if ($num == 0)
    	return "red";
	return "black";
}function hash_pad($hash)
{
	return str_pad($hash, 20);
}function hash_where($name, $hash)
{
	$shhash = preg_replace('/ *$/s', "", $hash);
	return "($name = " . sqlesc($hash) . " OR $name = " . sqlesc($shhash) . ")";
}    	function hit_start()
    	{
        	global $RUNTIME_START, $RUNTIME_TIMES;
        	$RUNTIME_START = gettimeofday();
    	}     	function hit_count()
    	{
        	return;
        	global $RUNTIME_CLAUSE;
        	if (preg_match(',([^/]+)$,', $_SERVER["SCRIPT_NAME"], $matches))
            	$path = $matches[1];
        	else
            	$path = "(unknown)";
        	$period = date("Y-m-d H") . ":00:00";
        	$RUNTIME_CLAUSE = "page = " . sqlesc($path) . " AND period = '$period'";
        	$update = "UPDATE hits SET count = count + 1 WHERE $RUNTIME_CLAUSE";
        	mysql_query($update);
        	if (mysql_affected_rows())
            	return;
        	$ret = mysql_query("INSERT INTO hits (page, period, count) VALUES (" . sqlesc($path) . ", '$period', 1)");
        	if (!$ret)
            	mysql_query($update);
    	}     	function hit_end()
    	{
        	return;
        	global $RUNTIME_START, $RUNTIME_CLAUSE, $RUNTIME_TIMES;
        	if (empty($RUNTIME_CLAUSE))
            	return;
        	$now = gettimeofday();
        	$runtime = ($now["sec"] - $RUNTIME_START["sec"]) + ($now["usec"] - $RUNTIME_START["usec"]) / 1000000;
        	$ts = posix_times();
        	$sys = ($ts["stime"] - $RUNTIME_TIMES["stime"]) / 100;
        	$user = ($ts["utime"] - $RUNTIME_TIMES["utime"]) / 100;
        	mysql_query("UPDATE hits SET runs = runs + 1, runtime = runtime + $runtime, user_cpu = user_cpu + $user, sys_cpu = sys_cpu + $sys WHERE $RUNTIME_CLAUSE");
    	} function get_user_icons($arr, $big = false)
{
if ($big) {
	$donorpic = "starbig.png";
	$warnedpic = "warnedbig.gif";
	$disabledpic = "disabledbig.png";
	$style = "style=\"margin-left:4pt;vertical-align:middle;\"";
} else {
	$donorpic = "star.png";
	$warnedpic = "warned.gif";
	$disabledpic = "disabled.png";
	$style = "style=\"margin-left:2pt;vertical-align:middle;\"";
} 	$pics = $arr["donor"] == "yes" ? "<img src=\"" . $GLOBALS["PIC_BASE_URL"] . $donorpic . "\" alt=\"Spender\" title=\"Dieser Benutzer hat mit einer Spende zum Erhalt der Homepage beigetragen\" border=0 $style>" : "";if (isset($arr["warned"]) && $arr["warned"] == "yes")
	$pics .= "<img src=\"" . $GLOBALS["PIC_BASE_URL"] . $warnedpic . "\" alt=\"Verwarnt\" title=\"Dieser Benutzer wurde verwarnt\" border=0 $style>";if (isset($arr["enabled"]) && $arr["enabled"] == "no")
	$pics .= "<img src=\"" . $GLOBALS["PIC_BASE_URL"] . $disabledpic . "\" alt=\"Deaktiviert\" title=\"Dieser Benutzer ist deaktiviert\" border=0 $style>"; return $pics;
}?>

This post has been edited 1 times, last edit by "crasy1977" (Sep 17th 2019, 6:11pm) with the following reason: code fehlt


Similar threads

Used tags

Basic, Hompage, Mysqli, nv, php7