-
Notifications
You must be signed in to change notification settings - Fork 1
/
update2_2_4.php
173 lines (161 loc) · 5.93 KB
/
update2_2_4.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
<?php
require_once("./includes/upb.initialize.php");
$from_version = UPB_VERSION;
$to_version = "2.2.5";
$where = "Updating to $to_version";
if (file_exists('./includes/script-styles.js'))
unlink('./includes/script-styles.js');
$result = $config_tdb->basicQuery('config','name','custom_avatars');
if (!empty($_POST))
{
$config_tdb->delete('custom_avatars');
$config_tdb->add('avatarupload_size', $_POST['avatarupload_size'], 'regist', 'number', 'text', '8', '2', 'Size Limits For Avatar Uploads', 'In kilobytes, type in the maximum size allowed for avatar uploads<br><i>Note: Setting to 0 will only allow linked avatars</i>');
$config_tdb->add('avatarupload_dim', $_POST['avatarupload_dim'], 'regist', 'number', 'text', '8', '3', 'Dimension Limits For Avatar Uploads', 'In pixels, type in the maximum size allowed for avatar uploads<br>e.g.100 will allow avatars up to 100x100px. If either the width or height exceeds this limit the avatar will be resized maintaining the correct ratio<br><i>Note: Setting to 0 will only allow linked avatars</i>');
$config_tdb->add('custom_avatars', '1', 'regist', 'number', 'dropdownlist', '8', '4', 'Custom Avatars', 'Allow users to link or upload their own avatars instead of choosing them locally in images/avatars/. Select <b>Both</b> to allow both types of avatar', 'a:4:{i:0;s:7:"Disable";i:1;s:4:"Link";i:2;s:6:"Upload";i:3;s:4:"Both";}');
$config_tdb->editVars('regist',array('custom_avatars'=>$result[0]['value']));
?>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<title>UPB v2.2.5 Updater</title>
<link rel='stylesheet' type='text/css'
href='./skins/default/css/style.css' />
</head>
<body>
<div id='upb_container'>
<div class='main_cat_wrapper2'>
<table class='main_table_2' cellspacing='1'>
<tr>
<td id='logo'><img src='./skins/default/images/logo.png' alt=''
title='' /></td>
</tr>
</table>
</div>
<br />
<br />
<div class='main_cat_wrapper'>
<div class='cat_area_1'>myUPB v2.2.5 Updater</div>
<table class='main_table' cellspacing='1'>
<tr>
<th style='text-align: center;'> </th>
</tr>
<tr>
<td class='area_welcome'>
<div class='welcome_text'>If you had any problems, please seek support
at <a href='http://forum.myupb.com/'>myupb.com's support forums!</a></div>
</td>
</tr>
<tr>
<td class='footer_3'><img src='./skins/default/images/spacer.gif'
alt='' title='' /></td>
</tr>
<tr>
<td class='area_2'
style='text-align: center; font-weight: bold; padding: 12px; line-height: 20px;'>
<p><?php echo $where; ?>
<p><input type='button' onclick="location.href='update2_2_5.php'"
value='Click here to proceed to next step'>
</td>
</tr>
<tr>
<td class='footer_3'><img src='./skins/default/images/spacer.gif'
alt='' title='' /></td>
</tr>
</table>
<div class='footer'><img src='./skins/default/images/spacer.gif' alt=''
title='' /></div>
</div>
<br />
<div class='copy'>Powered by myUPB · <a
href='http://www.myupb.com/'>PHP Outburst</a> ©2002 -
<?php echo date("Y",time()); ?></div>
</div>
</body>
</html>
<?php
}
else
{
?>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<title>UPB v2.2.5 Updater</title>
<link rel='stylesheet' type='text/css'
href='./skins/default/css/style.css' />
</head>
<body>
<div id='upb_container'>
<div class='main_cat_wrapper2'>
<table class='main_table_2' cellspacing='1'>
<tr>
<td id='logo'><img src='./skins/default/images/logo.png' alt=''
title='' /></td>
</tr>
</table>
</div>
<br />
<br />
<div class='main_cat_wrapper'>
<div class='cat_area_1'>myUPB v2.2.5 Updater</div>
<table class='main_table' cellspacing='1'>
<tr>
<th style='text-align: center;' colspan='2'> </th>
</tr>
<tr>
<td class='area_welcome' colspan='2'>
<div class='welcome_text'>If you had any problems, please seek support
at <a href='http://forum.myupb.com/'>myupb.com's support forums!</a></div>
</td>
</tr>
<tr>
<td class='footer_3' colspan='2'><img
src='./skins/default/images/spacer.gif' alt='' title='' /></td>
</tr>
<tr>
<form method='POST' action='<?php echo $_SERVER['PHP_SELF'];?>'>
<td class='area_1' width='40%'>In kilobytes, type in the maximum size
allowed for avatar uploads<br>
<i>Note: Setting to 0 will only allow linked avatars</i></td>
<td class='area_2'><input name='avatarupload_size' value='20'
size='10'></td>
</tr>
<td class='area_1'>In pixels, type in the maximum size allowed for
avatar uploads<br>
e.g. 100 will allow avatars up to 100x100px.<br>
If either the width or height exceeds this limit the avatar will be
resized maintaining the correct ratio<br>
<i>Note: Setting to 0 will only allow linked avatars</i></td>
<td class='area_2'><input name='avatarupload_dim' value='100' size='10'><br>
100px by 100px is the biggest size possible without breaking the
default forum layout.</td>
</tr>
<tr>
<td class='area_2'
style='text-align: center; font-weight: bold; padding: 12px; line-height: 20px;'
colspan='2'>
<p style='font-weight: normal;'>A new option has been added to custom
avatar display which will allow users to choose between uploading an
avatar or linking to one. Choose "Both" from the custom avatar option
in the Admin Panel to enable this option.</p>
<p><input type='submit' name='submit' value='Proceed'> <input
name='reset' type='reset' value='Reset the form'>
</form>
</td>
</tr>
<tr>
<td class='footer_3' colspan='2'><img
src='./skins/default/images/spacer.gif' alt='' title='' /></td>
</tr>
</table>
<div class='footer'><img src='./skins/default/images/spacer.gif' alt=''
title='' /></div>
</div>
<br />
<div class='copy'>Powered by myUPB · <a
href='http://www.myupb.com/'>PHP Outburst</a> ©2002 -
<?php echo date("Y",time()); ?></div>
</div>
</body>
</html>
<?php
}
?>