Zeile 7-9, Zeile 15-16 und Zeile 34 (könnte auch Zeile 35 sein, verschiebt sich in der Vorschau) ist im Original nicht vorhanden, also alles was hinter
// steht ist im Sammelpatch zusätzlich drin.
|
PHP-Quelltext
|
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
|
<?php
if ($USER['id']!='' && $USER['id']!=0) {
include_once("login/inc.nav_user.php");
if (isset($_POST['action'])) $ACTION=$_POST['action'];
else $ACTION='view';
//if ($_REQUEST['upload']==1 and $config['avatar_eod']==1) {
//header("location: include.php?event=23&PHPKITSID=".session_id()); exit();
//}
if ($config['avatar_eod']!=1 && $config['avatar_eod']!=2) {header("location: include.php?event=23&PHPKITSID=".session_id()); exit();}
elseif ($ACTION==$_POST['cancel']) {header("location: include.php?path=login/getavatar.php&PHPKITSID=".session_id()); exit();}
elseif (isset($_REQUEST['upload'])) {
if($ACTION==$_POST['upload_action'] && is_uploaded_file($_FILES['upload_pic']['tmp_name'])) {
//move_uploaded_file($_FILES['upload_pic']['tmp_name'], "tmp/".strrchr($_FILES['upload_pic']['tmp_name'], "/"));
//$_FILES['upload_pic']['tmp_name'] = "tmp/".strrchr($_FILES['upload_pic']['tmp_name'], "/");
if (!$avatar_size=getimagesize($_FILES['upload_pic']['tmp_name'])) unset($avatar_size);
else {
if ($avatar_size[2]==1) $ext='.gif';
elseif ($avatar_size[2]==2) $ext='.jpg';
elseif ($avatar_size[2]==3) $ext='.png';
else unset($ext);
}
if (isset($ext) && isset($avatar_size)) {
$filesize=$_FILES['upload_pic']['size'];
$filename='avauser_'.$USER['id'].$ext;;
if (($config['avatar_height']<$avatar_size[1]) || ($config['avatar_width']<$avatar_size[0])) $error=1;
elseif($filesize<($config['avatar_size']*1024) && $filesize!=0) {
$UPLOAD=new UPLOAD();
$uploadreturned=$UPLOAD->images($_FILES['upload_pic'],$config['avatar_path'],$filename);
if ($uploadreturned[0]==TRUE) {
//unlink($_FILES['upload_pic']['tmp_name']);
header("location: include.php?path=login/extoption.php&setavatar=".$filename."&PHPKITSID=".session_id()); exit();
}
else $error=4;
}
else $error=2;
}
else $error=3;
header("location: include.php?path=login/getavatar.php&upload&error=".$error."&PHPKITSID=".session_id()); exit();
}
else {
if (isset($_REQUEST['error'])) $error=$_REQUEST['error'];
if ($error==1) eval ("\$avatar_message= \"".getTemplate("getavatar_upload_error1")."\";");
elseif ($error==2) eval ("\$avatar_message= \"".getTemplate("getavatar_upload_error2")."\";");
elseif ($error==3) eval ("\$avatar_message= \"".getTemplate("getavatar_upload_error3")."\";");
else eval ("\$avatar_message= \"".getTemplate("getavatar_upload_message")."\";");
eval ("\$site_body.= \"".getTemplate("getavatar_upload")."\";");
}
}
else {
$dir=$config['avatar_path'];
$width=1;
$row='odd';
$a=opendir($dir);
while ($datei=readdir($a)) {
if (strstr($datei,"avatar") || ($USER['status']=='member' && strstr($datei,"avamember")) || ($USER['status']=='mod' && (strstr($datei,"avamod") || strstr($datei,"avamember"))) || ($USER['status']=='admin' && (strstr($datei,"avaadmin") || strstr($datei,"avamod") || strstr($datei,"avamember")))) {
if ($width==4) {
eval ("\$avatar_list.= \"".getTemplate("getavatar_rowbreak")."\";");
$width=1;
$row=rowcolor($row);
}
if (!$avatar_dimension=@getimagesize($dir."/".$datei)) unset($avatar_dimension);
eval ("\$avatar_list.= \"".getTemplate("getavatar_list")."\";");
$width++;
}
}
$cs=4-$width;
if ($cs>0) eval ("\$avatar_list.= \"".getTemplate("getavatar_lastrow")."\";");
closedir($a);
if ($config['avatar_eod']==2) eval ("\$avatar_uploadlink= \"".getTemplate("getavatar_uploadlink")."\";");
eval ("\$site_body.= \"".getTemplate("getavatar")."\";");
}
}
else {header("location: include.php?event=1&PHPKITSID=".session_id()); exit();}
?>
|