C:\$Recycle.Bin\S-1-5-21-3967099092-2644009230-141905953-500\$RTL8YJG\editprofile.php


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
<?php
/* $Id: editprofile.php,v 1.1.1.1 2002/10/28 19:13:46 pbaecher Exp $ */
/*
          ThWboard - PHP/MySQL Bulletin Board System
        ==============================================
            (c) 2000, 2001 by
               Paul Baecher         <paul@thewall.de>
               Felix Gonschorek   <funner@thewall.de>

          download the latest version:
            http://www.thwboard.de

          This  program is  free  software;  you can
          redistribute it and/or modify it under the
          terms of the GNU General Public License as
          published by the Free Software Foundation;
          either  version 2 of  the License,  or (at
          your option) any later version.

        ==============================================

*/

include "./inc/header.inc.php";

function 
EditboxEncode($string)
{
    
$string str_replace('&''&amp;'$string);
    
$string str_replace('"''&quot;'$string);
    
$string str_replace('<''&lt;'$string);
    
$string str_replace('>''&gt;'$string);
    
    return 
$string;
}

$Tframe=new Template("templates/" $style['styletemplate'] . "/frame.html");
$Tprofile=new Template("templates/" $style['styletemplate'] . "/profile.html");

$r_user thwb_query("SELECT userid, username, userhomepage, userlocation, usericq, useraim, usermsn,
    useroccupation, userinterests, usersignature,
    userhideemail, userhidesig, userinvisible, usernoding,
    styleid, useremail, useravatar, userbday 
    FROM "
.$pref."user WHERE userid='$g_user[userid]'");

$user mysql_fetch_array($r_user);

$user['userhomepage'] = EditboxEncode($user['userhomepage']);
$user['userlocation'] = EditboxEncode($user['userlocation']);
$user['useroccupation'] = EditboxEncode($user['useroccupation']);

if( ( 
$config['useravatar'] != '0' ) && ( $user['useravatar'] != 'notallowed' ) ) 
{
    
$Tavatarrow = new Template("templates/" $style['styletemplate'] . "/avatarrow.html");
    
$Tavatarpre = new Template("templates/" $style['styletemplate'] . "/avatarpre.html");
    
$Tavatarop = new Template("templates/" $style['styletemplate'] . "/avatarop.html");
    
    if( 
$config['useravatar'] == 
    {
        
$q_avatar thwb_query("SELECT avatarurl FROM ".$pref."avatar WHERE avatarurl='".$user['useravatar']."'");
        
        if( 
$a_avatar mysql_fetch_array($q_avatar) ) 
        {
            if ( 
$a_avatar['avatarurl'] == $user['useravatar'] ) 
            {
                
$isinstal true;
            }
        }
    }
    
    if( 
$config['useravatar'] == || $config['useravatar'] == )
    {
        
$r_avatar thwb_query("SELECT avatarname, avatarurl FROM ".$pref."avatar");
        
$avatarselect .= "<option value=\"avatar/noavatar.gif\"" . ( (!$user['useravatar']) || (!$isinstal) ? " selected" "" ) . ">* Kein Avatar *</option>\n";
        
        while ( 
$avatars mysql_fetch_array($r_avatar) ) 
        {
            if ( 
$avatars['avatarurl'] == 'avatar/noavatar.gif' 
            { 
                
$avatars['avatarurl'] = ''
            }
            
$avatarselect .= "<option value=\"" $avatars['avatarurl'] . "\"" . ( $avatars['avatarurl'] == $user['useravatar'] ? " selected" "" ) . ">" $avatars['avatarname'] . "</option>\n";
        }
        
        eval(
$Tavatarpre->GetTemplate(AVATRAPRE));
    }
    
    if ( ( 
$config['useravatar'] == ) || ( $config['useravatar'] == 3) )
    {
        
        if ( 
$config['useravatar'] == 
        {
            
$alter '<br>'.$style['smallfont'].'Alternative Avatarquelle des Benutzers:' $style['smallfontend'] . '<br>';
            
$alt_message ' oder um die vorinstallierte Avatar Auswahl zu aktivieren';
            
            if ( !
$isinstal 
            { 
                
$avatarentry $user['useravatar']; 
            } 
            else
            { 
                
$avatarentry ''
            }
        }
        else
        {
            
$avatarentry $user['useravatar']; 
        }
        
        eval(
$Tavatarop->GetTemplate(AVATRAOP));
    }
    
    eval(
$Tavatarrow->GetTemplate(AVATRAROW));


if( 
$user['userhomepage'] == '' )
{
    
$user['userhomepage'] = 'http://';
}

if( 
$user['usericq'] == )
{
    
$user['usericq'] = "";
}

if( 
$user['userage'] == )
{
    
$user['userage'] = "";
}

if( 
$user['userhidesig'] == )
{
    
$hidesigyes=" checked";
}
else
{
    
$hidesigno=" checked";
}

if( 
$user['userhideemail'] == )
{
    
$hideemailyes ' checked';
}
else
{
    
$hideemailno ' checked';
}

if( 
$user['userinvisible'] == )
{
    
$invisibleyes " checked";
}
else
{
    
$invisibleno " checked";
}

if( 
$user['usernoding'] == )
{
    
$nodingyes " checked";
}
else
{
    
$nodingno " checked";
}

$r_style thwb_query("SELECT styleid, stylename FROM ".$pref."style WHERE styleispublic=1");
if( 
mysql_num_rows($r_style) > )
{
    
$styleoptions '<option value="0">-----------------------------</option>';
    while( 
$tstyle mysql_fetch_array($r_style) )
    {
        
$styleoptions .= "<option value=\"$tstyle[styleid]\"" . ($tstyle['styleid'] == $user['styleid'] ? " selected" "") . ">$tstyle[stylename]</option>\n";
    }
}


// birthday stuff
$a_month = array(
    
=> 'Januar',
    
=> 'Februar',
    
=> 'M&auml;rz',
    
=> 'April',
    
=> 'Mai',
    
=> 'Juni',
    
=> 'Juli',
    
=> 'August',
    
=> 'September',
    
10 => 'Oktober',
    
11 => 'November',
    
12 => 'Dezember'
);
$bdayform '';

$user['userbday_year'] = (int)(substr($user['userbday'], 04));
$user['userbday_month'] = (int)(substr($user['userbday'], 52));
$user['userbday_day'] = (int)(substr($user['userbday'], 82));

// day
$bdayform .= '<select name="user[userbday_day]" class="tbselect"><option value="0"></option>';
for( 
$i 1$i <= 31$i++ )
{
    
$bdayform .= '<option value="' $i '"' . ( $i == $user['userbday_day'] ? ' selected' '' ) . '>' sprintf('%02d'$i) . '</option>';
}
$bdayform .= '</select>';

// month
$bdayform .= '&nbsp;<select name="user[userbday_month]" class="tbselect"><option value="0"></option>';
for( 
$i 1$i <= 12$i++ )
{
    
$bdayform .= '<option value="' $i '"' . ( $i == $user['userbday_month'] ? ' selected' '' ) . '>' $a_month[$i] . '</option>';
}
$bdayform .= '</select>';

// year
$bdayform .= '&nbsp;<select name="user[userbday_year]" class="tbselect"><option value="0"></option>';
for( 
$i 1930$i <= 2000$i++ )
{
    
$bdayform .= '<option value="' $i '"' . ( $i == $user['userbday_year'] ? ' selected' '' ) . '>' $i '</option>';
}
$bdayform .= '</select>';

// HTML Special Chars
$user['usersignature'] = htmlspecialchars($user['usersignature']);
$user['userinterests'] = htmlspecialchars($user['userinterests']);

$navpath .= 'Profil modifizieren';

eval(
$Tprofile->GetTemplate("CONTENT"));
eval(
$Tframe->GetTemplate());

?>