1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-09-19 20:43:40 +02:00

Compare commits

...

1422 Commits

Author SHA1 Message Date
(no author)
2f0a6d86f6 This commit was manufactured by cvs2svn to create tag 'milestone_2'.
git-svn-id: file:///svn/phpbb/tags/milestone_2@4450 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-28 14:10:13 +00:00
Paul S. Owen
7d7a08eee6 Various bits and pieces ... this isn't really what I wanted M-2 to look like but hum ho
git-svn-id: file:///svn/phpbb/trunk@4441 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-27 16:32:44 +00:00
Paul S. Owen
6225256418 bah, group handling needs some further discussion ... I'm done with it for M-2
git-svn-id: file:///svn/phpbb/trunk@4440 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-27 16:31:54 +00:00
Paul S. Owen
2c9b17ba48 oopsie
git-svn-id: file:///svn/phpbb/trunk@4439 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-27 00:33:28 +00:00
Paul S. Owen
3de3b9e9cf Move presently implemented group functions to ... functions
git-svn-id: file:///svn/phpbb/trunk@4438 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-27 00:32:00 +00:00
Paul S. Owen
b61ea7da25 user colour
git-svn-id: file:///svn/phpbb/trunk@4437 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-25 17:05:43 +00:00
Paul S. Owen
b92a5b9740 Group related updates
git-svn-id: file:///svn/phpbb/trunk@4436 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-25 16:57:19 +00:00
Paul S. Owen
634ac45db5 Various, acm_type, etc.
git-svn-id: file:///svn/phpbb/trunk@4435 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-25 16:53:40 +00:00
Paul S. Owen
795d702397 acm_type var name update
git-svn-id: file:///svn/phpbb/trunk@4434 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-25 16:53:26 +00:00
Paul S. Owen
7947c4e92c Show legend if group coloured and not hidden
git-svn-id: file:///svn/phpbb/trunk@4433 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-25 16:48:31 +00:00
Paul S. Owen
056af19ae6 sigh, my damn keyboard ... stupid CTRL key never works properly
git-svn-id: file:///svn/phpbb/trunk@4432 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-25 11:25:17 +00:00
Paul S. Owen
608f67b947 Remove topic_watch/unwatch from insert
git-svn-id: file:///svn/phpbb/trunk@4431 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-25 10:41:19 +00:00
Paul S. Owen
d96bb3a86e A few more changes ... nearly there ... deleting users is going to be a little troublesome
git-svn-id: file:///svn/phpbb/trunk@4430 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-25 01:38:49 +00:00
Paul S. Owen
fb5a64a319 The moving of update eliminates it's usefulness ... given the change was done to increase security it wins :)
git-svn-id: file:///svn/phpbb/trunk@4429 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-24 18:16:53 +00:00
Ludovic Arnaud
bd897d4259 Because of vars being unset by common.php we must always declare them after common.php has been called
git-svn-id: file:///svn/phpbb/trunk@4428 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-23 21:53:01 +00:00
Ludovic Arnaud
3ad05b08cc More paranoia
git-svn-id: file:///svn/phpbb/trunk@4427 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-23 21:51:31 +00:00
Paul S. Owen
3eb6414cc9 Colourise username ... to bring a nice cheery smile to SHS` face ... anything is an improvement :P
git-svn-id: file:///svn/phpbb/trunk@4426 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-23 18:31:28 +00:00
Paul S. Owen
7e97dbdabd That shouldn't be there ...
git-svn-id: file:///svn/phpbb/trunk@4425 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-23 18:20:25 +00:00
Paul S. Owen
60ced25ee5 hhmmm again
git-svn-id: file:///svn/phpbb/trunk@4424 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-23 01:21:50 +00:00
Paul S. Owen
6ca10363a6 hmmm
git-svn-id: file:///svn/phpbb/trunk@4422 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-23 01:03:52 +00:00
Paul S. Owen
39fa3b6b25 Mostly non-working still ... can add new users/team leaders
git-svn-id: file:///svn/phpbb/trunk@4421 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-23 01:01:20 +00:00
Paul S. Owen
97415b7c81 Minor update, use row1 instead of row3 as the legend td class
git-svn-id: file:///svn/phpbb/trunk@4420 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-22 23:40:27 +00:00
Paul S. Owen
115c8d4e70 Dump group moderator table, add field to user_group table
git-svn-id: file:///svn/phpbb/trunk@4419 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-22 22:51:12 +00:00
Paul S. Owen
28b604b69c Various updates "discovered" while working on website compression function useage
git-svn-id: file:///svn/phpbb/trunk@4418 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-22 00:35:59 +00:00
Paul S. Owen
bfedee8380 Wake up oh dozey one ...
git-svn-id: file:///svn/phpbb/trunk@4417 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-22 00:30:54 +00:00
Paul S. Owen
61a19df599 specialchars data in swatch, rejiggle index variable setting and comparisons, replace .php with $phpEx in styles for swatch
git-svn-id: file:///svn/phpbb/trunk@4416 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-22 00:28:45 +00:00
Ludovic Arnaud
b9e00bba7d Display page number infos only when necessary
git-svn-id: file:///svn/phpbb/trunk@4415 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-21 13:53:17 +00:00
Ludovic Arnaud
77fc6fabb5 I said "temp"
git-svn-id: file:///svn/phpbb/trunk@4414 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-21 13:51:29 +00:00
Ludovic Arnaud
389b50ed9e Minor changes
git-svn-id: file:///svn/phpbb/trunk@4413 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-17 20:15:28 +00:00
Ludovic Arnaud
bf25f0df9a Fixed: removes the ending slash if the script path is empty resulting in a double slash in the URL
git-svn-id: file:///svn/phpbb/trunk@4412 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-17 17:52:30 +00:00
Paul S. Owen
c2a42988c7 They look changed ... :D
git-svn-id: file:///svn/phpbb/trunk@4410 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-16 13:26:23 +00:00
Meik Sievertsen
8e0214256c path to editor.js.
git-svn-id: file:///svn/phpbb/trunk@4409 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-15 16:38:24 +00:00
Meik Sievertsen
95267c1f84 now display_notice is working as expected.
git-svn-id: file:///svn/phpbb/trunk@4408 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-15 16:33:21 +00:00
Meik Sievertsen
3623207f88 hmm, we never had such an object. :)
git-svn-id: file:///svn/phpbb/trunk@4407 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-15 16:32:48 +00:00
Paul S. Owen
9041b88501 Minor oopsie, forgot border="0" in image url ... probably make this defineable
git-svn-id: file:///svn/phpbb/trunk@4406 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-14 23:50:35 +00:00
Paul S. Owen
dbd512138e imageset editing code a little messy, need to add update/replace capability to all three elements but that's for M-4 ... I think we may be done for M-2
git-svn-id: file:///svn/phpbb/trunk@4405 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-14 23:32:50 +00:00
Paul S. Owen
09902892c0 No image graphic
git-svn-id: file:///svn/phpbb/trunk@4404 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-14 11:43:07 +00:00
Paul S. Owen
32e2c788c2 Raft of fixes ... hopefully things are working as they should ... if not, I'll be requring a new PC since I don't think this one will work too well after being dropped out a third floor window
git-svn-id: file:///svn/phpbb/trunk@4403 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-13 17:54:29 +00:00
Paul S. Owen
bb14bcbe6b Raft of fixes ... hopefully things are working as they should ... if not, I'll be requring a new PC since I don't think this one will work too well after being dropped out a third floor window
git-svn-id: file:///svn/phpbb/trunk@4402 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-13 17:38:54 +00:00
Meik Sievertsen
66836ea525 re-display download notice
git-svn-id: file:///svn/phpbb/trunk@4401 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-13 16:58:48 +00:00
Meik Sievertsen
c0551af851 bye bye forbidden extensions... we have a deny,allow rule for extensions, forbidden extensions are therefore a little bit redundant.
git-svn-id: file:///svn/phpbb/trunk@4400 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-13 16:56:01 +00:00
Paul S. Owen
e46f4cb505 Seems some compression applications don't bother with little things like standards ...
git-svn-id: file:///svn/phpbb/trunk@4399 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-13 16:43:58 +00:00
Paul S. Owen
321eb7eedc Fix up issues with .tar, .tar.gz and .tar.bz2 archives and directory structure creation
git-svn-id: file:///svn/phpbb/trunk@4398 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-13 16:11:04 +00:00
Paul S. Owen
808d0f1455 Some tidying up of theme editing, highlight used classes, enable custom class addition, allow tabs, newlines, etc. within class strings ... though standard format is very much prefered
git-svn-id: file:///svn/phpbb/trunk@4397 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-13 14:35:50 +00:00
Paul S. Owen
1e91f9b554 query_id return changed back ... I think somethins is afoot with my local repository ...
git-svn-id: file:///svn/phpbb/trunk@4396 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 23:40:14 +00:00
Paul S. Owen
1d8f0dba07 Do away with showing "categories" in the subforum listing ... just output a subforum icon/link ... people appear to want this in preference
git-svn-id: file:///svn/phpbb/trunk@4395 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 22:33:26 +00:00
Paul S. Owen
620f70fe1e Destroy! Destroy! Danger! Will Robinson Danger! ... Doctor Smith will destroy the cached SQL when something changes ...
git-svn-id: file:///svn/phpbb/trunk@4394 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 22:24:19 +00:00
Paul S. Owen
f8accfd986 oopsie on closedir
git-svn-id: file:///svn/phpbb/trunk@4393 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 22:20:44 +00:00
Paul S. Owen
3a90899e3d Fix topic count query
git-svn-id: file:///svn/phpbb/trunk@4392 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 20:53:13 +00:00
Paul S. Owen
eeab805012 Updates for installation of styles
git-svn-id: file:///svn/phpbb/trunk@4391 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 20:46:43 +00:00
Paul S. Owen
e6978f1e1c Setting returned query_id to correct value
git-svn-id: file:///svn/phpbb/trunk@4390 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 16:03:29 +00:00
Ludovic Arnaud
567ff01df1 Added: ability to destroy specific SQL caches
git-svn-id: file:///svn/phpbb/trunk@4389 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 15:46:03 +00:00
Paul S. Owen
f584f14af9 More condensing ... next, imageset editing and cleanup of theme/template editing ... then we'll call it a day till M-3 I think
git-svn-id: file:///svn/phpbb/trunk@4388 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 15:19:24 +00:00
Paul S. Owen
98d4554f02 Fixing more broken things ...
git-svn-id: file:///svn/phpbb/trunk@4387 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 14:11:25 +00:00
Paul S. Owen
36424de91e Tabs that should be spaces
git-svn-id: file:///svn/phpbb/trunk@4386 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 12:25:48 +00:00
Paul S. Owen
0e2e2abe5a Style related updates
git-svn-id: file:///svn/phpbb/trunk@4385 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 12:24:13 +00:00
Paul S. Owen
7f8e853356 Some tidy ups and fixes
git-svn-id: file:///svn/phpbb/trunk@4384 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 11:56:04 +00:00
Paul S. Owen
232576450d Put form stuff in subSilver css ...
git-svn-id: file:///svn/phpbb/trunk@4383 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 01:49:40 +00:00
Paul S. Owen
ec4e122032 Temp workaround for lack of style create/import/upload prob, fix improper setting of element ids when editing style
git-svn-id: file:///svn/phpbb/trunk@4382 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 01:47:32 +00:00
Paul S. Owen
a4ac56c798 Don't write out when closing unless a file actually exists ...
git-svn-id: file:///svn/phpbb/trunk@4381 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 01:37:49 +00:00
Paul S. Owen
9183068332 Much rejiggling
git-svn-id: file:///svn/phpbb/trunk@4380 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-12 01:21:32 +00:00
Ludovic Arnaud
57c17e44ec Taken out the $db var from acm classes for consistency with other classes
git-svn-id: file:///svn/phpbb/trunk@4379 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-11 21:45:50 +00:00
Paul S. Owen
27d86a2e32 Correct pathname for template
git-svn-id: file:///svn/phpbb/trunk@4378 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-11 10:41:03 +00:00
Paul S. Owen
ff0a7e2630 Not break you moron
git-svn-id: file:///svn/phpbb/trunk@4377 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-11 01:29:16 +00:00
Paul S. Owen
c8669abf9d Wouldn't copy theme/template files from unarchived location to destination ... this should fix that.
git-svn-id: file:///svn/phpbb/trunk@4376 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-11 01:16:29 +00:00
Paul S. Owen
0b4d299df9 Remove trailing slash from T_XXXX_PATH vars
git-svn-id: file:///svn/phpbb/trunk@4375 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-11 01:12:23 +00:00
Paul S. Owen
2a9d846859 Update for acm parameter change
git-svn-id: file:///svn/phpbb/trunk@4374 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-11 01:12:01 +00:00
Paul S. Owen
a5cbb0b693 Mainly user pruning var casing
git-svn-id: file:///svn/phpbb/trunk@4373 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-11 00:59:53 +00:00
Paul S. Owen
71dbb2c97e unified remove ... probably breaking other stuff in the process
git-svn-id: file:///svn/phpbb/trunk@4372 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-11 00:52:09 +00:00
Ludovic Arnaud
26e8568c9b Greater than, lesser than... what's the big deal?? :P
git-svn-id: file:///svn/phpbb/trunk@4371 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-10 21:19:21 +00:00
Ludovic Arnaud
253b6ff14e Less bug, more comments
git-svn-id: file:///svn/phpbb/trunk@4370 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-10 21:17:11 +00:00
Ludovic Arnaud
8d4bb4a17a Fixed: the style box not showing when editing a category. Pardon, a non-postable forum ;)
git-svn-id: file:///svn/phpbb/trunk@4369 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-10 19:53:03 +00:00
Ludovic Arnaud
2ada6c5380 Added support for db-based caching... for people who like to store data in databases.
git-svn-id: file:///svn/phpbb/trunk@4368 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-10 19:46:03 +00:00
Ludovic Arnaud
772cc44895 Cleaned up var names. $query_result is now passed by reference to be altered directly from the cache manager
git-svn-id: file:///svn/phpbb/trunk@4367 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-10 19:14:44 +00:00
Ludovic Arnaud
ecbbf83665 Renamed $expire_time to $max_age.
Added method_exists() checks for cache managers that would not support the caching of SQL data.


git-svn-id: file:///svn/phpbb/trunk@4366 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-10 18:51:07 +00:00
Ludovic Arnaud
0c3708ecc6 Moved sql_close() down, after the cache is unloaded.
git-svn-id: file:///svn/phpbb/trunk@4365 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-10 18:42:20 +00:00
Ludovic Arnaud
145399b4bc Added the binary attribute for Windows platforms. Removed the read attribute because it wasn't needed.
git-svn-id: file:///svn/phpbb/trunk@4364 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-10 18:33:25 +00:00
Ludovic Arnaud
b11ed262ac Primary / secondary style bbcode implementation. Not thoroughly tested yet but my test board still functions so I guess it works ;)
git-svn-id: file:///svn/phpbb/trunk@4363 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-10 18:30:27 +00:00
Paul S. Owen
214ea917e5 More jiggery and not a little pokery
git-svn-id: file:///svn/phpbb/trunk@4362 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-10 17:41:10 +00:00
Paul S. Owen
13a4d16b52 Rejiggling the code begins ...
git-svn-id: file:///svn/phpbb/trunk@4361 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-10 15:54:57 +00:00
Paul S. Owen
91724f4512 setting style as default, remove explicit testing for .tar archive creation
git-svn-id: file:///svn/phpbb/trunk@4360 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-10 11:51:50 +00:00
Paul S. Owen
35c8d412a7 Silly silly Paul, smacked handy and no tea
git-svn-id: file:///svn/phpbb/trunk@4359 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-10 10:53:50 +00:00
Paul S. Owen
baa01d15f2 Most style operations functional ... broke various theme, imageset and template operations in the process
git-svn-id: file:///svn/phpbb/trunk@4358 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-09 22:04:28 +00:00
Paul S. Owen
e9c616f732 Brain wanted in Room 101, Brain wanted
git-svn-id: file:///svn/phpbb/trunk@4357 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-09 16:05:58 +00:00
Paul S. Owen
2efff50736 It's amazing what a strategically placed = can do for normal operation ...
git-svn-id: file:///svn/phpbb/trunk@4356 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-09 15:30:08 +00:00
Paul S. Owen
5e79ac7d8f Further tidy ups for zip compatibility ... still seem to be problems deleting entries via Powerarchiver ... works fine under Linux
git-svn-id: file:///svn/phpbb/trunk@4355 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-09 12:36:14 +00:00
Paul S. Owen
f41a46c92f Ensure consistent output from filelist
git-svn-id: file:///svn/phpbb/trunk@4354 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-09 11:18:05 +00:00
Paul S. Owen
d85c1e052d Improve compatibility of zip extract method
git-svn-id: file:///svn/phpbb/trunk@4353 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-09 00:30:24 +00:00
Paul S. Owen
95767f8440 Style installation "working", allows for two or three element styles
git-svn-id: file:///svn/phpbb/trunk@4352 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-08 13:28:21 +00:00
Paul S. Owen
e3c310db51 Style related updates
git-svn-id: file:///svn/phpbb/trunk@4351 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-07 16:52:36 +00:00
Paul S. Owen
22b043e8cb Style related updates
git-svn-id: file:///svn/phpbb/trunk@4350 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-07 14:39:38 +00:00
Paul S. Owen
068987935e Change hardcoded lang strings for vars
git-svn-id: file:///svn/phpbb/trunk@4349 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-07 14:39:29 +00:00
Paul S. Owen
28c000fe7c oops forgot about modified time update
git-svn-id: file:///svn/phpbb/trunk@4348 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-07 01:42:11 +00:00
Paul S. Owen
52ec6f8706 Storage of edited templates ... guess some users may find this handy ... hhmm
git-svn-id: file:///svn/phpbb/trunk@4347 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-07 01:30:44 +00:00
Paul S. Owen
80688a477b oops, that's not quite right
git-svn-id: file:///svn/phpbb/trunk@4346 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-06 18:33:03 +00:00
Paul S. Owen
4a75a2512b Guess this may come in handy
git-svn-id: file:///svn/phpbb/trunk@4345 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-06 18:29:22 +00:00
Paul S. Owen
5ab81af82e Couple more updates
git-svn-id: file:///svn/phpbb/trunk@4344 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-06 18:29:11 +00:00
Paul S. Owen
b723058fb0 A fair amount of additional working or semi-working stuff ... template stored db source (when appropriate), switch theme/templates between DB/filesystem (if available), import, upload templates, imagesets, themes (if available ... i.e. no safe mode), etc. still a fair amount of stuff to do but getting there ... take care using this, backup any themes/templates/imagesets before fiddling and let me know of issues
git-svn-id: file:///svn/phpbb/trunk@4343 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-06 15:45:13 +00:00
Paul S. Owen
76ace1d154 css_data -> theme_data
git-svn-id: file:///svn/phpbb/trunk@4342 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-05 17:09:03 +00:00
Paul S. Owen
f77668cec0 Style related changes, new table for template data storage in situations where the HDD stored versions cannot be written to, safe mode upload, etc.
git-svn-id: file:///svn/phpbb/trunk@4341 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-08-05 17:07:52 +00:00
Paul S. Owen
246614568c Basic implementation of upload theme archive ... remember this only works with appropriate permissions set on style/ and safe mode off
git-svn-id: file:///svn/phpbb/trunk@4338 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-30 19:33:52 +00:00
Paul S. Owen
9c435ef53d Limit display of "secondary" submit/preview/cancel/save row
git-svn-id: file:///svn/phpbb/trunk@4337 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-30 15:41:24 +00:00
Paul S. Owen
94c4c558e0 Update image sizes ... missing jabber button known
git-svn-id: file:///svn/phpbb/trunk@4336 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-30 12:11:50 +00:00
Paul S. Owen
c89f345587 Okay, this time I'll try not to screw up ... again
git-svn-id: file:///svn/phpbb/trunk@4335 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-30 12:04:19 +00:00
Paul S. Owen
4f7a1c7169 Bye bye ... hopefully
git-svn-id: file:///svn/phpbb/trunk@4334 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-30 11:02:38 +00:00
Paul S. Owen
b72a8fd2c7 Is it a bird? Is it a plane? No, it's moron man ...
git-svn-id: file:///svn/phpbb/trunk@4333 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-30 10:57:07 +00:00
Paul S. Owen
c855c7ca70 path change for js src
git-svn-id: file:///svn/phpbb/trunk@4332 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-27 18:02:06 +00:00
Paul S. Owen
5979e37cd8 Bits I just want to dump in CVS for now
git-svn-id: file:///svn/phpbb/trunk@4330 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-25 23:50:49 +00:00
Paul S. Owen
58a3d036ce path change for bbcode
git-svn-id: file:///svn/phpbb/trunk@4329 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-24 16:10:26 +00:00
Paul S. Owen
e0f2c00ce6 border and padding updates for body
git-svn-id: file:///svn/phpbb/trunk@4328 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-24 14:06:39 +00:00
Paul S. Owen
fca99a7a62 Styling stuff
git-svn-id: file:///svn/phpbb/trunk@4327 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-24 14:02:02 +00:00
Paul S. Owen
8c02ad5f86 filelist changes ... do away with static type
git-svn-id: file:///svn/phpbb/trunk@4326 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-24 13:59:35 +00:00
Paul S. Owen
275f62a5bd Changes for styling directory layout alterations
git-svn-id: file:///svn/phpbb/trunk@4325 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-24 13:58:59 +00:00
Paul S. Owen
be3b51ae84 Install style, various other additions
git-svn-id: file:///svn/phpbb/trunk@4324 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-24 13:58:37 +00:00
Paul S. Owen
c93474e118 Moving again ... I think this time will be the last ... famous last words
git-svn-id: file:///svn/phpbb/trunk@4323 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-24 13:22:39 +00:00
Paul S. Owen
af1cc18e02 It's going to be one of those days ...
git-svn-id: file:///svn/phpbb/trunk@4322 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-24 10:54:04 +00:00
Paul S. Owen
e412b8da40 Generate stylesheet from DB on the fly
git-svn-id: file:///svn/phpbb/trunk@4321 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-24 10:52:09 +00:00
Meik Sievertsen
8c3e4a68c4 and the URL bbcode button...
git-svn-id: file:///svn/phpbb/trunk@4320 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-23 16:15:36 +00:00
Meik Sievertsen
eff6d76d4b re-enable editor.js. :)
git-svn-id: file:///svn/phpbb/trunk@4319 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-23 16:12:27 +00:00
Paul S. Owen
8ee1433d16 escape browser and page info
git-svn-id: file:///svn/phpbb/trunk@4318 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-23 15:39:38 +00:00
Paul S. Owen
0f265c3712 Styling stuff
git-svn-id: file:///svn/phpbb/trunk@4317 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-23 11:46:11 +00:00
Paul S. Owen
99f37308c8 remove becomes function, enable install of imagesets, alter packaging paths
git-svn-id: file:///svn/phpbb/trunk@4316 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-23 11:42:32 +00:00
Paul S. Owen
3c208e1d0b Save some mem when decompressing .zip
git-svn-id: file:///svn/phpbb/trunk@4315 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-22 20:06:17 +00:00
Paul S. Owen
2a016e4f47 Styling stuff
git-svn-id: file:///svn/phpbb/trunk@4314 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-22 20:03:52 +00:00
Paul S. Owen
0835d7ef19 Functionalised export for templates, themes and imagesets ... styles to be done ...
git-svn-id: file:///svn/phpbb/trunk@4313 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-22 20:03:18 +00:00
Paul S. Owen
bf2e74be99 Stripslashing escaped string twice ... should only be stipped when necessary and as early as possible
git-svn-id: file:///svn/phpbb/trunk@4312 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-22 14:08:40 +00:00
Paul S. Owen
83b28ce6fb Less aggressive stripslash for messages
git-svn-id: file:///svn/phpbb/trunk@4311 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-22 14:01:41 +00:00
Paul S. Owen
2882b8aafb viewlog update for combined log table
git-svn-id: file:///svn/phpbb/trunk@4310 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-22 12:18:33 +00:00
Paul S. Owen
971968b08c Extract .zip ... damn gzuncompress
git-svn-id: file:///svn/phpbb/trunk@4309 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-21 22:54:46 +00:00
Paul S. Owen
71cc8e79b3 Extraction of .tar, .tar.gz and .tar.bz2
git-svn-id: file:///svn/phpbb/trunk@4308 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-21 17:32:42 +00:00
Paul S. Owen
760bf9dbb2 argh
git-svn-id: file:///svn/phpbb/trunk@4307 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-21 16:10:22 +00:00
Paul S. Owen
cc637e72f0 concanetate rather than substr_replace
git-svn-id: file:///svn/phpbb/trunk@4306 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-21 16:10:07 +00:00
Paul S. Owen
852f552b4a add .tar, .tar.gz and .tar.bz2 support, rejiggle source, seperate compress objects extending the base class
git-svn-id: file:///svn/phpbb/trunk@4305 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-21 15:44:39 +00:00
Paul S. Owen
64eb7e8a66 More updates ... I do hope the commonality I believe exists between different styling sections works out ... else this will be a very large script ... :D
git-svn-id: file:///svn/phpbb/trunk@4304 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-21 00:45:12 +00:00
Paul S. Owen
b3d94f5c9a Send DB stored css data to template if necessary ... yes, I realise this won't be cached like a normal stylesheet but there are potential ways around that
git-svn-id: file:///svn/phpbb/trunk@4303 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-21 00:44:22 +00:00
Paul S. Owen
2ca95fed52 MySQL install version text
git-svn-id: file:///svn/phpbb/trunk@4302 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 21:23:13 +00:00
Paul S. Owen
f43714b595 slightly fudged install routine for themes ... will possibly do as seperate switch case
git-svn-id: file:///svn/phpbb/trunk@4301 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 20:18:44 +00:00
Paul S. Owen
d397264316 hm
git-svn-id: file:///svn/phpbb/trunk@4300 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 20:17:29 +00:00
Paul S. Owen
0c62b08090 Styling stuff
git-svn-id: file:///svn/phpbb/trunk@4299 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 17:46:12 +00:00
Paul S. Owen
252d56ec36 Cannot delete if only theme left, select new theme for use by styles that use this
git-svn-id: file:///svn/phpbb/trunk@4298 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 17:46:06 +00:00
Paul S. Owen
6c8531befe Styling stuff
git-svn-id: file:///svn/phpbb/trunk@4297 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 17:26:20 +00:00
Paul S. Owen
0db32b3f93 Delete theme ... be careful! Doesn't currently do any checks to ensure it's not the only theme, or to alter any styles using this theme ...
git-svn-id: file:///svn/phpbb/trunk@4296 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 17:26:13 +00:00
Paul S. Owen
a1dbf52fda Styling stuff
git-svn-id: file:///svn/phpbb/trunk@4295 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 16:23:57 +00:00
Paul S. Owen
3006a3db31 store or download
git-svn-id: file:///svn/phpbb/trunk@4294 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 16:23:45 +00:00
Paul S. Owen
5561e86529 This will dump out a DB stored stylesheet, also adds cfg file
git-svn-id: file:///svn/phpbb/trunk@4292 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 14:37:41 +00:00
Paul S. Owen
e0c4360705 Ignore given list of files
git-svn-id: file:///svn/phpbb/trunk@4291 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 14:37:14 +00:00
Paul S. Owen
57e12560be Styling stuff
git-svn-id: file:///svn/phpbb/trunk@4290 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 14:19:10 +00:00
Paul S. Owen
ab410e2c19 Updates for changes to filelist()
git-svn-id: file:///svn/phpbb/trunk@4289 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 14:18:53 +00:00
Paul S. Owen
60ce0c9bb3 More updates, can "export" a theme ... only as zip at present and with limitations ... make sure your store directory can be written to by server
git-svn-id: file:///svn/phpbb/trunk@4288 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 14:18:38 +00:00
Paul S. Owen
22cfe6dddb Compression/decompression "libs" and a change to filelist
git-svn-id: file:///svn/phpbb/trunk@4287 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 14:18:03 +00:00
Paul S. Owen
9e455b613a store directory check
git-svn-id: file:///svn/phpbb/trunk@4286 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 13:59:07 +00:00
Paul S. Owen
e5ea1f1755 This is where we can dump non-cache related files, e.g. database backups, styling output, etc. ... potentially we could also use it for upload/tmp work
git-svn-id: file:///svn/phpbb/trunk@4285 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-20 13:58:11 +00:00
Paul S. Owen
6bcf4a3110 oops
git-svn-id: file:///svn/phpbb/trunk@4283 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-18 18:31:33 +00:00
Paul S. Owen
0244aaa5d0 New theme function, edit theme details ... I'm really beginning to dislike styles, and safe mode is just well, worse than I remember on 2.0.x :D
git-svn-id: file:///svn/phpbb/trunk@4282 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-18 18:20:58 +00:00
Paul S. Owen
ac875d22a9 Changes to styles table ... themes in this case, storedb, boolean flag for whether style was stored in the DB or on the FS
git-svn-id: file:///svn/phpbb/trunk@4281 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-18 18:20:08 +00:00
Paul S. Owen
c86539f501 Don't be so nosey
git-svn-id: file:///svn/phpbb/trunk@4279 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-18 16:33:24 +00:00
Paul S. Owen
c7ad40b007 oop, guess I didn't commit this ...
git-svn-id: file:///svn/phpbb/trunk@4278 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-18 00:29:18 +00:00
Paul S. Owen
31c2b84dac must stop playing
git-svn-id: file:///svn/phpbb/trunk@4277 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-17 22:52:51 +00:00
Paul S. Owen
368fb159d7 Template cache clearing
git-svn-id: file:///svn/phpbb/trunk@4276 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-17 21:04:17 +00:00
Paul S. Owen
3b19bd3518 Style stuff
git-svn-id: file:///svn/phpbb/trunk@4275 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-17 21:04:02 +00:00
Paul S. Owen
5f7c851cab a few manage/pref type tests
git-svn-id: file:///svn/phpbb/trunk@4274 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-17 16:39:50 +00:00
Paul S. Owen
bf70fee152 Remove subfolder storage of templates ... a safe-mode thang, you can delete any existing cache/templates folder
git-svn-id: file:///svn/phpbb/trunk@4273 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-17 15:16:25 +00:00
Paul S. Owen
947c81b3db The moron has left the building
git-svn-id: file:///svn/phpbb/trunk@4272 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-16 12:13:30 +00:00
Paul S. Owen
2a777b536e mainoption/liteoption -> btnmain/btnlite
git-svn-id: file:///svn/phpbb/trunk@4271 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-16 12:08:59 +00:00
Paul S. Owen
a4ff0eba2d index on session_user_id
git-svn-id: file:///svn/phpbb/trunk@4270 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-16 12:07:01 +00:00
Paul S. Owen
4d003f7edf Online tracking img load switch
git-svn-id: file:///svn/phpbb/trunk@4269 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-16 11:46:04 +00:00
Paul S. Owen
1ccfd3f862 last play for tonight
git-svn-id: file:///svn/phpbb/trunk@4268 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-15 22:34:59 +00:00
Meik Sievertsen
a758d2cf61 small stat_username fix... sometimes the last poster name was not displayed correctly, this commit will fix this hopefully. hmm... have to think about a cleaner method of handling anonymous users...
git-svn-id: file:///svn/phpbb/trunk@4267 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-15 16:47:36 +00:00
Paul S. Owen
7b5a2485d3 Some basic imageset editing stuff ... doesn't actually "do" anything yet ... just testing out layouts, etc.
git-svn-id: file:///svn/phpbb/trunk@4266 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-15 14:58:46 +00:00
Paul S. Owen
19bb2b9487 Couple more little updates
git-svn-id: file:///svn/phpbb/trunk@4265 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-15 14:58:16 +00:00
Paul S. Owen
78f4c39237 pass by reference change
git-svn-id: file:///svn/phpbb/trunk@4264 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-14 22:57:29 +00:00
Paul S. Owen
e3a6399c22 tiny weeny ickle bittle changes
git-svn-id: file:///svn/phpbb/trunk@4263 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-14 22:55:32 +00:00
Paul S. Owen
f06ad43da6 Re-arrange auth and setup calls ... needs to be repeated for all major scripts
git-svn-id: file:///svn/phpbb/trunk@4262 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-14 22:54:39 +00:00
Paul S. Owen
405cac7b99 Re-arrange auth and setup calls ... needs to be repeated for all major scripts
git-svn-id: file:///svn/phpbb/trunk@4261 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-14 22:06:47 +00:00
Paul S. Owen
dd8e9527cc input submit/reset style class name change
git-svn-id: file:///svn/phpbb/trunk@4260 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-14 21:59:41 +00:00
Paul S. Owen
fd0e18c262 Re-arrange auth and setup calls ... needs to be repeated for all major scripts
git-svn-id: file:///svn/phpbb/trunk@4259 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-14 21:58:21 +00:00
Paul S. Owen
be9def57a9 Updated graphic
git-svn-id: file:///svn/phpbb/trunk@4258 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-14 21:00:39 +00:00
Paul S. Owen
05a55a9f42 Missing no_avatar graphic
git-svn-id: file:///svn/phpbb/trunk@4257 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-14 20:55:18 +00:00
Paul S. Owen
8cd660bf4c Fix style data
git-svn-id: file:///svn/phpbb/trunk@4256 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-14 20:51:46 +00:00
Paul S. Owen
2536066e65 Add/edit styles
git-svn-id: file:///svn/phpbb/trunk@4255 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-14 19:28:36 +00:00
Paul S. Owen
2e8dec8c1f Couple more little updates
git-svn-id: file:///svn/phpbb/trunk@4254 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-14 11:35:13 +00:00
Paul S. Owen
7668388b4e More styling stuff ... activate, deactivate styles ... deactivated styles can still be used in forum/board styling selectors
git-svn-id: file:///svn/phpbb/trunk@4253 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 23:29:22 +00:00
Paul S. Owen
2c400376a1 More styling stuff ... activate, deactivate styles
git-svn-id: file:///svn/phpbb/trunk@4252 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 23:28:42 +00:00
Paul S. Owen
46c24679bf Update data for styling schema changes, preview via style admin, styles in use by users count, default style feedback
git-svn-id: file:///svn/phpbb/trunk@4251 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 22:02:22 +00:00
Paul S. Owen
7d0d2ad869 Allow preview of style for user with appropriate rights ... a "cheat" really
git-svn-id: file:///svn/phpbb/trunk@4250 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 21:40:03 +00:00
Paul S. Owen
e1441b9fbe Update data for styling schema changes
git-svn-id: file:///svn/phpbb/trunk@4249 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 21:39:36 +00:00
Paul S. Owen
7222465d75 Update data for styling schema changes
git-svn-id: file:///svn/phpbb/trunk@4248 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 21:16:18 +00:00
Paul S. Owen
f4db75ec38 Some updates to schema, primarily style related ... removed template definable pm_box and poll length ... were they ever used? :D
git-svn-id: file:///svn/phpbb/trunk@4247 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 21:02:04 +00:00
Paul S. Owen
d1868a0e69 We'll get there in a sec ...
git-svn-id: file:///svn/phpbb/trunk@4246 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 17:50:30 +00:00
Paul S. Owen
9a7afb2de1 Silly \r\n
git-svn-id: file:///svn/phpbb/trunk@4245 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 17:49:44 +00:00
Paul S. Owen
bd18643844 Updated
git-svn-id: file:///svn/phpbb/trunk@4244 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 17:47:31 +00:00
Paul S. Owen
aea401ac98 Guess what
git-svn-id: file:///svn/phpbb/trunk@4243 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 17:47:17 +00:00
Paul S. Owen
927b4539bb index bye bye
git-svn-id: file:///svn/phpbb/trunk@4242 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 17:05:26 +00:00
Paul S. Owen
449d9c6db9 Template bye bye
git-svn-id: file:///svn/phpbb/trunk@4241 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 17:04:08 +00:00
Paul S. Owen
12919fd967 Image bye bye
git-svn-id: file:///svn/phpbb/trunk@4240 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 17:02:05 +00:00
Paul S. Owen
99ae3b4155 Updated style related data
git-svn-id: file:///svn/phpbb/trunk@4239 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 15:29:16 +00:00
Paul S. Owen
990f8e35e1 oops, those mcp templates are probably rather "wrong" ... Ashe, will talk to you about a few changes I think are needed in the code
git-svn-id: file:///svn/phpbb/trunk@4238 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 15:17:35 +00:00
Paul S. Owen
d6fbcb2e22 Header links for sorting
git-svn-id: file:///svn/phpbb/trunk@4237 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 15:15:39 +00:00
Paul S. Owen
8633c91692 Cope with secondary (per forum) styles, probably other minor things too ... there is a known permissions problem, will work on that soon. Ashe, the bbcode primary/secondary stuff may need some tightening, particularly since it only checks the bbcode_bitfield for the primary template (which may not exist as coped with later) ... I'll leave that to you to alter.
git-svn-id: file:///svn/phpbb/trunk@4236 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 15:15:05 +00:00
Paul S. Owen
91a6952683 Cope with secondary (per forum) styles, probably other minor things too ... there is a known permissions problem, will work on that soon
git-svn-id: file:///svn/phpbb/trunk@4235 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 15:13:59 +00:00
Paul S. Owen
4051c18ac3 These are area51 ...
git-svn-id: file:///svn/phpbb/trunk@4234 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 15:12:47 +00:00
Paul S. Owen
e42fc56501 Not the same as area51 ... I hope ...
git-svn-id: file:///svn/phpbb/trunk@4233 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 15:09:43 +00:00
Paul S. Owen
6c15f5d0f0 Cell heights
git-svn-id: file:///svn/phpbb/trunk@4232 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 15:03:22 +00:00
Paul S. Owen
786b52d51a Standard set ... this is not the same as area51
git-svn-id: file:///svn/phpbb/trunk@4231 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 15:02:39 +00:00
Paul S. Owen
c9ba30abcd More faffing
git-svn-id: file:///svn/phpbb/trunk@4230 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 14:44:43 +00:00
Meik Sievertsen
58d0665480 add support for login forum box.
git-svn-id: file:///svn/phpbb/trunk@4229 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 14:12:22 +00:00
Paul S. Owen
e97002f0f5 Episode "IV" : A new Home ... aka a new way to extract money from fans ... oops, sorry, irrelevant argument
git-svn-id: file:///svn/phpbb/trunk@4228 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 13:20:27 +00:00
Paul S. Owen
3d01e99127 more playing, followed by breaking
git-svn-id: file:///svn/phpbb/trunk@4227 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-13 00:45:39 +00:00
Paul S. Owen
daabc84e08 And an ittle bit more, just a weeny bit ...
git-svn-id: file:///svn/phpbb/trunk@4226 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-12 20:55:38 +00:00
Ludovic Arnaud
7ca4282622 Fixed the error message for too many quotes
git-svn-id: file:///svn/phpbb/trunk@4225 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-12 16:04:24 +00:00
Paul S. Owen
448f31331b Fix failure to INCLUDE a file following its sole recompilation ... I should add that neither of these commits have added support for primary/secondary styles (e.g. styling of forums) ... won't commit these till all relevant styling changes have been implemented.
git-svn-id: file:///svn/phpbb/trunk@4224 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-11 23:36:38 +00:00
Paul S. Owen
1b129a9034 forced_recompile "seems" to work now if set true ...
git-svn-id: file:///svn/phpbb/trunk@4223 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-11 23:28:56 +00:00
Paul S. Owen
3d02dc5fc2 These images should _not_ have been in CVS ... they are not part of phpBB2 CVS ... please remove any existing copies
git-svn-id: file:///svn/phpbb/trunk@4222 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-11 19:21:47 +00:00
Paul S. Owen
50211c2a98 Minor change to seperator colour
git-svn-id: file:///svn/phpbb/trunk@4220 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-11 15:46:35 +00:00
Paul S. Owen
30afda900c okay, after some conflicting advice :D and some jiggling here's the latest theme related update ... this stuff is enough to drive you batty
git-svn-id: file:///svn/phpbb/trunk@4219 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-11 15:46:22 +00:00
Meik Sievertsen
a4d72b8f1f include functions_admin to use the add_log function
git-svn-id: file:///svn/phpbb/trunk@4218 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-11 11:49:32 +00:00
Meik Sievertsen
e0b7709ae1 fix small issue with empty username and password
git-svn-id: file:///svn/phpbb/trunk@4217 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-11 11:48:52 +00:00
Paul S. Owen
344fc7deb5 bah
git-svn-id: file:///svn/phpbb/trunk@4216 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-08 17:59:27 +00:00
Paul S. Owen
a43f039742 $this->error removed
git-svn-id: file:///svn/phpbb/trunk@4215 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-08 00:28:24 +00:00
Paul S. Owen
c2516fa499 avatar stuff
git-svn-id: file:///svn/phpbb/trunk@4214 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-08 00:27:49 +00:00
Paul S. Owen
ff58fc5e7c Move certain methods out of ucp class, move ucp class into ucp, break half a dozen other features, introduce x hundred new, exciting bugs
git-svn-id: file:///svn/phpbb/trunk@4213 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-07 23:43:57 +00:00
Paul S. Owen
4cc4867c97 Another sqlite UNION ALL insert update ... yes, I know sqlite install seems to be rather borked at present ... I thought, "hhmm, that worked too well too quickly" so I broke it to ensure consistency is maintained with the rest of the codebase
git-svn-id: file:///svn/phpbb/trunk@4212 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-07 23:43:27 +00:00
Paul S. Owen
696e833555 "Fix" ongoing issue with caching and slashes
git-svn-id: file:///svn/phpbb/trunk@4211 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-07 23:40:01 +00:00
Meik Sievertsen
1b320bbb00 merged log tables, added new log_type (critical).
changed email class a little bit.
bug fixed the queue a little bit.


git-svn-id: file:///svn/phpbb/trunk@4210 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-06 18:48:33 +00:00
Meik Sievertsen
f31b471ee1 some topic/forum notification work, mainly bug fixing.
git-svn-id: file:///svn/phpbb/trunk@4209 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-06 18:46:52 +00:00
Paul S. Owen
5b5e11c1f5 Various changes ... note that at present things may look a little strange for those without access to the relevant imageset :D
git-svn-id: file:///svn/phpbb/trunk@4208 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-06 18:19:56 +00:00
Paul S. Owen
8bb0108ad9 Missing forum_link icon ...
git-svn-id: file:///svn/phpbb/trunk@4207 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-06 14:29:14 +00:00
Paul S. Owen
45c8440d02 Lang var case changes
git-svn-id: file:///svn/phpbb/trunk@4206 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-04 17:22:18 +00:00
Paul S. Owen
7eb946abb4 Wrong icon for global announcements
git-svn-id: file:///svn/phpbb/trunk@4205 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-04 17:21:02 +00:00
Paul S. Owen
27a9ed27c7 Various updates
git-svn-id: file:///svn/phpbb/trunk@4204 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-04 17:20:03 +00:00
Paul S. Owen
055fe9e82d sqlite support UNION ALL SELECT method
git-svn-id: file:///svn/phpbb/trunk@4203 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-04 17:19:00 +00:00
Paul S. Owen
c220126bbd Altered method of storage of cached permissions ... primarily for easier sqlite/firebird support. Clear your user_permission fields before re-visiting your forum else you'll see very little! Changed way in which founder status is protected
git-svn-id: file:///svn/phpbb/trunk@4202 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-04 17:17:37 +00:00
Paul S. Owen
423728cb16 Updated default permissions ... these ones tend to agree with the updated group definitions :)
git-svn-id: file:///svn/phpbb/trunk@4201 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-04 17:16:24 +00:00
Paul S. Owen
964e4d8cbb Insert @ supression
git-svn-id: file:///svn/phpbb/trunk@4200 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-04 15:05:04 +00:00
Ludovic Arnaud
4001c84388 mcp_viewip's gone bye bye
git-svn-id: file:///svn/phpbb/trunk@4199 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-03 23:03:34 +00:00
Ludovic Arnaud
6dbfa654f9 I may have forgotten to add this file to the repository
git-svn-id: file:///svn/phpbb/trunk@4198 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-03 23:01:08 +00:00
Ludovic Arnaud
a3cb2d595b More lang strings
git-svn-id: file:///svn/phpbb/trunk@4197 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-02 22:57:51 +00:00
Ludovic Arnaud
8d43a83ab9 Some "reasons" to test with. To be determined later :)
git-svn-id: file:///svn/phpbb/trunk@4196 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-02 22:46:29 +00:00
Ludovic Arnaud
3842aac9b6 Updated MCP. Started to implement reports review. Check out the new "post details" screen with reported posts
git-svn-id: file:///svn/phpbb/trunk@4195 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-02 22:42:50 +00:00
Ludovic Arnaud
79999c7bf3 If I'm not wrong, f_ignorequeue is not anymore
git-svn-id: file:///svn/phpbb/trunk@4194 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-02 22:41:05 +00:00
Ludovic Arnaud
01a68f9497 A single post can now only be reported once
git-svn-id: file:///svn/phpbb/trunk@4193 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-02 22:38:59 +00:00
Ludovic Arnaud
2b16fc0874 Added a quick link to post details for moderators
git-svn-id: file:///svn/phpbb/trunk@4192 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-02 22:36:10 +00:00
Ludovic Arnaud
c732220308 Updated MCP link, fixed the query the obtain "normal" topics
git-svn-id: file:///svn/phpbb/trunk@4191 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-02 22:30:34 +00:00
Ludovic Arnaud
b59698aa10 Shifting bits appears to be faster than the pow() function
git-svn-id: file:///svn/phpbb/trunk@4190 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-02 22:23:45 +00:00
Paul S. Owen
03d46951b2 Note that there are still some queries in CVS which cause SQLite to have a minor fit, these are "generally" fixed locally on my machine ... will commit when other bits and pieces are "done" ... hopefully ... perhaps ... good grief, it's nearly 3am again ... 10 years ago I could do these late nights/early mornings, bah
git-svn-id: file:///svn/phpbb/trunk@4189 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-01 01:56:52 +00:00
Paul S. Owen
b02a8a2a17 SQLite support ... Probably helps if the installer supports it I guess ... I'm having one of those lifes, please excuse me.
git-svn-id: file:///svn/phpbb/trunk@4188 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-07-01 01:54:27 +00:00
Paul S. Owen
35a926b66a SQLite support
git-svn-id: file:///svn/phpbb/trunk@4187 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-30 20:33:46 +00:00
Paul S. Owen
eba779cb35 There is no default_language ...
git-svn-id: file:///svn/phpbb/trunk@4185 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-29 11:35:55 +00:00
Meik Sievertsen
4d6a767305 a few fixes
git-svn-id: file:///svn/phpbb/trunk@4184 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-29 10:59:36 +00:00
Ludovic Arnaud
b85637fc1a Fixed typo. (and finally got WinCVS to work with Pageant again, weeee!)
git-svn-id: file:///svn/phpbb/trunk@4180 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-26 20:57:11 +00:00
Meik Sievertsen
aed6479f40 small adjustment for editing informations and small fix for post editing.
git-svn-id: file:///svn/phpbb/trunk@4179 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-26 20:40:32 +00:00
Meik Sievertsen
fd03f6c5f2 fixed edit posts (wrong username/id entered)
git-svn-id: file:///svn/phpbb/trunk@4178 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-26 16:46:17 +00:00
Meik Sievertsen
59573cce8b some updates...
git-svn-id: file:///svn/phpbb/trunk@4175 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-25 19:49:59 +00:00
Paul S. Owen
20aacd9417 Condensing layout ... hopefully not breaking anything in the process ..
git-svn-id: file:///svn/phpbb/trunk@4173 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-24 23:23:19 +00:00
Paul S. Owen
131c78ed54 more twiddling and playing
git-svn-id: file:///svn/phpbb/trunk@4172 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-24 23:22:51 +00:00
Paul S. Owen
b44bc16bd0 Fix up display of sigs and bbcode for preview
git-svn-id: file:///svn/phpbb/trunk@4170 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-24 16:46:30 +00:00
Meik Sievertsen
97680b4f54 deleted pm references and small fixes to the thumbnail creation
git-svn-id: file:///svn/phpbb/trunk@4169 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-23 16:59:02 +00:00
Paul S. Owen
464f8871fb A few updates
git-svn-id: file:///svn/phpbb/trunk@4168 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-23 15:23:52 +00:00
Paul S. Owen
7661a5d040 Global announcements ... sort of work ... well they seem to, need to look at possbility of splitting topics table in two
git-svn-id: file:///svn/phpbb/trunk@4167 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-23 14:00:57 +00:00
Paul S. Owen
36685677dd bits and pieces
git-svn-id: file:///svn/phpbb/trunk@4166 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-22 00:29:06 +00:00
Paul S. Owen
90e479df3d Add check for files/ , write img_magick details to config table, missed couple of lang strings
git-svn-id: file:///svn/phpbb/trunk@4165 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-21 15:24:03 +00:00
Paul S. Owen
db5bba6bc8 Add install/ warning for future use
git-svn-id: file:///svn/phpbb/trunk@4164 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-21 15:14:47 +00:00
Meik Sievertsen
8ef02f51fa ups. :)
git-svn-id: file:///svn/phpbb/trunk@4163 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-21 13:00:49 +00:00
Meik Sievertsen
251a5b8f94 only small addition for further use...
git-svn-id: file:///svn/phpbb/trunk@4162 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-21 12:36:00 +00:00
Ludovic Arnaud
3d36530308 Fixed signatures showing up no matter if you wanted it or not
git-svn-id: file:///svn/phpbb/trunk@4161 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-21 01:43:07 +00:00
Meik Sievertsen
2e13c45371 thumbnail creation support
git-svn-id: file:///svn/phpbb/trunk@4160 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-20 17:20:22 +00:00
Ludovic Arnaud
4f2cf69b68 Fixed topics sync'ing - hopefully using correct linefeeds
git-svn-id: file:///svn/phpbb/trunk@4156 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-19 22:06:53 +00:00
Ludovic Arnaud
270c960a23 I'm pretty sure I screwed up the first commit
git-svn-id: file:///svn/phpbb/trunk@4155 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-19 21:57:44 +00:00
Ludovic Arnaud
06a3df9ff3 General maintenance ;)
git-svn-id: file:///svn/phpbb/trunk@4154 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-19 20:26:01 +00:00
Paul S. Owen
fed8ae89c5 Missing sprintf
git-svn-id: file:///svn/phpbb/trunk@4152 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-19 16:48:47 +00:00
Paul S. Owen
50c157aed9 Missing colspan
git-svn-id: file:///svn/phpbb/trunk@4151 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-19 16:48:33 +00:00
Paul S. Owen
1b282e40a0 Marking and various fixes ... Karma calculation code removed ... don't see point in potentially messing up ratings when "formula" changes
git-svn-id: file:///svn/phpbb/trunk@4150 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-19 16:25:42 +00:00
Paul S. Owen
9c030162f6 Mostly IM related additions
git-svn-id: file:///svn/phpbb/trunk@4149 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-19 16:22:53 +00:00
Paul S. Owen
41f625656a Mostly read tracking (re-)fixes ... it works again ... I'll try not to break it a second time ... other changes for Firebird compatibility
git-svn-id: file:///svn/phpbb/trunk@4148 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-19 16:22:12 +00:00
Paul S. Owen
c0a013053a Yet more updates, topic marking works again ... still intend (optional) checking of "forum read" status on return to index (rather than just the current fudge of visiting the forum), obtain_ranks as a function (used in at least three scripts), removed jabber method that was needed, oops
git-svn-id: file:///svn/phpbb/trunk@4147 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-19 16:19:59 +00:00
Paul S. Owen
eb6c2c54df Various updates ... made "some attempt" at defining standard classes, support for various IM clients, etc. and blah
git-svn-id: file:///svn/phpbb/trunk@4146 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-19 16:16:43 +00:00
Paul S. Owen
7b9785e719 Further additions to memberslist modes, Jabber support, finally "fixed up" other IM client support, a little messy in places and lacking any permission checking for IM
git-svn-id: file:///svn/phpbb/trunk@4145 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-19 16:13:53 +00:00
Ludovic Arnaud
0c14f1d469 This checkin is sponsored by AOL
git-svn-id: file:///svn/phpbb/trunk@4144 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-19 15:29:53 +00:00
Paul S. Owen
5287a27653 Add xml and mhash to optional module list
git-svn-id: file:///svn/phpbb/trunk@4143 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-19 13:29:52 +00:00
Paul S. Owen
67f4864c7a Add new method ... allow grab of options for all forums ... useful for e.g. when forums where post count is incremented are required
git-svn-id: file:///svn/phpbb/trunk@4142 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-19 13:19:39 +00:00
Paul S. Owen
28c0d2ac07 For Jabber support ... original by Carlo "Gossip" Zottmann ... modified to remove unrequired functions
git-svn-id: file:///svn/phpbb/trunk@4141 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-19 13:17:13 +00:00
Meik Sievertsen
2da7737997 some changes in downloading files...
git-svn-id: file:///svn/phpbb/trunk@4140 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-18 17:57:44 +00:00
Meik Sievertsen
8107f14852 added: download notice for people unable to see files attached to posts
changed: put attachment display into a function now called by posting preview and viewtopic (functions_display.php)
fixed: small fix in posting routines, cleanups...


git-svn-id: file:///svn/phpbb/trunk@4139 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-17 19:34:17 +00:00
Paul S. Owen
86e67daaaa Add forum/topic_id info to redirects
git-svn-id: file:///svn/phpbb/trunk@4138 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-15 23:41:19 +00:00
Paul S. Owen
692bce3778 Updated Firebird schema ... "compatible" with mysql version ... NOTE the change in ucp schema, module_name becomes module_title to prevent conflict. Various script SQL issues preventing full compatibility with Firebird at present
git-svn-id: file:///svn/phpbb/trunk@4137 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-15 23:14:04 +00:00
Paul S. Owen
b87efc8994 Few more changes ... now look for (possible) existence of existing tables with same prefix, warn if appropriate, output fatal error on other SQL failures
git-svn-id: file:///svn/phpbb/trunk@4136 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-15 18:10:59 +00:00
Paul S. Owen
dc3ed2e128 Minor change, move bbcode_bitfield to template since it's template specific
git-svn-id: file:///svn/phpbb/trunk@4132 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-14 19:33:57 +00:00
Paul S. Owen
318f0ca5b8 Couple extra strings, bold text
git-svn-id: file:///svn/phpbb/trunk@4131 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-14 15:35:24 +00:00
Paul S. Owen
fec8d3858c bye bye
git-svn-id: file:///svn/phpbb/trunk@4130 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-14 14:36:59 +00:00
Paul S. Owen
20ea81c535 Moved lang strings
git-svn-id: file:///svn/phpbb/trunk@4129 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-14 14:36:27 +00:00
Paul S. Owen
a5ca1704be Single basic file ... hopefully this'll work okay ...
git-svn-id: file:///svn/phpbb/trunk@4128 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-14 12:24:23 +00:00
Paul S. Owen
2e91e64713 Try again ...
git-svn-id: file:///svn/phpbb/trunk@4127 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-14 11:39:00 +00:00
Paul S. Owen
b3769d8cfa Triggers in the schema
git-svn-id: file:///svn/phpbb/trunk@4126 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-14 11:38:43 +00:00
Paul S. Owen
66bc2cea57 Some tidying up, transfer of a few lang strings, removed mbstring module check for now
git-svn-id: file:///svn/phpbb/trunk@4125 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-14 01:47:09 +00:00
Paul S. Owen
bb056dc843 Reduce the size of h2 a little ...
git-svn-id: file:///svn/phpbb/trunk@4124 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-13 23:15:43 +00:00
Paul S. Owen
8bdac6683e You won't believe how close this computer came to having a free flying lesson ...
git-svn-id: file:///svn/phpbb/trunk@4122 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-13 20:00:57 +00:00
Paul S. Owen
01ec4113a2 Initial "new installer" ... everyone say 'oooooooohhhhh' ... and you'll look extremely silly
git-svn-id: file:///svn/phpbb/trunk@4121 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-13 19:34:09 +00:00
Meik Sievertsen
fc82dab423 deleting the constructor means refining the init call. ;)
git-svn-id: file:///svn/phpbb/trunk@4120 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-13 16:45:07 +00:00
Paul S. Owen
dee0f40fd2 various fixes and alterations
git-svn-id: file:///svn/phpbb/trunk@4118 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-12 17:11:43 +00:00
Paul S. Owen
68f6998a4c speling errOR
git-svn-id: file:///svn/phpbb/trunk@4115 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-11 17:43:59 +00:00
Meik Sievertsen
26606e62fd ups. :)
git-svn-id: file:///svn/phpbb/trunk@4095 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-07 16:38:04 +00:00
Meik Sievertsen
f31b414220 fixed: message post storage. We do not hold the parsed message, only the decoded one for displaying within the textarea.
git-svn-id: file:///svn/phpbb/trunk@4094 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-07 16:37:16 +00:00
Meik Sievertsen
7dd1ec0070 my turn to break things... only small changes.
git-svn-id: file:///svn/phpbb/trunk@4093 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-06 19:05:21 +00:00
Paul S. Owen
01ca3bce0e basic todo list
git-svn-id: file:///svn/phpbb/trunk@4091 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-06 15:24:26 +00:00
Paul S. Owen
d1dd262f83 Various updates and fixes ... no doubt there are new bugs but where would the fun be without them?
git-svn-id: file:///svn/phpbb/trunk@4090 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-06 15:23:50 +00:00
Paul S. Owen
8a09c0d75f Remove flash button ... perhaps this will reduce casual misuse :D
git-svn-id: file:///svn/phpbb/trunk@4089 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-06 11:17:24 +00:00
Paul S. Owen
99910d51cb A little more thinking out loud ... regular users are welcome to give feedback via area51
git-svn-id: file:///svn/phpbb/trunk@4088 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-05 20:27:43 +00:00
Ludovic Arnaud
bf99fa324f Added: bbcode_bitfield added to phpbb_styles. See dev forum
git-svn-id: file:///svn/phpbb/trunk@4087 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-05 19:21:19 +00:00
Ludovic Arnaud
758c3a4e85 Changed: [list=square] is translated into an UNordered list
Fixed: <ul> opening tag
Changed: [list] is not hardcoded anymore


git-svn-id: file:///svn/phpbb/trunk@4086 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-05 19:19:48 +00:00
Ludovic Arnaud
7adf890757 Changed: while validating quotes usernames, the loop will end at the first incorrect bbcode pair
git-svn-id: file:///svn/phpbb/trunk@4085 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-05 19:17:36 +00:00
Ludovic Arnaud
3b99c70b2f Cleaned up commented lines
git-svn-id: file:///svn/phpbb/trunk@4084 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-05 19:15:49 +00:00
Ludovic Arnaud
f0c133a559 Minor change: do not display the "lookup ip" link if the IP has already been resolved
git-svn-id: file:///svn/phpbb/trunk@4083 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-05 19:12:05 +00:00
Paul S. Owen
da2c292d2d Minor fix
git-svn-id: file:///svn/phpbb/trunk@4082 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-05 13:22:29 +00:00
Paul S. Owen
b980107839 Me thinking out loud ...
git-svn-id: file:///svn/phpbb/trunk@4081 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-05 12:57:06 +00:00
Paul S. Owen
6ca40653e9 A few minor updates
git-svn-id: file:///svn/phpbb/trunk@4080 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-05 00:53:39 +00:00
Paul S. Owen
d806c0a55f it's dhn's fault
git-svn-id: file:///svn/phpbb/trunk@4078 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-03 22:05:49 +00:00
Paul S. Owen
2b2c8709ab missing fields
git-svn-id: file:///svn/phpbb/trunk@4077 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-03 22:01:25 +00:00
Paul S. Owen
67bbcf5c49 Default rank images directory
git-svn-id: file:///svn/phpbb/trunk@4076 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-03 21:40:02 +00:00
Paul S. Owen
7dc2a615ee Default rank images directory
git-svn-id: file:///svn/phpbb/trunk@4075 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-03 12:19:32 +00:00
Paul S. Owen
9eaf76dc83 More attempts at breaking source
git-svn-id: file:///svn/phpbb/trunk@4072 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-02 17:27:38 +00:00
Paul S. Owen
3d6d86d995 userdata -> ucp
git-svn-id: file:///svn/phpbb/trunk@4071 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-01 19:44:45 +00:00
Meik Sievertsen
0c101c3dd4 some updates, email related.
git-svn-id: file:///svn/phpbb/trunk@4070 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-06-01 11:29:29 +00:00
Paul S. Owen
0e96aa60c2 Well, at least the little prat @ area51 led to a bug fix ...
git-svn-id: file:///svn/phpbb/trunk@4069 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-31 17:55:55 +00:00
Meik Sievertsen
18ccaf4483 moved the queue call, added interval. The current lock is very "fluent" at the moment. ;)
git-svn-id: file:///svn/phpbb/trunk@4068 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-30 06:37:07 +00:00
Meik Sievertsen
d4cbbb1055 added email queue + small changes (do not hit me for the mysql_basic change :D)
git-svn-id: file:///svn/phpbb/trunk@4067 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-29 14:29:59 +00:00
Paul S. Owen
65b38b317f Incorrect avatar dimensions
git-svn-id: file:///svn/phpbb/trunk@4065 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-28 14:20:11 +00:00
Paul S. Owen
208f1e59bf oop, only update if we have data ...
git-svn-id: file:///svn/phpbb/trunk@4064 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-27 00:46:10 +00:00
Paul S. Owen
b6a0ce82d4 Some cleanup ... fixes
git-svn-id: file:///svn/phpbb/trunk@4063 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-27 00:37:15 +00:00
Paul S. Owen
e1484f522d Majority are UCP related updates ... avatars should now work, aside from gallery, fixed a few other issues, updated schema/basic
git-svn-id: file:///svn/phpbb/trunk@4062 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-26 23:53:34 +00:00
Paul S. Owen
4e71b1b96d Editing time foobar
git-svn-id: file:///svn/phpbb/trunk@4061 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-26 14:07:11 +00:00
Ludovic Arnaud
59971466d7 Added: width / height parameters to flash
Fixed: ol closing tag
Screwed-up: ol opening tag - will check that later


git-svn-id: file:///svn/phpbb/trunk@4060 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-25 19:19:31 +00:00
Ludovic Arnaud
0c8eb878e3 Changed: \r\n becomes \n within posts
Added: width / height parameters to flash
Added: bbcodes validation within quotes usernames


git-svn-id: file:///svn/phpbb/trunk@4059 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-25 19:17:39 +00:00
Ludovic Arnaud
9517a0015e Updated [flash] tag with width and height parameters
git-svn-id: file:///svn/phpbb/trunk@4058 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-25 18:44:35 +00:00
Meik Sievertsen
a214f8cba5 some cleanups/updates
git-svn-id: file:///svn/phpbb/trunk@4057 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-25 14:32:20 +00:00
Meik Sievertsen
3e18c7b988 linefeeds... tortoisecvs 1.4.0rc3 seems to be more unstable as i thought.
git-svn-id: file:///svn/phpbb/trunk@4056 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-25 14:27:02 +00:00
Meik Sievertsen
5ceeb10e99 some updates in regards to fetching authentication.
git-svn-id: file:///svn/phpbb/trunk@4055 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-25 13:07:19 +00:00
Paul S. Owen
f381c0d3ef more fun with cookies
git-svn-id: file:///svn/phpbb/trunk@4054 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-24 00:30:53 +00:00
Ludovic Arnaud
bea13814e7 Changed: set_config() won't actually update the database if config values match
git-svn-id: file:///svn/phpbb/trunk@4053 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-23 23:55:39 +00:00
Paul S. Owen
d2f1d9e8bc Wasn't stripping slashes from the cookies ... that will account for some of the erroneous mark read, nothing changes issues. Add name="" to image generation ... for "on" event handlers, etc.
git-svn-id: file:///svn/phpbb/trunk@4052 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-23 23:46:55 +00:00
Paul S. Owen
2a896ad260 Various updates, changed jump to first unread as per Ashe's suggestion/request ... hope people don't start linking to it making me regret reverting to this implementation :D Moved many decisions on what icons to output to templates ... feedback wrt any performance impacts happily accepted.
git-svn-id: file:///svn/phpbb/trunk@4051 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-23 16:15:03 +00:00
Paul S. Owen
79eeeb0b7c Append POST originated forum_id to this->page if present
git-svn-id: file:///svn/phpbb/trunk@4050 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-22 17:03:04 +00:00
Paul S. Owen
92ece3c711 Renames and removals
git-svn-id: file:///svn/phpbb/trunk@4049 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-22 12:16:37 +00:00
Paul S. Owen
98f8dfebb0 Renames and removals
git-svn-id: file:///svn/phpbb/trunk@4048 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-22 11:57:53 +00:00
Ludovic Arnaud
70e6fa189b Changed: Moved up some var definitions.
Changed: topic_review() modified to set the correct bbcode_bitfield.
Fixed: some bugs regarding post preview


git-svn-id: file:///svn/phpbb/trunk@4047 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-22 01:35:48 +00:00
Ludovic Arnaud
81f3b7e85d Syntax highlightning CSS
git-svn-id: file:///svn/phpbb/trunk@4046 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-22 01:33:00 +00:00
Ludovic Arnaud
64b7c1d73d Changed: $warn_msg changed into a class var. (allows from returning errors from regexps)
Added: max_quote_depth
Changed: PHP syntax highlightning modified to use CSS classes instead of <font> tags


git-svn-id: file:///svn/phpbb/trunk@4045 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-22 01:32:27 +00:00
Ludovic Arnaud
34579c63e2 bbcode template updated for the new parser
git-svn-id: file:///svn/phpbb/trunk@4044 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-22 01:27:15 +00:00
Ludovic Arnaud
e039ffafc6 Updated bbcode parser.
Images that are replace with a link according to user's preferences now use the corresponding [url] template.
Some regular expressions have been made a little more restrictive.


git-svn-id: file:///svn/phpbb/trunk@4043 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-22 01:26:36 +00:00
Ludovic Arnaud
fd7b3a0953 Added max_quote_depth limiter to prevent users from nesting a hell lot of quotes.
array_merge() replaced with a faster solution. Note that it will _not_ overwrite existing strings.


git-svn-id: file:///svn/phpbb/trunk@4042 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-21 19:11:04 +00:00
Ludovic Arnaud
394b2d160a Added max_quote_depth limiter to prevent users from nesting a hell lot of quotes
git-svn-id: file:///svn/phpbb/trunk@4041 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-21 19:10:04 +00:00
Ludovic Arnaud
db4f5c970b n/m
git-svn-id: file:///svn/phpbb/trunk@4040 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-21 19:07:53 +00:00
Ludovic Arnaud
2af466141d get_forum_branch() moved to function_admins.php
git-svn-id: file:///svn/phpbb/trunk@4039 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-21 19:06:16 +00:00
Ludovic Arnaud
1967bef6a5 Titles go bold
git-svn-id: file:///svn/phpbb/trunk@4038 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-21 18:33:11 +00:00
Paul S. Owen
5b3787d66a whoops
git-svn-id: file:///svn/phpbb/trunk@4037 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-21 00:38:13 +00:00
Paul S. Owen
f3c308f67c Add a 6 char key to user_birthday
git-svn-id: file:///svn/phpbb/trunk@4036 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-21 00:13:59 +00:00
Paul S. Owen
659554b096 Enable display of birthday listing ... controlled via ACP Load Settings
git-svn-id: file:///svn/phpbb/trunk@4035 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-21 00:06:06 +00:00
Paul S. Owen
9ce38e6977 Enable display of birthday listing ... controlled via ACP Load Settings
git-svn-id: file:///svn/phpbb/trunk@4034 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-20 23:57:08 +00:00
Paul S. Owen
70634a792e oops, let's try and retain consistency with viewtopic
git-svn-id: file:///svn/phpbb/trunk@4033 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-20 17:39:10 +00:00
Paul S. Owen
18760b39f4 Alter layout for signature ... else it'll really screwup the look with large sigs ..
git-svn-id: file:///svn/phpbb/trunk@4032 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-20 17:36:47 +00:00
Paul S. Owen
fc67159096 Only set start = 0 when first sorting ... else it screws everything up :)
git-svn-id: file:///svn/phpbb/trunk@4031 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-20 14:01:57 +00:00
Paul S. Owen
f8a9ed5381 Avatar preferencial display here too
git-svn-id: file:///svn/phpbb/trunk@4030 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-20 13:37:16 +00:00
Paul S. Owen
f3f3b44897 This version tends to do what it was supposed to do ... I guess users will prefer this ...
git-svn-id: file:///svn/phpbb/trunk@4029 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-20 13:35:48 +00:00
Paul S. Owen
b48d7492a2 Enable view limiting functions ... Ashe, not sure if this is compatible with your thinking for bbcode but it seems the "logical" way to handle disabling of bbcode/flash in this manner. Fixed issue with automatic url handling of local links
git-svn-id: file:///svn/phpbb/trunk@4028 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-20 13:24:23 +00:00
Paul S. Owen
0b58522088 Correct doubled up viewsigs, replace viewemail with allow_viewemail, add couple new groups for COPPA users
git-svn-id: file:///svn/phpbb/trunk@4027 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-20 13:09:20 +00:00
Paul S. Owen
2700723d8b Fix forum link redirection when tracking clicks
git-svn-id: file:///svn/phpbb/trunk@4026 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-20 12:24:10 +00:00
Paul S. Owen
208a3b96bf More functions added ...
git-svn-id: file:///svn/phpbb/trunk@4025 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-20 12:16:25 +00:00
Paul S. Owen
d43770db28 Further updates
git-svn-id: file:///svn/phpbb/trunk@4024 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-19 21:41:55 +00:00
Paul S. Owen
5a92a8c323 oops, forgot to commit these ...
git-svn-id: file:///svn/phpbb/trunk@4023 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-19 17:55:00 +00:00
Paul S. Owen
cdbe4d6a52 ucp related updates
git-svn-id: file:///svn/phpbb/trunk@4022 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-19 15:24:59 +00:00
Paul S. Owen
d725a8faf1 Jump to last post on "View newest unread" when all posts have been read
git-svn-id: file:///svn/phpbb/trunk@4021 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-19 15:24:49 +00:00
Paul S. Owen
f0964d4a43 Changes as per functions_user.php
git-svn-id: file:///svn/phpbb/trunk@4020 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-19 15:24:14 +00:00
Paul S. Owen
746dd5cbbd Renamed class to ucp (for now at least), includes "module" handling for ucp, new validation, normalisation routines (usefulness to be proved :D), blah blah
git-svn-id: file:///svn/phpbb/trunk@4019 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-19 15:23:59 +00:00
Paul S. Owen
094ab7e189 Hello!
git-svn-id: file:///svn/phpbb/trunk@4018 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-19 15:23:04 +00:00
Paul S. Owen
7097d53af2 Bye billy ... oop, wrong film, oops wrong media ... shut up Paul
git-svn-id: file:///svn/phpbb/trunk@4017 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-19 13:45:26 +00:00
Ludovic Arnaud
1bb83a6760 Added: [/*] tag (list item end tag). Automagically added if needed, in which case it's stored as [/*Ⓜ️$uid]
git-svn-id: file:///svn/phpbb/trunk@4016 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-18 23:29:35 +00:00
Ludovic Arnaud
e2d5fcdda9 decode_text() will strip [/*:m] tags
git-svn-id: file:///svn/phpbb/trunk@4015 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-18 23:27:01 +00:00
Ludovic Arnaud
4ae5f981b5 Added: [/*] tag (list item end tag). Automagically added if needed, in which case it's stored as [/*Ⓜ️$uid]
Added: any {L_*} var in bbcode.html is replaced by its matching $lang string


git-svn-id: file:///svn/phpbb/trunk@4014 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-18 23:26:05 +00:00
Ludovic Arnaud
9723acc883 Additional lang strings for post reporting
git-svn-id: file:///svn/phpbb/trunk@4013 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-18 22:28:48 +00:00
Ludovic Arnaud
961ba4f001 Fixed: some stuff ;)
Changed: users cannot report the same post twice. if an user tries to, s/he's invited to edit his/her report


git-svn-id: file:///svn/phpbb/trunk@4012 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-18 22:26:18 +00:00
Meik Sievertsen
178572a5d0 #642733
git-svn-id: file:///svn/phpbb/trunk@4011 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-18 11:12:04 +00:00
Meik Sievertsen
33b0446650 prepared (and fixed) topic review.
git-svn-id: file:///svn/phpbb/trunk@4010 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-17 17:33:44 +00:00
Meik Sievertsen
7aa9eaeeb9 fixed a small annoying bug.
git-svn-id: file:///svn/phpbb/trunk@4007 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-11 19:56:28 +00:00
Meik Sievertsen
6b7f90de27 re-enable posting. ;)
git-svn-id: file:///svn/phpbb/trunk@4006 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-11 16:38:43 +00:00
Meik Sievertsen
4d1def879a a few updates, added #539865 and #694413.
git-svn-id: file:///svn/phpbb/trunk@4005 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-11 16:21:35 +00:00
Paul S. Owen
30fd2486d8 Yet more mildly fudged code ... just to get something up, minor fixes/updates elsewhere
git-svn-id: file:///svn/phpbb/trunk@4004 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-11 00:58:14 +00:00
Paul S. Owen
549537b9d5 Returned to instantiation of ucp object ... perhaps this approach is better? Altered basic info for ucp_modules, updated editor to allow alternative form and textarea names ... still lots of fudginess, hhhmmmm fudge, uuuuugggghhh
git-svn-id: file:///svn/phpbb/trunk@4003 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-10 17:19:27 +00:00
Paul S. Owen
db56a55808 guess what
git-svn-id: file:///svn/phpbb/trunk@4002 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-10 01:09:01 +00:00
Paul S. Owen
5066be354d guess what
git-svn-id: file:///svn/phpbb/trunk@4001 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-10 01:01:36 +00:00
Paul S. Owen
26c4b023fa This commit is in no way related to the UCP, anyone that says it are lying dogs, there are no changes here, none.
git-svn-id: file:///svn/phpbb/trunk@4000 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-10 01:01:24 +00:00
Paul S. Owen
6d119a0e45 Very rough code in places ... particularly sig parsing ... mainly as a "does it work?" test ... the answer seems to be "yes, it does" ... I don't recall the met office saying "Hell has frozen over", strange ...
git-svn-id: file:///svn/phpbb/trunk@3999 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-10 01:00:29 +00:00
Paul S. Owen
cb6cd93dae Updates ... looks a little better? Maybe we should move to genmed as the "new" gen?
git-svn-id: file:///svn/phpbb/trunk@3998 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-10 00:59:11 +00:00
Ludovic Arnaud
b5d4bc5ced Fixed quotes having bbcodes in author name
git-svn-id: file:///svn/phpbb/trunk@3997 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-09 20:24:15 +00:00
Paul S. Owen
2fc8842b0f Had to make a start on the UCP proper ... note that things may and in places are quite broken
git-svn-id: file:///svn/phpbb/trunk@3996 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-09 14:11:55 +00:00
Paul S. Owen
21ce5c4831 Updates to various items ... note this won't "work" at present since I've not committed associated updates
git-svn-id: file:///svn/phpbb/trunk@3995 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-09 00:14:57 +00:00
Paul S. Owen
874a397315 forum_link_track to forum_flags & 1
git-svn-id: file:///svn/phpbb/trunk@3994 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-08 13:17:40 +00:00
Paul S. Owen
0a73232ab0 speling erRor
git-svn-id: file:///svn/phpbb/trunk@3993 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-08 12:52:24 +00:00
Paul S. Owen
13da69d625 Prune related
git-svn-id: file:///svn/phpbb/trunk@3992 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-08 12:49:16 +00:00
Paul S. Owen
6a29503a13 Updated pruning, moved search limit to load form
git-svn-id: file:///svn/phpbb/trunk@3991 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-08 12:48:49 +00:00
Ludovic Arnaud
fd1e389f5b Fixed: moderators "viewprofile" links
git-svn-id: file:///svn/phpbb/trunk@3990 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-08 03:14:51 +00:00
Paul S. Owen
711d90b44f Changed forum_link_track to forum_flags for storage of additional info [ pruning related ], moved lang selection into DB, other minor changes, still working on admin_prune, per forum styling for posting
git-svn-id: file:///svn/phpbb/trunk@3989 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-08 01:14:14 +00:00
Ludovic Arnaud
bb373ebcba Do not update post's timestamp if we're only editing it
git-svn-id: file:///svn/phpbb/trunk@3983 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-06 00:42:04 +00:00
Ludovic Arnaud
b37c76e255 Semi-colon's missing
git-svn-id: file:///svn/phpbb/trunk@3982 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-06 00:14:43 +00:00
Paul S. Owen
cd031cc346 More line ending "issues"
git-svn-id: file:///svn/phpbb/trunk@3981 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-05 22:57:38 +00:00
Paul S. Owen
9551bfbc52 email topic, minor other changes, removed updating of parent forums upon posting (handled by functions_display)
git-svn-id: file:///svn/phpbb/trunk@3980 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-05 22:48:17 +00:00
Ludovic Arnaud
becf5f5199 The "Leave shadow" checkbox is back
git-svn-id: file:///svn/phpbb/trunk@3979 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-05 17:00:50 +00:00
Paul S. Owen
617c49bb8e Removed nav_links
git-svn-id: file:///svn/phpbb/trunk@3978 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-04 17:15:23 +00:00
Paul S. Owen
bd17c362c1 Fixed, hopefully, jumpbox indentation issues
git-svn-id: file:///svn/phpbb/trunk@3977 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-04 15:09:16 +00:00
Paul S. Owen
3e2e39d336 oops
git-svn-id: file:///svn/phpbb/trunk@3976 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-04 14:24:46 +00:00
Paul S. Owen
aed79aea29 No need to require guests to login before asking for password
git-svn-id: file:///svn/phpbb/trunk@3975 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-04 13:41:37 +00:00
Paul S. Owen
1652fa243f hhmm, sort of explains the weird post count behaviour of recent days ...
git-svn-id: file:///svn/phpbb/trunk@3974 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-04 13:40:21 +00:00
Paul S. Owen
af7468621b Seems to be behaving today ...
git-svn-id: file:///svn/phpbb/trunk@3973 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-04 13:39:49 +00:00
Paul S. Owen
c8b23a4273 I suppose the template may be useful too
git-svn-id: file:///svn/phpbb/trunk@3971 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-04 00:08:19 +00:00
Paul S. Owen
6b7b082123 we commit thy source code to the trash, sectors to sectors, bytes to bytes, bits to bits.
git-svn-id: file:///svn/phpbb/trunk@3970 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-04 00:00:26 +00:00
Paul S. Owen
dac0adead3 page header/footer become functions, forum passwords (I know, I know but it appears a popular feature for some reason ... inclusion not yet set in concrete nor complete), various bug fixes (and no doubt new bugs).
git-svn-id: file:///svn/phpbb/trunk@3969 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-03 23:58:45 +00:00
Meik Sievertsen
5b927b0162 only very small things.
git-svn-id: file:///svn/phpbb/trunk@3967 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-03 23:33:04 +00:00
Paul S. Owen
c6888eb18e Various updates, forum links, "improve" forum management, cleanups, blah blah, note the schema changes, note also that forum management may misbehave ... reports on wrong doings are welcome ... seem to be having problems with some mcp functions under apache/win32
git-svn-id: file:///svn/phpbb/trunk@3961 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-02 15:50:11 +00:00
Meik Sievertsen
9def7a65e3 changed attachment processing (posting), the old way was a mess. :)
git-svn-id: file:///svn/phpbb/trunk@3960 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-05-01 18:24:18 +00:00
Meik Sievertsen
3a4e4374dc further work on the attachment panel... and see how plain those icons are... these are the correct ones to rip ;)
Hopefully someone will make some nice upload icons. :)


git-svn-id: file:///svn/phpbb/trunk@3959 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-29 20:06:25 +00:00
Paul S. Owen
81cd87fe10 Removed to prevent further misuse
git-svn-id: file:///svn/phpbb/trunk@3958 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-29 11:27:52 +00:00
Paul S. Owen
7ea6b9d8fb Check for and remove other possible PHP execution tags
git-svn-id: file:///svn/phpbb/trunk@3957 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-28 15:06:34 +00:00
Paul S. Owen
9206fc8d12 Only displayed subforum icon if subforums were set to display_on_index
git-svn-id: file:///svn/phpbb/trunk@3956 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-26 17:28:32 +00:00
Paul S. Owen
09a9719982 Fixed error in handling sub-forum data when displaying "categories"
git-svn-id: file:///svn/phpbb/trunk@3955 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-26 16:24:58 +00:00
Ludovic Arnaud
8df413cafc I believe the original intent was to put the backslash in the character class, this should make it work
git-svn-id: file:///svn/phpbb/trunk@3954 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-26 01:35:12 +00:00
Paul S. Owen
5362625eab Various changes, and tests ... marking/tracking is not complete ... tinkering, changing, etc. still to be done ... it's just I've made numerous and various changes to different files so a commit really is due
git-svn-id: file:///svn/phpbb/trunk@3953 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-26 01:17:40 +00:00
Paul S. Owen
4e43cb5153 Updated icons
git-svn-id: file:///svn/phpbb/trunk@3952 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-26 00:47:58 +00:00
Paul S. Owen
fc2ecf2de9 Was certainly one problem with it ...
git-svn-id: file:///svn/phpbb/trunk@3951 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-24 23:00:52 +00:00
Paul S. Owen
51b0a56996 For the time being I want this to stay as addslashes for some cross-db compatibility testing ...
git-svn-id: file:///svn/phpbb/trunk@3950 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-24 18:40:57 +00:00
Ludovic Arnaud
42ee5e7a54 No functional changes, will only produce less PHP notices/warnings.
git-svn-id: file:///svn/phpbb/trunk@3949 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-24 18:24:53 +00:00
Ludovic Arnaud
5f58f0ff71 Fixed typos, added isset() to produce less PHP notices and changed addslashes() to the corresponding dbal function
git-svn-id: file:///svn/phpbb/trunk@3948 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-24 18:23:35 +00:00
Ludovic Arnaud
b939242c3a Fixed some undefined variables
git-svn-id: file:///svn/phpbb/trunk@3947 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-24 18:21:29 +00:00
Ludovic Arnaud
c3e4f02d49 Fixed some undefined variables (my bad ;))
git-svn-id: file:///svn/phpbb/trunk@3946 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-24 18:20:53 +00:00
Ludovic Arnaud
c74b68c26b Store only SELECT queries to be flushed later
git-svn-id: file:///svn/phpbb/trunk@3945 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-24 18:19:45 +00:00
Ludovic Arnaud
ca9107dfba Use {LAST_POST_TIME} to determine if the forum has "last post" infos
git-svn-id: file:///svn/phpbb/trunk@3944 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-24 18:17:53 +00:00
Paul S. Owen
55b4510b0e Modified internal layout of posts a little ... second time lucky, first copy was overwritten by another commit :D
git-svn-id: file:///svn/phpbb/trunk@3943 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-24 01:45:55 +00:00
Ludovic Arnaud
d1ec4973c7 Hmm, renamed the form. Now (Un)Mark All lnks should work
git-svn-id: file:///svn/phpbb/trunk@3942 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-23 23:07:59 +00:00
Ludovic Arnaud
0ed1f9d2b2 Changed: if the user hits "merge" and no destination topic is selected, the topic selection screen magically appears
git-svn-id: file:///svn/phpbb/trunk@3941 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-23 23:04:12 +00:00
Ludovic Arnaud
23a9077a0b Changed: topic_view displays the "merge" button, no matter if a destination topic has been selected
git-svn-id: file:///svn/phpbb/trunk@3940 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-23 22:58:10 +00:00
Ludovic Arnaud
8796a09d01 Fixed: imbricated quotes
Added: individual bbcodes can be disabled. (still has some bug, not sure where though)


git-svn-id: file:///svn/phpbb/trunk@3939 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-23 22:55:53 +00:00
Ludovic Arnaud
716baed055 Changed: polls are forked with topics. Votes are not, which means users will have to vote again.
git-svn-id: file:///svn/phpbb/trunk@3938 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-23 22:47:28 +00:00
Ludovic Arnaud
3a4af0ea4f Ugly-fixed: username missing when quoting a post
Added: in topic review, posts are second_pass()'ed


git-svn-id: file:///svn/phpbb/trunk@3937 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-23 22:00:32 +00:00
Ludovic Arnaud
e13b0efc6a Added: more sync() stuff, to be documented in the dev forum
git-svn-id: file:///svn/phpbb/trunk@3936 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-23 21:57:53 +00:00
Ludovic Arnaud
3847fc47ec Changed: only cache non-dynamic config settings
git-svn-id: file:///svn/phpbb/trunk@3935 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-23 21:48:41 +00:00
Ludovic Arnaud
44eb035adf Changed: the loading of bbcodes template is triggered whenever needed - see bbcode_tpl()
Changed: [flash] got templated


git-svn-id: file:///svn/phpbb/trunk@3934 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-23 21:47:15 +00:00
Paul S. Owen
13f7d92739 hhmmm, was slap bang in the middle of working on this ;) Excess slashing(?) .. keep an eye out for errors ... fixed static lang preg
git-svn-id: file:///svn/phpbb/trunk@3933 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-23 20:55:48 +00:00
Meik Sievertsen
444b49c50a replaced \' with ' in template to let it parse javascript correctly. admin_attachments.php changes. added real media streaming.
git-svn-id: file:///svn/phpbb/trunk@3932 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-23 20:50:07 +00:00
Ludovic Arnaud
bec93ceb59 Fixed: record_ values do not make the cache to expire
git-svn-id: file:///svn/phpbb/trunk@3931 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-23 20:22:44 +00:00
Ludovic Arnaud
3bcc643ee5 Added: [flash] bbcode template
git-svn-id: file:///svn/phpbb/trunk@3930 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-23 19:15:41 +00:00
Ludovic Arnaud
eb9ed9d007 Fixed: decode_text() not decoding /list tags properly
Fixed: topic_replies not incremented when quoting another post


git-svn-id: file:///svn/phpbb/trunk@3929 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-23 18:41:28 +00:00
Paul S. Owen
72fbb43a1e Thanks to John, who indirectly reminded me about this :D ... echo only data we need to echo.
git-svn-id: file:///svn/phpbb/trunk@3928 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-23 14:55:13 +00:00
Meik Sievertsen
178d7e052a NOOOOO, this was not me, you have not seen this... damn trapfalls... the bears are rumbling, try to access brain ... access denied.
git-svn-id: file:///svn/phpbb/trunk@3927 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-22 19:46:52 +00:00
Meik Sievertsen
fb19563302 first version of attachment admin panel + some fixes (i hope i do not screw someones code with this, my appologies)
git-svn-id: file:///svn/phpbb/trunk@3926 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-22 19:44:00 +00:00
Paul S. Owen
5085f051bf oops, I completely forget that viewforum uses the new topics_marking table ... guess I need to commit all related changes after all ... pooh
git-svn-id: file:///svn/phpbb/trunk@3925 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-22 17:26:29 +00:00
Paul S. Owen
254e82dee5 Lang string for f_votechg
git-svn-id: file:///svn/phpbb/trunk@3924 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-22 17:24:36 +00:00
Paul S. Owen
da6be44031 Throw an index on poll_last_vote
git-svn-id: file:///svn/phpbb/trunk@3923 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-22 17:23:54 +00:00
Paul S. Owen
b2f6faeed0 Replaced time limited display code ... sorting now checks last vote time, voting in a topic bumps it as if it were posted too.
git-svn-id: file:///svn/phpbb/trunk@3922 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-22 17:23:37 +00:00
Paul S. Owen
980109a5cb Knew I'd forget to add at least one thing ...
git-svn-id: file:///svn/phpbb/trunk@3921 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-22 16:49:55 +00:00
Paul S. Owen
899f7bc1d7 Re-enabled polling ... includes option of multiple choice polling, indication of option voted for, etc. ... preliminary implementation, various things need finishing
git-svn-id: file:///svn/phpbb/trunk@3920 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-22 16:47:34 +00:00
Paul S. Owen
9cb38cc0f9 Various new or updated polling related strings
git-svn-id: file:///svn/phpbb/trunk@3919 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-22 16:46:04 +00:00
Paul S. Owen
6fc1cb6b49 Wrong name for poll end caps in style imagesets, added poll_max_options to topic table ... ignore two new marking tables for time being ... code utilising one or both is yet to be committed and one or other may vanish.
git-svn-id: file:///svn/phpbb/trunk@3918 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-22 16:45:43 +00:00
Paul S. Owen
3bdde3d41f bbcode parse signatures
git-svn-id: file:///svn/phpbb/trunk@3915 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-22 01:04:24 +00:00
Paul S. Owen
d30d4987f3 Move second parse cache init after assignment of bitfield ... in case bitfield isn't set globally
git-svn-id: file:///svn/phpbb/trunk@3914 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-22 00:42:06 +00:00
Paul S. Owen
663144718d Add dotted topic and topic read/unread DB marking to Load Settings form
git-svn-id: file:///svn/phpbb/trunk@3913 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-22 00:00:54 +00:00
Paul S. Owen
f4ae4f51b6 Moved select to template
git-svn-id: file:///svn/phpbb/trunk@3910 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-21 16:35:44 +00:00
Paul S. Owen
c0a09ef80a A few changes, moved some items to templates
git-svn-id: file:///svn/phpbb/trunk@3909 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-21 16:35:32 +00:00
Paul S. Owen
cfc85ff84d Change tabbing order
git-svn-id: file:///svn/phpbb/trunk@3908 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-21 16:34:32 +00:00
Paul S. Owen
be2160b298 Excess non-breaking space with certain combinations of link output
git-svn-id: file:///svn/phpbb/trunk@3907 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-21 16:28:46 +00:00
Paul S. Owen
2f739ed4e7 Fixed display of hidden online users when u_viewonline is set true
git-svn-id: file:///svn/phpbb/trunk@3906 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-21 16:21:27 +00:00
Paul S. Owen
11a43c2e48 For "Email a friend" feature
git-svn-id: file:///svn/phpbb/trunk@3905 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-21 14:20:52 +00:00
Paul S. Owen
1cb3f21004 Removed {USERNAME}
git-svn-id: file:///svn/phpbb/trunk@3904 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-21 14:17:22 +00:00
Paul S. Owen
b776bf2cf3 Update email form inline with emailer changes
git-svn-id: file:///svn/phpbb/trunk@3903 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-21 14:16:21 +00:00
Paul S. Owen
786c8c2a06 Altered various aspects of emailing ... tested on a windows platform with both mail() and direct smtp ... it worked in both cases.
git-svn-id: file:///svn/phpbb/trunk@3902 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-21 14:13:10 +00:00
Ludovic Arnaud
5107b7aafa First-pass syntax highlightning. Will fix quotes later
git-svn-id: file:///svn/phpbb/trunk@3901 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-20 20:30:01 +00:00
Ludovic Arnaud
2abf7dc744 Review only approved posts
git-svn-id: file:///svn/phpbb/trunk@3900 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-20 19:46:15 +00:00
Meik Sievertsen
6ca8bbac47 dumdidum
git-svn-id: file:///svn/phpbb/trunk@3899 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-20 16:54:57 +00:00
Meik Sievertsen
c2da346e65 #575496 - only one way to do it, user input would be nice. ;)
git-svn-id: file:///svn/phpbb/trunk@3898 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-20 16:49:26 +00:00
Paul S. Owen
42d7f86141 Re-introduce sorting by rank ... note that only normal ranks are actively sorted. Special ranks are listed first no matter what the sort order.
git-svn-id: file:///svn/phpbb/trunk@3897 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-20 14:36:52 +00:00
Paul S. Owen
d1699421af hmmm, what's the word I'm looking for ... hhmmm .... poooh
git-svn-id: file:///svn/phpbb/trunk@3892 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-19 17:49:25 +00:00
Paul S. Owen
7a395b013f Missing concatenationnn ... thingy ... dot ..
git-svn-id: file:///svn/phpbb/trunk@3891 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-19 17:46:29 +00:00
Paul S. Owen
cd1fa01b2a Update of comment :D
git-svn-id: file:///svn/phpbb/trunk@3890 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-19 13:01:47 +00:00
Paul S. Owen
255a01f5a7 Replied to comment, no code changes
git-svn-id: file:///svn/phpbb/trunk@3889 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-19 13:00:25 +00:00
Paul S. Owen
7506d3d914 Updated topic/forum notification ... untested in live situation ... appeared to work via manual testing
git-svn-id: file:///svn/phpbb/trunk@3888 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-19 12:58:37 +00:00
Meik Sievertsen
68deb6cbfd do not use the sync function if post get deleted. added topic_last_post_id information to viewtopic, for determining delete permission correctly.
git-svn-id: file:///svn/phpbb/trunk@3887 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-19 10:28:37 +00:00
Meik Sievertsen
92141c3e35 use only one query for updating download counts.
git-svn-id: file:///svn/phpbb/trunk@3886 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-18 15:04:12 +00:00
Paul S. Owen
5e1a81ad66 Okay, give this one a whirl ... clear your template cache before trying
git-svn-id: file:///svn/phpbb/trunk@3885 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-18 14:32:32 +00:00
Meik Sievertsen
f9cf94e443 delete no longer used function
git-svn-id: file:///svn/phpbb/trunk@3884 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-18 13:11:40 +00:00
Meik Sievertsen
2bd1ced339 some arrangements...
git-svn-id: file:///svn/phpbb/trunk@3883 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-18 13:07:19 +00:00
Meik Sievertsen
25015ecc0b Revert INCLUDE template change, fixed attachment display.
git-svn-id: file:///svn/phpbb/trunk@3882 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-18 11:07:50 +00:00
Paul S. Owen
5286de6f0e Remove nulls for anon user
git-svn-id: file:///svn/phpbb/trunk@3881 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-18 00:31:10 +00:00
Paul S. Owen
e33d3c0994 Closing bracket in wrong place
git-svn-id: file:///svn/phpbb/trunk@3880 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-18 00:25:47 +00:00
Ludovic Arnaud
ff6fdd67be More bbcode fixes
git-svn-id: file:///svn/phpbb/trunk@3879 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-17 23:47:26 +00:00
Paul S. Owen
a79524cb33 Reduce (only a tad but still) the potential number of queries done when updating permissions
git-svn-id: file:///svn/phpbb/trunk@3878 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-17 22:59:51 +00:00
Paul S. Owen
e93d9d23f2 Fix ACL_UNSET problem ... was causing users to be granted permission even when denied
git-svn-id: file:///svn/phpbb/trunk@3877 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-17 21:43:39 +00:00
Ludovic Arnaud
e28707b3c2 make_normal fixed (was making topics sticky)
quickmod's "delete topic" fixed


git-svn-id: file:///svn/phpbb/trunk@3876 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-17 20:47:17 +00:00
Ludovic Arnaud
43e67f177d Trying to look busy
git-svn-id: file:///svn/phpbb/trunk@3875 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-17 20:12:50 +00:00
Paul S. Owen
3b907d8642 Minor changes
git-svn-id: file:///svn/phpbb/trunk@3874 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-17 17:47:41 +00:00
Paul S. Owen
e2c2953245 Use sorting function
git-svn-id: file:///svn/phpbb/trunk@3873 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-17 17:47:28 +00:00
Paul S. Owen
2e36408fab oops, it appears I missed most of the changes in mysql.php ...
git-svn-id: file:///svn/phpbb/trunk@3872 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-17 17:06:52 +00:00
Paul S. Owen
cc1a5f899d Remove superfluous query count increment in sql_query_limit
git-svn-id: file:///svn/phpbb/trunk@3871 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-17 17:01:10 +00:00
Paul S. Owen
d2db3f75bc Some change-arounds ... hopefully not introducing problems ...
git-svn-id: file:///svn/phpbb/trunk@3870 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-17 17:00:33 +00:00
Paul S. Owen
37f8fbb5f7 A special rank bug that was a real git to track down :D
git-svn-id: file:///svn/phpbb/trunk@3869 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-17 16:59:37 +00:00
Ludovic Arnaud
e97ea8ebe5 viewtopic v1.260: less memory than 1.259 and still 5% faster than v1.256
git-svn-id: file:///svn/phpbb/trunk@3868 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-17 02:06:49 +00:00
Ludovic Arnaud
55fcbef7e0 TODO ;)
git-svn-id: file:///svn/phpbb/trunk@3867 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-17 01:59:23 +00:00
Paul S. Owen
7e5e8422c8 Move signature addition entirely to template
git-svn-id: file:///svn/phpbb/trunk@3866 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 23:15:31 +00:00
Paul S. Owen
88cf1bb8cb bbcode parsing of signature ... may change ... alter handling of newlines
git-svn-id: file:///svn/phpbb/trunk@3865 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 23:07:56 +00:00
Paul S. Owen
4af673dcf1 Add bbcode_bitfield to user table schema for sig ... for time being at least
git-svn-id: file:///svn/phpbb/trunk@3864 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 23:07:17 +00:00
Ludovic Arnaud
c2e73ed656 Added syntax highlitning to [code]. Added [flash] tag.
git-svn-id: file:///svn/phpbb/trunk@3863 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 22:44:38 +00:00
Ludovic Arnaud
ce8eab90fb Removed unneeded decoding, added bbcode_uid to the second_pass function. (doh)
git-svn-id: file:///svn/phpbb/trunk@3862 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 22:32:20 +00:00
Paul S. Owen
126eb0979f Added some extra 's' extensions to preg_matches to cope with multiline data
git-svn-id: file:///svn/phpbb/trunk@3861 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 22:32:17 +00:00
Ludovic Arnaud
b93bb3d90c Added syntax highlitning for [code].
[code] is now case-insensitive. Nothing else to mention ;)


git-svn-id: file:///svn/phpbb/trunk@3860 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 22:31:20 +00:00
Ludovic Arnaud
b2b7a3f02a Keeping mysql4.php current makes some sense indeed
git-svn-id: file:///svn/phpbb/trunk@3859 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 21:25:22 +00:00
Ludovic Arnaud
f641d8a0bb Moved some code around, nothing serious.
Attention, bbcode() constructor now accepts only one argument: bbcode_bitfield


git-svn-id: file:///svn/phpbb/trunk@3858 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 21:16:57 +00:00
Ludovic Arnaud
aaa2c6faab Ranks put in the global cache
git-svn-id: file:///svn/phpbb/trunk@3857 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 21:07:08 +00:00
Ludovic Arnaud
23efd0bbb4 - BBCode now only loaded if necessary
- now obtains the whole post rowset before actual processing apply
- put all user_cache definitions together
- topic_view is only updated once per topic, not at every page


git-svn-id: file:///svn/phpbb/trunk@3856 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 20:45:30 +00:00
Ludovic Arnaud
afaf95bb13 Random XSS exploit
git-svn-id: file:///svn/phpbb/trunk@3855 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 20:22:12 +00:00
Paul S. Owen
1f4b7d27af Enable wider use of * wildcard to enhance exclude capability, improve logging
git-svn-id: file:///svn/phpbb/trunk@3854 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 17:00:52 +00:00
Paul S. Owen
5e6fe84a2c Remove duplicate username entries
git-svn-id: file:///svn/phpbb/trunk@3853 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 12:30:51 +00:00
Paul S. Owen
4818a5b065 And another PC/UNIX carriage return foobar corrected
git-svn-id: file:///svn/phpbb/trunk@3852 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 12:26:29 +00:00
Paul S. Owen
0b98e2ee23 Add .blue class for special group name listings
git-svn-id: file:///svn/phpbb/trunk@3851 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 12:19:57 +00:00
Paul S. Owen
c2b9cfd158 Enable multiple forum, user and group selection, tidy up logging, add details of affected forums
git-svn-id: file:///svn/phpbb/trunk@3850 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 12:09:29 +00:00
Paul S. Owen
7ed8bb270f Quick update to enable load_online_time useage
git-svn-id: file:///svn/phpbb/trunk@3849 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-16 00:23:51 +00:00
Paul S. Owen
8c2e96dbc9 Enable/disable searching ... note that user searching is always enabled for admins at this time (for ACP functionality ... this could be pared down to only those functions requiring username input)
git-svn-id: file:///svn/phpbb/trunk@3848 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 23:42:06 +00:00
Paul S. Owen
d3b302841c Only display PM/Search/Memberlist links if enabled
git-svn-id: file:///svn/phpbb/trunk@3847 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 23:41:43 +00:00
Paul S. Owen
1f80001ea8 Another windows carriage returns foobar
git-svn-id: file:///svn/phpbb/trunk@3846 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 23:26:54 +00:00
Paul S. Owen
4b79a1e658 Enable/disable searching
git-svn-id: file:///svn/phpbb/trunk@3845 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 23:21:05 +00:00
Paul S. Owen
11b76dcc8b Enable/disable fulltext index updating
git-svn-id: file:///svn/phpbb/trunk@3844 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 23:20:29 +00:00
Paul S. Owen
e9e95c8e1e Load config vars
git-svn-id: file:///svn/phpbb/trunk@3843 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 23:12:39 +00:00
Paul S. Owen
99405c6e4a Enable/disable display of moderator listings
git-svn-id: file:///svn/phpbb/trunk@3842 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 23:12:28 +00:00
Paul S. Owen
dce7e4c2b8 Enable/Disable online listing + time online
git-svn-id: file:///svn/phpbb/trunk@3841 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 22:57:05 +00:00
Paul S. Owen
d9dcb502a9 Load and cpu saving
git-svn-id: file:///svn/phpbb/trunk@3840 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 22:48:59 +00:00
Paul S. Owen
9f8bc2a0df Missed string
git-svn-id: file:///svn/phpbb/trunk@3839 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 21:38:19 +00:00
Meik Sievertsen
42b50a5d0f fixed delete post bug, use extension cache while posting, fix download counter for images
git-svn-id: file:///svn/phpbb/trunk@3838 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 18:56:31 +00:00
Paul S. Owen
93cb1853b5 Logging + fixes for user/group permission setting
git-svn-id: file:///svn/phpbb/trunk@3837 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 18:05:47 +00:00
Paul S. Owen
0c7c2f711f Change ACL_UNSET constant value
git-svn-id: file:///svn/phpbb/trunk@3836 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 17:34:03 +00:00
Paul S. Owen
2ea7f66a1b New acl admin strings
git-svn-id: file:///svn/phpbb/trunk@3835 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 17:33:53 +00:00
Paul S. Owen
df48f3e797 Changes in line with ACL_UNSET ... remember to wipe out all entries in your auth_users and auth_groups tables with auth_setting = 2
git-svn-id: file:///svn/phpbb/trunk@3834 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 17:33:35 +00:00
Paul S. Owen
ae1d8beb30 Introduced option to ignore permission settings for forum listings
git-svn-id: file:///svn/phpbb/trunk@3833 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 17:33:07 +00:00
Paul S. Owen
b7eef16074 Seems to be working ...
git-svn-id: file:///svn/phpbb/trunk@3832 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-15 17:32:49 +00:00
Ludovic Arnaud
25711806b3 $message is now processed in its unslashed form. Should not break anything...
git-svn-id: file:///svn/phpbb/trunk@3831 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-13 23:20:26 +00:00
Paul S. Owen
39dd567f90 some lang strings
git-svn-id: file:///svn/phpbb/trunk@3830 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-13 21:10:38 +00:00
Paul S. Owen
c51afc3b08 another quick fix for demo purposes
git-svn-id: file:///svn/phpbb/trunk@3829 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-13 21:01:14 +00:00
Paul S. Owen
d4ee356087 fix a few things up for demonstration
git-svn-id: file:///svn/phpbb/trunk@3828 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-13 20:01:53 +00:00
Paul S. Owen
c259434af4 Non (fully) working alternative to depedencies for admin, super mod and mod ... possibly
git-svn-id: file:///svn/phpbb/trunk@3827 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-13 18:01:30 +00:00
Paul S. Owen
2dc95a7e3e Dependencies go bye bye in favour of something else
git-svn-id: file:///svn/phpbb/trunk@3826 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-13 13:36:31 +00:00
Meik Sievertsen
2248698e53 faster (for me), especially for topics with a bunch of attachments (due to the nested block vars).
git-svn-id: file:///svn/phpbb/trunk@3825 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-13 12:28:57 +00:00
Meik Sievertsen
2918db79d5 Fixed INCLUDE. Now cached items are processed correctly. all glitches are fixed (for example the strange display after a template got changed)
git-svn-id: file:///svn/phpbb/trunk@3824 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-13 11:36:43 +00:00
Meik Sievertsen
46f33fae41 Installation should work again.
git-svn-id: file:///svn/phpbb/trunk@3823 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-13 11:10:54 +00:00
Paul S. Owen
c35cdd34da Renamed ACL_ constants, altered field names
git-svn-id: file:///svn/phpbb/trunk@3820 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-12 20:01:57 +00:00
Paul S. Owen
52530af898 Rename ACL_ constants
git-svn-id: file:///svn/phpbb/trunk@3819 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-12 20:01:10 +00:00
Paul S. Owen
32f0680b30 Getting there ... unlike Network Rail ...
git-svn-id: file:///svn/phpbb/trunk@3818 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-12 17:07:25 +00:00
Meik Sievertsen
793182218a added 711252 and lock topic within post, fixed post editing a bit.
git-svn-id: file:///svn/phpbb/trunk@3817 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-12 14:30:21 +00:00
Meik Sievertsen
75eef6bfd7 changed $message to be a class variable, added attachment category constants (now images are displayed inlined by default... no wrong assignments anymore, if you wondered why your zip file got streamed. ;))
git-svn-id: file:///svn/phpbb/trunk@3816 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-11 19:51:38 +00:00
Paul S. Owen
da775f2286 hehehe hoho
git-svn-id: file:///svn/phpbb/trunk@3815 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-11 16:18:58 +00:00
Paul S. Owen
c12aaefc9c Very, very broken right now ... re-working it as we speak
git-svn-id: file:///svn/phpbb/trunk@3814 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-11 15:29:06 +00:00
Meik Sievertsen
4feb08390c re-use include...
git-svn-id: file:///svn/phpbb/trunk@3813 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-11 06:07:58 +00:00
Ludovic Arnaud
4f55c9fb81 BBCode parser + decoder, missing some tags and mildly broken at this time
git-svn-id: file:///svn/phpbb/trunk@3812 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-11 00:19:29 +00:00
Ludovic Arnaud
f17c36cea4 Moved BBCODE_UID_LEN to common.php
git-svn-id: file:///svn/phpbb/trunk@3811 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-11 00:02:54 +00:00
Paul S. Owen
9c8c50cdb7 Try this version of include ...
git-svn-id: file:///svn/phpbb/trunk@3810 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-10 23:58:30 +00:00
Paul S. Owen
a702dc6683 Won't work ... since inline images are pulled from here ... need to look at match against non-image content types
git-svn-id: file:///svn/phpbb/trunk@3809 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-10 23:53:54 +00:00
Ludovic Arnaud
9cb2378597 Added /cache/templates/ and /files/ directories to the repository
git-svn-id: file:///svn/phpbb/trunk@3808 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-10 21:57:01 +00:00
Meik Sievertsen
3616d54094 initial 'view attachments' implementation. added new template var (merged include, to preserve previous block vars), could be changed later to consider caching. some config variables and upload icons are not present as of yet...
git-svn-id: file:///svn/phpbb/trunk@3807 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-10 21:35:31 +00:00
Ludovic Arnaud
f2d0929147 Moved up flood-check a little to save a query whenever possible
git-svn-id: file:///svn/phpbb/trunk@3806 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-10 19:11:09 +00:00
Ludovic Arnaud
73b191a343 Did you know that if you use backslashes in a log message WinCVS freaks out and commit files at random? I didn't either.
git-svn-id: file:///svn/phpbb/trunk@3804 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-10 01:58:18 +00:00
Ludovic Arnaud
c0aedcc467 IP information moved to Post Details
git-svn-id: file:///svn/phpbb/trunk@3803 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-10 00:56:23 +00:00
Paul S. Owen
2292b77b7d oopsie, me not think that last checkin was supposed to happen ... at least I hope not :D
git-svn-id: file:///svn/phpbb/trunk@3802 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-09 22:41:25 +00:00
Ludovic Arnaud
c17e275080 Weekly update: MCP templates. Forms renamed to 'main', added mcp_jumpbox.html for easy jumping and mcp_foruminfo.html.
Not too happy with HTML though =" templates\subSilver\mcp_forum.html templates\subSilver\mcp_foruminfo.html templates\subSilver\mcp_front.html templates\subSilver\mcp_header.html templates\subSilver\mcp_jumpbox.html templates\subSilver\mcp_move.html templates\subSilver\mcp_post.html templates\subSilver\mcp_viewip.html templates\subSilver\mcp_viewlogs.html


git-svn-id: file:///svn/phpbb/trunk@3800 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-09 22:17:55 +00:00
Ludovic Arnaud
e5e9fd9cba Form renamed, table class fixed
git-svn-id: file:///svn/phpbb/trunk@3799 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-09 22:17:16 +00:00
Ludovic Arnaud
98d7c47133 "Report" button only shows up if the user is authorised. Default forum_id for globals temporary (and arbitrary) set to 2.
git-svn-id: file:///svn/phpbb/trunk@3798 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-09 22:00:23 +00:00
Ludovic Arnaud
ddee09332d "Report" button only shows up if the user is authorised. Default forum_id for globals temporary (and arbitrary) set to 2.
git-svn-id: file:///svn/phpbb/trunk@3797 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-09 21:55:03 +00:00
Ludovic Arnaud
0c873e3621 Added 540408 (edit forum info) and 565097 (fork threads). Fixed a couple of bugs that no one would ever noticed
git-svn-id: file:///svn/phpbb/trunk@3796 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-09 21:47:58 +00:00
Ludovic Arnaud
6f3e9813ad Weekly update: MCP lang strings
git-svn-id: file:///svn/phpbb/trunk@3794 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-09 21:32:52 +00:00
Ludovic Arnaud
e5d14d24d5 Capitalisation
git-svn-id: file:///svn/phpbb/trunk@3793 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-09 21:28:26 +00:00
Ludovic Arnaud
11b9a0c95d Moved back gen_sorting() to mcp.php
git-svn-id: file:///svn/phpbb/trunk@3792 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-09 21:26:25 +00:00
Ludovic Arnaud
9d19bef3c1 I... erm... kinda forgot to add this one
git-svn-id: file:///svn/phpbb/trunk@3789 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-04 00:57:39 +00:00
Paul S. Owen
7018d81079 Add m_info
git-svn-id: file:///svn/phpbb/trunk@3788 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-03 11:37:17 +00:00
Ludovic Arnaud
e3bac84877 Oops. Didn't merge files correctly.
git-svn-id: file:///svn/phpbb/trunk@3787 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-03 03:13:59 +00:00
Ludovic Arnaud
6fbf4b7c1c Centralised sorting
git-svn-id: file:///svn/phpbb/trunk@3786 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-03 00:51:30 +00:00
Ludovic Arnaud
1354ee2f43 Trying to centralise sorting... currently used in MCP, successfully tested in viewforum.
git-svn-id: file:///svn/phpbb/trunk@3785 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-03 00:46:49 +00:00
Ludovic Arnaud
b6c35f2ff1 MCP update:
- mod_queue
- front page
- new viewlogs tab
- now using a dedicated function for jumpbox generation (not everywhere yet)


git-svn-id: file:///svn/phpbb/trunk@3784 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-03 00:10:10 +00:00
Ludovic Arnaud
3bf73634ca I knew that I forgot something: f_report now in use
git-svn-id: file:///svn/phpbb/trunk@3783 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-03 00:06:04 +00:00
Ludovic Arnaud
b1848bf34e Fixed the quickmod type-changing tools for global announcements
git-svn-id: file:///svn/phpbb/trunk@3782 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-02 23:25:38 +00:00
Ludovic Arnaud
3ce0f98f25 Modified view_logs to be used in MCP, added get_forum_list() to quickly get a set of forums the user is authed for
git-svn-id: file:///svn/phpbb/trunk@3781 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-02 23:21:17 +00:00
Ludovic Arnaud
af3512e6df Lots of HTML updates, and more to follow...
git-svn-id: file:///svn/phpbb/trunk@3780 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-02 23:16:05 +00:00
Ludovic Arnaud
f94a5cb87d Added user notification for post reporting, moved lang strings to lang_main, added CSS style for mcp_jumpbox
git-svn-id: file:///svn/phpbb/trunk@3779 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-02 23:13:47 +00:00
Paul S. Owen
2c94c4659e Just playing
git-svn-id: file:///svn/phpbb/trunk@3778 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-01 23:48:47 +00:00
Meik Sievertsen
8a04466b3f show the attach icon in viewforum. added cached extensions (we need them within viewtopic)
git-svn-id: file:///svn/phpbb/trunk@3777 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-01 21:11:07 +00:00
Paul S. Owen
d054df5007 *** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@3776 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-01 01:15:07 +00:00
Paul S. Owen
c9cab7794e Another u_ option ... this time for displaying avatars ... must start removing redundant fields in user table and elsewhere
git-svn-id: file:///svn/phpbb/trunk@3775 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-01 01:14:45 +00:00
Paul S. Owen
4d65caab3f Re-enable avatar display
git-svn-id: file:///svn/phpbb/trunk@3774 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-01 01:14:04 +00:00
Paul S. Owen
823a484e77 Lang string name changes for topic title prefixes
git-svn-id: file:///svn/phpbb/trunk@3773 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-01 00:50:06 +00:00
Paul S. Owen
5231006c03 Just throwing this in ... dependencies still not complete ... the GUI and storage has caused me to do more "thinking" than I'd anticipated ... comments are welcome on what you see. Note also ALLOW/DENY/INHERIT have become YES/NO/UNSET
git-svn-id: file:///svn/phpbb/trunk@3772 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-01 00:06:11 +00:00
Paul S. Owen
3257af80f0 Update icon name
git-svn-id: file:///svn/phpbb/trunk@3771 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-04-01 00:05:50 +00:00
Paul S. Owen
2b253d9b51 Update icon name
git-svn-id: file:///svn/phpbb/trunk@3770 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-31 23:56:00 +00:00
Paul S. Owen
6e3908893d Improve feedback for banned users
git-svn-id: file:///svn/phpbb/trunk@3769 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-31 21:47:10 +00:00
Ludovic Arnaud
372c2d65d1 File renamed to mcp_topic.html a long time ago
git-svn-id: file:///svn/phpbb/trunk@3767 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 21:25:07 +00:00
Ludovic Arnaud
9f30b01c18 nm - fixed some style bugs
git-svn-id: file:///svn/phpbb/trunk@3766 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 21:21:04 +00:00
Ludovic Arnaud
fc52e8b184 I hit Enter too fast - updated acl checks
git-svn-id: file:///svn/phpbb/trunk@3765 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 21:18:31 +00:00
Ludovic Arnaud
930e6a7e6b Modes renamed - easier to remember
git-svn-id: file:///svn/phpbb/trunk@3764 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 21:05:58 +00:00
Ludovic Arnaud
5e92d8c8f6 Switched up "real" and "normal" counts. (doh)
Changed sorting by time to use topic_last_post_time rather than topic_last_post_id.


git-svn-id: file:///svn/phpbb/trunk@3763 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 21:03:11 +00:00
Ludovic Arnaud
36011792e6 "Real" post and topic counts now updated correctly. Mass-resync your topics/forums.
git-svn-id: file:///svn/phpbb/trunk@3762 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 21:01:01 +00:00
Ludovic Arnaud
d29495c6c3 Moved lang_mod strings to lang_main
git-svn-id: file:///svn/phpbb/trunk@3761 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 20:59:38 +00:00
Ludovic Arnaud
17427fd725 Hopefully done with topics sync'ing
git-svn-id: file:///svn/phpbb/trunk@3760 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 20:58:58 +00:00
Meik Sievertsen
cd1f9c63d6 apply 2.0.x change
git-svn-id: file:///svn/phpbb/trunk@3759 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 17:51:56 +00:00
Paul S. Owen
853cea315f Couple of changes to f_ permissions
git-svn-id: file:///svn/phpbb/trunk@3757 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 16:11:50 +00:00
Paul S. Owen
02b64a24e3 Don't output error page header when header already sent
git-svn-id: file:///svn/phpbb/trunk@3756 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 14:39:48 +00:00
Paul S. Owen
880b49c381 Various updated lang strings
git-svn-id: file:///svn/phpbb/trunk@3755 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 14:36:27 +00:00
Paul S. Owen
db251b43da Minor changes
git-svn-id: file:///svn/phpbb/trunk@3754 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 14:33:50 +00:00
Paul S. Owen
c66ba88f92 Various changes ... it works again now :D
git-svn-id: file:///svn/phpbb/trunk@3753 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 14:27:42 +00:00
Paul S. Owen
eabafe4734 More updates, auth_dependencies latest layout ... still may change
git-svn-id: file:///svn/phpbb/trunk@3752 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 14:27:17 +00:00
Paul S. Owen
f302d5ea93 Wrong object name
git-svn-id: file:///svn/phpbb/trunk@3751 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-30 14:22:34 +00:00
Meik Sievertsen
0db7b7603d global $db... ashe, i think you noticed already. :)
git-svn-id: file:///svn/phpbb/trunk@3750 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-29 18:42:24 +00:00
Meik Sievertsen
c2abdb292d made admin_phpinfo PHP 4.1.x compatible (old style format)
git-svn-id: file:///svn/phpbb/trunk@3749 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-29 18:37:28 +00:00
Paul S. Owen
51187c1b64 Assorted updates
git-svn-id: file:///svn/phpbb/trunk@3748 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-29 18:33:20 +00:00
Paul S. Owen
ec884a2c5b icon name change
git-svn-id: file:///svn/phpbb/trunk@3747 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-29 18:28:45 +00:00
Paul S. Owen
9e38434b4a Moved acl_options caching code into acl
git-svn-id: file:///svn/phpbb/trunk@3746 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-29 18:25:41 +00:00
Meik Sievertsen
88fbdb6e1e capitalized install script lang vars.
git-svn-id: file:///svn/phpbb/trunk@3745 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-29 17:50:12 +00:00
Paul S. Owen
ea2f85d458 Imageset schema changes ... drop your old imageset table and replace with this + data
git-svn-id: file:///svn/phpbb/trunk@3744 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-29 16:27:50 +00:00
Paul S. Owen
de6cbb063a Overdue naming convention changes
git-svn-id: file:///svn/phpbb/trunk@3743 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-29 14:19:50 +00:00
Paul S. Owen
99859cce21 No longer relevant in this form
git-svn-id: file:///svn/phpbb/trunk@3742 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-29 13:17:14 +00:00
Ludovic Arnaud
2678cb904f Fixed topic count for users who can view unapproved items
git-svn-id: file:///svn/phpbb/trunk@3741 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-29 00:51:38 +00:00
Ludovic Arnaud
213beefc17 Not quite a typo
git-svn-id: file:///svn/phpbb/trunk@3740 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-28 01:28:23 +00:00
Ludovic Arnaud
69a854d3ee forum_parents made more reliable. Removed the $extra_form_fields parameter from jumpbox routines.
git-svn-id: file:///svn/phpbb/trunk@3739 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-28 01:25:03 +00:00
Ludovic Arnaud
e572edb513 Using real counts when displaying unapproved items to keep the page count accurate.
git-svn-id: file:///svn/phpbb/trunk@3738 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-28 00:43:50 +00:00
Ludovic Arnaud
42ec5e67da MCP: resync() function deemed stable enough to replace sync() in functions_admin.php. I will keep extensively testing it though...
Pruning: now works as expected.


git-svn-id: file:///svn/phpbb/trunk@3737 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-28 00:41:16 +00:00
Ludovic Arnaud
fb5957474b Random stuff: report.gif renamed to icon_report.gif, typo in acm_file.
git-svn-id: file:///svn/phpbb/trunk@3736 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-28 00:37:07 +00:00
Ludovic Arnaud
95a1f17db3 Added icon_report to imageset (mine was like a big exclamation mark but Paul's looks better me thinks).
Added topic_replies_real and forum_topics_real fields to store real numbers of posts and topics, including unapproved items.
Removed the duplicate group_display field bug that I had personnally introduced


git-svn-id: file:///svn/phpbb/trunk@3735 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-28 00:29:56 +00:00
Paul S. Owen
ede818ebde whoopsied again
git-svn-id: file:///svn/phpbb/trunk@3733 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-26 22:36:42 +00:00
Paul S. Owen
82f0af1349 More missing stuff ... sure it was here before
git-svn-id: file:///svn/phpbb/trunk@3732 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 23:47:44 +00:00
Paul S. Owen
a827c0c413 browser_check seemed to go missing
git-svn-id: file:///svn/phpbb/trunk@3731 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 23:23:44 +00:00
Paul S. Owen
617602a088 This may help ...
git-svn-id: file:///svn/phpbb/trunk@3730 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 17:27:37 +00:00
Paul S. Owen
17f27aa1ac I'm guessing there have been changes to these files ...
git-svn-id: file:///svn/phpbb/trunk@3729 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 16:52:07 +00:00
Paul S. Owen
81c1c387d9 Removed redundant ... for now at least ... session info from user table schema, added online/offline icon
git-svn-id: file:///svn/phpbb/trunk@3728 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 16:51:38 +00:00
Paul S. Owen
75b1ffa664 Various updates
git-svn-id: file:///svn/phpbb/trunk@3727 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 16:50:18 +00:00
Paul S. Owen
3428964065 ahh, more cute wikkle icons ... don't they look nice, off you go, go join your other little icon friends ... go on
git-svn-id: file:///svn/phpbb/trunk@3726 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 16:37:22 +00:00
Paul S. Owen
403ed59cca report icon
git-svn-id: file:///svn/phpbb/trunk@3725 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 16:18:26 +00:00
Paul S. Owen
e92d7078b1 Report icon
git-svn-id: file:///svn/phpbb/trunk@3724 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 16:17:12 +00:00
Paul S. Owen
ee728234ce ahhh, look at the cute wikkle icon
git-svn-id: file:///svn/phpbb/trunk@3723 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 16:16:45 +00:00
Paul S. Owen
378972cb6b board_email becomes board_contact, board_email is now intended for use in "From:" and "Reply-to:" ... board_contact to be used where a "user facing" contact point is needed, e.g. spam, errors, etc.
git-svn-id: file:///svn/phpbb/trunk@3722 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 15:02:35 +00:00
Paul S. Owen
652383559f Strangely, changes to language strings ..
git-svn-id: file:///svn/phpbb/trunk@3721 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 14:23:31 +00:00
Paul S. Owen
c9670f9924 Enable reminder email sending
git-svn-id: file:///svn/phpbb/trunk@3720 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 14:21:56 +00:00
Paul S. Owen
723a6e9d5b Simplify online user text generation
git-svn-id: file:///svn/phpbb/trunk@3719 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 14:19:49 +00:00
Paul S. Owen
b0545e7636 Tidy up and simplify emailer class, add generate_board_url function ... note changes to emailer setup! Example will be adm/index.php remind
git-svn-id: file:///svn/phpbb/trunk@3718 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 14:19:23 +00:00
Paul S. Owen
3d43169b2a Reminder message for admin index
git-svn-id: file:///svn/phpbb/trunk@3717 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 11:59:36 +00:00
Paul S. Owen
124e9b7cb2 stupid line endings again
git-svn-id: file:///svn/phpbb/trunk@3716 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 00:38:18 +00:00
Paul S. Owen
996abfe026 Change url for PM
git-svn-id: file:///svn/phpbb/trunk@3715 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 00:30:55 +00:00
Paul S. Owen
bfc6b77112 hhmm, where did that constant go ...
git-svn-id: file:///svn/phpbb/trunk@3714 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 00:23:43 +00:00
Paul S. Owen
4fa458baf3 Changed attachment upload path var to "non-dynamic" ... couldn't see a reason as to why it needed to be dynamic, if it must feel free to change it back.
git-svn-id: file:///svn/phpbb/trunk@3713 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 00:19:58 +00:00
Paul S. Owen
18294c2230 Output total posts/topics
git-svn-id: file:///svn/phpbb/trunk@3712 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-25 00:05:28 +00:00
Paul S. Owen
9482bb75ca Suggested change to headers ... seems to work fine on Apache2.
git-svn-id: file:///svn/phpbb/trunk@3711 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-24 22:07:26 +00:00
Paul S. Owen
a9425e4f33 Add browser validation
git-svn-id: file:///svn/phpbb/trunk@3710 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-24 19:03:32 +00:00
Paul S. Owen
0462beed1d Carriage returns
git-svn-id: file:///svn/phpbb/trunk@3709 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-24 19:03:17 +00:00
Paul S. Owen
12f21fee97 Capitalisation, additional of one or two new options, removal of global prune option, addition of stats reset on admin index page
git-svn-id: file:///svn/phpbb/trunk@3708 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-24 19:03:16 +00:00
Paul S. Owen
d1494cfd8c Add Id tags
git-svn-id: file:///svn/phpbb/trunk@3707 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-24 18:15:26 +00:00
Paul S. Owen
5d091c8c2b Capitalisation
git-svn-id: file:///svn/phpbb/trunk@3706 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-24 18:13:22 +00:00
Paul S. Owen
c4007ce1ff Corrected doubled up forbidden_extension id, removed extra line endings
git-svn-id: file:///svn/phpbb/trunk@3704 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-23 21:44:38 +00:00
Ludovic Arnaud
590a8f52fa Forgot to permanently delete the old file
git-svn-id: file:///svn/phpbb/trunk@3703 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-23 21:18:43 +00:00
Ludovic Arnaud
d00305346e Added images for unapproved and reported items.
git-svn-id: file:///svn/phpbb/trunk@3702 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-23 21:17:23 +00:00
Ludovic Arnaud
5f9c1401f2 Corrected image name, added missing group_display field
git-svn-id: file:///svn/phpbb/trunk@3701 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-23 21:15:06 +00:00
Paul S. Owen
237daacdf1 Tidy things up a little more
git-svn-id: file:///svn/phpbb/trunk@3700 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-23 16:58:29 +00:00
Paul S. Owen
0509c71053 Easy access to some PHP info
git-svn-id: file:///svn/phpbb/trunk@3699 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-23 16:18:50 +00:00
Meik Sievertsen
b9c9984955 erm... aspx is forbidden too, reactivate transaction.
git-svn-id: file:///svn/phpbb/trunk@3698 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-22 15:55:45 +00:00
Meik Sievertsen
8357b81a1e initial attachment functionality... only posting related (add/delete/edit) and schema. Also added attachment switch to board settings admin.
git-svn-id: file:///svn/phpbb/trunk@3697 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-22 15:48:46 +00:00
Meik Sievertsen
73ffe96e2e prepare files, last commit before committing initial attachment functionality - please see thread within development forum.
git-svn-id: file:///svn/phpbb/trunk@3695 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-20 13:21:58 +00:00
Paul S. Owen
ab3209af48 oops, missed a bit
git-svn-id: file:///svn/phpbb/trunk@3694 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-20 02:33:29 +00:00
Paul S. Owen
4352c59cee Fix login box action
git-svn-id: file:///svn/phpbb/trunk@3693 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-20 02:28:30 +00:00
Paul S. Owen
276ea6ced4 Remove debugging stuff
git-svn-id: file:///svn/phpbb/trunk@3692 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-20 02:26:04 +00:00
Paul S. Owen
49cbde66d9 oops, I guess this may help ...
git-svn-id: file:///svn/phpbb/trunk@3691 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-20 02:25:03 +00:00
Paul S. Owen
08f384157a No longer "MySQL" specific explain
git-svn-id: file:///svn/phpbb/trunk@3690 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-20 02:23:46 +00:00
Paul S. Owen
53449e4b9f Some more fudges
git-svn-id: file:///svn/phpbb/trunk@3689 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-20 02:23:12 +00:00
Paul S. Owen
115a2cc9e0 And from the flames rose the might phoenix ... well, a little crisp around the edges with the odd missing feather ...
git-svn-id: file:///svn/phpbb/trunk@3688 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-20 01:32:57 +00:00
Paul S. Owen
229242acf5 Print entire topic
git-svn-id: file:///svn/phpbb/trunk@3687 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-20 01:26:47 +00:00
Paul S. Owen
ab34d6329c Move to sql_query_limit
git-svn-id: file:///svn/phpbb/trunk@3686 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-20 01:25:59 +00:00
Paul S. Owen
f9f6cb194d Minor change
git-svn-id: file:///svn/phpbb/trunk@3685 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-20 00:33:25 +00:00
Paul S. Owen
507c678514 Add forum image to template vars
git-svn-id: file:///svn/phpbb/trunk@3684 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-20 00:31:36 +00:00
Paul S. Owen
a884b9f189 Remove some redundant pruning stuff
git-svn-id: file:///svn/phpbb/trunk@3683 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-20 00:30:47 +00:00
Paul S. Owen
cfbb8a10e7 sql char field types must be enclosed in ' rather than "
git-svn-id: file:///svn/phpbb/trunk@3682 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-20 00:29:24 +00:00
Paul S. Owen
57a5147d5b Wrong syntax for limit, cockup in sql_escape ...
git-svn-id: file:///svn/phpbb/trunk@3681 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-19 21:00:01 +00:00
Paul S. Owen
85c22541c1 Fudge for firebird schema
git-svn-id: file:///svn/phpbb/trunk@3680 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-19 20:42:34 +00:00
Paul S. Owen
ac45bff71a Seems to work ...
git-svn-id: file:///svn/phpbb/trunk@3679 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-19 20:42:00 +00:00
Ludovic Arnaud
5d323a651e ACM filenames re-prefixed
git-svn-id: file:///svn/phpbb/trunk@3677 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-19 02:04:46 +00:00
Ludovic Arnaud
5fde0d061e Desesperatly trying to synchronise my different versions ;)
git-svn-id: file:///svn/phpbb/trunk@3676 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-19 01:44:44 +00:00
Paul S. Owen
1a7c52fe19 Possible workaround for affected rows ... must test this
git-svn-id: file:///svn/phpbb/trunk@3673 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-18 22:51:22 +00:00
Paul S. Owen
eff4e2e818 Update following move of post count incrementation checks to permissions
git-svn-id: file:///svn/phpbb/trunk@3672 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-18 22:47:50 +00:00
Paul S. Owen
286f95c293 Line feeds
git-svn-id: file:///svn/phpbb/trunk@3671 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-18 22:24:09 +00:00
Paul S. Owen
b622c51d80 Here I am going on about minimising new includes and I go and create one ... probably better off as a seperate include though than adding ~500 lines of code to session.php
git-svn-id: file:///svn/phpbb/trunk@3670 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-18 22:23:08 +00:00
Paul S. Owen
70672802cb Line feeds again ... also wondering if, given what this does it may be better integrated with memberlist?
git-svn-id: file:///svn/phpbb/trunk@3669 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-18 17:43:21 +00:00
Paul S. Owen
30d05b9bd2 I keep forgetting changes to line terminators and tortoisecvs 1.3.4+
git-svn-id: file:///svn/phpbb/trunk@3668 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-18 17:32:16 +00:00
Paul S. Owen
17ed78c14d Problem with url matching + spaces
git-svn-id: file:///svn/phpbb/trunk@3667 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-18 17:24:14 +00:00
Paul S. Owen
9699d62901 Dont' display legend if blank
git-svn-id: file:///svn/phpbb/trunk@3663 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-18 15:18:03 +00:00
Paul S. Owen
58b47c8312 Change cache location to root path cache, you can delete the cache/ and its contents from the templates/ directory. Moved cache show, decompile, etc. methods to new admin_ object in functions_admin
git-svn-id: file:///svn/phpbb/trunk@3662 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-18 14:58:07 +00:00
Paul S. Owen
d85156d5cd Paul did a whoopsie
git-svn-id: file:///svn/phpbb/trunk@3661 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-18 00:17:12 +00:00
Paul S. Owen
df495c30c9 Trying something
git-svn-id: file:///svn/phpbb/trunk@3660 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-17 23:06:10 +00:00
Paul S. Owen
f81602d72b It's alive! It's alive! ...
git-svn-id: file:///svn/phpbb/trunk@3659 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-17 17:34:20 +00:00
Paul S. Owen
28ed4efed1 Moved to includes/
git-svn-id: file:///svn/phpbb/trunk@3658 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-17 11:48:27 +00:00
Paul S. Owen
18b4bf0d05 Moved db include
git-svn-id: file:///svn/phpbb/trunk@3657 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-17 10:54:45 +00:00
Paul S. Owen
c345279596 Moved to includes ... since they are included too .. trying to "clean up" structure a little
git-svn-id: file:///svn/phpbb/trunk@3656 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-17 10:54:23 +00:00
Paul S. Owen
ad7001c59e Windows carriage returns
git-svn-id: file:///svn/phpbb/trunk@3655 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-17 01:59:04 +00:00
Paul S. Owen
abb165fff2 Missing selects ... should make names of these vars more consistent ...
git-svn-id: file:///svn/phpbb/trunk@3654 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-17 01:34:14 +00:00
Paul S. Owen
4f6a85e548 Incomplete, intended future support for 2.2
git-svn-id: file:///svn/phpbb/trunk@3653 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-17 01:17:50 +00:00
Paul S. Owen
a765dc4402 Add index, remove login
git-svn-id: file:///svn/phpbb/trunk@3652 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-17 01:13:57 +00:00
Paul S. Owen
fa7d11ae8e Output group colour legend here too
git-svn-id: file:///svn/phpbb/trunk@3651 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-17 00:54:10 +00:00
Paul S. Owen
e975227cff Moved login procedure to a function enabling "inline" login links ... no more "messy" redirects ... install will be broken for now, at least when it comes to redirecting after completion. Moved "front-end" login to ucp.php
git-svn-id: file:///svn/phpbb/trunk@3650 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-17 00:53:38 +00:00
Paul S. Owen
391c4bff08 Moved directory
git-svn-id: file:///svn/phpbb/trunk@3648 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-13 12:19:56 +00:00
Paul S. Owen
461ae0f7e0 Redirect path changes
git-svn-id: file:///svn/phpbb/trunk@3647 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-13 12:18:52 +00:00
Paul S. Owen
8bb5de9861 New directory name
git-svn-id: file:///svn/phpbb/trunk@3646 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-13 12:14:48 +00:00
Ludovic Arnaud
9d2989b927 MCP updates. The resync function can now resync 'topic_reported' and 'topic_approved' flags
git-svn-id: file:///svn/phpbb/trunk@3645 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-13 01:12:52 +00:00
Ludovic Arnaud
c7440b7668 Added the quickmod var for topic_type switching
git-svn-id: file:///svn/phpbb/trunk@3644 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-13 01:06:36 +00:00
Ludovic Arnaud
dc71f0abb7 Please try not to notice.
git-svn-id: file:///svn/phpbb/trunk@3643 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-13 01:04:53 +00:00
Ludovic Arnaud
902beb10ef Slightly altered layout of reported/unapproved indicators
git-svn-id: file:///svn/phpbb/trunk@3642 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-13 00:45:36 +00:00
Ludovic Arnaud
78d872e530 More strings :]
git-svn-id: file:///svn/phpbb/trunk@3641 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-13 00:45:02 +00:00
Ludovic Arnaud
f408ac052d Added indicators for reported and/or unapproved items. Note that moderators with m_approve permission can now read unapproved topics and posts normally.
git-svn-id: file:///svn/phpbb/trunk@3640 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-13 00:40:28 +00:00
Ludovic Arnaud
4577cf61d1 Two new images (reported/unapproved items), please update your database. Added blank images as placeholders.
git-svn-id: file:///svn/phpbb/trunk@3639 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-13 00:38:42 +00:00
Ludovic Arnaud
c8298ccd51 More capitalization
git-svn-id: file:///svn/phpbb/trunk@3638 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-12 23:22:14 +00:00
Ludovic Arnaud
b4fa782d8e D'OH!
(sql cache can expire, now)


git-svn-id: file:///svn/phpbb/trunk@3637 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-12 23:20:57 +00:00
Ludovic Arnaud
b4e026844b $lang vars for reported/approved posts and topic
git-svn-id: file:///svn/phpbb/trunk@3636 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-12 23:17:04 +00:00
Meik Sievertsen
b5125ea70b Insert [*] when clicking list button (is my approach user friendly ?)
git-svn-id: file:///svn/phpbb/trunk@3635 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-12 16:34:40 +00:00
Meik Sievertsen
170534e631 ah... here is the missing email template... why are you not playing with your brothers, now get into this repository, hurry, hurry.
git-svn-id: file:///svn/phpbb/trunk@3634 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-12 14:26:37 +00:00
Meik Sievertsen
db1621aaa0 forum and topic notification + poll fixes
git-svn-id: file:///svn/phpbb/trunk@3633 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-12 14:21:57 +00:00
Meik Sievertsen
fa005f44ae some posting updates and fixes.
git-svn-id: file:///svn/phpbb/trunk@3631 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-10 19:39:50 +00:00
Paul S. Owen
4c4278ac8d Without caching
git-svn-id: file:///svn/phpbb/trunk@3630 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-10 18:22:12 +00:00
Paul S. Owen
687c45e26d oops, the idea of hidden groups is that you cannot see who is a member ... duh
git-svn-id: file:///svn/phpbb/trunk@3629 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-10 18:20:29 +00:00
Paul S. Owen
c75d5d7bf3 Various additions and fixes
git-svn-id: file:///svn/phpbb/trunk@3628 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-10 17:48:08 +00:00
Paul S. Owen
12828d376e Relevant template for moved email form
git-svn-id: file:///svn/phpbb/trunk@3627 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-10 16:59:23 +00:00
Paul S. Owen
f13a15d529 Add SMTP port
git-svn-id: file:///svn/phpbb/trunk@3626 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-09 16:19:29 +00:00
Paul S. Owen
d15b81a8a3 Email via memberslist
git-svn-id: file:///svn/phpbb/trunk@3625 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-09 16:14:50 +00:00
Paul S. Owen
58e755b906 Various cleanups ... no doubt breaking stuff in the process
git-svn-id: file:///svn/phpbb/trunk@3624 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-09 16:14:14 +00:00
Paul S. Owen
5cdf2b0b59 Enable per session view online, change layout, potential for links to terms and privacy policy
git-svn-id: file:///svn/phpbb/trunk@3623 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-09 16:11:08 +00:00
Paul S. Owen
cd9b3af2b5 Some changes to the returned data format + cleanups
git-svn-id: file:///svn/phpbb/trunk@3622 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-09 16:09:37 +00:00
Paul S. Owen
aa718d4a02 Minor schema adjustments, additional/altered config and acl options, added u_ options to basic (initial) group auth setup
git-svn-id: file:///svn/phpbb/trunk@3621 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-09 13:37:35 +00:00
Paul S. Owen
2c9ff9686c Updated for usercp_confirm path change
git-svn-id: file:///svn/phpbb/trunk@3620 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-09 12:05:06 +00:00
Paul S. Owen
bd2c598436 Moved from includes/ucp ... but still thinking ucp/ would be better in includes/ with all the other modular components
git-svn-id: file:///svn/phpbb/trunk@3619 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-09 12:04:36 +00:00
Paul S. Owen
673db9602c Moved to ucp
git-svn-id: file:///svn/phpbb/trunk@3618 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-09 12:03:30 +00:00
Paul S. Owen
2cd426a821 Functionality in memberlist.php
git-svn-id: file:///svn/phpbb/trunk@3617 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-09 12:01:38 +00:00
Paul S. Owen
7c272665a5 ucp -> memberlist profile link change for viewonline
git-svn-id: file:///svn/phpbb/trunk@3615 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-08 22:38:46 +00:00
Paul S. Owen
3d5bdc6c8c Add index to poster_id in posts table
git-svn-id: file:///svn/phpbb/trunk@3614 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-08 22:36:17 +00:00
Paul S. Owen
7ffb762b04 Wrong name
git-svn-id: file:///svn/phpbb/trunk@3613 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-08 22:11:01 +00:00
Paul S. Owen
a2cccab6af Additional info for profiles
git-svn-id: file:///svn/phpbb/trunk@3612 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-08 22:10:24 +00:00
Paul S. Owen
9a7f6f98f5 The first order by is irrelevant, it'll be replaced by the values of the second. Could've sworn I committed this change ... I'm losing it :D
git-svn-id: file:///svn/phpbb/trunk@3611 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-08 21:55:55 +00:00
Ludovic Arnaud
575d170365 The last one for today. As of now, sql_query_limit($sql, 0) will _not_ limit the number of rows that are affected.
git-svn-id: file:///svn/phpbb/trunk@3608 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-06 03:04:29 +00:00
Ludovic Arnaud
2d52ece84f I didn't do it.
git-svn-id: file:///svn/phpbb/trunk@3607 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-06 02:54:11 +00:00
Ludovic Arnaud
4e503c0508 Switched up $total and $offset as per MySQL manual
git-svn-id: file:///svn/phpbb/trunk@3606 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-06 02:36:04 +00:00
Ludovic Arnaud
04e9ebb824 Some debug code removed, minor bugfixes.
git-svn-id: file:///svn/phpbb/trunk@3605 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-06 02:23:29 +00:00
Ludovic Arnaud
9e9d126a6a More "reporting" stuff, note the very lame warning in viewtopic when a post has been reported.
git-svn-id: file:///svn/phpbb/trunk@3604 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-06 02:03:37 +00:00
Ludovic Arnaud
553087d0aa Implementing post reporting. 2 new tables plus an extra field for posts and topics tables.
git-svn-id: file:///svn/phpbb/trunk@3603 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-06 01:35:03 +00:00
Ludovic Arnaud
6251ea7130 Change related to the latest form of topics table
git-svn-id: file:///svn/phpbb/trunk@3602 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-06 01:33:20 +00:00
Ludovic Arnaud
afdff15fb9 Implementing post reporting
git-svn-id: file:///svn/phpbb/trunk@3601 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-06 01:13:44 +00:00
Ludovic Arnaud
7132f97d0a New template var for future use.
git-svn-id: file:///svn/phpbb/trunk@3600 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-06 01:08:00 +00:00
Paul S. Owen
799b5fc2de Name change
git-svn-id: file:///svn/phpbb/trunk@3599 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-05 01:14:42 +00:00
Paul S. Owen
658f2a4b66 Moved "viewprofile" to memberslist ... consolidation incomplete
git-svn-id: file:///svn/phpbb/trunk@3598 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-05 00:50:03 +00:00
Meik Sievertsen
cc827946ef wrong encoding too... no fear, this is your updated file. :)
git-svn-id: file:///svn/phpbb/trunk@3596 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-04 18:38:21 +00:00
Meik Sievertsen
b3b0b48f5e wrong encoding. ;)
Hopefully you did an update before commiting the drugs. :D


git-svn-id: file:///svn/phpbb/trunk@3595 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-04 18:32:30 +00:00
James Atkinson
e6c31a8787 Ok, this should be the right version...I've got too many windows open...
git-svn-id: file:///svn/phpbb/trunk@3594 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-04 18:14:36 +00:00
James Atkinson
77c9d2c275 <crappy british accent>You are the weakest link...goodbye!</crappy british
accent>

(I think I watch too much Game Show Network)


git-svn-id: file:///svn/phpbb/trunk@3593 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-04 17:57:01 +00:00
James Atkinson
3c42fb0501 We'll probably be needing this file
git-svn-id: file:///svn/phpbb/trunk@3592 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-04 17:55:12 +00:00
James Atkinson
fd629c7a9f Tons of work on the UCP, see my topic in the development forum for more info
on the bigger changes.

Registration should still work, the basic layout of the UCP is also done
with the start on the profile settings area.


git-svn-id: file:///svn/phpbb/trunk@3591 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-04 17:52:50 +00:00
Paul S. Owen
c5b9e64505 column size adjust
git-svn-id: file:///svn/phpbb/trunk@3590 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-04 16:58:28 +00:00
Paul S. Owen
72225094f6 Sort on cell titles, add rank
git-svn-id: file:///svn/phpbb/trunk@3589 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-04 16:49:02 +00:00
Paul S. Owen
5c0e4ca329 Few changes to user level permissions
git-svn-id: file:///svn/phpbb/trunk@3588 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-04 14:46:40 +00:00
Meik Sievertsen
87cce70d10 changed back to nl2br (nl2br in PHP >= 4.0.5 is XHTML compatible)
git-svn-id: file:///svn/phpbb/trunk@3584 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-02 15:52:46 +00:00
Meik Sievertsen
beb17ef6f2 Added delete-ability to posting...
git-svn-id: file:///svn/phpbb/trunk@3582 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-03-02 13:32:53 +00:00
Paul S. Owen
bc18f53071 Search for
git-svn-id: file:///svn/phpbb/trunk@3579 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-28 14:35:42 +00:00
Paul S. Owen
d4817bebbf Action for searchbox ... obviously doesn't work at present since search is yet to be overhauled ....
git-svn-id: file:///svn/phpbb/trunk@3578 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-28 14:35:35 +00:00
Paul S. Owen
4cba250b14 A box for searching ... pretty obvious I think ... unless you're Pit of course
git-svn-id: file:///svn/phpbb/trunk@3577 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-28 14:35:06 +00:00
Paul S. Owen
7116eb2ca9 get->post
git-svn-id: file:///svn/phpbb/trunk@3576 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-28 14:34:42 +00:00
Meik Sievertsen
e42a20b32e minor changes, re-added topicreview
git-svn-id: file:///svn/phpbb/trunk@3575 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-28 12:57:10 +00:00
Ludovic Arnaud
b5031760af Fixed some... hum... typos. Updated the resync function to always fill the first_poster_name and last_poster_name fields.
git-svn-id: file:///svn/phpbb/trunk@3574 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-28 01:34:46 +00:00
Ludovic Arnaud
04b00375fe Fixed a very potential cross-site scripting issue that would have for sure ended up on security sites.
git-svn-id: file:///svn/phpbb/trunk@3573 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-28 01:13:08 +00:00
Meik Sievertsen
a2889a6c5f ok, a slightly modified posting.php, some fixes too. topic-review and polls will re-appear shortly. Posting is a little bit screwed up now... will get fixed soon too. posting new topics/reply/quote/preview and edit works partially (the post get stored. ;)) This commit is to show the other developers the changes. ;)
git-svn-id: file:///svn/phpbb/trunk@3572 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-27 23:37:02 +00:00
Meik Sievertsen
d4884b0c02 display language variables correctly if template is re-cached.
git-svn-id: file:///svn/phpbb/trunk@3571 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-27 20:14:08 +00:00
Meik Sievertsen
773093a5ef posts tables are now merged.
git-svn-id: file:///svn/phpbb/trunk@3570 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-27 17:27:58 +00:00
Paul S. Owen
6735ab4882 sorting select name changes
git-svn-id: file:///svn/phpbb/trunk@3569 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-27 16:14:46 +00:00
Paul S. Owen
0e711275b5 is_numeric rather than is_int ... any troubles let me know
git-svn-id: file:///svn/phpbb/trunk@3568 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-27 16:14:25 +00:00
Paul S. Owen
66062783ce Potential (display) support for global announcements ... various issues still need to addressed wrt posting/replying/etc.
git-svn-id: file:///svn/phpbb/trunk@3567 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-27 15:58:07 +00:00
Paul S. Owen
ce4e06811c Some sort order changes and other minor changes to viewtopic/viewforum
git-svn-id: file:///svn/phpbb/trunk@3566 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-27 14:27:21 +00:00
Paul S. Owen
dfe581146f Some relatively minor stylistic cleanups ... removed first sort by select HTML, values there will be overwritten by the second sort select since they have the same names
git-svn-id: file:///svn/phpbb/trunk@3565 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-27 14:25:23 +00:00
Meik Sievertsen
ff93d24821 ok, i am commiting this one, before i am going to disable main posting parts for revamping... i will commit the changes when posting works again then.
git-svn-id: file:///svn/phpbb/trunk@3563 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-27 12:56:36 +00:00
Ludovic Arnaud
d128d5d800 "Playing with MCP" part II - now that's the correct version. Good night ;)
git-svn-id: file:///svn/phpbb/trunk@3562 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-27 03:43:11 +00:00
Ludovic Arnaud
5a12bdc77d Fixed pagination when posts aren't ordered by time. Modified the link to MCP to display the same range of posts as viewtopic.
git-svn-id: file:///svn/phpbb/trunk@3561 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-27 03:41:34 +00:00
Ludovic Arnaud
9833d0f012 Still playing around with permissions in MCP - should be fixed shortly
git-svn-id: file:///svn/phpbb/trunk@3560 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-27 03:26:33 +00:00
Ludovic Arnaud
f334d54feb Alternate syntax for acl_gets()
git-svn-id: file:///svn/phpbb/trunk@3559 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-27 03:22:27 +00:00
Paul S. Owen
1482ed4896 You'd think having spent as long as I have working on the session code I'd know how to use it ... well not in my universe ...
git-svn-id: file:///svn/phpbb/trunk@3558 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 23:31:59 +00:00
Paul S. Owen
7e72e538b2 Hope James doesn't mind but I've done some playing to get basic registration working
git-svn-id: file:///svn/phpbb/trunk@3557 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 23:28:27 +00:00
Ludovic Arnaud
b9e52c5f0f Adapted for merged posts tables
git-svn-id: file:///svn/phpbb/trunk@3556 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 21:32:32 +00:00
Paul S. Owen
9961eb789d Add forum_id to topicreview
git-svn-id: file:///svn/phpbb/trunk@3555 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 20:53:31 +00:00
Ludovic Arnaud
a66a762684 MCP update: topic_view. Posts can be ordered (for display) just like in viewtopic. Number of posts per page can be modified at will.
Note that this version will only work with my current copy of mysql dbl.


git-svn-id: file:///svn/phpbb/trunk@3554 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 20:09:14 +00:00
Meik Sievertsen
541667f440 some changes... mainly permission related. Please note the intval($forum_id) at viewtopic, somehow the auth class did not identified it while generating the forum rules.
git-svn-id: file:///svn/phpbb/trunk@3553 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 19:53:10 +00:00
Paul S. Owen
c3200c107f viewonline lang updates
git-svn-id: file:///svn/phpbb/trunk@3552 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 19:30:01 +00:00
Paul S. Owen
fa8fd70cbc Changes related to altered this->page content
git-svn-id: file:///svn/phpbb/trunk@3551 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 19:29:22 +00:00
Paul S. Owen
c190ad2370 Reduce size of stored page info ... hopefully this won't impact things unecessarily on busy forums.
git-svn-id: file:///svn/phpbb/trunk@3550 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 19:18:09 +00:00
Paul S. Owen
2dee304b0e oops, simple case of "idiotitis paulicus" ... be gone double announcements
git-svn-id: file:///svn/phpbb/trunk@3549 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 18:54:31 +00:00
Paul S. Owen
ea1b4dcd14 More updates ... this is still a mess :D
git-svn-id: file:///svn/phpbb/trunk@3548 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 17:16:30 +00:00
Paul S. Owen
f684613815 Allow style designer the option of seperating off announcements to make them more prominent ... note some changes in here also relate to potential solutions for global announcements, viewtopic has not been commited yet
git-svn-id: file:///svn/phpbb/trunk@3547 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 17:16:05 +00:00
Paul S. Owen
72c44126e6 Allow style designer the option of seperating off announcements to make them more prominent
git-svn-id: file:///svn/phpbb/trunk@3546 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 17:15:38 +00:00
Paul S. Owen
46e20bf2d1 Minor alteration
git-svn-id: file:///svn/phpbb/trunk@3545 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 16:01:28 +00:00
Meik Sievertsen
8b9ea6feb4 hmm, wasn't aware of changed something here. strange.
git-svn-id: file:///svn/phpbb/trunk@3544 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 13:24:41 +00:00
Meik Sievertsen
d95588823a only minor changes, some notes, played around with the code... nothing special.
git-svn-id: file:///svn/phpbb/trunk@3543 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 13:17:45 +00:00
Paul S. Owen
e295cab304 What a shock
git-svn-id: file:///svn/phpbb/trunk@3540 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 01:47:55 +00:00
Paul S. Owen
98c7975cc6 remove debug
git-svn-id: file:///svn/phpbb/trunk@3539 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 01:41:59 +00:00
Paul S. Owen
5b0d02baa2 Generally related to post tables merge
git-svn-id: file:///svn/phpbb/trunk@3538 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 00:37:43 +00:00
Paul S. Owen
dca34f5db9 Merge post and post_text tables ... denormalising of topics and forums should result in minimal fx on speed in 2.2
git-svn-id: file:///svn/phpbb/trunk@3537 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 00:36:48 +00:00
Paul S. Owen
108dbfe382 Now, you just knew this was coming didn't you ... come on, admit it, you did ...
git-svn-id: file:///svn/phpbb/trunk@3536 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 00:36:02 +00:00
Paul S. Owen
7d01f3202d Merge the post tables, clean it and the topic table up ... note that this doesn't fail gracefully ... it'll be merged into the update script in due course, this is a rough and ready temporary solution.
git-svn-id: file:///svn/phpbb/trunk@3535 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-26 00:30:10 +00:00
Paul S. Owen
09e99bf5f4 Updates to rules, replace accidently (oops) removed cat cell in viewtopic
git-svn-id: file:///svn/phpbb/trunk@3532 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-25 18:33:24 +00:00
Paul S. Owen
1aa274d1e7 Updates of various types, sizes, colours and accessories ...
git-svn-id: file:///svn/phpbb/trunk@3531 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-25 18:20:33 +00:00
Paul S. Owen
02bcd7e2e1 Various updates
git-svn-id: file:///svn/phpbb/trunk@3530 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-25 18:19:34 +00:00
Meik Sievertsen
46267dce88 added extension loading. please note the additional variable '
$load_extensions = "";' within config.php.


git-svn-id: file:///svn/phpbb/trunk@3528 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-25 16:49:45 +00:00
Paul S. Owen
74c6eec725 tiny weeny little change
git-svn-id: file:///svn/phpbb/trunk@3527 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-25 16:49:35 +00:00
Paul S. Owen
27b6d7582a I just can't help playing with it ... I must see a doctor at once
git-svn-id: file:///svn/phpbb/trunk@3526 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-25 16:09:39 +00:00
Paul S. Owen
3e440ce290 May be useful
git-svn-id: file:///svn/phpbb/trunk@3524 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-25 15:48:16 +00:00
Paul S. Owen
ca791961aa Not relevant to the 2.2 branch
git-svn-id: file:///svn/phpbb/trunk@3523 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-25 15:46:36 +00:00
Ludovic Arnaud
1e5de88c6f Added topic_id field to the log_moderator table
git-svn-id: file:///svn/phpbb/trunk@3521 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-24 23:51:26 +00:00
Ludovic Arnaud
8c1004ad85 Various MCP updates
git-svn-id: file:///svn/phpbb/trunk@3520 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-24 23:50:15 +00:00
Paul S. Owen
ee9a18771b internal html compliance updates
git-svn-id: file:///svn/phpbb/trunk@3519 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-23 21:02:39 +00:00
Paul S. Owen
a0d8aa693a stupid block level spacing ...
git-svn-id: file:///svn/phpbb/trunk@3518 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-23 20:58:24 +00:00
Paul S. Owen
30f4a933a0 Doubled alt on smiley html
git-svn-id: file:///svn/phpbb/trunk@3517 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-23 20:34:36 +00:00
Paul S. Owen
b2779edb66 HTML 4.01 compliance
git-svn-id: file:///svn/phpbb/trunk@3516 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-23 20:30:08 +00:00
Ludovic Arnaud
f7858cb9a5 Various updates
git-svn-id: file:///svn/phpbb/trunk@3514 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-23 08:19:54 +00:00
Paul S. Owen
cd9b46578d HTML4.01 compliance
git-svn-id: file:///svn/phpbb/trunk@3512 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-22 22:03:43 +00:00
Paul S. Owen
3b6f32fc6f file format probs
git-svn-id: file:///svn/phpbb/trunk@3511 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-22 17:28:08 +00:00
Paul S. Owen
a1f4ba0ed3 Find user by posted IP
git-svn-id: file:///svn/phpbb/trunk@3510 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-22 17:18:44 +00:00
Paul S. Owen
5fc4d66994 Add ANONYMOUS check for user_id
git-svn-id: file:///svn/phpbb/trunk@3509 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-22 16:09:34 +00:00
Paul S. Owen
e64b91ec32 More minor changes ...
git-svn-id: file:///svn/phpbb/trunk@3508 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-22 15:01:55 +00:00
Paul S. Owen
826ce9abf8 pooh, the w3c validator is down
git-svn-id: file:///svn/phpbb/trunk@3507 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-22 14:53:30 +00:00
Paul S. Owen
a5525d4b6b this one has a tendency to work better ...
git-svn-id: file:///svn/phpbb/trunk@3506 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-22 14:48:15 +00:00
Paul S. Owen
e2bd5cad67 minor changes ... mainly for Moz
git-svn-id: file:///svn/phpbb/trunk@3505 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-22 14:39:49 +00:00
Paul S. Owen
7ce7400bc6 Various other changes ... hopefully Ashe won't kill me for playing with the new mcp styles
git-svn-id: file:///svn/phpbb/trunk@3504 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-22 14:00:00 +00:00
Paul S. Owen
904931d706 Updates
git-svn-id: file:///svn/phpbb/trunk@3503 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-22 00:48:06 +00:00
Paul S. Owen
ec6a5740bf Use different folder images for posted to topics
git-svn-id: file:///svn/phpbb/trunk@3502 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 19:33:57 +00:00
Paul S. Owen
60a18eb9d6 New images ... drop your old table and re-create it, dumping the imageset data from the basic file into the resulting tables
git-svn-id: file:///svn/phpbb/trunk@3501 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 19:32:46 +00:00
Paul S. Owen
143e5db726 right matte
git-svn-id: file:///svn/phpbb/trunk@3500 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 19:01:45 +00:00
Paul S. Owen
f92fdc89a8 Doing this wasn't fun having completely forgotten how imageready stuff works ...
git-svn-id: file:///svn/phpbb/trunk@3499 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 19:00:48 +00:00
Paul S. Owen
c9d247a9a0 more updates
git-svn-id: file:///svn/phpbb/trunk@3498 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 17:51:38 +00:00
Paul S. Owen
d8268e0060 possible future use
git-svn-id: file:///svn/phpbb/trunk@3497 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 17:16:03 +00:00
Paul S. Owen
9de790c416 Darken links slightly
git-svn-id: file:///svn/phpbb/trunk@3496 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 14:40:13 +00:00
Paul S. Owen
24052a4fca More doubled up class defns
git-svn-id: file:///svn/phpbb/trunk@3495 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 14:23:31 +00:00
Paul S. Owen
c87ced82a1 Minor change to titles
git-svn-id: file:///svn/phpbb/trunk@3494 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 14:15:52 +00:00
Paul S. Owen
9bc54134c3 More lang string case changes
git-svn-id: file:///svn/phpbb/trunk@3493 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 14:07:13 +00:00
Paul S. Owen
2a8b3e11ab Without the debug stuff this time ...
git-svn-id: file:///svn/phpbb/trunk@3492 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 13:30:45 +00:00
Paul S. Owen
d2a016659d Wasn't grabbing appropriate user_id for given username entries
git-svn-id: file:///svn/phpbb/trunk@3491 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 13:30:19 +00:00
Paul S. Owen
7c96e14e76 More ANONYMOUS changes
git-svn-id: file:///svn/phpbb/trunk@3489 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 13:17:40 +00:00
Paul S. Owen
f3a3543476 Check for value of ANONYMOUS
git-svn-id: file:///svn/phpbb/trunk@3488 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 13:13:05 +00:00
Paul S. Owen
345b521b47 Updated to remove row color/class assignments
git-svn-id: file:///svn/phpbb/trunk@3487 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 12:40:23 +00:00
Paul S. Owen
5298c13d46 me again
git-svn-id: file:///svn/phpbb/trunk@3486 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 12:40:05 +00:00
Paul S. Owen
62a311d401 You get the idea ...
git-svn-id: file:///svn/phpbb/trunk@3485 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 12:16:51 +00:00
Paul S. Owen
983c50cb17 Altered theme entry ... delete your existing entry and replace with this
git-svn-id: file:///svn/phpbb/trunk@3484 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 11:49:27 +00:00
Paul S. Owen
1bcbac70c3 Updates
git-svn-id: file:///svn/phpbb/trunk@3483 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 11:46:19 +00:00
Paul S. Owen
411168e85a workaround for Mozilla 1.3b (at least) problems with rendering font: definitions
git-svn-id: file:///svn/phpbb/trunk@3482 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 11:38:45 +00:00
Ludovic Arnaud
d33b04ae6b Work is in progress on MCP. Resync function now takes into account subforums.
Topics can hopefully be moved. A hell lot of notes have been added.


git-svn-id: file:///svn/phpbb/trunk@3480 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 01:54:30 +00:00
Ludovic Arnaud
0101c669cc Renamed some functions in cache manager, now unloads vars properly before the page is output.
git-svn-id: file:///svn/phpbb/trunk@3479 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-21 01:51:46 +00:00
Paul S. Owen
389095086d I do realise this looks rather dodgy on Mozilla ... and that this isn't getting 2.2 written ... but hey, writting one more line of code at present will result in me personally expelling Saddam Hussein from Iraq, who needs the paras when you've got 2.2 ...
git-svn-id: file:///svn/phpbb/trunk@3478 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-20 23:53:47 +00:00
Paul S. Owen
dc35cd40c1 If I keep playing with it ... I'll go blind ...
git-svn-id: file:///svn/phpbb/trunk@3477 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-20 17:41:26 +00:00
Paul S. Owen
4cfb496ba2 playing some more
git-svn-id: file:///svn/phpbb/trunk@3476 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-20 17:35:35 +00:00
Paul S. Owen
e0f1db2e55 playing
git-svn-id: file:///svn/phpbb/trunk@3475 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-20 17:15:35 +00:00
Paul S. Owen
c3d87feaba bye bye
git-svn-id: file:///svn/phpbb/trunk@3474 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-20 17:15:07 +00:00
Paul S. Owen
e4c35ab877 Arial'ified the button text
git-svn-id: file:///svn/phpbb/trunk@3473 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-20 16:56:33 +00:00
Paul S. Owen
33441af23f Could've sworn I commited this change
git-svn-id: file:///svn/phpbb/trunk@3472 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-20 14:11:53 +00:00
Ludovic Arnaud
f2bc043b38 Deleting posts now actually works and so does topics sync'ing.
Added the ability to manual resync topics.


git-svn-id: file:///svn/phpbb/trunk@3471 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-17 06:24:42 +00:00
Ludovic Arnaud
b8fdc39afd Reverse the reversal.
git-svn-id: file:///svn/phpbb/trunk@3470 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-17 06:23:30 +00:00
Ludovic Arnaud
83c605a6e2 More capitalised lang strings, fixed some unset or incorrect variables
git-svn-id: file:///svn/phpbb/trunk@3469 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-17 06:20:41 +00:00
Paul S. Owen
615e676b02 Basic ability to add users to group and group moderators
git-svn-id: file:///svn/phpbb/trunk@3468 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-11 17:12:52 +00:00
Paul S. Owen
28a01da9a4 Add acl option for denying user/group post count incrementing in a given forum
git-svn-id: file:///svn/phpbb/trunk@3467 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-11 16:24:58 +00:00
Paul S. Owen
02e86186fb insert usernames into named form rather than via its numeric index
git-svn-id: file:///svn/phpbb/trunk@3466 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-11 15:55:05 +00:00
Paul S. Owen
2a411523a9 missing global auth
git-svn-id: file:///svn/phpbb/trunk@3463 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-07 18:27:15 +00:00
Ludovic Arnaud
660bcb0636 MCP update: topic selection for merge should now work... better
git-svn-id: file:///svn/phpbb/trunk@3462 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-07 01:18:02 +00:00
Ludovic Arnaud
cab4c3c9d1 MCP update: now it can delete topics
git-svn-id: file:///svn/phpbb/trunk@3461 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-07 01:01:50 +00:00
Paul S. Owen
9c19f50378 oopsie in user permission settings
git-svn-id: file:///svn/phpbb/trunk@3460 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-06 14:54:20 +00:00
Ludovic Arnaud
bb30927fdf Tweaking around the merge interface
git-svn-id: file:///svn/phpbb/trunk@3459 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-06 03:43:25 +00:00
Ludovic Arnaud
44cd06a722 Very first preimplementation of the alpha version of the still not working new version of Moderator CP. (did I mention it wasn't ready yet?)
git-svn-id: file:///svn/phpbb/trunk@3458 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-06 03:30:32 +00:00
Ludovic Arnaud
a870f28609 Small modification I wanted to commit before I get too much desynch'ed
git-svn-id: file:///svn/phpbb/trunk@3457 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-06 00:24:04 +00:00
Paul S. Owen
0cbcd2467c Listing of users
git-svn-id: file:///svn/phpbb/trunk@3456 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-05 17:40:46 +00:00
Paul S. Owen
e0a71f56ce Group related updates
git-svn-id: file:///svn/phpbb/trunk@3455 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-05 15:56:25 +00:00
Paul S. Owen
a6bf34acf6 Timezone issue ... perhaps this field should become a var/char ...
git-svn-id: file:///svn/phpbb/trunk@3454 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-05 15:55:55 +00:00
Paul S. Owen
65f8828fbb test group wide colour set
git-svn-id: file:///svn/phpbb/trunk@3452 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-04 16:28:03 +00:00
Paul S. Owen
0ffd0cc072 Minor changes
git-svn-id: file:///svn/phpbb/trunk@3451 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-04 15:50:52 +00:00
Paul S. Owen
cb57724972 couple new changes
git-svn-id: file:///svn/phpbb/trunk@3450 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-04 14:58:09 +00:00
Paul S. Owen
cdbb2931f0 websafe colour swatch
git-svn-id: file:///svn/phpbb/trunk@3449 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-02-04 14:57:56 +00:00
Paul S. Owen
7203dc2471 Another conditional and "special group" lang output
git-svn-id: file:///svn/phpbb/trunk@3448 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-31 15:46:57 +00:00
Paul S. Owen
849285d9eb forgot conditional on group_type
git-svn-id: file:///svn/phpbb/trunk@3447 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-31 15:43:29 +00:00
Paul S. Owen
1fe3a6a206 Guest -> GUEST
git-svn-id: file:///svn/phpbb/trunk@3446 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-31 15:40:58 +00:00
Paul S. Owen
a9f10f7df9 Don't output topic icon column for forum if topic icons aren't enabled for it
git-svn-id: file:///svn/phpbb/trunk@3445 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-31 15:40:45 +00:00
Paul S. Owen
2aca0f5e15 S_TOPIC_ICON output to indicate whether topic/post icons are enabled for this forum
git-svn-id: file:///svn/phpbb/trunk@3444 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-31 15:40:34 +00:00
Paul S. Owen
96e419d36e Add new group type, GROUP_FREE for "freely open"
git-svn-id: file:///svn/phpbb/trunk@3443 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-31 15:39:54 +00:00
Paul S. Owen
4eb55d6689 Changes mainly related to group admin updates ... added -13 +13 to timezone listing
git-svn-id: file:///svn/phpbb/trunk@3442 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-31 15:39:34 +00:00
Paul S. Owen
ad19326d39 Remove '<select ...' from language, timezone and style option list generation, change is_dir (which doesn't always work) to is_file, etc. introduce root_path to language option list gen
git-svn-id: file:///svn/phpbb/trunk@3441 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-31 15:39:07 +00:00
Paul S. Owen
70cd310197 Some initial re-working ...
git-svn-id: file:///svn/phpbb/trunk@3440 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-31 15:38:13 +00:00
Ludovic Arnaud
21ecf31419 I think we needed it anyway ;)
git-svn-id: file:///svn/phpbb/trunk@3439 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-31 02:14:48 +00:00
Ludovic Arnaud
2e20478640 Use array_shift to fetch cached rows.
git-svn-id: file:///svn/phpbb/trunk@3438 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-31 02:13:12 +00:00
Ludovic Arnaud
dc26ed5960 Do not display table headers when no subforum is shown
git-svn-id: file:///svn/phpbb/trunk@3437 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-31 02:11:38 +00:00
Ludovic Arnaud
5b0315305f I thought I had committed this already :-/
(fixed slashing of data, added file locking)


git-svn-id: file:///svn/phpbb/trunk@3436 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-31 01:43:09 +00:00
Paul S. Owen
1c391dc290 Some case changes ... just for SHS`
git-svn-id: file:///svn/phpbb/trunk@3435 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 22:24:30 +00:00
James Atkinson
1e1629fb15 Added UCP relevent lines and some capilization
git-svn-id: file:///svn/phpbb/trunk@3434 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 20:07:48 +00:00
James Atkinson
b1d7522d06 Minor changes, added visual confirmation stuff to mysql_basic and changed
user_avatar_type to null since avatars arn't used in registartion.


git-svn-id: file:///svn/phpbb/trunk@3433 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 20:06:17 +00:00
James Atkinson
3730697f18 Aded visual confirmation shtuff
git-svn-id: file:///svn/phpbb/trunk@3432 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 20:05:01 +00:00
James Atkinson
4022948cc5 This is the main UCP interface, handles passing off to registartion and
viewprofile.


git-svn-id: file:///svn/phpbb/trunk@3431 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 20:04:21 +00:00
James Atkinson
a0d0d1da78 Changes for UCP and registration, pretty minor overall. Fixed emailer to use
trigger_error insted of message_die.

emailer still needs some clean-up


git-svn-id: file:///svn/phpbb/trunk@3430 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 20:02:09 +00:00
James Atkinson
83e97693a4 Visual confirmation, and UCP module handler
git-svn-id: file:///svn/phpbb/trunk@3429 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 19:58:18 +00:00
James Atkinson
da919a3e45 Moved files to /ucp
git-svn-id: file:///svn/phpbb/trunk@3428 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 19:57:45 +00:00
James Atkinson
2b9b88f251 Moved user cp files to /ucp insted of includes/ucp, easier to handle this
way with phudo-module system


git-svn-id: file:///svn/phpbb/trunk@3427 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 19:57:19 +00:00
James Atkinson
2e64f1aea7 Beginnings of the UCP, here are the templates.
git-svn-id: file:///svn/phpbb/trunk@3426 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 19:50:19 +00:00
Paul S. Owen
c13fd394c8 Add user acl options for changing to own username colouration or group colouration
git-svn-id: file:///svn/phpbb/trunk@3425 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 19:05:41 +00:00
Paul S. Owen
1ec02ec3f3 Ooops, full list when editing ...
git-svn-id: file:///svn/phpbb/trunk@3423 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 16:19:20 +00:00
Paul S. Owen
8ee977f1d1 Case changes, fix forum_id in nav, fix forum_id in posting success msg
git-svn-id: file:///svn/phpbb/trunk@3422 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 15:54:27 +00:00
Paul S. Owen
87cd557369 default dirs
git-svn-id: file:///svn/phpbb/trunk@3420 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 15:32:30 +00:00
Paul S. Owen
c42cb7b212 nosey
git-svn-id: file:///svn/phpbb/trunk@3419 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 15:29:25 +00:00
Paul S. Owen
e50c490ae7 Destroy cache on import
git-svn-id: file:///svn/phpbb/trunk@3418 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 15:20:23 +00:00
Paul S. Owen
d5f80d7215 nosey!
git-svn-id: file:///svn/phpbb/trunk@3417 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 15:17:08 +00:00
Paul S. Owen
3e605446ff recursive add/import of icons/smilies/paks, reset topic/post icon_id's when deleting icons
git-svn-id: file:///svn/phpbb/trunk@3416 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 15:15:25 +00:00
Paul S. Owen
1cafc63b2f Left over leading /
git-svn-id: file:///svn/phpbb/trunk@3415 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 15:04:04 +00:00
Paul S. Owen
8f28bf8665 Probably "work" better without my own prefix ...
git-svn-id: file:///svn/phpbb/trunk@3414 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 14:59:18 +00:00
Paul S. Owen
8a61f56a22 A few demo icons
git-svn-id: file:///svn/phpbb/trunk@3413 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 14:58:48 +00:00
Paul S. Owen
7dd294296c These are all by Daz ( Darren Burnhill ) ... see http://www.forumimages.com/ for additional material, styles and images
git-svn-id: file:///svn/phpbb/trunk@3412 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-30 14:45:34 +00:00
Paul S. Owen
af765caefe oops
git-svn-id: file:///svn/phpbb/trunk@3409 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-29 23:24:36 +00:00
Paul S. Owen
238679ad71 other "oversights"
git-svn-id: file:///svn/phpbb/trunk@3408 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-29 23:21:50 +00:00
Paul S. Owen
dd1187b6c6 Double escaping ....
git-svn-id: file:///svn/phpbb/trunk@3407 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-29 23:14:34 +00:00
Paul S. Owen
a1ddf8e73b smilies check incorrect
git-svn-id: file:///svn/phpbb/trunk@3406 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-29 19:03:58 +00:00
Paul S. Owen
a7ee692e26 Hold on everyone, I forgot to give out the idiot homework ...
git-svn-id: file:///svn/phpbb/trunk@3405 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-29 18:49:43 +00:00
Paul S. Owen
8571f0ba90 And here ends the idiot lesson for today ... part 2 : How to screw up the admin panel will begin tomorrow
git-svn-id: file:///svn/phpbb/trunk@3404 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-29 18:36:26 +00:00
Paul S. Owen
09d4e7cf7c NOT NULL when should be NULL, doubled up a_event
git-svn-id: file:///svn/phpbb/trunk@3403 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-29 18:16:48 +00:00
Paul S. Owen
6c4096c67b 'test' logging action - locked topics
git-svn-id: file:///svn/phpbb/trunk@3402 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-29 17:46:02 +00:00
Paul S. Owen
bb93945423 Move logging functions, change name, add mode + lang var case changes
git-svn-id: file:///svn/phpbb/trunk@3401 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-29 17:45:34 +00:00
Paul S. Owen
bcd4581f77 More case changing but 'test' mod logging mesg
git-svn-id: file:///svn/phpbb/trunk@3400 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-29 17:44:58 +00:00
Paul S. Owen
75d35987e5 Move logging functions
git-svn-id: file:///svn/phpbb/trunk@3399 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-29 17:44:22 +00:00
Paul S. Owen
777717dd16 Some tinkering ... clear your prefetch (user_permissions) fields ...
git-svn-id: file:///svn/phpbb/trunk@3398 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-29 16:12:21 +00:00
Paul S. Owen
4d761a22d8 Incorrect acl parameters
git-svn-id: file:///svn/phpbb/trunk@3397 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-29 14:30:15 +00:00
Paul S. Owen
ba6a3c0139 Check for display set when outputting icons
git-svn-id: file:///svn/phpbb/trunk@3396 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 20:53:41 +00:00
Paul S. Owen
043d45c357 Missing cache save from page_footer() + unecessary cache update for word censors
git-svn-id: file:///svn/phpbb/trunk@3395 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 20:45:42 +00:00
Paul S. Owen
4ce762b83b Added global for phpbb_root_path to acm constructor
git-svn-id: file:///svn/phpbb/trunk@3394 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 20:44:30 +00:00
Paul S. Owen
93f57ce29c wrong case for lang var
git-svn-id: file:///svn/phpbb/trunk@3393 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 20:40:35 +00:00
Paul S. Owen
957a8eaf4b More admin related updates
git-svn-id: file:///svn/phpbb/trunk@3392 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 20:21:46 +00:00
Paul S. Owen
69eb24394a More case changing, hard coding of HTML, etc.
git-svn-id: file:///svn/phpbb/trunk@3391 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 20:21:34 +00:00
Paul S. Owen
f522f21240 Minor mods + lang var case changes
git-svn-id: file:///svn/phpbb/trunk@3390 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 18:55:54 +00:00
Paul S. Owen
06af965743 Minor cosmetic change to display of ban reason/length
git-svn-id: file:///svn/phpbb/trunk@3389 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 18:48:57 +00:00
Paul S. Owen
3c8b03e50e I tink I taw another bluudy error ... I did! I did see another bluudy error
git-svn-id: file:///svn/phpbb/trunk@3388 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 18:36:20 +00:00
Paul S. Owen
d8f4b656ae message_die remained ...
git-svn-id: file:///svn/phpbb/trunk@3387 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 18:32:58 +00:00
Paul S. Owen
7a39eba485 doh, changed file name forgot to change within source ...
git-svn-id: file:///svn/phpbb/trunk@3386 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 18:21:32 +00:00
Paul S. Owen
3c978b8d99 Doubled up on SMILE to
git-svn-id: file:///svn/phpbb/trunk@3385 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 18:18:57 +00:00
Paul S. Owen
676c7319dd oops, doubled up on ICONS
git-svn-id: file:///svn/phpbb/trunk@3384 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 18:18:08 +00:00
Paul S. Owen
1c1648e394 Slight change to obtain_icon sql
git-svn-id: file:///svn/phpbb/trunk@3383 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 18:16:53 +00:00
Paul S. Owen
d68426705a Icon/smilies updates
git-svn-id: file:///svn/phpbb/trunk@3382 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 18:16:10 +00:00
Paul S. Owen
c83052c7d1 Note the change to smilies_id -> smile_id + additional fields for icons table
git-svn-id: file:///svn/phpbb/trunk@3381 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 18:15:56 +00:00
Paul S. Owen
aa1045dea2 phew, lucky I remembered I just changed the name and enabled icon admin functions ...
git-svn-id: file:///svn/phpbb/trunk@3380 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 18:15:18 +00:00
Paul S. Owen
811b6d10d1 Oh gawd now I really didn't want to do that ...
git-svn-id: file:///svn/phpbb/trunk@3379 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-28 18:13:55 +00:00
Paul S. Owen
fbf19cae45 More case changes
git-svn-id: file:///svn/phpbb/trunk@3377 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-27 22:08:47 +00:00
Paul S. Owen
0752dfb52a More case change updates
git-svn-id: file:///svn/phpbb/trunk@3376 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-27 22:04:53 +00:00
Paul S. Owen
42ad34f513 Minor change to markup
git-svn-id: file:///svn/phpbb/trunk@3375 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-27 22:01:38 +00:00
Paul S. Owen
cc8e77a837 Various changes and fixes
git-svn-id: file:///svn/phpbb/trunk@3374 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-27 22:00:32 +00:00
Paul S. Owen
07c084b91e More case changing + message_die to trigger_error + show image on front end listing
git-svn-id: file:///svn/phpbb/trunk@3373 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-27 19:02:33 +00:00
Paul S. Owen
f65065e98c case change
git-svn-id: file:///svn/phpbb/trunk@3372 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-27 18:50:22 +00:00
Paul S. Owen
4243e02c6a Third time lucky ...
git-svn-id: file:///svn/phpbb/trunk@3371 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-27 18:42:21 +00:00
Paul S. Owen
ba53bd0732 Wrong var name for cache
git-svn-id: file:///svn/phpbb/trunk@3370 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-27 18:41:22 +00:00
Paul S. Owen
f32f525c30 Lang var case changing
git-svn-id: file:///svn/phpbb/trunk@3369 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-27 18:40:31 +00:00
Paul S. Owen
afcaabf5ef idiot ...
git-svn-id: file:///svn/phpbb/trunk@3368 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-27 18:31:14 +00:00
Paul S. Owen
0c26de16eb Category and module lang name changes + show ban information when selecting entries to unban
git-svn-id: file:///svn/phpbb/trunk@3367 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-27 18:16:22 +00:00
Paul S. Owen
47cc239b1d Do away with icon_id > 1 business since it's no longer needed ... note you should delete the empty icon in your icons table.
git-svn-id: file:///svn/phpbb/trunk@3366 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-27 15:44:05 +00:00
Paul S. Owen
f31d54d9d3 changes mainly for user/group permissions
git-svn-id: file:///svn/phpbb/trunk@3365 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-27 15:31:39 +00:00
Paul S. Owen
d441f9ffcb Minor additions and mods
git-svn-id: file:///svn/phpbb/trunk@3364 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-27 15:29:24 +00:00
Paul S. Owen
c13f96f100 Add user and group permission setup ... time for a cleanup here me thinks
git-svn-id: file:///svn/phpbb/trunk@3363 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-27 15:29:06 +00:00
Ludovic Arnaud
038fd680f1 Fixed cache expiration and missing lang strings on index/viewforum.
git-svn-id: file:///svn/phpbb/trunk@3362 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-24 03:56:37 +00:00
Ludovic Arnaud
bbc49787b4 Re-enabled fully dynamic config settings.
git-svn-id: file:///svn/phpbb/trunk@3361 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-22 20:52:09 +00:00
Ludovic Arnaud
644735d9ac Re-enabled fully dynamic config settings.
git-svn-id: file:///svn/phpbb/trunk@3360 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-22 20:44:37 +00:00
Ludovic Arnaud
4be10373b8 Merged forum nav for viewtopic/viewforum, fixed cache behavior with an empty icons table.
git-svn-id: file:///svn/phpbb/trunk@3359 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-22 20:16:18 +00:00
Paul S. Owen
2005fb7061 sql_quote to $db->sql_escape
git-svn-id: file:///svn/phpbb/trunk@3358 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-22 16:58:00 +00:00
Paul S. Owen
01517e23fd Icon updates
git-svn-id: file:///svn/phpbb/trunk@3357 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-22 16:46:44 +00:00
Paul S. Owen
90eb7c5179 Post icon + other minor changes
git-svn-id: file:///svn/phpbb/trunk@3356 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-22 16:46:36 +00:00
Paul S. Owen
9250724b57 More capitalisation
git-svn-id: file:///svn/phpbb/trunk@3355 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-22 16:35:17 +00:00
Paul S. Owen
f5537c8ff0 Posting works again ... well, as it did previously!
git-svn-id: file:///svn/phpbb/trunk@3354 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-22 16:35:06 +00:00
Paul S. Owen
67872da415 icon_id for posts table, note topic table topic_icon has changed to icon_id ...
git-svn-id: file:///svn/phpbb/trunk@3353 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-22 15:35:43 +00:00
Paul S. Owen
74ac4985db Change LIMIT query to use DBAL method
git-svn-id: file:///svn/phpbb/trunk@3351 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-22 15:06:23 +00:00
Paul S. Owen
85c4ee575c lastread stuff is just causing too many problems with repeated forums at present - disabling till fixed
git-svn-id: file:///svn/phpbb/trunk@3350 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-22 15:06:11 +00:00
Paul S. Owen
c1a478005a Post ignore line
git-svn-id: file:///svn/phpbb/trunk@3349 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-21 16:13:54 +00:00
Paul S. Owen
34137d7614 Stop web nosey parkers
git-svn-id: file:///svn/phpbb/trunk@3348 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-21 16:13:05 +00:00
Paul S. Owen
24c59e8f17 Cache topic icons ... being used in three places, two high traffic areas ... probably worth caching, alter word censor to one var array ... hopefully this doesn't break anything :D
git-svn-id: file:///svn/phpbb/trunk@3347 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-21 15:58:32 +00:00
Paul S. Owen
a262c97c75 Removed extra spaces within conditional braces
git-svn-id: file:///svn/phpbb/trunk@3346 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-21 15:54:20 +00:00
Paul S. Owen
f0dcfa29f7 ratings table
git-svn-id: file:///svn/phpbb/trunk@3345 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-21 15:01:47 +00:00
Paul S. Owen
c151eddbc3 Remove or rename some table definitions
git-svn-id: file:///svn/phpbb/trunk@3344 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-21 15:01:39 +00:00
Paul S. Owen
919e75c64f Wrong order by in acl_add_option
git-svn-id: file:///svn/phpbb/trunk@3343 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-21 14:40:04 +00:00
Paul S. Owen
fce3c5ef0b Re-jiggled where options are cached, moved clear prefetch to main auth class
git-svn-id: file:///svn/phpbb/trunk@3342 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-21 14:37:56 +00:00
Paul S. Owen
5bea3ea3b4 Re-jiggle where acl_option caching is done, move to common in-keeping with config
git-svn-id: file:///svn/phpbb/trunk@3341 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-21 14:33:07 +00:00
Paul S. Owen
8c31649706 require_once updates
git-svn-id: file:///svn/phpbb/trunk@3340 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-21 14:15:48 +00:00
Paul S. Owen
75731c034c bye bye
git-svn-id: file:///svn/phpbb/trunk@3339 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-21 14:09:31 +00:00
Ludovic Arnaud
458b9b50ec Un-b0rked ACL options caching, small general fixes
git-svn-id: file:///svn/phpbb/trunk@3338 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-20 05:12:38 +00:00
Ludovic Arnaud
b2721cca0c Very minor changes.
git-svn-id: file:///svn/phpbb/trunk@3317 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-13 06:44:16 +00:00
Ludovic Arnaud
ab928d8f5f Minor fixes
git-svn-id: file:///svn/phpbb/trunk@3316 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-13 05:11:11 +00:00
Ludovic Arnaud
9f4cb905d3 EOL should be fixed now
git-svn-id: file:///svn/phpbb/trunk@3315 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-13 04:25:57 +00:00
Paul S. Owen
a16d1d9aff whatever that commit was caused some interesting formating :D
git-svn-id: file:///svn/phpbb/trunk@3314 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-12 00:28:28 +00:00
Ludovic Arnaud
4533fba0fc Implementation of an experimental cache manager.
git-svn-id: file:///svn/phpbb/trunk@3313 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-11 23:07:30 +00:00
Ludovic Arnaud
85b196b5fe Implementation of an experimental cache manager.
git-svn-id: file:///svn/phpbb/trunk@3312 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-11 22:56:49 +00:00
Paul S. Owen
d7e485e5f6 more capitals et al
git-svn-id: file:///svn/phpbb/trunk@3311 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-11 16:25:49 +00:00
Paul S. Owen
08fd930da0 Change background colour of selection box for presets ... just trying to find "good" way of seperating headers from options without lots of space, or "underlining"
git-svn-id: file:///svn/phpbb/trunk@3310 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-11 15:27:37 +00:00
Paul S. Owen
7ae621056f oops, seems I forgot to commit this :)
git-svn-id: file:///svn/phpbb/trunk@3309 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-11 01:37:34 +00:00
Paul S. Owen
2a02d24ffc Related preset changes
git-svn-id: file:///svn/phpbb/trunk@3307 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-10 14:55:46 +00:00
Paul S. Owen
f116dfc56c Ooops allow viewonline makes more sense per user than per forum ... doh
git-svn-id: file:///svn/phpbb/trunk@3306 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-10 14:55:19 +00:00
Paul S. Owen
c468f95dfa One last(!) additional preset ... inherit from parent (if appropriate)
git-svn-id: file:///svn/phpbb/trunk@3305 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-10 14:53:43 +00:00
Paul S. Owen
902ec5f517 Case change for lang var names
git-svn-id: file:///svn/phpbb/trunk@3304 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-10 14:17:48 +00:00
Paul S. Owen
be073e179c Minor change
git-svn-id: file:///svn/phpbb/trunk@3303 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-10 14:17:18 +00:00
Paul S. Owen
7618c89426 Minor change to seperate presets from "main" permission settings table
git-svn-id: file:///svn/phpbb/trunk@3302 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-10 14:04:40 +00:00
Paul S. Owen
451a653bbf bye billy ... I mean admin
git-svn-id: file:///svn/phpbb/trunk@3296 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-10 12:26:17 +00:00
Paul S. Owen
fe1c986988 Fixed "apparent" issue with super moderators remaining after "deletion"
git-svn-id: file:///svn/phpbb/trunk@3295 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-10 01:36:34 +00:00
Paul S. Owen
77e09080dc Removed limit ... wasn't a "bad" idea but ultimately created more work than I expected :D
git-svn-id: file:///svn/phpbb/trunk@3294 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-10 01:18:35 +00:00
Paul S. Owen
cf96f8dcfb Couple of HTML issues, now compliant again
git-svn-id: file:///svn/phpbb/trunk@3293 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-09 15:22:59 +00:00
Paul S. Owen
4d1c3e3696 More text
git-svn-id: file:///svn/phpbb/trunk@3292 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-09 15:14:46 +00:00
Paul S. Owen
36b452bae4 escaping was leaving slashes ... reverted for time being
git-svn-id: file:///svn/phpbb/trunk@3291 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-09 15:13:06 +00:00
Paul S. Owen
05bc60b26d Enable presets
git-svn-id: file:///svn/phpbb/trunk@3290 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-09 15:12:11 +00:00
Paul S. Owen
6af4750b4c This is red, now why is it red ... probably because it's not green ... so let's make it green and hope it wasn't red for some specific reason
git-svn-id: file:///svn/phpbb/trunk@3287 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-08 22:27:16 +00:00
Paul S. Owen
763d264d5f ignore post test
git-svn-id: file:///svn/phpbb/trunk@3286 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-08 22:23:51 +00:00
Paul S. Owen
799ffa517c my min karma, as opposed to my little pony or some such
git-svn-id: file:///svn/phpbb/trunk@3285 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-08 22:23:12 +00:00
Paul S. Owen
f236f3f838 Updates as opposed to downdates
git-svn-id: file:///svn/phpbb/trunk@3284 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-08 18:27:16 +00:00
Paul S. Owen
f58083b8af Ashes to ashes, bits to bits
git-svn-id: file:///svn/phpbb/trunk@3283 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-08 18:21:25 +00:00
Paul S. Owen
76c17a6991 Change message_die for trigger_error
git-svn-id: file:///svn/phpbb/trunk@3282 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-08 17:36:18 +00:00
Paul S. Owen
2f555f5b22 And as if by magic ... pooooooffff ... MCP appeared, "hello MCP" the children say, don't be silly children, MCP is a sequence of bits it cannot reply, "idiot children" the developer says.
git-svn-id: file:///svn/phpbb/trunk@3281 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-08 17:31:16 +00:00
Paul S. Owen
ed54cc285f Oh no! Now it's me ... argghh ... I'm melting I'm melting ... oohh the pain of it, the pain of it all (c) NBC
git-svn-id: file:///svn/phpbb/trunk@3280 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-08 17:29:58 +00:00
Paul S. Owen
4d75e2fc09 Remove server string stuff since it's now handled by redirect
git-svn-id: file:///svn/phpbb/trunk@3279 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-08 17:04:55 +00:00
Paul S. Owen
d54d938117 I have risen again ... yet I'm still broken ... wooh is me, wooh is me
git-svn-id: file:///svn/phpbb/trunk@3278 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-08 17:01:38 +00:00
Paul S. Owen
930a9223c7 Oh my God what have they done? What HAVE they done .... infamy! infamy! they've all got it in-for-me ... (c) Rank
git-svn-id: file:///svn/phpbb/trunk@3277 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-08 17:00:37 +00:00
Paul S. Owen
1c5d6dcf39 A document
git-svn-id: file:///svn/phpbb/trunk@3272 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-07 20:47:05 +00:00
Paul S. Owen
4676461520 MD5 javascript and minor changes
git-svn-id: file:///svn/phpbb/trunk@3271 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-07 20:19:48 +00:00
Paul S. Owen
6e8683a124 And this one removes all the debugging info ...
git-svn-id: file:///svn/phpbb/trunk@3270 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-07 18:59:31 +00:00
Paul S. Owen
22389f0d32 This one has the enormous benefit of actually doing what it was supposed to do ...
git-svn-id: file:///svn/phpbb/trunk@3269 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-07 18:58:36 +00:00
Paul S. Owen
9b97e57deb Oops, forgot lang updates
git-svn-id: file:///svn/phpbb/trunk@3268 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-07 18:41:05 +00:00
Paul S. Owen
82b23fdf67 Enable exclusion from bans for users, IP's or email addresses
git-svn-id: file:///svn/phpbb/trunk@3267 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-07 18:39:24 +00:00
Paul S. Owen
493a689b1e We'll try and get it right this time ...
git-svn-id: file:///svn/phpbb/trunk@3265 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-07 14:45:12 +00:00
Paul S. Owen
d2e324fe0b Move escape functions to DB methods
git-svn-id: file:///svn/phpbb/trunk@3264 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-07 14:37:50 +00:00
Paul S. Owen
5048f1f2bc Various updates, inc. fixing non-escaping of '
git-svn-id: file:///svn/phpbb/trunk@3263 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-07 14:37:34 +00:00
Paul S. Owen
7bdb2816f9 Various updates
git-svn-id: file:///svn/phpbb/trunk@3262 89ea8834-ac86-4346-8a33-228a782c2dd0
2003-01-07 14:37:19 +00:00
Paul S. Owen
b369a1e43c Start to (re-)fix generation of "plain text" templates from compiled source for template editing
git-svn-id: file:///svn/phpbb/trunk@3166 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-12-03 13:46:33 +00:00
Paul S. Owen
ef09c7e9c9 Notes to port bug fixes from 2.0.x
git-svn-id: file:///svn/phpbb/trunk@3165 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-12-03 00:40:12 +00:00
Paul S. Owen
df3e7ab532 Redirect changes
git-svn-id: file:///svn/phpbb/trunk@3161 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-12-02 23:53:21 +00:00
Paul S. Owen
afd03ff1b8 oops
git-svn-id: file:///svn/phpbb/trunk@3107 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-27 15:15:12 +00:00
Paul S. Owen
1e8cc35b2a Changed to get ... did this break stuff before in a non-session-id related way ..hmm
git-svn-id: file:///svn/phpbb/trunk@3106 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-27 15:15:06 +00:00
Paul S. Owen
f42bf5dfd4 Minor change ... remove topic who is online listing
git-svn-id: file:///svn/phpbb/trunk@3105 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-27 15:10:19 +00:00
Paul S. Owen
fca41683d0 This should be maintained as is in CVS ... it is regenerated automatically as required.
git-svn-id: file:///svn/phpbb/trunk@3104 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-27 13:37:11 +00:00
Bart van Bragt
3b71148ddf Grmbl
git-svn-id: file:///svn/phpbb/trunk@3103 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-27 13:33:52 +00:00
Bart van Bragt
831c9b5a61 Initial Lastread support. Mind the schema and config changes\!
git-svn-id: file:///svn/phpbb/trunk@3102 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-27 13:24:46 +00:00
Paul S. Owen
16e8fb800f No point in outputting two type fields in edit
git-svn-id: file:///svn/phpbb/trunk@3100 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-26 11:26:51 +00:00
Paul S. Owen
8f051f1b47 I know the jumpbox layout doesn't always match the real forum structure ... will fix
git-svn-id: file:///svn/phpbb/trunk@3099 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-26 00:50:16 +00:00
Paul S. Owen
5f4b283a3e Paul oopsied everywhere ... bad Paul ... use your litter tray
git-svn-id: file:///svn/phpbb/trunk@3098 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-26 00:17:06 +00:00
Bart van Bragt
2f9758b912 Fixing my fix and initial checkin of markread()
git-svn-id: file:///svn/phpbb/trunk@3097 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-26 00:15:45 +00:00
Paul S. Owen
2b2dd5abc4 A few subSilver icons for forum admin
git-svn-id: file:///svn/phpbb/trunk@3096 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-25 23:52:05 +00:00
Paul S. Owen
c81c598b66 oops
git-svn-id: file:///svn/phpbb/trunk@3095 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-25 23:51:23 +00:00
Paul S. Owen
734c286f9f Some changes to forum admin to better reflect subforum 'post/non-post' changes ... no guarantees I've not broken something ... note the schema changes
git-svn-id: file:///svn/phpbb/trunk@3094 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-25 23:46:23 +00:00
Bart van Bragt
efad1f2491 Made the error handler behave responsibly when $user isn't there yet
git-svn-id: file:///svn/phpbb/trunk@3092 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-25 18:32:36 +00:00
Paul S. Owen
0f31aa8416 This should now work ... still blank screens on errors (due to way errors are now handled by db layer ... need to set return on error and handle sql errors locally in install.php)
git-svn-id: file:///svn/phpbb/trunk@3090 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-24 23:41:07 +00:00
Paul S. Owen
2c83dfae78 Updates ... so it now works again ...
git-svn-id: file:///svn/phpbb/trunk@3089 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-24 23:40:30 +00:00
Paul S. Owen
b728abd4d2 Add forum_postable to forum schema
git-svn-id: file:///svn/phpbb/trunk@3088 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-24 23:10:16 +00:00
Paul S. Owen
aedd730552 Of course it has to be more tricky than that doesn't it ... well, I'm off to bed so it can stick it up its pipe and smoke it for now :D
git-svn-id: file:///svn/phpbb/trunk@3078 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-21 22:46:12 +00:00
Paul S. Owen
bb05d733ee didn't urlencode highlighted url data ... tut tut
git-svn-id: file:///svn/phpbb/trunk@3077 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-21 22:25:03 +00:00
James Atkinson
25a3ef55be Moved profile.php to ucp.php. ucp is really really broken right now, don't even think about trying to use it.
git-svn-id: file:///svn/phpbb/trunk@3075 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-21 15:40:21 +00:00
Paul S. Owen
68ee9ffb1f Merged and condensed into posting ... for now at least.
git-svn-id: file:///svn/phpbb/trunk@3074 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-21 15:33:59 +00:00
James Atkinson
fdbeac30d1 Moving UCP files to ucp/ directory
git-svn-id: file:///svn/phpbb/trunk@3073 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-21 15:26:06 +00:00
Paul S. Owen
f44c970572 Just to get topic review working again ...
git-svn-id: file:///svn/phpbb/trunk@3072 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-21 01:35:53 +00:00
Paul S. Owen
44af262312 Got bored so added print topic output view
git-svn-id: file:///svn/phpbb/trunk@3071 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-20 23:07:01 +00:00
James Atkinson
70e6af55a8 Missing semi-colon in schema file.
git-svn-id: file:///svn/phpbb/trunk@3070 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-20 16:24:38 +00:00
Paul S. Owen
e0ea770c40 Update the version ... still somewhat meaningless but hum ho
git-svn-id: file:///svn/phpbb/trunk@3068 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-19 23:45:23 +00:00
Paul S. Owen
20b65e010c Wrong height for reply icon ... this has been bugging me for ages, but no more I say, begone disgusting wrong size entry, be gone, thou shalt never darken thy PC again
git-svn-id: file:///svn/phpbb/trunk@3067 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-19 23:28:04 +00:00
Paul S. Owen
d88ab81568 colspan missing
git-svn-id: file:///svn/phpbb/trunk@3066 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-19 23:26:43 +00:00
Paul S. Owen
de936e0bd4 Change year
git-svn-id: file:///svn/phpbb/trunk@3065 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-19 23:24:09 +00:00
Paul S. Owen
8ae487932d Update jumpbox for subforum changes
git-svn-id: file:///svn/phpbb/trunk@3064 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-19 23:12:11 +00:00
Paul S. Owen
c1fc6dce16 Further layout faffing, nav links for viewtopic (code needs merging with viewforum/posting), moderators for viewtopic
git-svn-id: file:///svn/phpbb/trunk@3063 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-19 18:55:23 +00:00
Paul S. Owen
b468fd6e29 Extra break to valign moderators and MCP link
git-svn-id: file:///svn/phpbb/trunk@3062 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-18 21:09:16 +00:00
Paul S. Owen
6e910ca116 Cache moderator names? Output moderators for all forums in viewforum. Alter a few things in templates
git-svn-id: file:///svn/phpbb/trunk@3061 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-18 21:04:45 +00:00
Paul S. Owen
ce40939e60 Cache moderator names?
git-svn-id: file:///svn/phpbb/trunk@3060 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-18 18:56:27 +00:00
Paul S. Owen
68d4dcf0d3 Output moderator list for forums
git-svn-id: file:///svn/phpbb/trunk@3059 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-18 00:20:23 +00:00
Paul S. Owen
b86d90362d Minor adjustment to subforum listing
git-svn-id: file:///svn/phpbb/trunk@3058 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-18 00:20:06 +00:00
Paul S. Owen
8636df8f62 "Fix" problem with forum_id being overwritten by sub forum listing
git-svn-id: file:///svn/phpbb/trunk@3057 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-18 00:19:47 +00:00
Paul S. Owen
2a2244a770 Remove some L_ var assignments
git-svn-id: file:///svn/phpbb/trunk@3056 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-15 12:51:57 +00:00
Paul S. Owen
335835787e More upper casing
git-svn-id: file:///svn/phpbb/trunk@3055 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-15 12:51:47 +00:00
Paul S. Owen
286e4103f6 More minor adjustments
git-svn-id: file:///svn/phpbb/trunk@3054 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-15 12:50:41 +00:00
Paul S. Owen
66af710664 Output nothing if moderator display is "off"
git-svn-id: file:///svn/phpbb/trunk@3053 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-15 12:45:28 +00:00
Paul S. Owen
3184365533 Minor layout changes
git-svn-id: file:///svn/phpbb/trunk@3052 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-15 12:44:31 +00:00
Paul S. Owen
e654727d5d Forgot to strip tags to prevent some browsers from displaying raw tags rather than removing/interpreting them
git-svn-id: file:///svn/phpbb/trunk@3031 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-13 21:53:46 +00:00
Paul S. Owen
fbe796ed21 Forum description to forum name anchor title
git-svn-id: file:///svn/phpbb/trunk@3030 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-13 21:52:40 +00:00
Paul S. Owen
8cade616ab Forum description to template
git-svn-id: file:///svn/phpbb/trunk@3029 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-13 21:52:20 +00:00
Paul S. Owen
f0da525e44 Num posted articles/topics update
git-svn-id: file:///svn/phpbb/trunk@3028 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-13 21:48:06 +00:00
Paul S. Owen
bb20ba7235 Minor change to remove total_post count
git-svn-id: file:///svn/phpbb/trunk@3027 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-13 21:48:01 +00:00
Paul S. Owen
2fe1f1bc65 Fix couple of errors ... you should run UPDATE phpbb_users SET user_permissions = '' after this update
git-svn-id: file:///svn/phpbb/trunk@3026 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-13 21:33:13 +00:00
Paul S. Owen
5a7e3a3bb3 Part of memberslist now
git-svn-id: file:///svn/phpbb/trunk@3025 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-12 20:55:46 +00:00
Paul S. Owen
b5ad02cb2c Re-activated user search
git-svn-id: file:///svn/phpbb/trunk@3024 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-12 20:55:18 +00:00
Paul S. Owen
5d426363c6 REGISTERED_INACTIVE to INACTIVE special group name change
git-svn-id: file:///svn/phpbb/trunk@3023 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-09 00:47:42 +00:00
Paul S. Owen
782482df38 More key changes ...
git-svn-id: file:///svn/phpbb/trunk@3022 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-09 00:47:14 +00:00
Paul S. Owen
9d2219b39a Give the special groups a special constant ...to make them feel, well, special.
git-svn-id: file:///svn/phpbb/trunk@3021 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-09 00:45:34 +00:00
Paul S. Owen
1405e47fc1 Mainly updates for additional/altered admin permission options ... note, you MUST empty your current auth_options table and insert the list from the mysql_basic, you will also need to empty the auth_user/auth_group tables and re-assign permissions, and you should clear the $acl_options array in config_cache
git-svn-id: file:///svn/phpbb/trunk@3020 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-09 00:04:18 +00:00
Paul S. Owen
1c5f838a2d Incorrect check on moderated forum field
git-svn-id: file:///svn/phpbb/trunk@3019 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-08 10:59:00 +00:00
Ludovic Arnaud
097a1caca8 Cleaned up viewforum/index, altered template class to replace missing lang strings with a nicely formatted text, pre-implemented topics prefetching and broke some things.
git-svn-id: file:///svn/phpbb/trunk@3018 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-08 03:33:58 +00:00
Paul S. Owen
5d859740ee A few key changes for template alterations ... note that this will currently cause some blank output, particularly for form buttons in admin
git-svn-id: file:///svn/phpbb/trunk@3017 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-07 23:21:56 +00:00
Paul S. Owen
4092e36cca These changes mean you no longer have to assign L_ vars values (unless you want/need to) ... the relevant entry in the lang array will automatically be used if a var isn't assigned
git-svn-id: file:///svn/phpbb/trunk@3016 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-07 23:21:14 +00:00
Paul S. Owen
021929b31f oops
git-svn-id: file:///svn/phpbb/trunk@3015 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-07 22:12:04 +00:00
Paul S. Owen
8f14946d09 Update parent forums upon posting, show navlinks ... should create a function for this given commonality with viewtopic/viewforum
git-svn-id: file:///svn/phpbb/trunk@3014 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-07 22:02:49 +00:00
Paul S. Owen
97de599ae8 HTML stuff
git-svn-id: file:///svn/phpbb/trunk@3013 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-07 22:02:04 +00:00
Paul S. Owen
7366bd9e41 Fix a couple of issues, hopefully haven't broken anything Ashe was planning ...
git-svn-id: file:///svn/phpbb/trunk@3012 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-07 21:45:34 +00:00
Ludovic Arnaud
cfd055f979 Subforums update take #1
git-svn-id: file:///svn/phpbb/trunk@3011 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-07 03:39:50 +00:00
Ludovic Arnaud
7cda8ec239 Subforums update take #1
git-svn-id: file:///svn/phpbb/trunk@3010 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-07 03:20:33 +00:00
Ludovic Arnaud
e9e9716acc Experimental: link to the first unread post without redirection
git-svn-id: file:///svn/phpbb/trunk@3009 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-05 07:03:14 +00:00
Ludovic Arnaud
a583f7bd10 ALTER TABLE phpbb_smilies CHANGE smile_on_posting display_on_posting
git-svn-id: file:///svn/phpbb/trunk@3008 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-05 06:38:09 +00:00
Ludovic Arnaud
bc6e36ef4f viewforum queries update + a couple of bugfixes.
git-svn-id: file:///svn/phpbb/trunk@3007 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-05 04:50:55 +00:00
Paul S. Owen
5b73ad4cbd Fix autologin issues
git-svn-id: file:///svn/phpbb/trunk@3006 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-02 21:44:36 +00:00
Ludovic Arnaud
97978b69f1 Some bugfixes, quick-(un)locking now works.
git-svn-id: file:///svn/phpbb/trunk@3005 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-01 21:35:41 +00:00
Paul S. Owen
ac0c0f5247 More minor changes
git-svn-id: file:///svn/phpbb/trunk@3004 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-01 15:40:22 +00:00
Paul S. Owen
ab669d0f04 Minor change to add navlinks to bottom of form
git-svn-id: file:///svn/phpbb/trunk@3003 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-01 14:48:45 +00:00
Paul S. Owen
96c024b85f floatval to doubleval for 4.1.x
git-svn-id: file:///svn/phpbb/trunk@3002 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-01 14:44:31 +00:00
Paul S. Owen
c5ec313d53 oops, forgot to change credits ...
git-svn-id: file:///svn/phpbb/trunk@3001 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-01 14:39:29 +00:00
Paul S. Owen
7f93e95ffd Too processor intensive
git-svn-id: file:///svn/phpbb/trunk@3000 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-01 14:37:53 +00:00
Paul S. Owen
fea84a1016 Change color picker to SHS` unixsafe palette ... feedback on rendering time welcome + moved out lots of javascript
git-svn-id: file:///svn/phpbb/trunk@2999 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-01 14:37:12 +00:00
Paul S. Owen
9c0435c01a Change color picker to SHS` unixsafe palette ... feedback on rendering time welcome
git-svn-id: file:///svn/phpbb/trunk@2998 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-01 14:36:39 +00:00
Paul S. Owen
6fa38a1181 Various, typically posting related updates
git-svn-id: file:///svn/phpbb/trunk@2997 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-11-01 12:23:08 +00:00
Paul S. Owen
1a67029fcd sigh
git-svn-id: file:///svn/phpbb/trunk@2996 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-31 13:47:00 +00:00
Paul S. Owen
2bf1c5f9b0 Smilies enabled ... note this is not necessarily final ...
git-svn-id: file:///svn/phpbb/trunk@2995 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-31 13:41:28 +00:00
Paul S. Owen
da3121c0fd doubleval for load config, session to user var name change
git-svn-id: file:///svn/phpbb/trunk@2994 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-31 12:09:51 +00:00
Ludovic Arnaud
29f583c626 Minor changes, trying to get it working on my test server
git-svn-id: file:///svn/phpbb/trunk@2993 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-31 03:20:54 +00:00
Paul S. Owen
8f0890acd1 Magic URL updates
git-svn-id: file:///svn/phpbb/trunk@2992 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-31 00:51:00 +00:00
Paul S. Owen
72f1ad476a oops
git-svn-id: file:///svn/phpbb/trunk@2991 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-31 00:02:10 +00:00
Paul S. Owen
282e7ec58a Couple further updates
git-svn-id: file:///svn/phpbb/trunk@2990 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-30 23:50:50 +00:00
Paul S. Owen
5abbc58deb moderate == moderated, thanks SHS`
git-svn-id: file:///svn/phpbb/trunk@2989 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-30 23:27:11 +00:00
Paul S. Owen
ebdb61373b Fixes and reversions (temp)
git-svn-id: file:///svn/phpbb/trunk@2988 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-30 23:26:35 +00:00
Paul S. Owen
1b259b300e These ones probably work ...
git-svn-id: file:///svn/phpbb/trunk@2987 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-30 20:05:18 +00:00
Paul S. Owen
0a4f369681 Dumped sql_query_array, replaced with build_array, posting updates, fixed quoting in mysql layers, fulltext enabled ... speed/problem feedback welcome
git-svn-id: file:///svn/phpbb/trunk@2986 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-30 18:59:09 +00:00
Paul S. Owen
9273252cfc sqLquote subject ...
git-svn-id: file:///svn/phpbb/trunk@2985 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-30 01:02:48 +00:00
Paul S. Owen
18f9fa60a7 acl_get not get_acl
git-svn-id: file:///svn/phpbb/trunk@2984 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-30 01:00:31 +00:00
Paul S. Owen
691f50ada9 Changed $board_config to $config, more posting "stuff", altered polling code in viewtopic and loads of new problems, poor coding, etc. created :)
git-svn-id: file:///svn/phpbb/trunk@2983 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-30 00:57:27 +00:00
Paul S. Owen
9075298051 Merged back into functions ... not worth a seperate file @ only 4kb
git-svn-id: file:///svn/phpbb/trunk@2982 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-29 16:11:29 +00:00
Paul S. Owen
56ca392f4e Minor updates for syncing, sql quoting, etc.
git-svn-id: file:///svn/phpbb/trunk@2981 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-28 20:39:06 +00:00
Paul S. Owen
c581ae15c2 sql_quote fixed
git-svn-id: file:///svn/phpbb/trunk@2980 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-28 20:38:53 +00:00
Paul S. Owen
98f17b0f75 Removed function, replaced missing functionality
git-svn-id: file:///svn/phpbb/trunk@2979 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-28 00:45:06 +00:00
Paul S. Owen
34921891bb Moved to en
git-svn-id: file:///svn/phpbb/trunk@2978 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-28 00:36:16 +00:00
Paul S. Owen
45f2496110 Contains the language name
git-svn-id: file:///svn/phpbb/trunk@2977 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-28 00:35:08 +00:00
Paul S. Owen
de4133420a Rules and lang changes
git-svn-id: file:///svn/phpbb/trunk@2976 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-28 00:34:43 +00:00
Paul S. Owen
33e84f8ea0 Rules updates
git-svn-id: file:///svn/phpbb/trunk@2975 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-28 00:25:38 +00:00
Paul S. Owen
44c9dacbde Layout and form updates
git-svn-id: file:///svn/phpbb/trunk@2974 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-28 00:25:03 +00:00
Paul S. Owen
3e2e5dc4f2 mysql4 update
git-svn-id: file:///svn/phpbb/trunk@2973 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-28 00:09:48 +00:00
Paul S. Owen
595a39122f Posting and acl option updates
git-svn-id: file:///svn/phpbb/trunk@2972 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-28 00:08:18 +00:00
Paul S. Owen
7cc1dbf6b0 nav link index title change
git-svn-id: file:///svn/phpbb/trunk@2971 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-26 21:56:33 +00:00
Paul S. Owen
1edc9d362f Preliminary 'freeze' on permissions awaiting developer feedback, testing, etc. Caching of non-dynmaic config and acl option elements.
git-svn-id: file:///svn/phpbb/trunk@2970 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-26 12:36:38 +00:00
Paul S. Owen
a7d186fd91 Preliminary 'freeze' on permissions system awaiting developer feedback, testing, etc. Caching of non-dynmaic config and acl option elements.
git-svn-id: file:///svn/phpbb/trunk@2969 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-26 12:34:39 +00:00
Paul S. Owen
6d0738ff22 Cache file -> needs to have appropriate write permissions set on server
git-svn-id: file:///svn/phpbb/trunk@2968 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-26 12:32:09 +00:00
Paul S. Owen
2b8cb26e6b A few ideas and tests
git-svn-id: file:///svn/phpbb/trunk@2963 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-22 17:33:10 +00:00
Paul S. Owen
6ebc8de14c bah, various issues, assign lang to this->lang via pointer(?)
git-svn-id: file:///svn/phpbb/trunk@2962 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-21 14:10:45 +00:00
Ludovic Arnaud
413cd7bf03 My contribution for today: 1 extra byte
git-svn-id: file:///svn/phpbb/trunk@2960 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-20 22:50:41 +00:00
Paul S. Owen
d5a41ebfa0 It's been a while ...
git-svn-id: file:///svn/phpbb/trunk@2959 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-20 19:19:59 +00:00
Paul S. Owen
0e9f0ac4ec Mostly changes to turn userdata into user->data, lang into user->lang + bitstring 2nd format + inheritance for permission admin and various other updates/fixes/changes ... note that user->lang & user->theme isn't final
git-svn-id: file:///svn/phpbb/trunk@2958 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-20 19:19:07 +00:00
Paul S. Owen
4887cf1e49 Will it stay or will it go now ... hang on, I believe someone's already written that track ...
git-svn-id: file:///svn/phpbb/trunk@2957 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-20 19:15:59 +00:00
Paul S. Owen
bd2cf21a05 They shouldn't still be there ...
git-svn-id: file:///svn/phpbb/trunk@2956 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-18 23:25:17 +00:00
Ludovic Arnaud
48727c433f Random bugfixes, (hopefully) improved admin panel security.
git-svn-id: file:///svn/phpbb/trunk@2955 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-17 02:56:11 +00:00
Ludovic Arnaud
80864fa7ee Random bugfixes, (hopefully) improved admin panel security.
git-svn-id: file:///svn/phpbb/trunk@2954 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-17 02:50:50 +00:00
Ludovic Arnaud
fafd167dde More jumpbox stuff, still not happy with the layout though =(
git-svn-id: file:///svn/phpbb/trunk@2953 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-11 02:55:34 +00:00
Ludovic Arnaud
1e52eafc80 Minor bugfix (subforums template was called even if there only were empty subcats).
Jumpbox got its "Select a forum" entry back.


git-svn-id: file:///svn/phpbb/trunk@2952 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-11 02:24:00 +00:00
Ludovic Arnaud
58ddae0c90 More bugfixes
git-svn-id: file:///svn/phpbb/trunk@2951 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-10 01:02:47 +00:00
Ludovic Arnaud
c677640b64 Bugfix (disappearing forum names) + enabled jumpbox and modified it to allow category jumping.
git-svn-id: file:///svn/phpbb/trunk@2950 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-10 00:35:35 +00:00
Paul S. Owen
4a2f986943 oops, that got broke ... removed some now superfluous code
git-svn-id: file:///svn/phpbb/trunk@2949 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-09 20:53:42 +00:00
Ludovic Arnaud
369189806b Added the redirect() function for nice and clean redirection.
git-svn-id: file:///svn/phpbb/trunk@2948 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-09 19:50:48 +00:00
Paul S. Owen
ac4b54ff4d missing global
git-svn-id: file:///svn/phpbb/trunk@2947 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-08 22:14:22 +00:00
Paul S. Owen
8b21ebbdab Of little use since the whole user admin interface will need rewriting
git-svn-id: file:///svn/phpbb/trunk@2946 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-08 21:50:02 +00:00
Paul S. Owen
521760fe50 missed method name change
git-svn-id: file:///svn/phpbb/trunk@2945 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-08 21:48:02 +00:00
Paul S. Owen
2c16ed7248 Minor changes to select box
git-svn-id: file:///svn/phpbb/trunk@2944 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-08 21:01:25 +00:00
Paul S. Owen
1d0e4ee436 Permission related updates ... is still not final but is getting there ... faster than British Rail too
git-svn-id: file:///svn/phpbb/trunk@2943 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-08 20:11:59 +00:00
Paul S. Owen
64aee6d171 Permission changes, updates admin functions, indented jumpboxes ... note that the update script doesn't seem to introduce the user_permissions field @ present so you need to add it manually
git-svn-id: file:///svn/phpbb/trunk@2942 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-08 20:06:55 +00:00
Paul S. Owen
c0a0d11d08 Stale lock should be gone ... thanks to whoever contributed these images
git-svn-id: file:///svn/phpbb/trunk@2941 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-08 17:50:26 +00:00
Ludovic Arnaud
a5a63df36f Fixed last poster name, dumped categories table.
git-svn-id: file:///svn/phpbb/trunk@2939 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-07 01:07:41 +00:00
Ludovic Arnaud
cf0ac8d631 Fixed demo topic not showing up after install.
git-svn-id: file:///svn/phpbb/trunk@2938 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-07 01:00:09 +00:00
Ludovic Arnaud
8b5482d320 Err... max() actually needs two args :D
git-svn-id: file:///svn/phpbb/trunk@2937 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-07 00:48:51 +00:00
Paul S. Owen
7a8b0a6f27 auth comments, cache(?)
git-svn-id: file:///svn/phpbb/trunk@2936 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-06 11:57:45 +00:00
Paul S. Owen
803cc378dd anonymous user takes id = 0, smilies have width and height terms
git-svn-id: file:///svn/phpbb/trunk@2934 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-05 23:48:11 +00:00
Paul S. Owen
123dea7a06 Change admin lang to en by default ... prevents admin/viewonline chocking
git-svn-id: file:///svn/phpbb/trunk@2933 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-05 23:40:34 +00:00
Paul S. Owen
1eeecbd075 wrong field name, oops
git-svn-id: file:///svn/phpbb/trunk@2932 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-05 11:38:10 +00:00
Paul S. Owen
3dc658f3ea Switch to user class(?)
git-svn-id: file:///svn/phpbb/trunk@2931 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-05 10:25:40 +00:00
Paul S. Owen
81f9eccb94 Is this quicker or slower than the for loop/concat method for comparing the IPs?
git-svn-id: file:///svn/phpbb/trunk@2930 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-05 00:21:35 +00:00
Paul S. Owen
64a01741f9 another oopsie in sessions + whos online fix for forum_id in page_header (index displays correctly now)
git-svn-id: file:///svn/phpbb/trunk@2929 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-05 00:08:47 +00:00
Paul S. Owen
f4858c1b7d oops, forgot to replace if ...
git-svn-id: file:///svn/phpbb/trunk@2928 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-04 23:54:50 +00:00
Paul S. Owen
2ff0cd6907 Associative array change ...
git-svn-id: file:///svn/phpbb/trunk@2927 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-04 23:42:20 +00:00
Paul S. Owen
d1564db4be prune_enable re-added ... is it still required ... couldn't prune_freq be used as an indicator?
git-svn-id: file:///svn/phpbb/trunk@2926 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-04 23:38:42 +00:00
Paul S. Owen
f00afb8550 Overcome last visit issue (in a 'way'), reduce work gc has to do ... hopefully without screwing up what it does ... but this is a "Paul production" so anything is possible ...
git-svn-id: file:///svn/phpbb/trunk@2925 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-04 23:37:07 +00:00
Ludovic Arnaud
7dbb4fd6ec Now this build can be installed without any error.
git-svn-id: file:///svn/phpbb/trunk@2924 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-04 21:57:08 +00:00
Paul S. Owen
30aeac65dc Well, here are all my changes ... don't blame me if things break :D
git-svn-id: file:///svn/phpbb/trunk@2923 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-04 13:09:10 +00:00
Paul S. Owen
b5bbc005a5 Written by mat100 ... modified slightly for CVS
git-svn-id: file:///svn/phpbb/trunk@2922 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-04 13:02:54 +00:00
Paul S. Owen
35d7bfcca7 Includes the color Mod javascript written by mat100
git-svn-id: file:///svn/phpbb/trunk@2921 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-04 13:02:22 +00:00
Paul S. Owen
9ea1bc91e9 ISO
git-svn-id: file:///svn/phpbb/trunk@2920 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-04 12:40:07 +00:00
Paul S. Owen
3d6f2caccb Name change
git-svn-id: file:///svn/phpbb/trunk@2919 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-04 10:14:52 +00:00
Ludovic Arnaud
71c288bd21 I updated my copy with the Area51 template so here it is, along with a couple of bugfixes :]
git-svn-id: file:///svn/phpbb/trunk@2918 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-03 23:50:39 +00:00
Ludovic Arnaud
aee5fbcd8a I updated my copy with the Area51 template so here it is, along with a couple of bugfixes :]
git-svn-id: file:///svn/phpbb/trunk@2917 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-03 23:32:45 +00:00
Ludovic Arnaud
743460bd80 Subforums part 3: "the one that actually works"
git-svn-id: file:///svn/phpbb/trunk@2916 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-03 19:44:58 +00:00
Ludovic Arnaud
4c82531712 Setting error reporting to the highest level have benefits.
git-svn-id: file:///svn/phpbb/trunk@2915 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-03 02:49:47 +00:00
Ludovic Arnaud
2d99854ce8 Subforums handling part 2, new files.
git-svn-id: file:///svn/phpbb/trunk@2914 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-03 02:46:32 +00:00
Ludovic Arnaud
268d936f46 Subforums handling part 2, it almost works. Also added: the "Explain" link at the bottom page, can be removed easily before official release if necessary.
git-svn-id: file:///svn/phpbb/trunk@2913 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-03 02:43:41 +00:00
Ludovic Arnaud
1666e7d3e7 First implementation of subforums handling in index.
git-svn-id: file:///svn/phpbb/trunk@2912 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-10-01 21:41:57 +00:00
Ludovic Arnaud
6752c2a168 No need to be paranoid about direct access to this file, removed $mtime reference.
git-svn-id: file:///svn/phpbb/trunk@2910 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-09-29 20:45:57 +00:00
Ludovic Arnaud
e1e52497fa Preimplementation of smilies order, "smilies" changed into "emoticons" as per Bart comment and sql_query_array() fixed to allow FALSE values
git-svn-id: file:///svn/phpbb/trunk@2893 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-09-19 01:11:32 +00:00
Ludovic Arnaud
13307c1360 New smilies admin, a bug fixed in mysql.php and a left join removed from admin_forums.php
git-svn-id: file:///svn/phpbb/trunk@2891 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-09-18 04:38:17 +00:00
Ludovic Arnaud
66e0b32220 Forums management updated, now able to delete forums
git-svn-id: file:///svn/phpbb/trunk@2890 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-09-16 15:22:52 +00:00
Ludovic Arnaud
eef332eea5 Cleanups
git-svn-id: file:///svn/phpbb/trunk@2889 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-09-15 17:21:08 +00:00
Ludovic Arnaud
8d6c391d48 First commit of updated forums management panel - crossing fingers
git-svn-id: file:///svn/phpbb/trunk@2888 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-09-15 16:14:35 +00:00
Paul S. Owen
0226e8602a Instantiate template and set template path from seperate method
git-svn-id: file:///svn/phpbb/trunk@2882 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-22 21:40:51 +00:00
Paul S. Owen
eca02e139c Garbage collection update
git-svn-id: file:///svn/phpbb/trunk@2881 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-22 21:17:02 +00:00
Paul S. Owen
d0f8b34e23 Wrong var name for gc method
git-svn-id: file:///svn/phpbb/trunk@2880 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-22 17:55:55 +00:00
Paul S. Owen
69e89c9067 Forum/Topic marking updates
git-svn-id: file:///svn/phpbb/trunk@2879 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-22 13:58:35 +00:00
Paul S. Owen
6cf59bc2e9 Define auth_values which can only be manipulated by the forum founder
git-svn-id: file:///svn/phpbb/trunk@2878 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-19 17:58:06 +00:00
Paul S. Owen
419ae3e549 More updates
git-svn-id: file:///svn/phpbb/trunk@2877 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-18 17:36:01 +00:00
Paul S. Owen
d5f0bfc3e1 Related to permission changes ...
git-svn-id: file:///svn/phpbb/trunk@2876 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-18 00:33:30 +00:00
Paul S. Owen
bca30bbe48 Failed on no groups ...
git-svn-id: file:///svn/phpbb/trunk@2875 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-17 23:58:03 +00:00
Paul S. Owen
27838c6f02 updated schema for update_script changes ...
git-svn-id: file:///svn/phpbb/trunk@2874 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-17 23:23:20 +00:00
Paul S. Owen
4a5f17c131 checked and it works ... or appears to from a 2.0.x install
git-svn-id: file:///svn/phpbb/trunk@2873 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-17 23:08:39 +00:00
Paul S. Owen
0d72ddd0ad Various updates
git-svn-id: file:///svn/phpbb/trunk@2872 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-17 22:52:23 +00:00
Paul S. Owen
50eae551cd *** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@2871 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-17 22:22:59 +00:00
Paul S. Owen
f28585bedd no comment
git-svn-id: file:///svn/phpbb/trunk@2870 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-17 22:21:59 +00:00
Paul S. Owen
655e905313 ...
git-svn-id: file:///svn/phpbb/trunk@2869 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-17 22:14:48 +00:00
Paul S. Owen
682b29d9b5 damn it damn it damn it
git-svn-id: file:///svn/phpbb/trunk@2868 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-17 22:12:23 +00:00
Paul S. Owen
d0f2ed7fb6 oopsie
git-svn-id: file:///svn/phpbb/trunk@2867 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-17 22:11:31 +00:00
Paul S. Owen
26190e5c3b Some sql changes
git-svn-id: file:///svn/phpbb/trunk@2866 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-17 22:08:34 +00:00
Paul S. Owen
ecf33211ec Anonymous takes user_id = 0 ... hopefully this will not cause problems on the various supported DB's ...
git-svn-id: file:///svn/phpbb/trunk@2865 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-16 17:50:38 +00:00
Paul S. Owen
c261dfa420 damn it, wrong table for now ...
git-svn-id: file:///svn/phpbb/trunk@2864 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-16 17:31:22 +00:00
Paul S. Owen
65805038b7 various updates
git-svn-id: file:///svn/phpbb/trunk@2863 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-16 17:14:37 +00:00
Paul S. Owen
f8fa2d31f3 Many updates, should upgrade any previous dated release ... note that it will have 'problems' with boards running updated CVS ... need to ignore a number of errors in code
git-svn-id: file:///svn/phpbb/trunk@2862 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-16 17:05:44 +00:00
Paul S. Owen
f47f503fec another oopsie
git-svn-id: file:///svn/phpbb/trunk@2861 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-16 01:25:25 +00:00
Paul S. Owen
19f78622b0 permission stuff .. what else ...
git-svn-id: file:///svn/phpbb/trunk@2860 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-16 01:21:50 +00:00
Paul S. Owen
03f5d64e39 ooops
git-svn-id: file:///svn/phpbb/trunk@2859 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-16 01:15:41 +00:00
Paul S. Owen
8e3bbcde6f Idiot
git-svn-id: file:///svn/phpbb/trunk@2858 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-15 16:31:07 +00:00
Paul S. Owen
832c29d3f5 permission changes
git-svn-id: file:///svn/phpbb/trunk@2857 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-15 16:02:48 +00:00
Paul S. Owen
807f003c99 forum_style not default_style
git-svn-id: file:///svn/phpbb/trunk@2856 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-15 16:01:12 +00:00
Paul S. Owen
84dacf840d !
git-svn-id: file:///svn/phpbb/trunk@2855 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-15 15:57:21 +00:00
Paul S. Owen
8809cd7121 Permission related updates
git-svn-id: file:///svn/phpbb/trunk@2854 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-15 15:47:43 +00:00
Paul S. Owen
8bf310b6b2 More session changes to accomodate ACL_PERMIT/PREVENT ...
git-svn-id: file:///svn/phpbb/trunk@2853 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-15 15:45:22 +00:00
Paul S. Owen
67f4e334ec ggrr
git-svn-id: file:///svn/phpbb/trunk@2852 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-13 16:44:05 +00:00
Paul S. Owen
ce3591abfb Where did that dunce cap go?
git-svn-id: file:///svn/phpbb/trunk@2851 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-13 16:41:31 +00:00
Paul S. Owen
ea2d31b58f oopsie, that version wasn't ready for commit ....
git-svn-id: file:///svn/phpbb/trunk@2850 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-13 16:40:34 +00:00
Paul S. Owen
38b8e4b801 More changes ... switched away from prefetch for now ...
git-svn-id: file:///svn/phpbb/trunk@2849 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-13 16:34:17 +00:00
Paul S. Owen
a7cda845fa Permit, Prevent options ... I wonder if any other board will miraculously gain these ...
git-svn-id: file:///svn/phpbb/trunk@2848 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-12 14:20:50 +00:00
Paul S. Owen
71468f8071 DB utils related additions/changes
git-svn-id: file:///svn/phpbb/trunk@2847 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-08 20:56:48 +00:00
Paul S. Owen
943545558e Various updates and additions
git-svn-id: file:///svn/phpbb/trunk@2846 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-08 20:56:34 +00:00
Paul S. Owen
523bf91b36 Insert any new fields required by auth plugins
git-svn-id: file:///svn/phpbb/trunk@2840 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-07 13:03:05 +00:00
Paul S. Owen
2b0b8993e7 Return required config fields to board admin
git-svn-id: file:///svn/phpbb/trunk@2839 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-07 13:02:48 +00:00
Paul S. Owen
702761f40b Authentication stuff ... plugins generate any HTML form stuff they require
git-svn-id: file:///svn/phpbb/trunk@2838 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-07 01:12:11 +00:00
Paul S. Owen
2c55d91ef8 Authentication stuff
git-svn-id: file:///svn/phpbb/trunk@2837 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-07 01:11:51 +00:00
Paul S. Owen
42d197b780 Fix errors, add admin output for ldap
git-svn-id: file:///svn/phpbb/trunk@2836 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-07 01:11:38 +00:00
Paul S. Owen
284dc92e08 LDAP config options
git-svn-id: file:///svn/phpbb/trunk@2835 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-07 00:06:27 +00:00
Paul S. Owen
bab1021f8c Rule output changes ... no point in limiting delete/attach just to viewtopic ...
git-svn-id: file:///svn/phpbb/trunk@2834 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-07 00:03:14 +00:00
Paul S. Owen
3a662e24f4 Change connection limit to session per minute limit ... maybe more 'general' ?
git-svn-id: file:///svn/phpbb/trunk@2833 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-07 00:02:08 +00:00
Paul S. Owen
16922e62e3 Minor changes ... oh and to vB developers ... remember, when using ideas from our schemas the copyright should read "(C) 2002 phpBB Group" ... ;)
git-svn-id: file:///svn/phpbb/trunk@2832 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-07 00:01:18 +00:00
Paul S. Owen
d299df3b25 Various updates ...
git-svn-id: file:///svn/phpbb/trunk@2831 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-06 23:58:27 +00:00
Paul S. Owen
6e6c85b9b7 Bad redirect on login from form
git-svn-id: file:///svn/phpbb/trunk@2830 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-06 21:22:51 +00:00
Paul S. Owen
6c3bc8ceab Ooops, this may help I guess ...
git-svn-id: file:///svn/phpbb/trunk@2829 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-06 17:13:17 +00:00
Paul S. Owen
f8ea2a46a8 Auth plug-in, say thanks to Sergey Kanareykin
git-svn-id: file:///svn/phpbb/trunk@2828 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-06 16:56:14 +00:00
Paul S. Owen
685c8b0669 Guess ...
git-svn-id: file:///svn/phpbb/trunk@2827 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-06 15:40:25 +00:00
Paul S. Owen
67182dac72 Changed things ... in various ways ... I think
git-svn-id: file:///svn/phpbb/trunk@2826 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-06 15:32:25 +00:00
Paul S. Owen
6812929e37 This bug courteousy of "The Idiot Song" (c) P. Owen : All Rights Reserved
git-svn-id: file:///svn/phpbb/trunk@2825 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-06 15:21:20 +00:00
Paul S. Owen
fc1aed076e Various updates
git-svn-id: file:///svn/phpbb/trunk@2824 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-06 13:55:05 +00:00
Paul S. Owen
88c64f4505 Wrong footer .. what a shock
git-svn-id: file:///svn/phpbb/trunk@2823 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-06 00:50:06 +00:00
Paul S. Owen
5750fb8353 bye bye computer
git-svn-id: file:///svn/phpbb/trunk@2822 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-05 15:01:48 +00:00
Paul S. Owen
3f8d62a645 The next thing to go wrong causes this computer to go flying ...
git-svn-id: file:///svn/phpbb/trunk@2821 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-05 15:00:33 +00:00
Paul S. Owen
ac288081ba message_die admin header/footer update
git-svn-id: file:///svn/phpbb/trunk@2820 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-05 14:59:47 +00:00
Paul S. Owen
3754702825 what tintyint? I see no tintyint ....
git-svn-id: file:///svn/phpbb/trunk@2819 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-05 00:48:32 +00:00
Paul S. Owen
09b7d6b2b9 Updates, removed included header/footer (merged into functions within pagestart)
git-svn-id: file:///svn/phpbb/trunk@2817 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-04 13:58:52 +00:00
Paul S. Owen
ca71651767 Various updates
git-svn-id: file:///svn/phpbb/trunk@2816 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-03 23:52:33 +00:00
Paul S. Owen
66295f4bda Couple of X/HTML 4.01 Transitional validation errors
git-svn-id: file:///svn/phpbb/trunk@2814 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-02 19:19:54 +00:00
Paul S. Owen
dd74309709 Log category ... naughty Paul, stop putting off working on permissions ... smack handy
git-svn-id: file:///svn/phpbb/trunk@2813 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-02 17:21:31 +00:00
Paul S. Owen
0c27202137 log function name change
git-svn-id: file:///svn/phpbb/trunk@2812 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-02 16:45:45 +00:00
Paul S. Owen
97798bb0b2 Add moderator log viewing
git-svn-id: file:///svn/phpbb/trunk@2811 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-02 16:39:59 +00:00
Paul S. Owen
74d60e4c1a Pagination updates ... new function for on_page
git-svn-id: file:///svn/phpbb/trunk@2810 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-02 16:39:02 +00:00
Paul S. Owen
7d1f1b4596 Sort fixes
git-svn-id: file:///svn/phpbb/trunk@2809 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-02 12:50:24 +00:00
Paul S. Owen
7eae8a7c1a & => &amp;
git-svn-id: file:///svn/phpbb/trunk@2808 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-01 22:05:49 +00:00
Paul S. Owen
06d5d0bbe2 Updates to admin_styles, initial theme edit implementation
git-svn-id: file:///svn/phpbb/trunk@2807 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-01 22:05:07 +00:00
Paul S. Owen
43fc9da25e Full of debug print outs but hum ho
git-svn-id: file:///svn/phpbb/trunk@2806 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-01 16:41:04 +00:00
Paul S. Owen
b1c816b114 Full of debug printouts but hum ho
git-svn-id: file:///svn/phpbb/trunk@2805 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-01 16:40:42 +00:00
Paul S. Owen
b5a9c86e7e Damn missing SID
git-svn-id: file:///svn/phpbb/trunk@2804 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-01 16:15:36 +00:00
Paul S. Owen
f4eb27763b phpBB Logo goes to forum index
git-svn-id: file:///svn/phpbb/trunk@2803 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-01 16:14:18 +00:00
Paul S. Owen
0cea5122b9 Log string re-arrangements
git-svn-id: file:///svn/phpbb/trunk@2802 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-01 15:38:09 +00:00
Paul S. Owen
0873f243ca Often helps to send the required variables to the page that actually makes use of them ...
git-svn-id: file:///svn/phpbb/trunk@2801 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-01 14:39:50 +00:00
Paul S. Owen
3aceae9272 Non-slashed serialised data for admin logs... oops
git-svn-id: file:///svn/phpbb/trunk@2800 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-01 14:08:18 +00:00
Paul S. Owen
aab6df3ce4 Log actions
git-svn-id: file:///svn/phpbb/trunk@2799 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-01 14:04:41 +00:00
Paul S. Owen
3de8299362 User prune admin initials ... doesn't coimplete task at present ... till we handle deletion of posts there is not point
git-svn-id: file:///svn/phpbb/trunk@2798 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-08-01 13:49:22 +00:00
Paul S. Owen
cea28bc26c Some implementation of hard coded HTML
git-svn-id: file:///svn/phpbb/trunk@2795 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-30 01:05:09 +00:00
Paul S. Owen
56eea32ffd Append _cat to category names
git-svn-id: file:///svn/phpbb/trunk@2794 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-30 01:04:52 +00:00
Paul S. Owen
55c1db0449 Nope, still doesn't actually do anything ... just further layout et al updates
git-svn-id: file:///svn/phpbb/trunk@2793 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-30 01:04:12 +00:00
Paul S. Owen
5e704d622c More permission strings ...
git-svn-id: file:///svn/phpbb/trunk@2792 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-30 01:03:35 +00:00
Paul S. Owen
8ff2db064e Permission updates ... again it's mainly layout rather than actual capability ...
git-svn-id: file:///svn/phpbb/trunk@2791 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-29 23:28:01 +00:00
Paul S. Owen
0e3d8d07b5 Permission stuff again
git-svn-id: file:///svn/phpbb/trunk@2790 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-29 23:27:41 +00:00
Paul S. Owen
cf60a775f4 Prelim administrators management layout ...
git-svn-id: file:///svn/phpbb/trunk@2789 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-29 18:08:58 +00:00
Paul S. Owen
33a9c6df9f Need to look-see @ group output
git-svn-id: file:///svn/phpbb/trunk@2788 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-29 17:50:54 +00:00
Paul S. Owen
06e1e97778 Missed options for global email disable and min/max chars for search indexing ...
git-svn-id: file:///svn/phpbb/trunk@2786 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-29 11:23:45 +00:00
Paul S. Owen
03f9b1f98b Well, Doug asked for it so ... now I really am going to bed.
git-svn-id: file:///svn/phpbb/trunk@2784 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-29 02:01:16 +00:00
Paul S. Owen
eff7c5e37d Fix few schema errors
git-svn-id: file:///svn/phpbb/trunk@2783 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-29 00:31:57 +00:00
Paul S. Owen
962f439057 Add sid to redirects
git-svn-id: file:///svn/phpbb/trunk@2782 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-29 00:22:31 +00:00
Paul S. Owen
d700814a7d Fix login for moz et al
git-svn-id: file:///svn/phpbb/trunk@2781 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-29 00:20:02 +00:00
Paul S. Owen
95358ec77c oops, wrong var name
git-svn-id: file:///svn/phpbb/trunk@2780 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-29 00:00:16 +00:00
Paul S. Owen
862fb87e51 Missed settings and some reorg ...
git-svn-id: file:///svn/phpbb/trunk@2779 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-28 23:56:26 +00:00
Paul S. Owen
4fce84ef0a Log actions
git-svn-id: file:///svn/phpbb/trunk@2778 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-28 19:50:43 +00:00
Paul S. Owen
1cf0a19dd1 Missing setting of checked for disabled user reg
git-svn-id: file:///svn/phpbb/trunk@2777 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-28 19:41:48 +00:00
Paul S. Owen
655a057e90 extra constant
git-svn-id: file:///svn/phpbb/trunk@2776 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-28 19:41:21 +00:00
Paul S. Owen
b61163b76b Tidy code a little
git-svn-id: file:///svn/phpbb/trunk@2775 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-28 17:31:11 +00:00
Paul S. Owen
eabb8b1e5b Another bites the dust ... (c) Queen
git-svn-id: file:///svn/phpbb/trunk@2774 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-28 16:57:54 +00:00
Paul S. Owen
187017ec65 Updates for admin_board changes
git-svn-id: file:///svn/phpbb/trunk@2773 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-28 16:57:05 +00:00
Paul S. Owen
bcdd07232c Split up single page into several ... still not happy with certain splits or the "Default" page ...
git-svn-id: file:///svn/phpbb/trunk@2772 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-28 16:56:36 +00:00
Paul S. Owen
cdcd5a1e4d Add ban_reason
git-svn-id: file:///svn/phpbb/trunk@2771 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-28 15:18:02 +00:00
Paul S. Owen
b578774351 Add checkboxes
git-svn-id: file:///svn/phpbb/trunk@2770 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-28 00:29:18 +00:00
Paul S. Owen
36319544af Check field type before inserting username
git-svn-id: file:///svn/phpbb/trunk@2769 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 21:12:15 +00:00
Paul S. Owen
5c6cbb56fc More user search fixes ...
git-svn-id: file:///svn/phpbb/trunk@2768 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 20:39:13 +00:00
Paul S. Owen
0361c40cb4 Wrong cell name for unbanning
git-svn-id: file:///svn/phpbb/trunk@2767 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 17:22:20 +00:00
Paul S. Owen
11477591bf href to javascript
git-svn-id: file:///svn/phpbb/trunk@2766 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 17:16:35 +00:00
Paul S. Owen
1b67df0761 damn damn damn
git-svn-id: file:///svn/phpbb/trunk@2765 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 16:56:54 +00:00
Paul S. Owen
c2e9857c5d Look out your window ... just to the left of the Big Dipper you'll see a small dot moving at high speed ... this is my computer ...
git-svn-id: file:///svn/phpbb/trunk@2764 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 16:49:18 +00:00
Paul S. Owen
9407a604fa bah
git-svn-id: file:///svn/phpbb/trunk@2763 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 16:47:37 +00:00
Paul S. Owen
ab3480b2e1 Wrong var ... naughty Paul ... smacked wrists
git-svn-id: file:///svn/phpbb/trunk@2762 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 16:46:02 +00:00
Paul S. Owen
a2cd2c4de3 oops
git-svn-id: file:///svn/phpbb/trunk@2761 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 16:43:51 +00:00
Paul S. Owen
789675c740 Updated user search system ... this _really_ needs to be integrated with memberslist or something ... but it'll do here for now
git-svn-id: file:///svn/phpbb/trunk@2760 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 16:37:31 +00:00
Paul S. Owen
dd700e5064 minor changes
git-svn-id: file:///svn/phpbb/trunk@2759 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 00:16:55 +00:00
Paul S. Owen
b598c4d7c9 rank related changes
git-svn-id: file:///svn/phpbb/trunk@2758 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 00:16:46 +00:00
Paul S. Owen
81ef17705d bye bye
git-svn-id: file:///svn/phpbb/trunk@2757 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 00:07:55 +00:00
Paul S. Owen
dd1cd9d330 Oh where has my template gone?
git-svn-id: file:///svn/phpbb/trunk@2756 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 00:07:22 +00:00
Paul S. Owen
008a2e1687 itsy bitsy change
git-svn-id: file:///svn/phpbb/trunk@2755 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 00:06:47 +00:00
Paul S. Owen
46466285a5 We commit thy ASCII to the trash bin, HDD to HDD, Processor to Processor, RAM to RAM
git-svn-id: file:///svn/phpbb/trunk@2754 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 00:02:09 +00:00
Paul S. Owen
30b396291c And as if by magic ... poof ... ranks admin started to work again
git-svn-id: file:///svn/phpbb/trunk@2753 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-27 00:00:44 +00:00
Paul S. Owen
541294a876 Log initial data
git-svn-id: file:///svn/phpbb/trunk@2752 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-26 22:13:44 +00:00
Paul S. Owen
6c42fe4150 Idiot, idiot, idiot ... stand in the corner
git-svn-id: file:///svn/phpbb/trunk@2751 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-26 18:10:14 +00:00
Paul S. Owen
82ca177d23 oops
git-svn-id: file:///svn/phpbb/trunk@2750 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-26 17:59:08 +00:00
Paul S. Owen
2a708774fa Minor updates
git-svn-id: file:///svn/phpbb/trunk@2749 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-26 17:45:43 +00:00
Paul S. Owen
99a97bab08 Reduce repeated code
git-svn-id: file:///svn/phpbb/trunk@2748 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-26 17:45:28 +00:00
Paul S. Owen
f91520a5ac Excessive break-line-age
git-svn-id: file:///svn/phpbb/trunk@2747 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-26 17:25:53 +00:00
Paul S. Owen
dbf4ea97af Doh ... a deer a ... yes, well, uhm
git-svn-id: file:///svn/phpbb/trunk@2746 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-26 17:20:55 +00:00
Paul S. Owen
46bfc70d6d Various updates, banning, etc.
git-svn-id: file:///svn/phpbb/trunk@2745 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-26 16:31:50 +00:00
Paul S. Owen
30bb2a8397 Infamy! Infamy! They've all got it in-fa-my
git-svn-id: file:///svn/phpbb/trunk@2744 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-26 14:57:30 +00:00
Paul S. Owen
58f3dea5cc Timed ban check
git-svn-id: file:///svn/phpbb/trunk@2743 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-26 12:14:41 +00:00
Paul S. Owen
9b35e2b168 Throw in a load check for the hell of it ...
git-svn-id: file:///svn/phpbb/trunk@2742 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-25 15:50:57 +00:00
Paul S. Owen
42f2152a9f Various changes + Ashe's security fix
git-svn-id: file:///svn/phpbb/trunk@2741 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-25 15:18:00 +00:00
Paul S. Owen
d4483e3375 No! No! Please ... don't go ... what will I do without you? Oh dear God ... no ...
git-svn-id: file:///svn/phpbb/trunk@2740 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-25 14:29:31 +00:00
Paul S. Owen
c31a629275 updated
git-svn-id: file:///svn/phpbb/trunk@2739 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-25 14:27:42 +00:00
Paul S. Owen
4d0b2c9167 Updated
git-svn-id: file:///svn/phpbb/trunk@2738 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-25 14:26:52 +00:00
Paul S. Owen
38f9c9acfe more oops
git-svn-id: file:///svn/phpbb/trunk@2737 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-25 12:56:03 +00:00
Paul S. Owen
398c78e5ab oops, oops and done
git-svn-id: file:///svn/phpbb/trunk@2736 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-25 12:55:20 +00:00
Paul S. Owen
04e53a1f7c Various updates + search indexing prelim stuff ... hosts will hate this version!
git-svn-id: file:///svn/phpbb/trunk@2735 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-25 12:47:38 +00:00
Paul S. Owen
70968cb025 More re-arrangements
git-svn-id: file:///svn/phpbb/trunk@2714 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-17 20:57:31 +00:00
Paul S. Owen
4e72e76ea1 Removed 'imageset' buttons ...
git-svn-id: file:///svn/phpbb/trunk@2713 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-17 15:27:58 +00:00
Paul S. Owen
79db867c43 Removed 'imageset' buttons
git-svn-id: file:///svn/phpbb/trunk@2712 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-17 15:27:11 +00:00
Paul S. Owen
70de922f8d oops
git-svn-id: file:///svn/phpbb/trunk@2711 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-17 15:02:33 +00:00
Paul S. Owen
5569c9f135 Various changes to quick mod tools
git-svn-id: file:///svn/phpbb/trunk@2710 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-17 14:58:32 +00:00
Paul S. Owen
e2b46f15fe Extra lang strings
git-svn-id: file:///svn/phpbb/trunk@2709 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-17 14:56:18 +00:00
Paul S. Owen
467fc013d1 Various changes
git-svn-id: file:///svn/phpbb/trunk@2708 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-17 14:56:12 +00:00
Paul S. Owen
f685c49fa2 Updates to message output for admin (primarily)
git-svn-id: file:///svn/phpbb/trunk@2707 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-17 14:13:27 +00:00
Paul S. Owen
889cc525e4 Various updates
git-svn-id: file:///svn/phpbb/trunk@2706 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-17 14:13:16 +00:00
Paul S. Owen
22431f6be4 wrong icons
git-svn-id: file:///svn/phpbb/trunk@2705 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 21:39:00 +00:00
Paul S. Owen
3e931c9696 Minor changes
git-svn-id: file:///svn/phpbb/trunk@2704 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 20:39:05 +00:00
Paul S. Owen
72a5470ff6 Registered shouldn't moderate forum ....
git-svn-id: file:///svn/phpbb/trunk@2703 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 18:45:09 +00:00
Paul S. Owen
d1cdba3891 How come this worked fine locally ... bloody amazing ...
git-svn-id: file:///svn/phpbb/trunk@2702 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 18:22:33 +00:00
Paul S. Owen
7c00475d72 oops
git-svn-id: file:///svn/phpbb/trunk@2701 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 18:18:36 +00:00
Paul S. Owen
b8fa4851bb Remove topic_vote
git-svn-id: file:///svn/phpbb/trunk@2700 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 17:31:28 +00:00
Paul S. Owen
bab8906f13 Add acl, remove user_level ... this needs fixing to ensure user can admin if board is disabled
git-svn-id: file:///svn/phpbb/trunk@2699 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 17:31:19 +00:00
Paul S. Owen
183718f25f This will do a clean install ... it will fail if config isn't writeable or any other error occurs ...
git-svn-id: file:///svn/phpbb/trunk@2698 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 17:30:36 +00:00
Paul S. Owen
7b1c9135e8 Renamed
git-svn-id: file:///svn/phpbb/trunk@2697 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 15:12:44 +00:00
Paul S. Owen
1cb0ab7927 Start integrating install.tpl
git-svn-id: file:///svn/phpbb/trunk@2696 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 14:45:00 +00:00
Paul S. Owen
fcef615972 Alter SQL for decoding IPs as suggested by Josh (area51 post)
git-svn-id: file:///svn/phpbb/trunk@2695 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 13:00:11 +00:00
Paul S. Owen
87c864b6e0 Move to centralised install/
git-svn-id: file:///svn/phpbb/trunk@2694 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 12:53:56 +00:00
Paul S. Owen
edf30a3c54 Move to 'centralised' location in install/
git-svn-id: file:///svn/phpbb/trunk@2693 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 12:52:36 +00:00
Paul S. Owen
d1698fdeb5 Centralise install/upgrade/schemas ... make for easier removal and less cluter ... I think ... install needs to have it's template hard coded
git-svn-id: file:///svn/phpbb/trunk@2692 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 12:51:51 +00:00
Paul S. Owen
8238a7cfb8 Changed names
git-svn-id: file:///svn/phpbb/trunk@2691 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 12:47:30 +00:00
Paul S. Owen
60723f5c6b remove user_level, add colour
git-svn-id: file:///svn/phpbb/trunk@2690 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 12:45:17 +00:00
Paul S. Owen
1edd9f840f oops
git-svn-id: file:///svn/phpbb/trunk@2689 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 12:45:05 +00:00
Paul S. Owen
e11768c2c7 Remove user_level
git-svn-id: file:///svn/phpbb/trunk@2688 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 12:42:26 +00:00
Paul S. Owen
47f7d07e2c renamed
git-svn-id: file:///svn/phpbb/trunk@2687 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 12:31:21 +00:00
Paul S. Owen
3a453527cb Minor changes
git-svn-id: file:///svn/phpbb/trunk@2686 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 12:28:12 +00:00
Paul S. Owen
14927f5445 bye bye
git-svn-id: file:///svn/phpbb/trunk@2685 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-16 11:43:06 +00:00
Paul S. Owen
a0bb541974 oops
git-svn-id: file:///svn/phpbb/trunk@2684 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 20:24:12 +00:00
Paul S. Owen
1ccb73e898 Various extra lines
git-svn-id: file:///svn/phpbb/trunk@2679 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 15:03:23 +00:00
Paul S. Owen
865cdfdbda More images ... remember my 'nicked' comment previously ... applies here too ...
git-svn-id: file:///svn/phpbb/trunk@2678 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:56:54 +00:00
Paul S. Owen
4d4dbfaf89 Name changes, removal of .cfg
git-svn-id: file:///svn/phpbb/trunk@2677 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:54:36 +00:00
Paul S. Owen
427a71155e Name change to .html from .tpl as per requests (to ease local editing ... for those who can't search for .tpl ... ;) ), various updates to account for conditionals in templating engine, etc.
git-svn-id: file:///svn/phpbb/trunk@2676 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:53:45 +00:00
Paul S. Owen
fad21bcb01 Hard-coded HTML into admin modules ... no point in continuing to template this stuff since no one (or few) rarely bother to make use of the feature. Lots of changes for permissions, sessions, etc. some new styling stuff present (inc. editing templates though not complete), lots of bugs and non-functioning stuff ... any 'existing' modules will cause the right hand panel to fail ... remove them. If I catch anyone nicking graphics from here I'll kill 'em ...
git-svn-id: file:///svn/phpbb/trunk@2675 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:51:03 +00:00
Paul S. Owen
71707ca5db To allow for 'easy switch' imagesets (i.e. .cfg's move into the DB as requested) 'non-style' specific images (buttons, etc.) are now stored separately to the template
git-svn-id: file:///svn/phpbb/trunk@2674 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:47:57 +00:00
Paul S. Owen
4bc4397f4a Updates for permissions, sessions, lots of things ... note that _many_ things _do_not_work_ now ... I'm commiting them to stop people complaining about my holding on to everything :) There is _no_ update script at present for all these changes, you'll have to work out what's needed yourselves till I finish various things
git-svn-id: file:///svn/phpbb/trunk@2673 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:45:26 +00:00
Paul S. Owen
d03de47b51 Gone but not forgotten ... what's not forgotten? who said that? shut up Paul
git-svn-id: file:///svn/phpbb/trunk@2672 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:43:31 +00:00
Paul S. Owen
c4a926b4e2 Same as last commits, updates for various changes
git-svn-id: file:///svn/phpbb/trunk@2671 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:41:55 +00:00
Paul S. Owen
53a03e33bc Updates for altered permission/sessions/etc.
git-svn-id: file:///svn/phpbb/trunk@2670 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:41:35 +00:00
Paul S. Owen
044f82dbd7 Various updates and alterations
git-svn-id: file:///svn/phpbb/trunk@2669 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:41:12 +00:00
Paul S. Owen
f212a877c4 Latest schema
git-svn-id: file:///svn/phpbb/trunk@2668 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:40:17 +00:00
Paul S. Owen
5e671994ff Various updates which will break yet more things
git-svn-id: file:///svn/phpbb/trunk@2667 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:39:01 +00:00
Paul S. Owen
89d28bb48b Combine posting and searching functions ... not entirely convinced about this since searching is done without need of posting routines but hum ho for now
git-svn-id: file:///svn/phpbb/trunk@2666 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:37:47 +00:00
Paul S. Owen
1811b914f0 Combine, update, remove various functions ... by committing this various 'things' will stop working, I did warn you not to use 2.1.x ... :)
git-svn-id: file:///svn/phpbb/trunk@2665 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:35:12 +00:00
Paul S. Owen
0b285c07f6 Combine various admin related functions
git-svn-id: file:///svn/phpbb/trunk@2664 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:34:34 +00:00
Paul S. Owen
72db8c4a5e Combine emailer and smtp
git-svn-id: file:///svn/phpbb/trunk@2663 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:34:16 +00:00
Paul S. Owen
a0ee4ce6ae This should work fine with existing templates ... note that you will need to create a directory called cache/ in your templates directory ... give it a+w access (chmod 700)
git-svn-id: file:///svn/phpbb/trunk@2662 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:33:30 +00:00
Paul S. Owen
05b6c0348e Renamed again
git-svn-id: file:///svn/phpbb/trunk@2661 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-14 14:32:45 +00:00
Paul S. Owen
44b8633eb4 Few minor changes
git-svn-id: file:///svn/phpbb/trunk@2656 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-07 14:10:18 +00:00
Paul S. Owen
61a947b132 Slightly condensed ... for admin/ only
git-svn-id: file:///svn/phpbb/trunk@2655 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-07 00:07:13 +00:00
Paul S. Owen
2beb39c812 Have log ... will view
git-svn-id: file:///svn/phpbb/trunk@2654 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-06 20:37:09 +00:00
Paul S. Owen
20da9bb86d Time to a commit ... been a while
git-svn-id: file:///svn/phpbb/trunk@2653 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-06 13:18:20 +00:00
Paul S. Owen
419bb07697 Initial commit ... neither do anything, just wanted to add something :D
git-svn-id: file:///svn/phpbb/trunk@2652 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-07-05 23:52:14 +00:00
Paul S. Owen
501ec60c0c See previous check-in
git-svn-id: file:///svn/phpbb/trunk@2651 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-29 01:58:54 +00:00
Paul S. Owen
af4f292d28 Combine SMTP and Emailer sources into one
git-svn-id: file:///svn/phpbb/trunk@2650 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-29 01:47:26 +00:00
dougk_ff7
46b8fc7cfe Ok, a schema fix... Not a terrible problem....
git-svn-id: file:///svn/phpbb/trunk@2646 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-27 19:55:26 +00:00
Paul S. Owen
3a233ee6bb oops, that's what you get for not testing more thoroughly ...
git-svn-id: file:///svn/phpbb/trunk@2644 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-22 15:17:26 +00:00
Paul S. Owen
c3be8488ed Removed image sets for time being, chances are some things will change
git-svn-id: file:///svn/phpbb/trunk@2643 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-22 15:17:13 +00:00
Paul S. Owen
5cff35d0f7 Template caching ( file based )
git-svn-id: file:///svn/phpbb/trunk@2642 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-22 11:48:10 +00:00
Paul S. Owen
e733a0eca1 Few more changes
git-svn-id: file:///svn/phpbb/trunk@2641 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-21 22:40:29 +00:00
Paul S. Owen
674cf1c3d6 A few suggested or preliminary changes ... these aren't fixed and again I suggest no one install (or even manually update) this version at present.
git-svn-id: file:///svn/phpbb/trunk@2640 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-21 20:12:08 +00:00
the_systech
6a3ec2b0b3 Fix for supposed "security" hole....
git-svn-id: file:///svn/phpbb/trunk@2636 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-17 21:18:37 +00:00
Paul S. Owen
84b6f6e925 Various updates ... still preliminary, particularly auth
git-svn-id: file:///svn/phpbb/trunk@2631 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-11 02:27:26 +00:00
Paul S. Owen
c0495aace4 Updates in line with 2.0.1
git-svn-id: file:///svn/phpbb/trunk@2630 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-10 01:52:48 +00:00
Paul S. Owen
e9bec6c557 Fixes in line with 2.0.1
git-svn-id: file:///svn/phpbb/trunk@2629 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-10 01:49:57 +00:00
Paul S. Owen
b2d06c7309 Various additions to come in line with 2.0.1
git-svn-id: file:///svn/phpbb/trunk@2628 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-10 01:49:48 +00:00
Paul S. Owen
5d0b7f5f9f Possible updates and additions ...
git-svn-id: file:///svn/phpbb/trunk@2627 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-09 00:04:44 +00:00
Paul S. Owen
e739e793eb Spot the deliberate errors
git-svn-id: file:///svn/phpbb/trunk@2626 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-08 23:55:00 +00:00
Paul S. Owen
3212f1ec0e Non-English languages aren't being maintained inline with development at present, layout is likely to change so they go bye bye for now ... less trouble for time being I hope ...
git-svn-id: file:///svn/phpbb/trunk@2625 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-08 22:03:40 +00:00
Paul S. Owen
61e31c383c NOTE! This is a work in progress and is subject to considerable change ... and the update script is not likely to cope with it ... I heavily recommend no one install a fresh copy of 2.1 at this time.
git-svn-id: file:///svn/phpbb/trunk@2624 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-08 20:31:56 +00:00
Paul S. Owen
d8fa35e790 Initial session and auth code checkin
git-svn-id: file:///svn/phpbb/trunk@2623 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-08 19:50:18 +00:00
Paul S. Owen
da00e4a5ee What is this still doing here?!?! :D
git-svn-id: file:///svn/phpbb/trunk@2622 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-08 16:54:44 +00:00
Paul S. Owen
397e8ef31b Some transfers from 2.0.x plus move debugging to template var which will please some people
git-svn-id: file:///svn/phpbb/trunk@2621 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-06-08 16:45:41 +00:00
Paul S. Owen
d75291c5d2 Add fields for forum/topic post count incrementing and topic moderation
git-svn-id: file:///svn/phpbb/trunk@2612 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-05-21 14:25:52 +00:00
Paul S. Owen
9f0f335812 Fix ban_ip ALTER error
git-svn-id: file:///svn/phpbb/trunk@2592 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-05-17 21:52:35 +00:00
Paul S. Owen
6bf767ae77 Fix bad URL for topic notifications
git-svn-id: file:///svn/phpbb/trunk@2581 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-05-14 17:27:20 +00:00
Paul S. Owen
24d2101805 doh
git-svn-id: file:///svn/phpbb/trunk@2562 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-05-09 14:23:24 +00:00
Paul S. Owen
46bd19817c Alter ban_ip's when examining subnets ... this whole thing needs a review for IPv6
git-svn-id: file:///svn/phpbb/trunk@2561 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-05-09 14:13:45 +00:00
Paul S. Owen
f6c6628509 IP related updates
git-svn-id: file:///svn/phpbb/trunk@2560 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-05-09 14:08:41 +00:00
Paul S. Owen
ab8d9f1978 IP related updates NOTE this is just MySQL! Do not run this if you are using other DB's or the necessary IP changes will not be implemented in future
git-svn-id: file:///svn/phpbb/trunk@2559 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-05-09 14:08:36 +00:00
Paul S. Owen
8043f50781 IP related updates + fixed gc in sessions
git-svn-id: file:///svn/phpbb/trunk@2558 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-05-09 14:07:33 +00:00
Paul S. Owen
2d7bfa5c61 IP size to 40 chars
git-svn-id: file:///svn/phpbb/trunk@2557 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-05-08 23:34:36 +00:00
James Atkinson
52c0d86c95 Changed code so it stores total users in config table to remove a slightly costly query
git-svn-id: file:///svn/phpbb/trunk@2549 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-04-30 17:56:50 +00:00
the_systech
559dff21b7 Fix for "security vulnerability" in img tag
git-svn-id: file:///svn/phpbb/trunk@2544 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-04-24 15:00:33 +00:00
Paul S. Owen
1386605952 Oops
git-svn-id: file:///svn/phpbb/trunk@2540 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-04-21 01:13:44 +00:00
Paul S. Owen
20fc6a2f10 Updated for schema changes
git-svn-id: file:///svn/phpbb/trunk@2539 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-04-20 23:45:02 +00:00
Paul S. Owen
310e9af890 And again something screws up causing a "not up to date" check failure ...
git-svn-id: file:///svn/phpbb/trunk@2538 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-04-20 23:44:35 +00:00
Paul S. Owen
9649ececed Associated schema changes
git-svn-id: file:///svn/phpbb/trunk@2537 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-04-20 23:43:46 +00:00
Paul S. Owen
fa3d0694a8 Forum watch stuff ... just copied the topic watch stuff and thus needs reviewing inline with everything else ... but something needed to be added to 2.1 :)
git-svn-id: file:///svn/phpbb/trunk@2536 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-04-20 22:56:09 +00:00
Paul S. Owen
35c0d33ee7 Forum watch stuff
git-svn-id: file:///svn/phpbb/trunk@2535 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-04-20 22:55:11 +00:00
Paul S. Owen
0616125f9b Initial version
git-svn-id: file:///svn/phpbb/trunk@2534 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-04-20 21:01:06 +00:00
Paul S. Owen
36c0a04de9 Ooops
git-svn-id: file:///svn/phpbb/trunk@2533 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-04-20 00:36:33 +00:00
Paul S. Owen
5b0bba72b1 merged from 2.0.0 branch (marked merge_point_20020420) + assorted updates and trial stuff for example session alterations
git-svn-id: file:///svn/phpbb/trunk@2532 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-04-20 00:22:29 +00:00
Paul S. Owen
65aa921828 Update a few things for 2.1 CVS
git-svn-id: file:///svn/phpbb/trunk@2489 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-04-04 21:51:32 +00:00
Paul S. Owen
f5b2f6067a Switch to shiny new 2.1 update_script
git-svn-id: file:///svn/phpbb/trunk@2488 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-04-04 21:49:25 +00:00
Paul S. Owen
214f16f791 Update a few things for 2.1 CVS
git-svn-id: file:///svn/phpbb/trunk@2487 89ea8834-ac86-4346-8a33-228a782c2dd0
2002-04-04 21:44:36 +00:00
1280 changed files with 55046 additions and 86425 deletions

File diff suppressed because it is too large Load Diff

620
phpBB/adm/admin_ban.php Normal file
View File

@@ -0,0 +1,620 @@
<?php
/***************************************************************************
* admin_ban.php
* -------------------
* begin : Tuesday, Jul 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if (!empty($setmodules))
{
if (!$auth->acl_get('a_ban'))
{
return;
}
$filename = basename(__FILE__);
$module['USER']['BAN_USERS'] = $filename . "$SID&amp;mode=user";
$module['USER']['BAN_EMAILS'] = $filename . "$SID&amp;mode=email";
$module['USER']['BAN_IPS'] = $filename . "$SID&amp;mode=ip";
return;
}
define('IN_PHPBB', 1);
// Load default header
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
// Do we have ban permissions?
if (!$auth->acl_get('a_ban'))
{
trigger_error($user->lang['NO_ADMIN']);
}
// Mode setting
$mode = (isset($_REQUEST['mode'])) ? $_REQUEST['mode'] : '';
$current_time = time();
// Start program
if (isset($_REQUEST['bansubmit']))
{
// Grab the list of entries
$ban = (!empty($_REQUEST['ban'])) ? $_REQUEST['ban'] : '';
$ban_list = array_unique(explode("\n", $ban));
$ban_list_log = implode(', ', $ban_list);
$ban_exclude = (!empty($_POST['banexclude'])) ? 1 : 0;
$ban_reason = (isset($_POST['banreason'])) ? $_POST['banreason'] : '';
if (!empty($_POST['banlength']))
{
if ($_POST['banlength'] != -1 || empty($_POST['banlengthother']))
{
$ban_end = max($current_time, $current_time + (intval($_POST['banlength']) * 60));
}
else
{
$ban_other = explode('-', $_POST['banlengthother']);
$ban_end = max($current_time, gmmktime(0, 0, 0, $ban_other[1], $ban_other[2], $ban_other[0]));
}
}
else
{
$ban_end = 0;
}
$banlist = array();
switch ($mode)
{
case 'user':
$type = 'ban_userid';
if (in_array('*', $ban_list))
{
$banlist[] = '*';
}
else
{
$sql = 'SELECT user_id
FROM ' . USERS_TABLE . '
WHERE username IN (' . implode(', ', array_diff(preg_replace('#^[\s]*(.*?)[\s]*$#', "'\\1'", $ban_list), array("''"))) . ')';
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
do
{
$banlist[] = $row['user_id'];
}
while ($row = $db->sql_fetchrow($result));
}
}
break;
case 'ip':
$type = 'ban_ip';
foreach ($ban_list as $ban_item)
{
if (preg_match('#^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})[ ]*\-[ ]*([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$#', trim($ban_item), $ip_range_explode))
{
// Don't ask about all this, just don't ask ... !
$ip_1_counter = $ip_range_explode[1];
$ip_1_end = $ip_range_explode[5];
while ($ip_1_counter <= $ip_1_end)
{
$ip_2_counter = ($ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[2] : 0;
$ip_2_end = ($ip_1_counter < $ip_1_end) ? 254 : $ip_range_explode[6];
if($ip_2_counter == 0 && $ip_2_end == 254)
{
$ip_2_counter = 256;
$ip_2_fragment = 256;
$banlist[] = "'$ip_1_counter.*'";
}
while ($ip_2_counter <= $ip_2_end)
{
$ip_3_counter = ($ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[3] : 0;
$ip_3_end = ($ip_2_counter < $ip_2_end || $ip_1_counter < $ip_1_end) ? 254 : $ip_range_explode[7];
if ($ip_3_counter == 0 && $ip_3_end == 254)
{
$ip_3_counter = 256;
$ip_3_fragment = 256;
$banlist[] = "'$ip_1_counter.$ip_2_counter.*'";
}
while ($ip_3_counter <= $ip_3_end)
{
$ip_4_counter = ($ip_3_counter == $ip_range_explode[3] && $ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[4] : 0;
$ip_4_end = ($ip_3_counter < $ip_3_end || $ip_2_counter < $ip_2_end) ? 254 : $ip_range_explode[8];
if ($ip_4_counter == 0 && $ip_4_end == 254)
{
$ip_4_counter = 256;
$ip_4_fragment = 256;
$banlist[] = "'$ip_1_counter.$ip_2_counter.$ip_3_counter.*'";
}
while ($ip_4_counter <= $ip_4_end)
{
$banlist[] = "'$ip_1_counter.$ip_2_counter.$ip_3_counter.$ip_4_counter'";
$ip_4_counter++;
}
$ip_3_counter++;
}
$ip_2_counter++;
}
$ip_1_counter++;
}
}
else if (preg_match('#^([\w\-_]\.?){2,}$#is', trim($ban_item)))
{
$ip_ary = gethostbynamel(trim($ban_item));
foreach ($ip_ary as $ip)
{
if (!empty($ip))
{
$banlist[] = "'" . $ip . "'";
}
}
}
else if (preg_match('#^([0-9]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})$#', trim($ban_item)) || preg_match('#^[a-f0-9:]+\*?$#i', trim($ban_item)))
{
$banlist[] = "'" . trim($ban_item) . "'";
}
else if (preg_match('#^\*$#', trim($ban_item)))
{
$banlist[] = "'*'";
}
}
break;
case 'email':
$type = 'ban_email';
foreach ($ban_list as $ban_item)
{
if (preg_match('#^.*?@*|(([a-z0-9\-]+\.)+([a-z]{2,3}))$#i', trim($ban_item)))
{
$banlist[] = "'" . trim($ban_item) . "'";
}
}
break;
}
$sql = "SELECT $type
FROM " . BANLIST_TABLE . "
WHERE $type <> ''
AND ban_exclude = $ban_exclude";
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
$banlist_tmp = array();
do
{
switch ($mode)
{
case 'user':
$banlist_tmp[] = $row['ban_userid'];
break;
case 'ip':
$banlist_tmp[] = "'" . $row['ban_ip'] . "'";
break;
case 'email':
$banlist_tmp[] = "'" . $row['ban_email'] . "'";
break;
}
}
while ($row = $db->sql_fetchrow($result));
$banlist = array_unique(array_diff($banlist, $banlist_tmp));
unset($banlist_tmp);
}
if (sizeof($banlist))
{
$sql = '';
foreach ($banlist as $ban_entry)
{
switch (SQL_LAYER)
{
case 'mysql':
case 'mysql4':
$sql .= (($sql != '') ? ', ' : '') . "($ban_entry, $current_time, $ban_end, $ban_exclude, '$ban_reason')";
break;
case 'mssql':
case 'sqlite':
$sql .= (($sql != '') ? ' UNION ALL ' : '') . " SELECT $ban_entry, $current_time, $ban_end, $ban_exclude, '$ban_reason'";
break;
default:
$sql = 'INSERT INTO ' . BANLIST_TABLE . " ($type, ban_start, ban_end, ban_exclude, ban_reason)
VALUES ($ban_entryx, $current_time, $ban_end, $ban_exclude, '$ban_reason')";
$db->sql_query($sql);
$sql = '';
}
}
if ($sql != '')
{
$sql = 'INSERT INTO ' . BANLIST_TABLE . " ($type, ban_start, ban_end, ban_exclude, ban_reason)
VALUES $sql";
$db->sql_query($sql);
}
if (!$ban_exclude)
{
$sql = '';
switch ($mode)
{
case 'user':
$sql = "WHERE session_user_id IN (" . implode(', ', $banlist) . ")";
break;
case 'ip':
$sql = "WHERE session_ip IN (" . implode(', ', $banlist) . ")";
break;
case 'email':
$sql = "SELECT user_id
FROM " . USERS_TABLE . "
WHERE user_email IN (" . implode(', ', $banlist) . ")";
$result = $db->sql_query($sql);
$sql = '';
if ($row = $db->sql_fetchrow($result))
{
do
{
$sql .= (($sql != '') ? ', ' : '') . $row['user_id'];
}
while ($row = $db->sql_fetchrow($result));
$sql = "WHERE session_user_id IN (" . str_replace('*', '%', $sql) . ")";
}
break;
}
if ($sql != '')
{
$sql = "DELETE FROM " . SESSIONS_TABLE . "
$sql";
$db->sql_query($sql);
}
}
// Update log
$log_entry = ($ban_exclude) ? 'LOG_BAN_EXCLUDE_' : 'LOG_BAN_';
add_log('admin', $log_entry . strtoupper($mode), $ban_reason, $ban_list_log);
}
trigger_error($user->lang['BAN_UPDATE_SUCESSFUL']);
}
else if (isset($_POST['unbansubmit']))
{
$unban_sql = implode(', ', array_map('intval', $_POST['unban']));
if ($unban_sql != '')
{
$l_unban_list = '';
// Grab details of bans for logging information later
switch ($mode)
{
case 'user':
$sql = "SELECT u.username AS unban_info
FROM " . USERS_TABLE . " u, " . BANLIST_TABLE . " b
WHERE b.ban_id IN ($unban_sql)
AND u.user_id = b.ban_userid";
break;
case 'email':
$sql = "SELECT ban_email AS unban_info
FROM " . BANLIST_TABLE . "
WHERE ban_id IN ($unban_sql)";
break;
case 'ip':
$sql = "SELECT ban_ip AS unban_info
FROM " . BANLIST_TABLE . "
WHERE ban_id IN ($unban_sql)";
break;
}
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$l_unban_list .= (($l_unban_list != '') ? ', ' : '') . $row['unban_info'];
}
$sql = "DELETE FROM " . BANLIST_TABLE . "
WHERE ban_id IN ($unban_sql)";
$db->sql_query($sql);
add_log('admin', 'LOG_UNBAN_' . strtoupper($mode), $l_unban_list);
}
trigger_error($user->lang['BAN_UPDATE_SUCESSFUL']);
}
//
// Output relevant entry page
//
//
// Remove timed out bans
//
$sql = "DELETE FROM " . BANLIST_TABLE . "
WHERE ban_end < " . time() . "
AND ban_end <> 0";
$db->sql_query($sql);
//
// Ban length options
//
$ban_end_text = array(0 => $user->lang['PERMANENT'], 30 => $user->lang['30_MINS'], 60 => $user->lang['1_HOUR'], 360 => $user->lang['6_HOURS'], 1440 => $user->lang['1_DAY'], 10080 => $user->lang['7_DAYS'], 20160 => $user->lang['2_WEEKS'], 40320 => $user->lang['1_MONTH'], -1 => $user->lang['OTHER'] . ' -&gt; ');
$ban_end_options = '';
foreach ($ban_end_text as $length => $text)
{
$ban_end_options .= '<option value="' . $length . '">' . $text . '</option>';
}
// Title
switch ($mode)
{
case 'user':
$l_title = $user->lang['BAN_USERS'];
break;
case 'email':
$l_title = $user->lang['BAN_EMAILS'];
break;
case 'ip':
$l_title = $user->lang['BAN_IPS'];
break;
}
// Output page
adm_page_header($l_title);
?>
<p><?php echo $user->lang['BAN_EXPLAIN']; ?></p>
<?php
switch ($mode)
{
case 'user':
$field = 'username';
$l_ban_title = $user->lang['BAN_USERS'];
$l_ban_explain = $user->lang['BAN_USERNAME_EXPLAIN'];
$l_ban_exclude_explain = $user->lang['BAN_USER_EXCLUDE_EXPLAIN'];
$l_unban_title = $user->lang['UNBAN_USERNAME'];
$l_unban_explain = $user->lang['UNBAN_USERNAME_EXPLAIN'];
$l_ban_cell = $user->lang['USERNAME'];
$l_no_ban_cell = $user->lang['NO_BANNED_USERS'];
$s_submit_extra = '<input type="submit" name="usersubmit" value="' . $user->lang['LOOK_UP_USER'] . '" class="btnlite" onclick="window.open(\'../memberlist.' . $phpEx . $SID . '&amp;mode=searchuser&amp;field=ban\', \'_phpbbsearch\', \'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740\');return false;" />';
$sql = "SELECT b.*, u.user_id, u.username
FROM " . BANLIST_TABLE . " b, " . USERS_TABLE . " u
WHERE (b.ban_end >= " . time() . "
OR b.ban_end = 0)
AND u.user_id = b.ban_userid
AND b.ban_userid <> 0
AND u.user_id <> " . ANONYMOUS . "
ORDER BY u.user_id ASC";
break;
case 'ip':
$field = 'ban_ip';
$l_ban_title = $user->lang['BAN_IPS'];
$l_ban_explain = $user->lang['BAN_IP_EXPLAIN'];
$l_ban_exclude_explain = $user->lang['BAN_IP_EXCLUDE_EXPLAIN'];
$l_unban_title = $user->lang['UNBAN_IP'];
$l_unban_explain = $user->lang['UNBAN_IP_EXPLAIN'];
$l_ban_cell = $user->lang['IP_HOSTNAME'];
$l_no_ban_cell = $user->lang['NO_BANNED_IP'];
$s_submit_extra = '';
$sql = "SELECT *
FROM " . BANLIST_TABLE . "
WHERE (ban_end >= " . time() . "
OR ban_end = 0)
AND ban_ip <> ''";
break;
case 'email':
$field = 'ban_email';
$l_ban_title = $user->lang['BAN_EMAILS'];
$l_ban_explain = $user->lang['BAN_EMAIL_EXPLAIN'];
$l_ban_exclude_explain = $user->lang['BAN_EMAIL_EXCLUDE_EXPLAIN'];
$l_unban_title = $user->lang['UNBAN_EMAIL'];
$l_unban_explain = $user->lang['UNBAN_EMAIL_EXPLAIN'];
$l_ban_cell = $user->lang['EMAIL_ADDRESS'];
$l_no_ban_cell = $user->lang['NO_BANNED_EMAIL'];
$s_submit_extra = '';
$sql = "SELECT *
FROM " . BANLIST_TABLE . "
WHERE (ban_end >= " . time() . "
OR ban_end = 0)
AND ban_email <> ''";
break;
}
$result = $db->sql_query($sql);
$banned_options = '';
$ban_length = $ban_reasons = array();
if ($row = $db->sql_fetchrow($result))
{
do
{
$banned_options .= '<option' . (($row['ban_exclude']) ? ' class="sep"' : '') . ' value="' . $row['ban_id'] . '">' . $row[$field] . '</option>';
$time_length = (!empty($row['ban_end'])) ? ($row['ban_end'] - $row['ban_start']) / 60 : 0;
$ban_length[$row['ban_id']] = (!empty($ban_end_text[$time_length])) ? $ban_end_text[$time_length] : $user->lang['OTHER'] . ' -> ' . gmdate('Y-m-d', $row['ban_end']);
$ban_reasons[$row['ban_id']] = addslashes($row['ban_reason']);
}
while ($row = $db->sql_fetchrow($result));
}
$db->sql_freeresult($result);
?>
<h1><?php echo $l_ban_title; ?></h1>
<p><?php echo $l_ban_explain; ?></p>
<script language="Javascript" type="text/javascript">
<!--
var ban_length = new Array();
<?php
if (sizeof($ban_length))
{
foreach ($ban_length as $ban_id => $length)
{
echo "ban_length['$ban_id'] = \"$length\";\n";
}
}
?>
var ban_reason = new Array();
<?php
if (sizeof($ban_reasons))
{
foreach ($ban_reasons as $ban_id => $reason)
{
echo "ban_reason['$ban_id'] = \"$reason\";\n";
}
}
?>
function display_details(option)
{
document.forms[0].unbanreason.value = ban_reason[option];
document.forms[0].unbanlength.value = ban_length[option];
}
//-->
</script>
<form method="post" action="<?php echo "admin_ban.$phpEx$SID&amp;mode=$mode"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $l_ban_title; ?></th>
</tr>
<tr>
<td class="row2" width="45%"><?php echo $l_ban_cell; ?>: </td>
<td class="row1"><textarea cols="40" rows="3" name="ban"></textarea></td>
</tr>
<tr>
<td class="row2" width="45%"><?php echo $user->lang['BAN_LENGTH']; ?>:</td>
<td class="row1"><select name="banlength"><?php echo $ban_end_options; ?></select>&nbsp; <input class="post" type="text" name="banlengthother" maxlength="10" size="10" /></td>
</tr>
<tr>
<td class="row2" width="45%"><?php echo $user->lang['BAN_EXCLUDE']; ?>: <br /><span class="gensmall"><?php echo $l_ban_exclude_explain;;?></span></td>
<td class="row1"><input type="radio" name="banexclude" value="1" /> <?php echo $user->lang['YES']; ?> &nbsp; <input type="radio" name="banexclude" value="0" checked="checked" /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row2" width="45%"><?php echo $user->lang['BAN_REASON']; ?>:</td>
<td class="row1"><input class="post" type="text" name="banreason" maxlength="255" size="40" /></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"> <input type="submit" name="bansubmit" value="<?php echo $user->lang['SUBMIT']; ?>" class="btnmain" />&nbsp; <input type="reset" value="<?php echo $user->lang['RESET']; ?>" class="btnlite" />&nbsp; <?php echo $s_submit_extra; ?></td>
</tr>
</table>
<h1><?php echo $l_unban_title; ?></h1>
<p><?php echo $l_unban_explain; ?></p>
<table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $l_unban_title; ?></th>
</tr>
<?php
if ($banned_options != '')
{
?>
<tr>
<td class="row2" width="45%"><?php echo $l_ban_cell; ?>: <br /></td>
<td class="row1"> <select name="unban[]" multiple="multiple" size="5" onchange="display_details(this.options[this.selectedIndex].value)"><?php echo $banned_options; ?></select></td>
</tr>
<tr>
<td class="row2" width="45%"><?php echo $user->lang['BAN_REASON']; ?>:</td>
<td class="row1"><input class="row1" style="border:0px" type="text" name="unbanreason" size="40" /></td>
</tr>
<tr>
<td class="row2" width="45%"><?php echo $user->lang['BAN_LENGTH']; ?>:</td>
<td class="row1"><input class="row1" style="border:0px" type="text" name="unbanlength" size="40" /></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><input type="submit" name="unbansubmit" value="<?php echo $user->lang['SUBMIT']; ?>" class="btnmain" />&nbsp; <input type="reset" value="<?php echo $user->lang['RESET']; ?>" class="btnlite" /></td>
</tr>
<?php
}
else
{
?>
<tr>
<td class="row1" colspan="2" align="center"><?php echo $l_no_ban_cell; ?></td>
</tr>
<?php
}
?>
</table></form>
<?php
adm_page_footer();
?>

770
phpBB/adm/admin_board.php Normal file
View File

@@ -0,0 +1,770 @@
<?php
/***************************************************************************
* admin_board.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if (!empty($setmodules))
{
$filename = basename(__FILE__);
$module['GENERAL']['COOKIE_SETTINGS'] = ($auth->acl_get('a_cookies')) ? "$filename$SID&amp;mode=cookie" : '';
$module['GENERAL']['BOARD_DEFAULTS'] = ($auth->acl_get('a_defaults')) ? "$filename$SID&amp;mode=default" : '';
$module['GENERAL']['BOARD_SETTINGS'] = ($auth->acl_get('a_board')) ? "$filename$SID&amp;mode=setting" : '';
$module['GENERAL']['AVATAR_SETTINGS'] = ($auth->acl_get('a_board')) ? "$filename$SID&amp;mode=avatar" : '';
$module['GENERAL']['EMAIL_SETTINGS'] = ($auth->acl_get('a_server')) ? "$filename$SID&amp;mode=email" : '';
$module['GENERAL']['SERVER_SETTINGS'] = ($auth->acl_get('a_server')) ? "$filename$SID&amp;mode=server" : '';
$module['GENERAL']['AUTH_SETTINGS'] = ($auth->acl_get('a_server')) ? "$filename$SID&amp;mode=auth" : '';
$module['GENERAL']['LOAD_SETTINGS'] = ($auth->acl_get('a_server')) ? "$filename$SID&amp;mode=load" : '';
$module['USER']['KARMA_SETTINGS'] = ($auth->acl_get('a_users')) ? "$filename$SID&amp;mode=karma" : '';
return;
}
define('IN_PHPBB', 1);
// Load default header
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
// Get mode
$mode = (isset($_REQUEST['mode'])) ? htmlspecialchars($_REQUEST['mode']) : '';
$submit = (isset($_POST['submit'])) ? true : false;
// Check permissions/set title
switch ($mode)
{
case 'cookie':
$l_title = 'COOKIE_SETTINGS';
$which_auth = 'a_cookies';
break;
case 'default':
$l_title = 'BOARD_DEFAULTS';
$which_auth = 'a_defaults';
break;
case 'avatar':
$l_title = 'AVATAR_SETTINGS';
$which_auth = 'a_board';
break;
case 'setting':
$l_title = 'BOARD_SETTINGS';
$which_auth = 'a_board';
break;
case 'email':
$l_title = 'EMAIL_SETTINGS';
$which_auth = 'a_server';
break;
case 'server':
$l_title = 'SERVER_SETTINGS';
$which_auth = 'a_server';
break;
case 'load':
$l_title = 'LOAD_SETTINGS';
$which_auth = 'a_server';
break;
case 'auth':
$l_title = 'AUTH_SETTINGS';
$which_auth = 'a_server';
break;
case 'karma':
$l_title = 'KARMA_SETTINGS';
$which_auth = 'a_users';
break;
default:
return;
}
// Check permissions
if (!$auth->acl_get($which_auth))
{
trigger_error($user->lang['NO_ADMIN']);
}
// Pull all config data
$sql = "SELECT *
FROM " . CONFIG_TABLE;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$config_name = $row['config_name'];
$config_value = $row['config_value'];
$default_config[$config_name] = $config_value;
$new[$config_name] = (isset($_POST[$config_name])) ? $_POST[$config_name] : $default_config[$config_name];
if ($submit)
{
set_config($config_name, str_replace('\\\\', '\\', addslashes($new[$config_name])));
}
}
if ($submit)
{
add_log('admin', 'LOG_' . strtoupper($mode) . '_CONFIG');
trigger_error($user->lang['CONFIG_UPDATED']);
}
adm_page_header($user->lang[$l_title]);
?>
<h1><?php echo $user->lang[$l_title]; ?></h1>
<p><?php echo $user->lang[$l_title . '_EXPLAIN']; ?></p>
<form action="<?php echo "admin_board.$phpEx$SID&amp;mode=$mode"; ?>" method="post"><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $user->lang[$l_title]; ?></th>
</tr>
<?php
// Output relevant page
switch ($mode)
{
case 'cookie':
$cookie_secure_yes = ($new['cookie_secure']) ? 'checked="checked"' : '';
$cookie_secure_no = (!$new['cookie_secure']) ? 'checked="checked"' : '';
?>
<tr>
<td class="row1" width="50%"><b><?php echo $user->lang['COOKIE_DOMAIN']; ?>: </b></td>
<td class="row2"><input class="post" type="text" maxlength="255" name="cookie_domain" value="<?php echo $new['cookie_domain']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['COOKIE_NAME']; ?>: </b></td>
<td class="row2"><input class="post" type="text" maxlength="16" name="cookie_name" value="<?php echo $new['cookie_name']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['COOKIE_PATH']; ?>: </b></td>
<td class="row2"><input class="post" type="text" maxlength="255" name="cookie_path" value="<?php echo $new['cookie_path']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['COOKIE_SECURE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['COOKIE_SECURE_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="cookie_secure" value="0"<?php echo $cookie_secure_no; ?> /><?php echo $user->lang['DISABLED']; ?>&nbsp; &nbsp;<input type="radio" name="cookie_secure" value="1"<?php echo $cookie_secure_yes; ?> /><?php echo $user->lang['ENABLED']; ?></td>
</tr>
<?php
break;
case 'avatar':
$avatars_local_yes = ($new['allow_avatar_local']) ? 'checked="checked"' : '';
$avatars_local_no = (!$new['allow_avatar_local']) ? 'checked="checked"' : '';
$avatars_remote_yes = ($new['allow_avatar_remote']) ? 'checked="checked"' : '';
$avatars_remote_no = (!$new['allow_avatar_remote']) ? 'checked="checked"' : '';
$avatars_upload_yes = ($new['allow_avatar_upload']) ? 'checked="checked"' : '';
$avatars_upload_no = (!$new['allow_avatar_upload']) ? 'checked="checked"' : '';
?>
<tr>
<td class="row1" width="50%"><b><?php echo $user->lang['ALLOW_LOCAL']; ?>: </b></td>
<td class="row2"><input type="radio" name="allow_avatar_local" value="1"<?php echo $avatars_local_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="allow_avatar_local" value="0"<?php echo $avatars_local_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ALLOW_REMOTE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ALLOW_REMOTE_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="allow_avatar_remote" value="1"<?php echo $avatars_remote_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="allow_avatar_remote" value="0"<?php echo $avatars_remote_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ALLOW_UPLOAD']; ?>: </b></td>
<td class="row2"><input type="radio" name="allow_avatar_upload" value="1"<?php echo $avatars_upload_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="allow_avatar_upload" value="0"<?php echo $avatars_upload_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['MAX_FILESIZE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['MAX_FILESIZE_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="4" maxlength="10" name="avatar_filesize" value="<?php echo $new['avatar_filesize']; ?>" /> Bytes</td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['MIN_AVATAR_SIZE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['MIN_AVATAR_SIZE_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="avatar_min_height" value="<?php echo $new['avatar_min_height']; ?>" /> x <input class="post" type="text" size="3" maxlength="4" name="avatar_min_width" value="<?php echo $new['avatar_min_width']; ?>"></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['MAX_AVATAR_SIZE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['MAX_AVATAR_SIZE_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="avatar_max_height" value="<?php echo $new['avatar_max_height']; ?>" /> x <input class="post" type="text" size="3" maxlength="4" name="avatar_max_width" value="<?php echo $new['avatar_max_width']; ?>"></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['AVATAR_STORAGE_PATH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['AVATAR_STORAGE_PATH_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="20" maxlength="255" name="avatar_path" value="<?php echo $new['avatar_path']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['AVATAR_GALLERY_PATH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['AVATAR_GALLERY_PATH_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="20" maxlength="255" name="avatar_gallery_path" value="<?php echo $new['avatar_gallery_path']; ?>" /></td>
</tr>
<?php
break;
case 'default':
$style_select = style_select($new['default_style'], true);
$lang_select = language_select($new['default_lang']);
$timezone_select = tz_select($new['board_timezone']);
$override_user_style_yes = ($new['override_user_style']) ? 'checked="checked"' : '';
$override_user_style_no = (!$new['override_user_style']) ? 'checked="checked"' : '';
$dst_yes = ($new['board_dst']) ? 'checked="checked"' : '';
$dst_no = (!$new['board_dst']) ? 'checked="checked"' : '';
$topic_notify_yes = ($new['allow_topic_notify']) ? 'checked="checked"' : '';
$topic_notify_no = (!$new['allow_topic_notify']) ? 'checked="checked"' : '';
$forum_notify_yes = ($new['allow_forum_notify']) ? 'checked="checked"' : '';
$forum_notify_no = (!$new['allow_forum_notify']) ? 'checked="checked"' : '';
$html_yes = ($new['allow_html']) ? 'checked="checked"' : '';
$html_no = (!$new['allow_html']) ? 'checked="checked"' : '';
$bbcode_yes = ($new['allow_bbcode']) ? 'checked="checked"' : '';
$bbcode_no = (!$new['allow_bbcode']) ? 'checked="checked"' : '';
$smile_yes = ($new['allow_smilies']) ? 'checked="checked"' : '';
$smile_no = (!$new['allow_smilies']) ? 'checked="checked"' : '';
$sig_yes = ($new['allow_sig']) ? 'checked="checked"' : '';
$sig_no = (!$new['allow_sig']) ? 'checked="checked"' : '';
$censors_yes = ($new['allow_nocensors']) ? 'checked="checked"' : '';
$censors_no = (!$new['allow_nocensors']) ? 'checked="checked"' : '';
$namechange_yes = ($new['allow_namechange']) ? 'checked="checked"' : '';
$namechange_no = (!$new['allow_namechange']) ? 'checked="checked"' : '';
$emailreuse_yes = ($new['allow_emailreuse']) ? 'checked="checked"' : '';
$emailreuse_no = (!$new['allow_emailreuse']) ? 'checked="checked"' : '';
$attachments_yes = ($new['allow_attachments']) ? 'checked="checked"' : '';
$attachments_no = (!$new['allow_attachments']) ? 'checked="checked"' : '';
// Caching screws up slashes so we fudge a solution
$user_char_ary = array('USERNAME_CHARS_ANY' => '.*', 'USERNAME_ALPHA_ONLY' => '[/w]+', 'USERNAME_ALPHA_SPACERS' => '[/w_/+/. /-/[/]]+');
$user_char_options = '';
foreach ($user_char_ary as $lang => $value)
{
$selected = ($new['allow_name_chars'] == $value) ? ' selected="selected"' : '';
$user_char_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$lang] . '</option>';
}
?>
<tr>
<td class="row1" width="50%"><b><?php echo $user->lang['DEFAULT_STYLE']; ?></td>
<td class="row2"><select name="default_style"><?php echo $style_select; ?></select></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['OVERRIDE_STYLE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['OVERRIDE_STYLE_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="override_user_style" value="1" <?php echo $override_user_style_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="override_user_style" value="0" <?php echo $override_user_style_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['DEFAULT_LANGUAGE']; ?>: </b></td>
<td class="row2"><select name="default_lang"><?php echo $lang_select; ?></select></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['DATE_FORMAT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['DATE_FORMAT_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" name="default_dateformat" value="<?php echo $new['default_dateformat']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['SYSTEM_TIMEZONE']; ?>: </b></td>
<td class="row2"><select name="board_timezone"><?php echo $timezone_select; ?></select></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['SYSTEM_DST']; ?>: </b></td>
<td class="row2"><input type="radio" name="board_dst" value="1" <?php echo $dst_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="board_dst" value="0" <?php echo $dst_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['CHAR_LIMIT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['CHAR_LIMIT_EXPLAIN']; ?></span</td>
<td class="row2"><input class="post" type="text" size="4" maxlength="6" name="max_post_chars" value="<?php echo $new['max_post_chars']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['SMILIES_LIMIT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SMILIES_LIMIT_EXPLAIN']; ?></span</td>
<td class="row2"><input class="post" type="text" size="4" maxlength="4" name="max_post_smilies" value="<?php echo $new['max_post_smilies']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['QUOTE_DEPTH_LIMIT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['QUOTE_DEPTH_LIMIT_EXPLAIN']; ?></span</td>
<td class="row2"><input class="post" type="text" size="4" maxlength="4" name="max_quote_depth" value="<?php echo $new['max_quote_depth']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ALLOW_TOPIC_NOTIFY']; ?>: </b></td>
<td class="row2"><input type="radio" name="allow_topic_notify" value="1" <?php echo $topic_notify_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="allow_topic_notify" value="0" <?php echo $topic_notify_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ALLOW_FORUM_NOTIFY']; ?>: </b></td>
<td class="row2"><input type="radio" name="allow_forum_notify" value="1" <?php echo $forum_notify_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="allow_forum_notify" value="0" <?php echo $forum_notify_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ALLOW_NAME_CHANGE']; ?>: </b></td>
<td class="row2"><input type="radio" name="allow_namechange" value="1" <?php echo $namechange_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="allow_namechange" value="0" <?php echo $namechange_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['USERNAME_LENGTH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['USERNAME_LENGTH_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="3" maxlength="3" name="min_name_chars" value="<?php echo $new['min_name_chars']; ?>" /> <?php echo $user->lang['MIN_CHARS']; ?>&nbsp;&nbsp;<input class="post" type="text" size="3" maxlength="3" name="max_name_chars" value="<?php echo $new['max_name_chars']; ?>" /> <?php echo $user->lang['MAX_CHARS']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['USERNAME_CHARS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['USERNAME_CHARS_EXPLAIN']; ?></span></td>
<td class="row2"><select name="allow_name_chars"><?php echo $user_char_options; ?></select></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['PASSWORD_LENGTH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['PASSWORD_LENGTH_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="3" maxlength="3" name="min_pass_chars" value="<?php echo $new['min_pass_chars']; ?>" /> <?php echo $user->lang['MIN_CHARS']; ?>&nbsp;&nbsp;<input class="post" type="text" size="3" maxlength="3" name="max_pass_chars" value="<?php echo $new['max_pass_chars']; ?>" /> <?php echo $user->lang['MAX_CHARS']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ALLOW_EMAIL_REUSE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ALLOW_EMAIL_REUSE_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="allow_emailreuse" value="1" <?php echo $emailreuse_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="allow_emailreuse" value="0" <?php echo $emailreuse_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ALLOW_ATTACHMENTS']; ?>: </b></td>
<td class="row2"><input type="radio" name="allow_attachments" value="1" <?php echo $attachments_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="allow_attachments" value="0" <?php echo $attachments_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ALLOW_HTML']; ?>: </b></td>
<td class="row2"><input type="radio" name="allow_html" value="1" <?php echo $html_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="allow_html" value="0" <?php echo $html_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ALLOWED_TAGS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ALLOWED_TAGS_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="30" maxlength="255" name="allow_html_tags" value="<?php echo $new['allow_html_tags']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ALLOW_BBCODE']; ?>: </b></td>
<td class="row2"><input type="radio" name="allow_bbcode" value="1" <?php echo $bbcode_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="allow_bbcode" value="0" <?php echo $bbcode_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ALLOW_SMILIES']; ?>: </b></td>
<td class="row2"><input type="radio" name="allow_smilies" value="1" <?php echo $smile_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="allow_smilies" value="0" <?php echo $smile_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ALLOW_SIG']; ?>: </b></td>
<td class="row2"><input type="radio" name="allow_sig" value="1" <?php echo $sig_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="allow_sig" value="0" <?php echo $sig_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['MAX_SIG_LENGTH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['MAX_SIG_LENGTH_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="5" maxlength="4" name="max_sig_chars" value="<?php echo $new['max_sig_chars']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ALLOW_NO_CENSORS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ALLOW_NO_CENSORS_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="allow_nocensors" value="1" <?php echo $censors_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="allow_nocensors" value="0" <?php echo $censors_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<?php
break;
case 'setting':
$disable_board_yes = ($new['board_disable']) ? 'checked="checked"' : '';
$disable_board_no = (!$new['board_disable']) ? 'checked="checked"' : '';
$confirm_enabled = ($new['enable_confirm']) ? 'checked="checked"' : '';
$confirm_disabled = (!$new['enable_confirm']) ? 'checked="checked"' : '';
$coppa_enable_yes = ($new['coppa_enable']) ? 'checked="checked"' : '';
$coppa_enable_no = (!$new['coppa_enable']) ? 'checked="checked"' : '';
$activation_none = ($new['require_activation'] == USER_ACTIVATION_NONE) ? 'checked="checked"' : '';
$activation_user = ($new['require_activation'] == USER_ACTIVATION_SELF) ? 'checked="checked"' : '';
$activation_admin = ($new['require_activation'] == USER_ACTIVATION_ADMIN) ? 'checked="checked"' : '';
$activation_user_admin = ($new['require_activation'] == USER_ACTIVATION_SELF_ADMIN) ? 'checked="checked"' : '';
$activation_disable = ($new['require_activation'] == USER_ACTIVATION_DISABLE) ? 'checked="checked"' : '';
$privmsg_on = (!$new['privmsg_disable']) ? 'checked="checked"' : '';
$privmsg_off = ($new['privmsg_disable']) ? 'checked="checked"' : '';
$prune_yes = ($new['prune_enable']) ? 'checked="checked"' : '';
$prune_no = (!$new['prune_enable']) ? 'checked="checked"' : '';
$display_last_edited_yes = ($new['display_last_edited']) ? 'checked="checked"' : '';
$display_last_edited_no = (!$new['display_last_edited']) ? 'checked="checked"' : '';
?>
<tr>
<td class="row1" width="50%"><b><?php echo $user->lang['SITE_NAME']; ?>: </b></td>
<td class="row2"><input class="post" type="text" size="40" maxlength="255" name="sitename" value="<?php echo htmlentities($new['sitename']); ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['SITE_DESC']; ?>: </b></td>
<td class="row2"><input class="post" type="text" size="40" maxlength="255" name="site_desc" value="<?php echo htmlentities($new['site_desc']); ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['BOARD_DISABLE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BOARD_DISABLE_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="board_disable" value="1" <?php echo $disable_board_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="board_disable" value="0" <?php echo $disable_board_no; ?> /> <?php echo $user->lang['NO']; ?><br /><input class="post" type="text" name="board_disable_msg" maxlength="255" size="40" value="<?php echo $new['board_disable_msg']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ACC_ACTIVATION']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ACC_ACTIVATION_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_NONE; ?>" <?php echo $activation_none; ?> /> <?php echo $user->lang['ACC_NONE']; ?>&nbsp; &nbsp;<input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_SELF; ?>" <?php echo $activation_user; ?> /> <?php echo $user->lang['ACC_USER']; ?>&nbsp; &nbsp;<input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_ADMIN; ?>" <?php echo $activation_admin; ?> /> <?php echo $user->lang['ACC_ADMIN']; ?>&nbsp; &nbsp;<input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_DISABLE; ?>" <?php echo $activation_disable; ?> /> <?php echo $user->lang['ACC_DISABLE']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['VISUAL_CONFIRM']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['VISUAL_CONFIRM_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="enable_confirm" value="1"<?php echo $confirm_enabled ?> /> <?php echo $user->lang['YES'] ?>&nbsp; &nbsp;<input type="radio" name="enable_confirm" value="0" <?php echo $confirm_disabled ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ENABLE_COPPA']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ENABLE_COPPA_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="coppa_enable" value="1" <?php echo $coppa_enable_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="coppa_enable" value="0" <?php echo $coppa_enable_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['COPPA_FAX']; ?>: </b></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="coppa_fax" value="<?php echo $new['coppa_fax']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['COPPA_MAIL']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['COPPA_MAIL_EXPLAIN']; ?></span></td>
<td class="row2"><textarea name="coppa_mail" rows="5" cols="40"><?php echo $new['coppa_mail']; ?></textarea></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['BOARD_PM']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BOARD_PM_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="privmsg_disable" value="0" <?php echo $privmsg_on; ?> /><?php echo $user->lang['ENABLED']; ?>&nbsp; &nbsp;<input type="radio" name="privmsg_disable" value="1" <?php echo $privmsg_off; ?> /><?php echo $user->lang['DISABLED']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['BOXES_MAX']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BOXES_MAX_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" maxlength="4" size="4" name="pm_max_boxes" value="<?php echo $new['pm_max_boxes']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['BOXES_LIMIT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BOXES_LIMIT_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" maxlength="4" size="4" name="pm_max_msgs" value="<?php echo $new['pm_max_msgs']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['EDIT_TIME']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['EDIT_TIME_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" maxlength="3" size="3" name="edit_time" value="<?php echo $new['edit_time']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['DISPLAY_LAST_EDITED']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['DISPLAY_LAST_EDITED_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="display_last_edited" value="1" <?php echo $display_last_edited_yes; ?> /><?php echo $user->lang['YES']; ?>&nbsp; &nbsp;<input type="radio" name="display_last_edited" value="0" <?php echo $display_last_edited_no; ?> /><?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['FLOOD_INTERVAL']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['FLOOD_INTERVAL_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="flood_interval" value="<?php echo $new['flood_interval']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['MIN_SEARCH_CHARS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['MIN_SEARCH_CHARS_EXPLAIN']; ?></span</td>
<td class="row2"><input class="post" type="text" size="3" maxlength="3" name="min_search_chars" value="<?php echo $new['min_search_chars']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['MAX_SEARCH_CHARS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['MAX_SEARCH_CHARS_EXPLAIN']; ?></span</td>
<td class="row2"><input class="post" type="text" size="3" maxlength="3" name="max_search_chars" value="<?php echo $new['max_search_chars']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['TOPICS_PER_PAGE']; ?>: </b></td>
<td class="row2"><input class="post" type="text" name="topics_per_page" size="3" maxlength="4" value="<?php echo $new['topics_per_page']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['POSTS_PER_PAGE']; ?>: </b></td>
<td class="row2"><input class="post" type="text" name="posts_per_page" size="3" maxlength="4" value="<?php echo $new['posts_per_page']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['HOT_THRESHOLD']; ?>: </b></td>
<td class="row2"><input class="post" type="text" name="hot_threshold" size="3" maxlength="4" value="<?php echo $new['hot_threshold']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['MAX_POLL_OPTIONS']; ?>: </b></td>
<td class="row2"><input class="post" type="text" name="max_poll_options" size="4" maxlength="4" value="<?php echo $new['max_poll_options']; ?>" /></td>
</tr>
<?php
break;
case 'email':
$email_yes = ($new['email_enable']) ? 'checked="checked"' : '';
$email_no = (!$new['email_enable']) ? 'checked="checked"' : '';
$board_email_form_yes = ($new['board_email_form']) ? 'checked="checked"' : '';
$board_email_form_no = (!$new['board_email_form']) ? 'checked="checked"' : '';
$smtp_yes = ($new['smtp_delivery']) ? 'checked="checked"' : '';
$smtp_no = (!$new['smtp_delivery']) ? 'checked="checked"' : '';
?>
<tr>
<td class="row1"><b><?php echo $user->lang['ENABLE_EMAIL']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ENABLE_EMAIL_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="email_enable" value="1" <?php echo $email_yes; ?> /> <?php echo $user->lang['ENABLED']; ?>&nbsp;&nbsp;<input type="radio" name="email_enable" value="0" <?php echo $email_no; ?> /> <?php echo $user->lang['DISABLED']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['BOARD_EMAIL_FORM']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BOARD_EMAIL_FORM_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="board_email_form" value="1" <?php echo $board_email_form_yes; ?> /> <?php echo $user->lang['ENABLED']; ?>&nbsp;&nbsp;<input type="radio" name="board_email_form" value="0" <?php echo $board_email_form_no; ?> /> <?php echo $user->lang['DISABLED']; ?></td>
</tr>
<tr>
<td class="row1" width="50%"><b><?php echo $user->lang['EMAIL_PACKAGE_SIZE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['EMAIL_PACKAGE_SIZE_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="5" maxlength="5" name="email_package_size" value="<?php echo $new['email_package_size']; ?>" /></td>
</tr>
<tr>
<td class="row1" width="50%"><b><?php echo $user->lang['CONTACT_EMAIL']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['CONTACT_EMAIL_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="board_contact" value="<?php echo $new['board_contact']; ?>" /></td>
</tr>
<tr>
<td class="row1" width="50%"><b><?php echo $user->lang['ADMIN_EMAIL']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ADMIN_EMAIL_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="board_email" value="<?php echo $new['board_email']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['EMAIL_SIG']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['EMAIL_SIG_EXPLAIN']; ?></span></td>
<td class="row2"><textarea name="board_email_sig" rows="5" cols="30"><?php echo $new['board_email_sig']; ?></textarea></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['USE_SMTP']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['USE_SMTP_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="smtp_delivery" value="1" <?php echo $smtp_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="smtp_delivery" value="0" <?php echo $smtp_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['SMTP_SERVER']; ?>: </b></td>
<td class="row2"><input class="post" type="text" name="smtp_host" value="<?php echo $new['smtp_host']; ?>" size="25" maxlength="50" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['SMTP_PORT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SMTP_PORT_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" name="smtp_port" value="<?php echo $new['smtp_port']; ?>" size="4" maxlength="5" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['SMTP_USERNAME']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SMTP_USERNAME_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" name="smtp_username" value="<?php echo $new['smtp_username']; ?>" size="25" maxlength="255" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['SMTP_PASSWORD']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SMTP_PASSWORD_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="password" name="smtp_password" value="<?php echo $new['smtp_password']; ?>" size="25" maxlength="255" /></td>
</tr>
<?php
break;
case 'server':
$ip_all = ($new['ip_check'] == 4) ? 'checked="checked"' : '';
$ip_classc = ($new['ip_check'] == 3) ? 'checked="checked"' : '';
$ip_classb = ($new['ip_check'] == 2) ? 'checked="checked"' : '';
$ip_none = ($new['ip_check'] == 0) ? 'checked="checked"' : '';
$browser_yes = ($new['browser_check']) ? 'checked="checked"' : '';
$browser_no = (!$new['browser_check']) ? 'checked="checked"' : '';
$gzip_yes = ($new['gzip_compress']) ? 'checked="checked"' : '';
$gzip_no = (!$new['gzip_compress']) ? 'checked="checked"' : '';
?>
<tr>
<td class="row1"><b><?php echo $user->lang['SERVER_NAME']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SERVER_NAME_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" maxlength="255" size="40" name="server_name" value="<?php echo $new['server_name']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['SERVER_PORT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SERVER_PORT_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" maxlength="5" size="5" name="server_port" value="<?php echo $new['server_port']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['SCRIPT_PATH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SCRIPT_PATH_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" maxlength="255" name="script_path" value="<?php echo $new['script_path']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['IP_VALID']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['IP_VALID_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="ip_check" value="4" <?php echo $ip_all; ?> /> <?php echo $user->lang['ALL']; ?>&nbsp;&nbsp;<input type="radio" name="ip_check" value="3" <?php echo $ip_classc; ?> /> <?php echo $user->lang['CLASS_C']; ?>&nbsp;&nbsp;<input type="radio" name="ip_check" value="2" <?php echo $ip_classb; ?> /> <?php echo $user->lang['CLASS_B']; ?>&nbsp;&nbsp;<input type="radio" name="ip_check" value="0" <?php echo $ip_none; ?> /> <?php echo $user->lang['NONE']; ?>&nbsp;&nbsp;</td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['BROWSER_VALID']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['BROWSER_VALID_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="browser_check" value="1" <?php echo $browser_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="browser_check" value="0" <?php echo $browser_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ENABLE_GZIP']; ?>: </b></td>
<td class="row2"><input type="radio" name="gzip_compress" value="1" <?php echo $gzip_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="gzip_compress" value="0" <?php echo $gzip_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['SMILIES_PATH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SMILIES_PATH_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="20" maxlength="255" name="smilies_path" value="<?php echo $new['smilies_path']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['ICONS_PATH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['ICONS_PATH_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="20" maxlength="255" name="icons_path" value="<?php echo $new['icons_path']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['RANKS_PATH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['RANKS_PATH_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="20" maxlength="255" name="ranks_path" value="<?php echo $new['ranks_path']; ?>" /></td>
</tr>
<?php
break;
case 'load':
$load_db_track_yes = ($new['load_db_track']) ? 'checked="checked"' : '';
$load_db_track_no = (!$new['load_db_track']) ? 'checked="checked"' : '';
$load_db_lastread_yes = ($new['load_db_lastread']) ? 'checked="checked"' : '';
$load_db_lastread_no = (!$new['load_db_lastread']) ? 'checked="checked"' : '';
$load_online_yes = ($new['load_online']) ? 'checked="checked"' : '';
$load_online_no = (!$new['load_online']) ? 'checked="checked"' : '';
$load_onlinetrack_yes = ($new['load_onlinetrack']) ? 'checked="checked"' : '';
$load_onlinetrack_no = (!$new['load_onlinetrack']) ? 'checked="checked"' : '';
$load_birthdays_yes = ($new['load_birthdays']) ? 'checked="checked"' : '';
$load_birthdays_no = (!$new['load_birthdays']) ? 'checked="checked"' : '';
$moderators_yes = ($new['load_moderators']) ? 'checked="checked"' : '';
$moderators_no = (!$new['load_moderators']) ? 'checked="checked"' : '';
$search_yes = ($new['load_search']) ? 'checked="checked"' : '';
$search_no = (!$new['load_search']) ? 'checked="checked"' : '';
$search_update_yes = ($new['load_search_upd']) ? 'checked="checked"' : '';
$search_update_no = (!$new['load_search_upd']) ? 'checked="checked"' : '';
$search_phrase_yes = ($new['load_search_phr']) ? 'checked="checked"' : '';
$search_phrase_no = (!$new['load_search_phr']) ? 'checked="checked"' : '';
?>
<tr>
<td class="row1" width="50%"><b><?php echo $user->lang['LIMIT_LOAD']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['LIMIT_LOAD_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="4" maxlength="4" name="limit_load" value="<?php echo $new['limit_load']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['SESSION_LENGTH']; ?>: </b></td>
<td class="row2"><input class="post" type="text" maxlength="5" size="5" name="session_length" value="<?php echo $new['session_length']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['LIMIT_SESSIONS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['LIMIT_SESSIONS_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="4" maxlength="4" name="active_sessions" value="<?php echo $new['active_sessions']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['YES_POST_MARKING']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['YES_POST_MARKING_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="load_db_track" value="1"<?php echo $load_db_track_yes ?> /><?php echo $user->lang['YES'] ?>&nbsp; &nbsp;<input type="radio" name="load_db_track" value="0" <?php echo $load_db_track_no ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['YES_READ_MARKING']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['YES_READ_MARKING_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="load_db_lastread" value="1"<?php echo $load_db_lastread_yes ?> /><?php echo $user->lang['YES'] ?>&nbsp; &nbsp;<input type="radio" name="load_db_lastread" value="0" <?php echo $load_db_lastread_no ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['YES_ONLINE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['YES_ONLINE_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="load_online" value="1"<?php echo $load_online_yes ?> /><?php echo $user->lang['YES'] ?>&nbsp; &nbsp;<input type="radio" name="load_online" value="0" <?php echo $load_online_no ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['YES_ONLINE_TRACK']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['YES_ONLINE_TRACK_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="load_onlinetrack" value="1"<?php echo $load_onlinetrack_yes ?> /><?php echo $user->lang['YES'] ?>&nbsp; &nbsp;<input type="radio" name="load_onlinetrack" value="0" <?php echo $load_onlinetrack_no ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['VIEW_ONLINE_TIME']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['VIEW_ONLINE_TIME_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="4" maxlength="3" name="load_online_time" value="<?php echo $new['load_online_time']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['YES_BIRTHDAYS']; ?>: </b></td>
<td class="row2"><input type="radio" name="load_birthdays" value="1"<?php echo $load_birthdays_yes ?> /><?php echo $user->lang['YES'] ?>&nbsp; &nbsp;<input type="radio" name="load_birthdays" value="0" <?php echo $load_birthdays_no ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['YES_MODERATORS']; ?>: </b></td>
<td class="row2"><input type="radio" name="load_moderators" value="1"<?php echo $moderators_yes ?> /><?php echo $user->lang['YES'] ?>&nbsp; &nbsp;<input type="radio" name="load_moderators" value="0" <?php echo $moderators_no ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['YES_SEARCH']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['YES_SEARCH_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="load_search" value="1"<?php echo $search_yes ?> /><?php echo $user->lang['YES'] ?>&nbsp; &nbsp;<input type="radio" name="load_search" value="0" <?php echo $search_no ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['SEARCH_INTERVAL']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SEARCH_INTERVAL_EXPLAIN']; ?></span></td>
<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="search_interval" value="<?php echo $new['search_interval']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['YES_SEARCH_UPDATE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['YES_SEARCH_UPDATE_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="load_search_upd" value="1"<?php echo $search_update_yes ?> /><?php echo $user->lang['YES'] ?>&nbsp; &nbsp;<input type="radio" name="load_search_upd" value="0" <?php echo $search_update_no ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['YES_SEARCH_PHRASE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['YES_SEARCH_PHRASE_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="load_search_phr" value="1"<?php echo $search_phrase_yes ?> /><?php echo $user->lang['YES'] ?>&nbsp; &nbsp;<input type="radio" name="load_search_phr" value="0" <?php echo $search_phrase_no ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<?php
break;
case 'auth':
$auth_plugins = array();
$dp = opendir($phpbb_root_path . 'includes/auth');
while ($file = readdir($dp))
{
if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
{
$auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file);
}
}
sort($auth_plugins);
$auth_select = '';
foreach ($auth_plugins as $method)
{
$selected = ($config['auth_method'] == $method) ? ' selected="selected"' : '';
$auth_select .= '<option value="' . $method . '"' . $selected . '>' . ucfirst($method) . '</option>';
}
?>
<tr>
<td class="row1" width="50%"><b><?php echo $user->lang['AUTH_METHOD']; ?>: </b></td>
<td class="row2"><select name="auth_method"><?php echo $auth_select; ?></select></td>
</tr>
<?php
foreach ($auth_plugins as $method)
{
if ($method && file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
{
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
$method = 'admin_' . $method;
if (function_exists($method))
{
if ($config_fields = $method($new))
{
// Check if we need to create config fields for this plugin
foreach($config_fields as $field)
{
if (!isset($config[$field]))
{
set_config($field, '');
}
}
}
unset($config_fields);
}
}
}
break;
case 'karma':
$enable_karma_yes = ($new['enable_karma']) ? 'checked="checked"' : '';
$enable_karma_no = (!$new['enable_karma']) ? 'checked="checked"' : '';
?>
<tr>
<td class="row1"><b><?php echo $user->lang['ENABLE_KARMA']; ?>: </b></td>
<td class="row2"><input type="radio" name="enable_karma" value="1"<?php echo $enable_karma_yes ?> /><?php echo $user->lang['YES'] ?>&nbsp; &nbsp;<input type="radio" name="enable_karma" value="0" <?php echo $enable_karma_no ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['MIN_RATINGS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['MIN_RATINGS_EXPLAIN']; ?></span</td>
<td class="row2"><input class="post" type="text" size="3" maxlength="5" name="min_ratings" value="<?php echo $new['min_ratings']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['KARMA_HIST_WEIGHT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['KARMA_HIST_WEIGHT_EXPLAIN']; ?></span</td>
<td class="row2"><input class="post" type="text" size="3" maxlength="5" name="karma_hist_weight" value="<?php echo $new['karma_hist_weight']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['KARMA_DAY_WEIGHT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['KARMA_DAY_WEIGHT_EXPLAIN']; ?></span</td>
<td class="row2"><input class="post" type="text" size="3" maxlength="5" name="karma_day_weight" value="<?php echo $new['karma_30_weight']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['KARMA_REG_WEIGHT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['KARMA_REG_WEIGHT_EXPLAIN']; ?></span</td>
<td class="row2"><input class="post" type="text" size="3" maxlength="5" name="karma_reg_weight" value="<?php echo $new['karma_reg_weight']; ?>" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['KARMA_POST_WEIGHT']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['KARMA_POST_WEIGHT_EXPLAIN']; ?></span</td>
<td class="row2"><input class="post" type="text" size="3" maxlength="5" name="karma_post_weight" value="<?php echo $new['karma_post_weight']; ?>" /></td>
</tr>
<?php
break;
}
?>
<tr>
<td class="cat" colspan="2" align="center"><input type="submit" name="submit" value="<?php echo $user->lang['SUBMIT']; ?>" class="btnmain" />&nbsp;&nbsp;<input type="reset" value="<?php echo $user->lang['RESET']; ?>" class="btnlite" /></td>
</tr>
</table></form>
<?php
adm_page_footer();
?>

View File

@@ -0,0 +1,995 @@
<?php
// -------------------------------------------------------------
//
// $Id$
//
// FILENAME : admin_database.php
// STARTED : Thu May 31, 2001
// COPYRIGHT : <20> 2003 phpBB Group
// WWW : http://www.phpbb.com/
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
//
// -------------------------------------------------------------
if (!empty($setmodules))
{
$filename = basename(__FILE__);
$module['DB']['DB_BACKUP'] = ($auth->acl_get('a_backup')) ? $filename . "$SID&amp;mode=backup" : '';
$file_uploads = @ini_get('file_uploads');
if (!empty($file_uploads) && $file_uploads !== 0 && strtolower($file_uploads) != 'off' && $auth->acl_get('a_restore'))
{
$module['DB']['DB_RESTORE'] = "$filenamex$SID&amp;mode=restore";
}
return;
}
define('IN_PHPBB', 1);
// Load default header
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
include($phpbb_root_path . 'functions_compress.'.$phpEx);
@set_time_limit(1200);
// Get some vars
$mode = (isset($_GET['mode'])) ? htmlspecialchars($_GET['mode']) : '';
$action = (isset($_REQUEST['action'])) ? htmlspecialchars($_REQUEST['action']) : '';
// --------------------
// Begin program proper
// --------------------
switch($mode)
{
case 'backup':
if (!$auth->acl_get('a_backup'))
{
trigger_error($user->lang['NO_ADMIN']);
}
$db_type = '';
switch (SQL_LAYER)
{
case 'oracle':
$db_type = 'Oracle';
break;
case 'odbc':
$db_type = 'ODBC';
break;
case 'mssql':
$db_type = 'MSSQL';
break;
}
if ($db_type)
{
trigger_error($user->lang['Backups_not_supported']);
}
$additional_tables = (isset($_REQUEST['tables'])) ? htmlspecialchars($_REQUEST['tables']) : '';
$backup_type = (isset($_REQUEST['type'])) ? intval($_REQUEST['type']) : false;
$search = (!empty($_REQUEST['search'])) ? true : false;
$store = (!empty($_REQUEST['store'])) ? true : false;
$compress = (isset($_REQUEST['compress'])) ? htmlspecialchars($_REQUEST['compress']) : '';
if (!isset($_POST['backupstart']) && !isset($_GET['backupstart']))
{
adm_page_header($user->lang['DB_BACKUP']);
?>
<h1><?php echo $user->lang['DB_BACKUP']; ?></h1>
<p><?php echo $user->lang['Backup_explain']; ?></p>
<form method="post" action="<?php echo "admin_database.$phpEx$SID&amp;mode=$mode"; ?>"><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $user->lang['Backup_options']; ?></th>
</tr>
<tr>
<td class="row1" width="40%"><b><?php echo $user->lang['Backup_type']; ?>: </b></td>
<td class="row2"><input type="radio" name="type" value="full" checked="checked" /> <?php echo $user->lang['Full_backup']; ?>&nbsp;&nbsp;<input type="radio" name="type" value="structure" /> <?php echo $user->lang['Structure_only']; ?>&nbsp;&nbsp;<input type="radio" name="type" value="data" /> <?php echo $user->lang['Data_only']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['Additional_tables']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['Additional_tables_explain']; ?></span></td>
<td class="row2"><input class="post" type="text" name="tables" maxlength="255" size="40" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['INC_SEARCH_INDEX']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['INC_SEARCH_INDEX_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="search" value="1" checked="checked" /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="search" value="0" /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['DOWNLOAD_STORE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['DOWNLOAD_STORE_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="store" value="0" checked="checked" /> <?php echo $user->lang['EXPORT_DOWNLOAD']; ?>&nbsp;&nbsp;<input type="radio" name="store" value="1" /> <?php echo $user->lang['EXPORT_STORE']; ?></td>
</tr>
<?php
if (@extension_loaded('zlib') || extension_loaded('bz2'))
{
?>
<tr>
<td class="row1"><b><?php echo $user->lang['Compress_file']; ?>: </b></td>
<td class="row2"><input type="radio" name="compress" value="none" checked="checked" /> <?php echo $user->lang['NONE']; ?><?php
if (extension_loaded('zlib'))
{
?>&nbsp;&nbsp;<input type="radio" name="compress" value="gzip" />.gz&nbsp;&nbsp;<input type="radio" name="compress" value="zip" />.zip<?php
}
if (extension_loaded('bz2'))
{
?>&nbsp;&nbsp;<input type="radio" name="compress" value="bzip" />.bz2<?php
}
?></td>
</tr>
<?php
}
?>
<tr>
<td class="cat" colspan="2" align="center"><input type="submit" name="backupstart" value="<?php echo $user->lang['Start_backup']; ?>" class="btnmain" /></td>
</tr>
</table></form>
<?php
break;
}
else if (!isset($_POST['startdownload']) && !isset($_GET['startdownload']))
{
$meta = "<meta http-equiv=\"refresh\" content=\"0;url=admin_database.$phpEx?mode=backup&amp;type=$backup_type&amp;tables=" . quotemeta($additional_tables) . "&amp;search=$search&amp;store=" . quotemeta($store_path) . "&amp;compress=$compress&amp;backupstart=1&amp;startdownload=1\">";
$message = (empty($store_path)) ? $user->lang['Backup_download'] : $user->lang['Backup_writing'];
adm_page_header($user->lang['DB_Backup'], $meta);
page_message($user->lang['DB_Backup'], $message);
adm_page_footer();
}
$tables = (SQL_LAYER != 'postgresql') ? mysql_get_tables() : pg_get_tables();
@sort($tables);
if (!empty($additional_tables))
{
$additional_tables = explode(',', $additional_tables);
for($i = 0; $i < count($additional_tables); $i++)
{
$tables[] = trim($additional_tables[$i]);
}
unset($additional_tables);
}
// Enable output buffering
@ob_start();
@ob_implicit_flush(0);
// Build the sql script file...
echo "#\n";
echo "# phpBB Backup Script\n";
echo "# Dump of tables for $dbname\n";
echo "#\n# DATE : " . gmdate("d-m-Y H:i:s", time()) . " GMT\n";
echo "#\n";
if (SQL_LAYER == 'postgresql')
{
echo "\n" . pg_get_sequences("\n", $backup_type);
}
for($i = 0; $i < count($tables); $i++)
{
$table_name = $tables[$i];
if (SQL_LAYER != 'mysql4')
{
$table_def_function = "get_table_def_" . SQL_LAYER;
$table_content_function = "get_table_content_" . SQL_LAYER;
}
else
{
$table_def_function = "get_table_def_mysql";
$table_content_function = "get_table_content_mysql";
}
if ($backup_type != 'data')
{
echo "#\n# TABLE: " . $table_name . "\n#\n";
echo $table_def_function($table_name, "\n") . "\n";
}
if ($backup_type != 'structure')
{
//
// Skip search table data?
//
if ($search || (!$search && !preg_match('/search_word/', $table_name)))
{
$table_content_function($table_name, "output_table_content");
}
}
}
// Flush the buffer, send the file
switch ($compress)
{/*
case 'gzip':
$extension = 'sql.gz';
$contents = gzencode(ob_get_contents());
ob_end_clean();
break;
case 'zip':
$extension = 'zip';
$zip = new zipfile;
$zip->add_file(ob_get_contents(), "phpbb_db_backup.sql", time());
ob_end_clean();
$contents = $zip->file();
break;
case 'bzip':
$extension = 'bz2';
$contents = bzcompress(ob_get_contents());
ob_end_clean();
break;*/
default:
$extension = 'sql';
$contents = ob_get_contents();
ob_end_clean();
}
add_log('admin', 'log_db_backup');
if (empty($store_path))
{
header("Pragma: no-cache");
header("Content-Type: text/x-delimtext; name=\"phpbb_db_backup.$extension\"");
header("Content-disposition: attachment; filename=phpbb_db_backup.$extension");
echo $contents;
unset($contents);
}
else
{
if (!($fp = fopen('./../' . $store_path . "/phpbb_db_backup.$extension", 'wb')))
{
message_die(ERROR, 'Could not open backup file');
}
if (!fwrite($fp, $contents))
{
message_die(ERROR, 'Could not write backup file content');
}
fclose($fp);
unset($contents);
trigger_error($user->lang['Backup_success']);
}
exit;
break;
case 'restore':
if (!$auth->acl_get('a_restore'))
{
trigger_error($user->lang['NO_ADMIN']);
}
if (isset($_POST['restorestart']))
{
// Handle the file upload ....
// If no file was uploaded report an error...
if (!empty($_POST['local']))
{
$file_tmpname = './../' . str_replace('\\\\', '/', $_POST['local']);
$filename = substr($file_tmpname, strrpos($file_tmpname, '/'));
}
else
{
$filename = (!empty($_POST['backup_file']['name'])) ? $HTTP_POST_FILES['backup_file']['name'] : '';
$file_tmpname = ($HTTP_POST_FILES['backup_file']['tmp_name'] != 'none') ? $HTTP_POST_FILES['backup_file']['tmp_name'] : '';
}
if ($file_tmpname == '' || $filename == '' || !file_exists($file_tmpname))
{
trigger_error($user->lang['Restore_Error_no_file']);
}
$ext = substr($filename, strrpos($filename, '.') + 1);
if (!preg_match('/^(sql|gz|bz2)$/', $ext))
{
trigger_error($user->lang['Restore_Error_filename']);
}
if ((!extension_loaded('zlib') && $ext == 'gz') || (!extension_loaded('zip') && $ext == 'zip') || ($ext == 'bz2' && !extension_loaded('bz2')))
{
trigger_error($user->lang['Compress_unsupported']);
}
$sql_query = '';
switch ($ext)
{
case 'gz':
$fp = gzopen($file_tmpname, 'rb');
while (!gzeof($fp))
{
$sql_query .= gzgets($fp, 100000);
}
gzclose($fp);
break;
case 'bz2':
$sql_query = bzdecompress(fread(fopen($file_tmpname, 'rb'), filesize($file_tmpname)));
break;
case 'zip':
default;
$sql_query = fread(fopen($file_tmpname, 'r'), filesize($file_tmpname));
}
if ($sql_query != '')
{
// Strip out sql comments...
$sql_query = remove_remarks($sql_query);
$pieces = split_sql_file($sql_query, ';');
$sql_count = count($pieces);
for($i = 0; $i < $sql_count; $i++)
{
$sql = trim($pieces[$i]);
if (!empty($sql) && $sql[0] != '#')
{
$db->sql_query($sql);
}
}
}
add_log('admin', 'log_db_restore');
trigger_error($user->lang['Restore_success']);
}
//
// Restore page
//
adm_page_header($user->lang['DB_RESTORE']);
?>
<h1><?php echo $user->lang['DB_RESTORE']; ?></h1>
<p><?php echo $user->lang['Restore_explain']; ?></p>
<form enctype="multipart/form-data" method="post" action="<?php echo "admin_database.$phpEx$SID&amp;mode=$mode"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
<th colspan="2"><?php echo $user->lang['Select_file']; ?></th>
</tr>
<tr>
<td class="row1"><?php echo $user->lang['Upload_file']; ?>: <br /><span class="gensmall"><?php
echo $user->lang['Supported_extensions'];
$types = ': <u>sql</u>';
if (extension_loaded('zlib'))
{
$types .= ', <u>sql.gz</u>';
}
if (extension_loaded('bz2'))
{
$types .= ', <u>bz2</u>';
}
echo $types;
?></span></td>
<td class="row2"><input type="file" name="backup_file" /></td>
</tr>
<tr>
<td class="row1"><?php echo $user->lang['Local_backup_file']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Local_backup_file_explain']; ?></span></td>
<td class="row2"><input type="text" name="local" size="40" /></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><input type="submit" name="restorestart" value="<?php echo $user->lang['Start_Restore']; ?>" class="btnmain" /></td>
</tr>
</table></form>
<?php
break;
default:
trigger_error($user->lang['No_admin']);
exit;
}
adm_page_footer();
// -----------------------------------------------
// Begin Functions
//
//
// Table defns (not from phpMyAdmin)
//
function mysql_get_tables()
{
global $db, $table_prefix;
$tables = array();
$result = mysql_list_tables($db->dbname, $db->db_connect_id);
if ($row = $db->sql_fetchrow($result))
{
do
{
if (preg_match('/^' . $table_prefix . '/', $row[0]))
{
$tables[] = $row[0];
}
}
while ($row = $db->sql_fetchrow($result));
}
return $tables;
}
//
// The following functions are adapted from phpMyAdmin and upgrade_20.php
//
// This function is used for grabbing the sequences for postgres...
//
function pg_get_sequences($crlf, $backup_type)
{
global $db;
$get_seq_sql = "SELECT relname FROM pg_class WHERE NOT relname ~ 'pg_.*'
AND relkind = 'S' ORDER BY relname";
$seq = $db->sql_query($get_seq_sql);
if (!$num_seq = $db->sql_numrows($seq))
{
$return_val = "# No Sequences Found $crlf";
}
else
{
$return_val = "# Sequences $crlf";
$i_seq = 0;
while($i_seq < $num_seq)
{
$row = $db->sql_fetchrow($seq);
$sequence = $row['relname'];
$get_props_sql = "SELECT * FROM $sequence";
$seq_props = $db->sql_query($get_props_sql);
if ($db->sql_numrows($seq_props) > 0)
{
$row1 = $db->sql_fetchrow($seq_props);
if ($backup_type == 'structure')
{
$row['last_value'] = 1;
}
$return_val .= "CREATE SEQUENCE $sequence start " . $row['last_value'] . ' increment ' . $row['increment_by'] . ' maxvalue ' . $row['max_value'] . ' minvalue ' . $row['min_value'] . ' cache ' . $row['cache_value'] . "; $crlf";
} // End if numrows > 0
if (($row['last_value'] > 1) && ($backup_type != 'structure'))
{
$return_val .= "SELECT NEXTVALE('$sequence'); $crlf";
unset($row['last_value']);
}
$i_seq++;
} // End while..
} // End else...
return $returnval;
} // End function...
//
// The following functions will return the "CREATE TABLE syntax for the
// varying DBMS's
//
// This function returns, will return the table def's for postgres...
//
function get_table_def_postgresql($table, $crlf)
{
global $db;
$schema_create = "";
//
// Get a listing of the fields, with their associated types, etc.
//
$field_query = "SELECT a.attnum, a.attname AS field, t.typname as type, a.attlen AS length, a.atttypmod as lengthvar, a.attnotnull as notnull
FROM pg_class c, pg_attribute a, pg_type t
WHERE c.relname = '$table'
AND a.attnum > 0
AND a.attrelid = c.oid
AND a.atttypid = t.oid
ORDER BY a.attnum";
$result = $db->sql_query($field_query);
if (!$result)
{
message_die(GENERAL_ERROR, "Failed in get_table_def (show fields)", "", __LINE__, __FILE__, $field_query);
} // end if..
$schema_create .= "DROP TABLE $table;$crlf";
//
// Ok now we actually start building the SQL statements to restore the tables
//
$schema_create .= "CREATE TABLE $table($crlf";
while ($row = $db->sql_fetchrow($result))
{
//
// Get the data from the table
//
$sql_get_default = "SELECT d.adsrc AS rowdefault
FROM pg_attrdef d, pg_class c
WHERE (c.relname = '$table')
AND (c.oid = d.adrelid)
AND d.adnum = " . $row['attnum'];
$def_res = $db->sql_query($sql_get_default);
if (!$def_res)
{
unset($row['rowdefault']);
}
else
{
$row['rowdefault'] = @pg_result($def_res, 0, 'rowdefault');
}
if ($row['type'] == 'bpchar')
{
// Internally stored as bpchar, but isn't accepted in a CREATE TABLE statement.
$row['type'] = 'char';
}
$schema_create .= ' ' . $row['field'] . ' ' . $row['type'];
if (eregi('char', $row['type']))
{
if ($row['lengthvar'] > 0)
{
$schema_create .= '(' . ($row['lengthvar'] -4) . ')';
}
}
if (eregi('numeric', $row['type']))
{
$schema_create .= '(';
$schema_create .= sprintf("%s,%s", (($row['lengthvar'] >> 16) & 0xffff), (($row['lengthvar'] - 4) & 0xffff));
$schema_create .= ')';
}
if (!empty($row['rowdefault']))
{
$schema_create .= ' DEFAULT ' . $row['rowdefault'];
}
if ($row['notnull'] == 't')
{
$schema_create .= ' NOT NULL';
}
$schema_create .= ",$crlf";
}
//
// Get the listing of primary keys.
//
$sql_pri_keys = "SELECT ic.relname AS index_name, bc.relname AS tab_name, ta.attname AS column_name, i.indisunique AS unique_key, i.indisprimary AS primary_key
FROM pg_class bc, pg_class ic, pg_index i, pg_attribute ta, pg_attribute ia
WHERE (bc.oid = i.indrelid)
AND (ic.oid = i.indexrelid)
AND (ia.attrelid = i.indexrelid)
AND (ta.attrelid = bc.oid)
AND (bc.relname = '$table')
AND (ta.attrelid = i.indrelid)
AND (ta.attnum = i.indkey[ia.attnum-1])
ORDER BY index_name, tab_name, column_name ";
$result = $db->sql_query($sql_pri_keys);
if (!$result)
{
message_die(GENERAL_ERROR, "Failed in get_table_def (show fields)", "", __LINE__, __FILE__, $sql_pri_keys);
}
while ($row = $db->sql_fetchrow($result))
{
if ($row['primary_key'] == 't')
{
if (!empty($primary_key))
{
$primary_key .= ', ';
}
$primary_key .= $row['column_name'];
$primary_key_name = $row['index_name'];
}
else
{
//
// We have to store this all this info because it is possible to have a multi-column key...
// we can loop through it again and build the statement
//
$index_rows[$row['index_name']]['table'] = $table;
$index_rows[$row['index_name']]['unique'] = ($row['unique_key'] == 't') ? ' UNIQUE ' : '';
$index_rows[$row['index_name']]['column_names'] .= $row['column_name'] . ', ';
}
}
if (!empty($index_rows))
{
while(list($idx_name, $props) = each($index_rows))
{
$props['column_names'] = ereg_replace(", $", "" , $props['column_names']);
$index_create .= 'CREATE ' . $props['unique'] . " INDEX $idx_name ON $table (" . $props['column_names'] . ");$crlf";
}
}
if (!empty($primary_key))
{
$schema_create .= " CONSTRAINT $primary_key_name PRIMARY KEY ($primary_key),$crlf";
}
//
// Generate constraint clauses for CHECK constraints
//
$sql_checks = "SELECT rcname as index_name, rcsrc
FROM pg_relcheck, pg_class bc
WHERE rcrelid = bc.oid
AND bc.relname = '$table'
AND NOT EXISTS (
SELECT *
FROM pg_relcheck as c, pg_inherits as i
WHERE i.inhrelid = pg_relcheck.rcrelid
AND c.rcname = pg_relcheck.rcname
AND c.rcsrc = pg_relcheck.rcsrc
AND c.rcrelid = i.inhparent
)";
$result = $db->sql_query($sql_checks);
if (!$result)
{
message_die(GENERAL_ERROR, "Failed in get_table_def (show fields)", "", __LINE__, __FILE__, $sql_checks);
}
//
// Add the constraints to the sql file.
//
while ($row = $db->sql_fetchrow($result))
{
$schema_create .= ' CONSTRAINT ' . $row['index_name'] . ' CHECK ' . $row['rcsrc'] . ",$crlf";
}
$schema_create = ereg_replace(',' . $crlf . '$', '', $schema_create);
$index_create = ereg_replace(',' . $crlf . '$', '', $index_create);
$schema_create .= "$crlf);$crlf";
if (!empty($index_create))
{
$schema_create .= $index_create;
}
//
// Ok now we've built all the sql return it to the calling function.
//
return (stripslashes($schema_create));
}
//
// This function returns the "CREATE TABLE" syntax for mysql dbms...
//
function get_table_def_mysql($table, $crlf)
{
global $db;
$schema_create = "";
$field_query = "SHOW FIELDS FROM $table";
$key_query = "SHOW KEYS FROM $table";
// If the user has selected to drop existing tables when doing a restore.
// Then we add the statement to drop the tables....
$schema_create .= "DROP TABLE IF EXISTS $table;$crlf";
$schema_create .= "CREATE TABLE $table($crlf";
// Ok lets grab the fields...
$result = $db->sql_query($field_query);
while ($row = $db->sql_fetchrow($result))
{
$schema_create .= ' ' . $row['Field'] . ' ' . $row['Type'];
if (!empty($row['Default']))
{
$schema_create .= ' DEFAULT \'' . $row['Default'] . '\'';
}
if ($row['Null'] != "YES")
{
$schema_create .= ' NOT NULL';
}
if ($row['Extra'] != "")
{
$schema_create .= ' ' . $row['Extra'];
}
$schema_create .= ",$crlf";
}
//
// Drop the last ',$crlf' off ;)
//
$schema_create = ereg_replace(',' . $crlf . '$', "", $schema_create);
//
// Get any Indexed fields from the database...
//
$result = $db->sql_query($key_query);
while($row = $db->sql_fetchrow($result))
{
$kname = $row['Key_name'];
if (($kname != 'PRIMARY') && ($row['Non_unique'] == 0))
{
$kname = "UNIQUE|$kname";
}
if (!is_array($index[$kname]))
{
$index[$kname] = array();
}
$index[$kname][] = $row['Column_name'];
}
foreach ($index as $x => $columns)
{
$schema_create .= ", $crlf";
if ($x == 'PRIMARY')
{
$schema_create .= ' PRIMARY KEY (' . implode($columns, ', ') . ')';
}
elseif (substr($x,0,6) == 'UNIQUE')
{
$schema_create .= ' UNIQUE ' . substr($x,7) . ' (' . implode($columns, ', ') . ')';
}
else
{
$schema_create .= " KEY $x (" . implode($columns, ', ') . ')';
}
}
$schema_create .= "$crlf);";
if (get_magic_quotes_runtime())
{
return(stripslashes($schema_create));
}
else
{
return($schema_create);
}
} // End get_table_def_mysql
//
// This fuction will return a tables create definition to be used as an sql
// statement.
//
//
// The following functions Get the data from the tables and format it as a
// series of INSERT statements, for each different DBMS...
// After every row a custom callback function $handler gets called.
// $handler must accept one parameter ($sql_insert);
//
//
// Here is the function for postgres...
//
function get_table_content_postgresql($table, $handler)
{
global $db;
// Grab all of the data from current table.
$result = $db->sql_query("SELECT * FROM $table");
$i_num_fields = $db->sql_numfields($result);
for ($i = 0; $i < $i_num_fields; $i++)
{
$aryType[] = $db->sql_fieldtype($i, $result);
$aryName[] = $db->sql_fieldname($i, $result);
}
$iRec = 0;
while ($row = $db->sql_fetchrow($result))
{
unset($schema_vals);
unset($schema_fields);
unset($schema_insert);
// Build the SQL statement to recreate the data.
for($i = 0; $i < $i_num_fields; $i++)
{
$strVal = $row[$aryName[$i]];
if (preg_match('#char|text|bool#i', $aryType[$i]))
{
$strQuote = "'";
$strEmpty = "";
$strVal = addslashes($strVal);
}
elseif (preg_match('#date|timestamp#i', $aryType[$i]))
{
if ($empty($strVal))
{
$strQuote = "";
}
else
{
$strQuote = "'";
}
}
else
{
$strQuote = "";
$strEmpty = "NULL";
}
if (empty($strVal) && $strVal != "0")
{
$strVal = $strEmpty;
}
$schema_vals .= " $strQuote$strVal$strQuote,";
$schema_fields .= " $aryName[$i],";
}
$schema_vals = preg_replace('#,$#', '', $schema_vals);
$schema_vals = preg_replace('#^ #', '', $schema_vals);
$schema_fields = preg_replace('#,$#', '', $schema_fields);
$schema_fields = preg_replace('#^ #', '', $schema_fields);
// Take the ordered fields and their associated data and build it
// into a valid sql statement to recreate that field in the data.
$schema_insert = "INSERT INTO $table ($schema_fields) VALUES($schema_vals);";
$handler(trim($schema_insert));
}
return(true);
}// end function get_table_content_postgres...
//
// This function is for getting the data from a mysql table.
//
function get_table_content_mysql($table, $handler)
{
global $db;
// Grab the data from the table.
$result = $db->sql_query("SELECT * FROM $table");
// Loop through the resulting rows and build the sql statement.
$schema_insert = "";
if ($row = $db->sql_fetchrow($result))
{
$schema_insert = "\n#\n# Table Data for $table\n#\n";
$handler($schema_insert);
do
{
$table_list = '(';
$num_fields = $db->sql_numfields($result);
//
// Grab the list of field names.
//
for ($j = 0; $j < $num_fields; $j++)
{
$table_list .= $db->sql_fieldname($j, $result) . ', ';
}
//
// Get rid of the last comma
//
$table_list = preg_replace('#, $#', '', $table_list);
$table_list .= ')';
//
// Start building the SQL statement.
//
$schema_insert = "INSERT INTO $table $table_list VALUES(";
//
// Loop through the rows and fill in data for each column
//
for ($j = 0; $j < $num_fields; $j++)
{
if (!isset($row[$j]))
{
//
// If there is no data for the column set it to null.
// There was a problem here with an extra space causing the
// sql file not to reimport if the last column was null in
// any table. Should be fixed now :) JLH
//
$schema_insert .= ' NULL,';
}
elseif ($row[$j] != '')
{
$schema_insert .= ' \'' . addslashes($row[$j]) . '\',';
}
else
{
$schema_insert .= '\'\',';
}
}
//
// Get rid of the the last comma.
//
$schema_insert = preg_replace('#,$#', '', $schema_insert);
$schema_insert .= ');';
//
// Go ahead and send the insert statement to the handler function.
//
$handler(trim($schema_insert));
}
while ($row = $db->sql_fetchrow($result));
}
return true;
}
function output_table_content($content)
{
global $tempfile;
//fwrite($tempfile, $content . "\n");
//$backup_sql .= $content . "\n";
echo $content ."\n";
return;
}
//
// End Functions
// -----------------------------------------------
?>

View File

@@ -0,0 +1,166 @@
<?php
/***************************************************************************
* admin_disallow.php
* -------------------
* begin : Tuesday, Oct 05, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if (!empty($setmodules))
{
if (!$auth->acl_get('a_names'))
{
return;
}
$module['USER']['DISALLOW'] = basename(__FILE__) . $SID;
return;
}
define('IN_PHPBB', 1);
// Include files
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
require($phpbb_root_path . 'includes/functions_user.'.$phpEx);
// Check permissions
if (!$auth->acl_get('a_names'))
{
trigger_error($user->lang['NO_ADMIN']);
}
if (isset($_POST['disallow']))
{
$disallowed_user = (isset($_REQUEST['disallowed_user'])) ? htmlspecialchars($_REQUEST['disallowed_user']) : '';
$disallowed_user = str_replace('*', '%', $disallowed_user);
if (validate_username($disallowed_user))
{
$message = $user->lang['Disallowed_already'];
}
else
{
$sql = 'INSERT INTO ' . DISALLOW_TABLE . " (disallow_username)
VALUES('" . $db->sql_escape(stripslashes($disallowed_user)) . "')";
$result = $db->sql_query($sql);
$message = $user->lang['Disallow_successful'];
}
add_log('admin', 'log_disallow_add', str_replace('%', '*', $disallowed_user));
trigger_error($message);
}
else if (isset($_POST['allow']))
{
$disallowed_id = (isset($_REQUEST['disallowed_id'])) ? intval($_REQUEST['disallowed_id']) : '';
if (empty($disallowed_id))
{
trigger_error($user->lang['No_user_selected']);
}
$sql = 'DELETE FROM ' . DISALLOW_TABLE . "
WHERE disallow_id = $disallowed_id";
$db->sql_query($sql);
add_log('admin', 'log_disallow_delete');
trigger_error($user->lang['Disallowed_deleted']);
}
// Grab the current list of disallowed usernames...
$sql = 'SELECT *
FROM ' . DISALLOW_TABLE;
$result = $db->sql_query($sql);
$disallow_select = '';
if ($row = $db->sql_fetchrow($result))
{
do
{
$disallow_select .= '<option value="' . $row['disallow_id'] . '">' . str_replace('%', '*', $row['disallow_username']) . '</option>';
}
while ($row = $db->sql_fetchrow($result));
}
// Output page
adm_page_header($user->lang['DISALLOW']);
?>
<h1><?php echo $user->lang['DISALLOW']; ?></h1>
<p><?php echo $user->lang['Disallow_explain']; ?></p>
<form method="post" action="<?php echo "admin_disallow.$phpEx$SID"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $user->lang['Add_disallow_title']; ?></th>
</tr>
<tr>
<td class="row1"><?php echo $user->lang['USERNAME']; ?><br /><span class="gensmall"><?php echo $user->lang['Add_disallow_explain']; ?></span></td>
<td class="row2"><input class="post" type="text" name="disallowed_user" size="30" />&nbsp;</td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="disallow" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" />
</tr>
</table>
<h1><?php echo $user->lang['Delete_disallow_title']; ?></h1>
<p><?php echo $user->lang['Delete_disallow_explain']; ?></p>
<table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $user->lang['Delete_disallow_title']; ?></th>
</tr>
<?php
if ($disallow_select != '')
{
?>
<tr>
<td class="row1"><?php echo $user->lang['USERNAME']; ?></td>
<td class="row2"><select class="post" name="disallowed_id"><?php echo $disallow_select; ?></select></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="allow" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" />
</tr>
<?php
}
else
{
?>
<tr>
<td class="row1" colspan="2" align="center"><?php echo $user->lang['No_disallowed']; ?></td>
</tr>
<?php
}
?>
</table></form>
<?php
adm_page_footer();
?>

223
phpBB/adm/admin_email.php Normal file
View File

@@ -0,0 +1,223 @@
<?php
/***************************************************************************
* admin_email.php
* -------------------
* begin : Thu May 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
****************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if (!empty($setmodules))
{
$file = basename(__FILE__);
$module['GENERAL']['MASS_EMAIL'] = ($auth->acl_get('a_email')) ? "$file$SID" : '';
return;
}
define('IN_PHPBB', 1);
// Include files
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
// Check permissions
if (!$auth->acl_get('a_email'))
{
trigger_error($user->lang['NO_ADMIN']);
}
// Set some vars
$message = $subject = $group_id = '';
// Do the job ...
if (isset($_POST['submit']))
{
// Increase maximum execution time in case of a lot of users, but don't complain
// about it if it isn't allowed.
@set_time_limit(1200);
// Error checking needs to go here ... if no subject and/or no message then skip
// over the send and return to the form
$group_id = (isset($_POST['g'])) ? intval($_POST['g']) : 0;
$subject = (!empty($_POST['subject'])) ? stripslashes(trim($_POST['subject'])) : '';
$message = (!empty($_POST['message'])) ? stripslashes(trim($_POST['message'])) : '';
$error = array();
if ($subject == '')
{
$error[] = $user->lang['NO_EMAIL_SUBJECT'];
}
if ($message == '')
{
$error[] = $user->lang['NO_EMAIL_MESSAGE'];
}
if (!sizeof($error))
{
$sql = ($group_id) ? 'SELECT u.user_email, u.username, u.user_lang FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug WHERE ug.group_id = $group_id AND ug.user_pending <> 1 AND u.user_id = ug.user_id AND u.user_allow_massemail = 1" : 'SELECT user_email FROM ' . USERS_TABLE . ' WHERE user_allow_massemail = 1';
$result = $db->sql_query($sql);
if (!($row = $db->sql_fetchrow($result)))
{
trigger_error($user->lang['NO_USER']);
}
$db->sql_freeresult($result);
$i = 0;
$email_list = array();
do
{
$email_list[$row['user_lang']][$i]['email'] = $row['user_email'];
$email_list[$row['user_lang']][$i]['name'] = $row['username'];
$i++;
}
while ($row = $db->sql_fetchrow($result));
$db->sql_freeresult($result);
// Let's do some checking to make sure that mass mail functions are working in win32 versions of php.
if (preg_match('#^[c-z]:\\\#i', getenv('PATH')) && !$config['smtp_delivery'] && phpversion() < '4.3')
{
// We are running on windows, force delivery to use our smtp functions since
// php's are broken by default
$config['smtp_delivery'] = 1;
$config['smtp_host'] = @ini_get('SMTP');
}
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer(true);
$extra_headers = 'X-AntiAbuse: Board servername - ' . $config['server_name'] . "\n";
$extra_headers .= 'X-AntiAbuse: User_id - ' . $user->data['user_id'] . "\n";
$extra_headers .= 'X-AntiAbuse: Username - ' . $user->data['username'] . "\n";
$extra_headers .= 'X-AntiAbuse: User IP - ' . $user->ip . "\n";
foreach ($email_list as $lang => $to_ary)
{
foreach ($to_ary as $to)
{
$emailer->template('admin_send_email', $lang);
$emailer->subject($subject);
$emailer->headers($extra_headers);
$emailer->replyto($config['board_email']);
$emailer->to($to['email'], $to['name']);
$emailer->assign_vars(array(
'SITENAME' => $config['sitename'],
'CONTACT_EMAIL' => $config['board_contact'],
'MESSAGE' => $message)
);
$emailer->send();
$emailer->reset();
}
}
$emailer->mail_queue->save();
unset($email_list);
if ($group_id)
{
$sql = 'SELECT group_name
FROM ' . GROUPS_TABLE . "
WHERE group_id = $group_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
extract($row);
}
else
{
// Not great but the logging routine doesn't cope well with localising
// on the fly
$group_name = $user->lang['ALL_USERS'];
}
add_log('admin', 'LOG_MASS_EMAIL', $group_name);
trigger_error($user->lang['EMAIL_SENT']);
}
}
// Initial selection
$sql = 'SELECT group_id, group_type, group_name
FROM ' . GROUPS_TABLE . '
ORDER BY group_type DESC, group_name ASC';
$result = $db->sql_query($sql);
$select_list = '<option value="0"' . ((!$group_id) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_USERS'] . '</option>';
if ($row = $db->sql_fetchrow($result))
{
do
{
$selected = ($group_id == $row['group_id']) ? ' selected="selected"' : '';
$select_list .= '<option value = "' . $row['group_id'] . '"' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="blue"' : '') . $selected . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
}
while ($row = $db->sql_fetchrow($result));
}
$db->sql_freeresult($result);
adm_page_header($user->lang['MASS_EMAIL']);
?>
<h1><?php echo $user->lang['MASS_EMAIL']; ?></h1>
<p><?php echo $user->lang['MASS_EMAIL_EXPLAIN']; ?></p>
<form method="post" action="admin_email.<?php echo $phpEx.$SID; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $user->lang['COMPOSE']; ?></th>
</tr>
<?php
if (sizeof($error))
{
?>
<tr>
<td class="row3" colspan="2" align="center"><span class="error"><?php echo implode('<br />', $error); ?></span></td>
</tr>
<?php
}
?>
<tr>
<td class="row1" align="right"><b><?php echo $user->lang['RECIPIENTS']; ?></b></td>
<td class="row2" align="left"><select name="g"><?php echo $select_list; ?></select></td>
</tr>
<tr>
<td class="row1" align="right"><b><?php echo $user->lang['SUBJECT']; ?></b></td>
<td class="row2"><input class="post" type="text" name="subject" size="45" maxlength="100" tabindex="2" value="<?php echo $subject; ?>" /></td>
</tr>
<tr>
<td class="row1" align="right" valign="top"><span class="gen"><b><?php echo $user->lang['MESSAGE']; ?></b></span>
<td class="row2"><textarea class="post" name="message" rows="10" cols="76" wrap="virtual" tabindex="3"><?php echo $message; ?></textarea></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><input type="submit" value="<?php echo $user->lang['EMAIL']; ?>" name="submit" class="btnmain" /></td>
</tr>
</table></form>
<?php
adm_page_footer();
?>

1329
phpBB/adm/admin_forums.php Normal file

File diff suppressed because it is too large Load Diff

759
phpBB/adm/admin_groups.php Normal file
View File

@@ -0,0 +1,759 @@
<?php
// -------------------------------------------------------------
//
// $Id$
//
// FILENAME : admin_groups.php
// STARTED : Sat Feb 13, 2001
// COPYRIGHT : <20> 2001,2003 phpBB Group
// WWW : http://www.phpbb.com/
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
//
// -------------------------------------------------------------
if (!empty($setmodules))
{
if (!$auth->acl_get('a_group'))
{
return;
}
$module['GROUP']['MANAGE'] = basename(__FILE__) . "$SID&amp;mode=manage";
$module['GROUP']['GROUP_PREFS'] = basename(__FILE__) . "$SID&amp;mode=prefs";
return;
}
define('IN_PHPBB', 1);
// Include files
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require('pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/functions_user.'.$phpEx);
// Do we have general permissions?
if (!$auth->acl_get('a_group') )
{
trigger_error($user->lang['NO_ADMIN']);
}
// Check and set some common vars
$update = (isset($_POST['update'])) ? true : false;
$mode = (isset($_REQUEST['mode'])) ? htmlspecialchars($_REQUEST['mode']) : false;
$group_id = (isset($_REQUEST['g'])) ? intval($_REQUEST['g']) : false;
$mark_ary = (!empty($_POST['mark'])) ? array_map('intval', $_POST['mark']) : false;
$name_ary = (!empty($_POST['usernames'])) ? array_unique(explode("\n", $_POST['usernames'])) : false;
$start = (isset($_GET['start']) && $action == 'member') ? intval($_GET['start']) : 0;
$start_mod = (isset($_GET['start']) && $action == 'leader') ? intval($_GET['start']) : 0;
$group_type = $group_name = $group_desc = $group_colour = $group_rank = $group_avatar = false;
if (isset($_POST['add']))
{
$action = 'add';
}
else if (isset($_POST['addleaders']) || isset($_POST['addusers']))
{
$action = (isset($_POST['addleaders'])) ? 'addleaders' : 'addusers';
}
else
{
$action = (isset($_REQUEST['action'])) ? htmlspecialchars($_REQUEST['action']) : '';
}
// Grab basic data for group, if group_id is set and exists
if ($group_id)
{
$sql = 'SELECT *
FROM ' . GROUPS_TABLE . "
WHERE group_id = $group_id";
$result = $db->sql_query($sql);
if (!extract($db->sql_fetchrow($result)))
{
trigger_error($user->lang['NO_GROUP']);
}
$db->sql_freeresult($result);
}
switch ($mode)
{
case 'manage':
// Page header
adm_page_header($user->lang['MANAGE']);
// Which page?
switch ($action)
{
case 'approve':
if (!$group_id)
{
trigger_error($user->lang['NO_GROUP']);
}
approve_user($group_id, $mark_ary, false, $group_name);
trigger_error($user->lang['USERS_APPROVED']);
break;
case 'default':
if (!$group_id)
{
trigger_error($user->lang['NO_GROUP']);
}
set_default_group($group_id, $mark_ary, false, $group_name, $group_colour, $group_rank, false, false);
trigger_error($user->lang['GROUP_DEFS_UPDATED']);
break;
case 'delete':
case 'deleteusers':
case 'demote':
if (!$group_id)
{
trigger_error($user->lang['NO_GROUP']);
}
if ($error = remove_from_group($action, $group_id, $mark_ary, false, $group_name))
{
trigger_error($user->lang[$error]);
}
$message = ($action == 'demote') ? 'GROUP_MODS_DEMOTED' : (($action == 'deleteusers') ? 'GROUP_USERS_REMOVE' : 'GROUP_DELETED');
trigger_error($user->lang[$message]);
break;
case 'addleaders':
case 'addusers':
if (!$group_id)
{
trigger_error($user->lang['NO_GROUP']);
}
if (!$name_ary)
{
trigger_error($user->lang['NO_USERS']);
}
// Add user/s to group
if ($error = add_to_group($action, $group_id, false, $name_ary, $group_colour, $group_rank, $group_avatar, $group_avatar_type))
{
trigger_error($user->lang[$error]);
}
$message = ($action == 'addleaders') ? 'GROUP_MODS_ADDED' : 'GROUP_USERS_ADDED';
trigger_error($user->lang[$message]);
break;
case 'edit':
case 'add':
if ($action == 'edit' && !$group_id)
{
trigger_error($user->lang['NO_GROUP']);
}
// Did we submit?
if ($update)
{
if (!($error = create_group($action, $group_id, $group_type, $group_name, $group_description, $group_colour, $group_rank, $group_avatar)))
{
$message = ($action == 'edit') ? 'GROUP_UPDATED' : 'GROUP_CREATED';
trigger_error($message);
}
}
else if (!$group_id)
{
$group_name = (!empty($_POST['group_name'])) ? stripslashes(htmlspecialchars($_POST['group_name'])) : '';
$group_description = $group_colour = $group_avatar = '';
$group_type = GROUP_FREE;
}
?>
<h1><?php echo $user->lang['MANAGE']; ?></h1>
<p><?php echo $user->lang['GROUP_EDIT_EXPLAIN']; ?></p>
<?php
$sql = 'SELECT *
FROM ' . RANKS_TABLE . '
WHERE rank_special = 1
ORDER BY rank_title';
$result = $db->sql_query($sql);
$rank_options = '<option value="-1"' . ((empty($group_rank)) ? 'selected="selected" ' : '') . '>' . $user->lang['USER_DEFAULT'] . '</option>';
if ($row = $db->sql_fetchrow($result))
{
do
{
$selected = (!empty($group_rank) && $row['rank_id'] == $group_rank) ? ' selected="selected"' : '';
$rank_options .= '<option value="' . $row['rank_id'] . '"' . $selected . '>' . $row['rank_title'] . '</option>';
}
while ($row = $db->sql_fetchrow($result));
}
$db->sql_freeresult($result);
$type_free = ($group_type == GROUP_FREE) ? ' checked="checked"' : '';
$type_open = ($group_type == GROUP_OPEN) ? ' checked="checked"' : '';
$type_closed = ($group_type == GROUP_CLOSED) ? ' checked="checked"' : '';
$type_hidden = ($group_type == GROUP_HIDDEN) ? ' checked="checked"' : '';
?>
<script language="javascript" type="text/javascript">
<!--
function swatch()
{
window.open('./swatch.<?php echo $phpEx; ?>?form=settings&amp;name=group_colour', '_swatch', 'HEIGHT=115,resizable=yes,scrollbars=no,WIDTH=636');
return false;
}
//-->
</script>
<form name="settings" method="post" action="admin_groups.<?php echo "$phpEx$SID&amp;mode=$mode&amp;action=$action&amp;g=$group_id"; ?>"><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $user->lang['GROUP_DETAILS']; ?></th>
</tr>
<?php
if (sizeof($error))
{
?>
<tr>
<td class="row1" colspan="2" align="center"><span style="color:red"><?php echo implode('<br />', $error); ?></span></td>
</tr>
<?php
}
?>
<tr>
<td class="row2" width="40%"><b><?php echo $user->lang['GROUP_NAME']; ?>:</b></td>
<td class="row1"><?php
if ($group_type != GROUP_SPECIAL)
{
?><input class="post" type="text" name="group_name" value="<?php echo (!empty($group_name)) ? $group_name : ''; ?>" size="40" maxlength="40" /><?php
}
else
{
?><b><?php echo ($group_type == GROUP_SPECIAL) ? $user->lang['G_' . $group_name] : $group_name; ?></b><?php
}
?></td>
</tr>
<tr>
<td class="row2"><b><?php echo $user->lang['GROUP_DESC']; ?>:</b></td>
<td class="row1"><input class="post" type="text" name="group_description" value="<?php echo (!empty($group_description)) ? $group_description : ''; ?>" size="40" maxlength="255" /></td>
</tr>
<?php
if ($group_type != GROUP_SPECIAL)
{
?>
<tr>
<td class="row2"><b><?php echo $user->lang['GROUP_TYPE']; ?>:</b><br /><span class="gensmall"><?php echo $user->lang['GROUP_TYPE_EXPLAIN']; ?></span></td>
<td class="row1" nowrap="nowrap"><input type="radio" name="group_type" value="<?php echo GROUP_FREE . '"' . $type_free; ?> /> <?php echo $user->lang['GROUP_OPEN']; ?> &nbsp; <input type="radio" name="group_type" value="<?php echo GROUP_OPEN . '"' . $type_open; ?> /> <?php echo $user->lang['GROUP_REQUEST']; ?> &nbsp; <input type="radio" name="group_type" value="<?php echo GROUP_CLOSED . '"' . $type_closed; ?> /> <?php echo $user->lang['GROUP_CLOSED']; ?> &nbsp; <input type="radio" name="group_type" value="<?php echo GROUP_HIDDEN . '"' . $type_hidden; ?>" /> <?php echo $user->lang['GROUP_HIDDEN']; ?></td>
</tr>
<?php
}
?>
<tr>
<th colspan="2"><?php echo $user->lang['GROUP_SETTINGS_SAVE']; ?></th>
</tr>
<tr>
<td class="row2"><b><?php echo $user->lang['GROUP_COLOR']; ?>:</b><br /><span class="gensmall"><?php echo $user->lang['GROUP_COLOR_EXPLAIN']; ?></span></td>
<td class="row1" nowrap="nowrap"><input class="post" type="text" name="group_colour" value="<?php echo (!empty($group_colour)) ? $group_colour : ''; ?>" size="6" maxlength="6" /> &nbsp; [ <a href="<?php echo "swatch.$phpEx"; ?>" onclick="swatch();return false" target="_swatch"><?php echo $user->lang['COLOUR_SWATCH']; ?></a> ]</td>
</tr>
<tr>
<td class="row2"><b><?php echo $user->lang['GROUP_RANK']; ?>:</b></td>
<td class="row1"><select name="group_rank"><?php echo $rank_options; ?></select></td>
</tr>
<!-- tr>
<th colspan="2"><?php echo $user->lang['GROUP_AVATAR']; ?></th>
</tr>
<tr>
<td class="row2"><b><?php echo $user->lang['GROUP_AVATAR']; ?>:</b><br /><span class="gensmall"><?php echo $user->lang['GROUP_AVATAR_EXPLAIN']; ?></span></td>
<td class="row1">&nbsp;</td>
</tr -->
<tr>
<td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>" /> &nbsp; <input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" /></td>
</tr>
</table></form>
<?php
break;
// Show list of leaders, existing and pending members
case 'list':
if (!$group_id)
{
trigger_error($user->lang['NO_GROUP']);
}
?>
<h1><?php echo $user->lang['GROUP_MEMBERS']; ?></h1>
<p><?php echo $user->lang['GROUP_MEMBERS_EXPLAIN']; ?></p>
<?php
// Total number of group leaders
$sql = 'SELECT COUNT(user_id) AS total_leaders
FROM ' . USER_GROUP_TABLE . "
WHERE group_id = $group_id
AND group_leader = 1";
$result = $db->sql_query($sql);
$total_leaders = ($row = $db->sql_fetchrow($result)) ? $row['total_leaders'] : 0;
$db->sql_freeresult($result);
// Total number of group members (non-leaders)
$sql = 'SELECT COUNT(user_id) AS total_members
FROM ' . USER_GROUP_TABLE . "
WHERE group_id = $group_id
AND group_leader <> 1";
$result = $db->sql_query($sql);
$total_members = ($row = $db->sql_fetchrow($result)) ? $row['total_members'] : 0;
$db->sql_freeresult($result);
// Grab the members
$sql = 'SELECT u.user_id, u.username, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
WHERE ug.group_id = $group_id
AND u.user_id = ug.user_id
ORDER BY ug.group_leader DESC, ug.user_pending DESC, u.username
LIMIT $start, " . $config['topics_per_page'];
$result = $db->sql_query($sql);
$leader = $member = 0;
$group_data = array();
if ($row = $db->sql_fetchrow($result))
{
do
{
$type = ($row['group_leader']) ? 'leader' : 'member';
$group_data[$type][$$type]['user_id'] = $row['user_id'];
$group_data[$type][$$type]['group_id'] = $row['group_id'];
$group_data[$type][$$type]['username'] = $row['username'];
$group_data[$type][$$type]['user_regdate'] = $row['user_regdate'];
$group_data[$type][$$type]['user_posts'] = $row['user_posts'];
$group_data[$type][$$type]['user_pending'] = $row['user_pending'];
$$type++;
}
while ($row = $db->sql_fetchrow($result));
}
$db->sql_freeresult($result);
if ($group_type != GROUP_SPECIAL)
{
?>
<h1><?php echo $user->lang['GROUP_MODS']; ?></h1>
<p><?php echo $user->lang['GROUP_MODS_EXPLAIN']; ?></p>
<form name="mod" method="post" action="<?php echo "admin_groups.$phpEx$SID&amp;mode=$mode&amp;g=$group_id"; ?>"><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th width="55%"><?php echo $user->lang['USERNAME']; ?></th>
<th width="3%" nowrap="nowrap">Default</th>
<th width="20%"><?php echo $user->lang['JOINED']; ?></th>
<th width="20%"><?php echo $user->lang['POSTS']; ?></th>
<th width="2%"><?php echo $user->lang['MARK']; ?></th>
</tr>
<?php
if (sizeof($group_data['leader']))
{
foreach ($group_data['leader'] as $row)
{
$row_class = ($row_class == 'row1') ? 'row2' : 'row1';
?>
<tr>
<td class="<?php echo $row_class; ?>"><a href="<?php echo "admin_users.$phpEx$SID&amp;mode=edit&amp;u=" . $row['user_id']; ?>"><?php echo $row['username']; ?></a></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo ($row['group_id'] == $group_id) ? $user->lang['YES'] : $user->lang['NO']; ?></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo $user->format_date($row['user_regdate'], $user->lang['DATE_FORMAT']); ?></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo $row['user_posts']; ?></td>
<td class="<?php echo $row_class; ?>" align="center"><input class="checkbox" type="checkbox" name="mark[]" value="<?php echo $row['user_id']; ?>" /></td>
</tr>
<?php
}
}
else
{
?>
<tr>
<td class="row1" colspan="5" align="center"><?php echo $user->lang['GROUPS_NO_MODS']; ?></td>
</tr>
<?php
}
?>
<tr>
<td class="cat" colspan="5" align="right">Select option: <select name="action"><option value="default">Default</option><option value="demote">Demote</option><option value="delete">Delete</option></select> <input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['UPDATE']; ?>" />&nbsp;</td>
</tr>
</table>
<table width="95%" cellspacing="1" cellpadding="1" border="0" align="center">
<tr>
<td valign="top"><?php echo on_page($total_moderators, $config['topics_per_page'], $start_mod); ?></td>
<td align="right"><b><span class="gensmall"><a href="javascript:marklist('mod', true);" class="gensmall"><?php echo $user->lang['MARK_ALL']; ?></a> :: <a href="javascript:marklist('mod', false);" class="gensmall"><?php echo $user->lang['UNMARK_ALL']; ?></a></span></b>&nbsp;<br /><span class="nav"><?php echo generate_pagination("admin_groups.$phpEx$SID&amp;action=list&amp;mode=mod&amp;g=$group_id", $total_members, $config['topics_per_page'], $start); ?></span></td>
</tr>
</table>
<br clear="all" />
<table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $user->lang['ADD_USERS']; ?></th>
</tr>
<tr>
<td class="row1" width="40%"><b><?php echo $user->lang['USER_GETS_GROUP_SET']; ?>:</b> <br /><span class="gensmall"><?php echo $user->lang['USER_GETS_GROUP_SET_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="default" value="1" /> <?php echo $user->lang['YES']; ?> &nbsp; <input type="radio" name="default" value="0" checked="checked" /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1" width="40%"><b><?php echo $user->lang['USERNAME']; ?>:</b><br /><span class="gensmall"><?php echo $user->lang['USERNAMES_EXPLAIN']; ?></span></td>
<td class="row2"><textarea name="usernames" cols="40" rows="5"></textarea></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="addleaders" value="<?php echo $user->lang['SUBMIT']; ?>" /> &nbsp; <input class="btnlite" type="submit" value="<?php echo $user->lang['FIND_USERNAME']; ?>" onclick="window.open('<?php echo "../memberlist.$phpEx$SID"; ?>&amp;mode=searchuser&amp;form=mod&amp;field=usernames', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;" /></td>
</tr>
</table>
</form>
<?php
}
// Existing members
?>
<h1><?php echo $user->lang['GROUP_LIST']; ?></h1>
<p><?php echo $user->lang['GROUP_LIST_EXPLAIN']; ?></p>
<form name="list" method="post" action="<?php echo "admin_groups.$phpEx$SID&amp;mode=$mode&amp;g=$group_id"; ?>"><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th width="55%"><?php echo $user->lang['USERNAME']; ?></th>
<th width="3%" nowrap="nowrap">Default</th>
<th width="20%"><?php echo $user->lang['JOINED']; ?></th>
<th width="20%"><?php echo $user->lang['POSTS']; ?></th>
<th width="2%"><?php echo $user->lang['MARK']; ?></th>
</tr>
<?php
if (sizeof($group_data['member']))
{
$pending = $group_data['member'][0]['user_pending'];
foreach ($group_data['member'] as $row)
{
if ($row['user_pending'] != $pending)
{
$pending = $row['user_pending'];
?>
<tr>
<td class="row3" colspan="5"><b>Approved Members</b></td>
</tr>
<?php
}
if ($pending)
{
?>
<tr>
<td class="row3" colspan="5"><b>Pending Members</b></td>
</tr>
<?php
}
$row_class = ($row_class == 'row1') ? 'row2' : 'row1';
?>
<tr>
<td class="<?php echo $row_class; ?>"><a href="<?php echo "admin_users.$phpEx$SID&amp;mode=edit&amp;u=" . $row['user_id']; ?>"><?php echo $row['username']; ?></a></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo ($row['group_id'] == $group_id) ? $user->lang['YES'] : $user->lang['NO']; ?></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo $user->format_date($row['user_regdate'], $user->lang['DATE_FORMAT']); ?></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo $row['user_posts']; ?></td>
<td class="<?php echo $row_class; ?>" align="center"><input class="checkbox" type="checkbox" name="mark[]" value="<?php echo $row['user_id']; ?>" /></td>
</tr>
<?php
}
}
else
{
?>
<tr>
<td class="row1" colspan="5" align="center"><?php echo $user->lang['GROUPS_NO_MEMBERS']; ?></td>
</tr>
<?php
}
?>
<tr>
<td class="cat" colspan="5" align="right">Select option: <select name="action"><option value="approve">Approve</option><option value="default">Default</option><option value="delete">Delete</option></select> <input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['UPDATE']; ?>" />&nbsp;</td>
</tr>
</table>
<table width="95%" cellspacing="1" cellpadding="1" border="0" align="center">
<tr>
<td valign="top"><?php echo on_page($total_members, $config['topics_per_page'], $start); ?></td>
<td align="right"><b><span class="gensmall"><a href="javascript:marklist('list', true);" class="gensmall"><?php echo $user->lang['MARK_ALL']; ?></a> :: <a href="javascript:marklist('list', false);" class="gensmall"><?php echo $user->lang['UNMARK_ALL']; ?></a></span></b>&nbsp;<br /><span class="nav"><?php echo generate_pagination("admin_groups.$phpEx$SID&amp;action=list&amp;mode=member&amp;g=$group_id", $total_members, $config['topics_per_page'], $start); ?></span></td>
</tr>
</table>
<br clear="all" />
<table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $user->lang['ADD_USERS']; ?></th>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['USER_GETS_GROUP_SET']; ?>:</b> <br /><span class="gensmall"><?php echo $user->lang['USER_GETS_GROUP_SET_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="default" value="1" /> <?php echo $user->lang['YES']; ?> &nbsp; <input type="radio" name="default" value="0" checked="checked" /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['USERNAME']; ?>:</b><br /><span class="gensmall"><?php echo $user->lang['USERNAMES_EXPLAIN']; ?></span></td>
<td class="row2"><textarea name="usernames" cols="40" rows="5"></textarea></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="addusers" value="<?php echo $user->lang['SUBMIT']; ?>" /> &nbsp; <input class="btnlite" type="submit" value="<?php echo $user->lang['FIND_USERNAME']; ?>" onclick="window.open('<?php echo "../memberlist.$phpEx$SID"; ?>&amp;mode=searchuser&amp;form=mod&amp;field=usernames', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;" /></td>
</tr>
</table>
</form>
<?php
break;
// Management front end
default:
?>
<h1><?php echo $user->lang['MANAGE']; ?></h1>
<p><?php echo $user->lang['GROUP_MANAGE_EXPLAIN']; ?></p>
<h1><?php echo $user->lang['USER_DEF_GROUPS']; ?></h1>
<p><?php echo $user->lang['USER_DEF_GROUPS_EXPLAIN']; ?></p>
<form method="post" action="<?php echo "admin_groups.$phpEx$SID&amp;mode=$mode"; ?>"><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th width="95%"><?php echo $user->lang['MANAGE']; ?></th>
<th nowrap="nowrap"><?php echo $user->lang['TOTAL_MEMBERS']; ?></th>
<th colspan="3"><?php echo $user->lang['OPTIONS']; ?></th>
</tr>
<?php
$sql = 'SELECT g.group_id, g.group_name, g.group_type, COUNT(ug.user_id) AS total_members
FROM (' . GROUPS_TABLE . ' g
LEFT JOIN ' . USER_GROUP_TABLE . ' ug USING (group_id))
GROUP BY g.group_id
ORDER BY g.group_type ASC, g.group_name';
$result = $db->sql_query($sql);
$special = $normal = 0;
$group_ary = array();
while ($row = $db->sql_fetchrow($result) )
{
$type = ($row['group_type'] == GROUP_SPECIAL) ? 'special' : 'normal';
$group_ary[$type][$$type]['group_id'] = $row['group_id'];
$group_ary[$type][$$type]['group_name'] = $row['group_name'];
$group_ary[$type][$$type]['group_type'] = $row['group_type'];
$group_ary[$type][$$type]['total_members'] = $row['total_members'];
$$type++;
}
$db->sql_freeresult($result);
$special_toggle = false;
foreach ($group_ary as $type => $row_ary)
{
if ($type == 'special')
{
?>
<tr>
<td class="cat" colspan="5" align="right">Create new group: <input class="post" type="text" name="group_name" maxlength="30" /> <input class="btnmain" type="submit" name="add" value="<?php echo $user->lang['SUBMIT']; ?>" /></td>
</tr>
</table>
<h1><?php echo $user->lang['SPECIAL_GROUPS']; ?></h1>
<p><?php echo $user->lang['SPECIAL_GROUPS_EXPLAIN']; ?></p>
<table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th width="95%"><?php echo $user->lang['MANAGE']; ?></th>
<th><?php echo $user->lang['TOTAL_MEMBERS']; ?></th>
<th colspan="3"><?php echo $user->lang['OPTIONS']; ?></th>
</tr>
<?php
}
foreach ($row_ary as $row)
{
$row_class = ($row_class != 'row1') ? 'row1' : 'row2';
$group_id = $row['group_id'];
$group_name = (!empty($user->lang['G_' . $row['group_name']]))? $user->lang['G_' . $row['group_name']] : $row['group_name'];
?>
<tr>
<td width="95%" class="<?php echo $row_class; ?>"><a href="admin_groups.<?php echo "$phpEx$SID&amp;mode=$mode&amp;action=list&amp;g=$group_id"; ?>"><?php echo $group_name;?></a></td>
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap">&nbsp;<?php echo $row['total_members']; ?>&nbsp;</td>
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap">&nbsp;<a href="<?php echo "admin_groups.$phpEx$SID&amp;mode=$mode&amp;action=default&amp;g=$group_id"; ?>">Default<?php echo $user->lang['']; ?></a>&nbsp;</td>
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap">&nbsp;<a href="<?php echo "admin_groups.$phpEx$SID&amp;mode=$mode&amp;action=edit&amp;g=$group_id"; ?>"><?php echo $user->lang['EDIT']; ?></a>&nbsp;</td>
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap">&nbsp;<?php
echo ($row['group_type'] != GROUP_SPECIAL) ? "<a href=\"admin_groups.$phpEx$SID&amp;mode=$mode&amp;action=delete&amp;g=$group_id\">" . $user->lang['DELETE'] . '</a>' : $user->lang['DELETE'];
?>&nbsp;</td>
</tr>
<?php
}
}
?>
<tr>
<td class="cat" colspan="5">&nbsp;</td>
</tr>
</table></form>
<?php
break;
}
// Common javascript
?>
<script language="Javascript" type="text/javascript">
<!--
function marklist(match, status)
{
len = eval('document.' + match + '.length');
for (i = 0; i < len; i++)
{
eval('document.' + match + '.elements[i].checked = ' + status);
}
}
function getElement(id)
{
return document.getElementById ? document.getElementById(id) : document.all ? document.all(id) : null;
}
function showbox(id)
{
var el = getElement(id);
if (el && el.style)
el.style.display = '';
}
function hidebox(id)
{
var el = getElement(id);
if (el && el.style)
el.style.display = 'none';
}
//-->
</script>
<?php
adm_page_footer();
break;
// Setting groupwide preferences
case 'prefs':
adm_page_header($user->lang['GROUP_PREFS']);
if ($update)
{
}
else
{
$user_lang = (!empty($_POST['user_lang'])) ? htmlspecialchars($_POST['user_lang']) : '';
$user_tz = (isset($_POST['user_tz'])) ? doubleval($_POST['user_tz']) : '';
$user_dst = (isset($_POST['user_dst'])) ? intval($_POST['user_dst']) : '';
}
?>
<h1><?php echo $user->lang['GROUP_SETTINGS']; ?></h1>
<p><?php echo $user->lang['GROUP_SETTINGS_EXPLAIN']; ?></p>
<form method="post" action="admin_groups.<?php echo "$phpEx$SID&amp;action=edit&amp;g=$group_id"; ?>"><table class="bg" width="90%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $user->lang['GROUP_SETTINGS']; ?></th>
</tr>
<tr>
<td class="row2"><?php echo $user->lang['GROUP_LANG']; ?>:</td>
<td class="row1"><select name="user_lang"><?php echo '<option value="-1" selected="selected">' . $user->lang['USER_DEFAULT'] . '</option>' . language_select(); ?></select></td>
</tr>
<tr>
<td class="row2"><?php echo $user->lang['GROUP_TIMEZONE']; ?>:</td>
<td class="row1"><select name="user_tz"><?php echo '<option value="-14" selected="selected">' . $user->lang['USER_DEFAULT'] . '</option>' . tz_select(); ?></select></td>
</tr>
<tr>
<td class="row2"><?php echo $user->lang['GROUP_DST']; ?>:</td>
<td class="row1" nowrap="nowrap"><input type="radio" name="user_dst" value="0" /> <?php echo $user->lang['DISABLED']; ?> &nbsp; <input type="radio" name="user_dst" value="1" /> <?php echo $user->lang['ENABLED']; ?> &nbsp; <input type="radio" name="user_dst" value="-1" checked="checked" /> <?php echo $user->lang['USER_DEFAULT']; ?></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="submitprefs" value="<?php echo $user->lang['SUBMIT']; ?>" /> &nbsp; <input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" /></td>
</tr>
</table></form>
<?php
adm_page_footer();
break;
default:
trigger_error($user->lang['NO_MODE']);
}
exit;
?>

727
phpBB/adm/admin_icons.php Normal file
View File

@@ -0,0 +1,727 @@
<?php
/***************************************************************************
* admin_icons.php
* -------------------
* begin : Thu May 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
****************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if (!empty($setmodules))
{
if (!$auth->acl_get('a_icons'))
{
return;
}
$filename = basename(__FILE__);
$module['POST']['SMILE'] = $filename . $SID . '&amp;mode=emoticons';
$module['POST']['ICONS'] = $filename . $SID . '&amp;mode=icons';
return;
}
define('IN_PHPBB', 1);
// Include files
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
// Do we have general permissions?
if (!$auth->acl_get('a_icons'))
{
trigger_error($user->lang['NO_ADMIN']);
}
// Grab some basic parameters
$mode = (!empty($_REQUEST['mode'])) ? $_REQUEST['mode'] : '';
$action = (!empty($_REQUEST['action'])) ? $_REQUEST['action'] : ((isset($_POST['add'])) ? 'add' : '');
$id = (isset($_GET['id'])) ? intval($_GET['id']) : false;
// What are we working on?
switch ($mode)
{
case 'emoticons':
$table = SMILIES_TABLE;
$lang = 'SMILE';
$fields = 'smile';
$img_path = $config['smilies_path'];
break;
case 'icons':
$table = ICONS_TABLE;
$lang = 'ICONS';
$fields = 'icons';
$img_path = $config['icons_path'];
break;
}
// Clear some arrays
$_images = $_paks = array();
// Grab file list of paks and images
if ($action == 'edit' || $action == 'add' || $action == 'import')
{
$dir = @opendir($phpbb_root_path . $img_path);
while ($file = @readdir($dir))
{
if (is_file($phpbb_root_path . $img_path . '/' . $file))
{
$img_size = @getimagesize($phpbb_root_path . $img_path . '/' . $file);
if (preg_match('#\.(gif|png|jpg)$#i', $file) || (!empty($img_size[0]) && !empty($img_size[1])))
{
$_images[] = $file;
}
elseif (preg_match('#\.pak$#i', $file))
{
$_paks[] = $file;
}
}
}
@closedir($dir);
}
// What shall we do today? Oops, I believe that's trademarked ...
switch ($action)
{
case 'delete':
$db->sql_query('DELETE FROM ' . $table . '
WHERE ' . $fields . '_id = ' . intval($_GET['id']));
switch ($mode)
{
case 'emoticons':
break;
case 'icons':
// Reset appropriate icon_ids
$db->sql_query('UPDATE ' . TOPICS_TABLE . '
SET icon_id = 0
WHERE icon_id = ' . intval($_GET['id']));
$db->sql_query('UPDATE ' . POSTS_TABLE . '
SET icon_id = 0
WHERE icon_id = ' . intval($_GET['id']));
break;
}
trigger_error($user->lang[$lang . '_DELETED']);
break;
case 'edit':
case 'add':
$order_list = '';
$existing_imgs = array();
$result = $db->sql_query('SELECT *
FROM ' . $table . '
ORDER BY ' . $fields . '_order DESC');
if ($row = $db->sql_fetchrow($result))
{
do
{
$existing_imgs[] = $row[$fields . '_url'];
if ($row[$fields . '_id'] == $id)
{
$after = TRUE;
$data = $row;
}
else
{
$selected = '';
if (!empty($after))
{
$selected = ' selected="selected"';
$after = FALSE;
}
$after_txt = ($mode == 'emoticons') ? $row['code'] : $row['icons_url'];
$order_list = '<option value="' . ($row[$fields . '_order']) . '"' . $selected . '>' . sprintf($user->lang['AFTER_' . $lang], ' -&gt; ' . htmlspecialchars($after_txt)) . '</option>' . $order_list;
}
}
while ($row = $db->sql_fetchrow($result));
}
$db->sql_freeresult($result);
$order_list = '<option value="1"' . ((!isset($after)) ? ' selected="selected"' : '') . '>' . $user->lang['FIRST'] . '</option>' . $order_list;
$imglist = filelist($phpbb_root_path . $img_path, '');
$filename_list = '';
foreach ($imglist as $path => $img_ary)
{
foreach ($img_ary as $img)
{
$img = "$path$img";
if (!in_array($img, $existing_imgs) || $action == 'edit')
{
if ((isset($data) && $img == $data[$fields . '_url']) ||
(!isset($data) && !isset($edit_img)))
{
$selected = ' selected="selected"';
$edit_img = $img;
}
else
{
$selected = '';
}
$filename_list .= '<option value="' . $img . '"' . htmlspecialchars($img) . $selected . '>' . $img . '</option>';
}
}
}
unset($existing_imgs);
unset($imglist);
adm_page_header($user->lang[$lang]);
?>
<h1><?php echo $user->lang[$lang]; ?></h1>
<p><?php echo $user->lang[$lang .'_EXPLAIN']; ?></p>
<script language="javascript" type="text/javascript" defer="defer">
<!--
function update_image(newimage)
{
document.image.src = "<?php echo $phpbb_root_path . $img_path ?>/" + newimage;
}
function update_image_dimensions()
{
if (document.image.height)
{
document.forms[0].height.value = document.image.height;
document.forms[0].width.value = document.image.width;
}
}
//-->
</script>
<form method="post" action="admin_icons.<?php echo $phpEx . $SID . "&amp;mode=$mode&amp;action=" . (($action == 'add') ? 'create' : 'modify'); ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $user->lang[$lang . '_CONFIG'] ?></th>
</tr>
<tr>
<td class="row1"><?php echo $user->lang[$lang . '_URL'] ?></td>
<td class="row2"><select name="img" onchange="update_image(this.options[selectedIndex].value);"><?php echo $filename_list ?></select> &nbsp; <img src="<?php echo $phpbb_root_path . $img_path . '/' . $edit_img ?>" name="image" border="0" alt="" title="" onload="update_image_dimensions()" /> &nbsp;</td>
</tr>
<?php
if ($mode == 'emoticons')
{
?>
<tr>
<td class="row1"><?php echo $user->lang[$lang . '_CODE'] ?></td>
<td class="row2"><input class="post" type="text" name="code" value="<?php echo (!empty($data['code'])) ? $data['code'] : '' ?>" /></td>
</tr>
<tr>
<td class="row1"><?php echo $user->lang[$lang . '_EMOTION'] ?></td>
<td class="row2"><input class="post" type="text" name="emotion" value="<?php echo (!empty($data['emoticon'])) ? $data['emoticon'] : '' ?>" /></td>
</tr>
<?php
}
?>
<tr>
<td class="row1"><?php echo $user->lang[$lang . '_WIDTH'] ?></td>
<td class="row2"><input class="post" type="text" size="3" name="width" value="<?php echo (!empty($data[$fields .'_width'])) ? $data[$fields .'_width'] : '' ?>" /></td>
</tr>
<tr>
<td class="row1"><?php echo $user->lang[$lang . '_HEIGHT'] ?></td>
<td class="row2"><input class="post" type="text" size="3" name="height" value="<?php echo (!empty($data[$fields .'_height'])) ? $data[$fields .'_height'] : '' ?>" /></td>
</tr>
<tr>
<td class="row1"><?php echo $user->lang['DISPLAY_ON_POSTING'] ?></td>
<td class="row2"><input type="checkbox" name="display_on_posting" <?php echo (!empty($data['display_on_posting']) || !isset($data)) ? ' checked="checked"' : '' ?>/></td>
</tr>
<tr>
<td class="row1"><?php echo $user->lang[$lang . '_ORDER'] ?></td>
<td class="row2"><select name="order"><?php echo $order_list ?></select></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><?php
if (!empty($data))
{
?><input type="hidden" name="id" value="<?php echo $data[$fields . '_id'] ?>" /><?php
}
?><input class="btnmain" type="submit" value="<?php echo $user->lang['SUBMIT'] ?>" /></td>
</tr>
</table></form>
<?php
adm_page_footer();
break;
case 'create':
case 'modify':
$image_id = intval($_POST['id']);
$img = stripslashes($_POST['img']);
$image_order = intval($_POST['order']);
$image_width = intval($_POST['width']);
$image_height = intval($_POST['height']);
if ($image_width == 0 || $image_height == 0)
{
$img_size = @getimagesize($phpbb_root_path . $img_path . '/' . $img);
$smile_width = $img_size[0];
$smile_height = $img_size[1];
}
$img_sql = array(
$fields . '_url' => $img,
$fields . '_width' => $image_width,
$fields . '_height' => $image_height,
$fields . '_order' => $image_order,
'display_on_posting'=> (!empty($_POST['display_on_posting'])) ? 1 : 0
);
if ($mode == 'emoticons')
{
$img_sql = array_merge($sql, array(
'emoticon' => stripslashes($_POST['emotion']),
'code' => htmlspecialchars(stripslashes($_POST['code']))
));
}
if ($action == 'modify')
{
$result = $db->sql_query('SELECT ' . $fields . '_order
FROM ' . $table . '
WHERE ' . $fields . "_id = $image_id");
$order_old = $db->sql_fetchfield($fields . '_order', 0, $result);
if ($order_old == $smile_order)
{
$no_update = TRUE;
}
if ($order_old > $smile_order)
{
$sign = '+';
$where = $fields . "_order >= $image_order AND " . $fields . "_order < $order_old";
}
else
{
$sign = '-';
$where = $fields . "_order > $order_old AND " . $fields . "_order < $image_order";
$sql[$fields . '_order'] = $smile_order - 1;
}
}
else
{
$sign = '+';
$where = $fields . "_order > $image_order";
}
if (empty($no_update))
{
$sql = 'UPDATE ' . $table . '
SET ' . $fields . '_order = ' . $fields . "_order $sign 1
WHERE $where";
$db->sql_query($sql);
}
if ($action == 'modify')
{
$db->sql_query('UPDATE ' . $table . '
SET ' . $db->sql_build_array('UPDATE', $img_sql) . "
WHERE " . $fields . "_id = $image_id");
$cache->destroy('icons');
trigger_error($user->lang[$lang . '_EDITED']);
}
else
{
$db->sql_query('INSERT INTO ' . $table . ' ' . $db->sql_build_array('INSERT', $img_sql));
$cache->destroy('icons');
trigger_error($user->lang[$lang . '_ADDED']);
}
break;
case 'import':
if (!empty($_POST['pak']))
{
$order = 0;
// The user has already selected a smilies_pak file
if ($_POST['current'] == 'delete')
{
$db->sql_query('TRUNCATE ' . $table);
switch ($mode)
{
case 'emoticons':
break;
case 'icons':
// Reset all icon_ids
$db->sql_query('UPDATE ' . TOPICS_TABLE . '
SET icon_id = 0');
$db->sql_query('UPDATE ' . POSTS_TABLE . '
SET icon_id = 0');
break;
}
}
else
{
$cur_img = array();
$field_sql = ($mode == 'emoticons') ? 'code' : 'icons_url';
$result = $db->sql_query('SELECT ' . $field_sql . '
FROM ' . $table);
if ($row = $db->sql_fetchrow($result))
{
do
{
++$order;
$cur_img[$row[$field_sql]] = 1;
}
while ($row = $db->sql_fetchrow($result));
}
$db->sql_freeresult($result);
}
if (!($pak_ary = @file($phpbb_root_path . $img_path . '/'. stripslashes($_POST['pak']))))
{
trigger_error('Could not read smiley pak file', E_USER_ERROR);
}
foreach ($pak_ary as $pak_entry)
{
$data = array();
if (preg_match_all("#'(.*?)', #", $pak_entry, $data))
{
if ((sizeof($data[1]) == 5 && $mode == 'icons') ||
(sizeof($data[1]) != 5 && $mode == 'emoticons'))
{
trigger_error($user->lang['WRONG_PAK_TYPE']);
}
$img = stripslashes($data[1][0]);
$width = stripslashes($data[1][1]);
$height = stripslashes($data[1][2]);
if (isset($data[1][3]) && isset($data[1][4]))
{
$emotion = stripslashes($data[1][3]);
$code = htmlentities(stripslashes($data[1][4]));
}
if ($_POST['current'] == 'replace' &&
(($mode == 'emoticons' && !empty($cur_img[$code])) ||
($mode == 'icons' && !empty($cur_img[$img]))))
{
$replace_sql = ($mode == 'emoticons') ? $code : $img;
$sql = array(
$fields . '_url' => $img,
$fields . '_height' => intval($height),
$fields . '_width' => intval($width),
);
if ($mode == 'emoticons')
{
$sql = array_merge($sql, array(
'emoticon' => $emotion
));
}
$db->sql_query("UPDATE $table SET " . $db->sql_build_array('UPDATE', $sql) . "
WHERE $field_sql = '" . $db->sql_escape($replace_sql) . "'");
}
else
{
++$order;
$sql = array(
$fields . '_url' => $img,
$fields . '_height' => intval($height),
$fields . '_width' => intval($width),
$fields . '_order' => intval($order),
);
if ($mode == 'emoticons')
{
$sql = array_merge($sql, array(
'code' => $code,
'emoticon' => $emotion
));
}
$db->sql_query("INSERT INTO $table " . $db->sql_build_array('INSERT', $sql));
}
}
}
$cache->destroy('icons');
trigger_error($user->lang[$lang . '_IMPORT_SUCCESS']);
}
else
{
$paklist = filelist($phpbb_root_path . $img_path, '', 'pak');
$pak_options = '';
if (count($paklist))
{
foreach ($paklist as $pak)
{
$pak = substr($pak['path'], 1) . (($pak['path'] != '') ? '/' : '') . $pak['file'];
$pak_options .= '<option>' . htmlspecialchars($pak) . '</option>';
}
}
adm_page_header($user->lang[$lang]);
?>
<h1><?php echo $user->lang[$lang] ?></h1>
<p><?php echo $user->lang[$lang .'_EXPLAIN'] ?></p>
<form method="post" action="admin_icons.<?php echo $phpEx . $SID . '&amp;mode=' . $mode . '&amp;action=import'; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $user->lang[$lang . '_IMPORT'] ?></th>
</tr>
<?php
if ($pak_options == '')
{
?>
<tr>
<td class="row1" colspan="2"><?php echo $user->lang['NO_' . $lang . '_PAK']; ?></td>
</tr>
<?php
}
else
{
?>
<tr>
<td class="row2"><?php echo $user->lang['SELECT_PACKAGE'] ?></td>
<td class="row1"><select name="pak"><?php echo $pak_options ?></select></td>
</tr>
<tr>
<td class="row2"><?php echo $user->lang['CURRENT_' . $lang] ?><br /><span class="gensmall"><?php echo $user->lang['CURRENT_' . $lang . '_EXPLAIN'] ?></span></td>
<td class="row1"><input type="radio" name="current" value="keep" checked="checked" /> <?php echo $user->lang['KEEP_ALL'] ?>&nbsp; &nbsp;<input type="radio" name="current" value="replace" /> <?php echo $user->lang['REPLACE_MATCHES'] ?>&nbsp; &nbsp;<input type="radio" name="current" value="delete" /> <?php echo $user->lang['DELETE_ALL'] ?>&nbsp;</td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><input class="btnmain" name="import" type="submit" value="<?php echo $user->lang['IMPORT_' . $lang] ?>" /></td>
</tr>
<?php
}
?>
</table></form>
<?php
adm_page_footer();
}
break;
case 'export':
adm_page_header($user->lang['EXPORT_' . $lang]);
trigger_error(sprintf($user->lang['EXPORT_' . $lang . '_EXPLAIN'], '<a href="admin_icons.' . $phpEx . $SID . '&amp;mode=' . $mode . '&amp;action=send">', '</a>'));
break;
case 'send':
$result = $db->sql_query('SELECT *
FROM ' . $table . "
ORDER BY {$fields}_order");
if ($row = $db->sql_fetchrow($result))
{
do
{
$pak .= "'" . addslashes($row[$fields . '_url']) . "', ";
$pak .= "'" . addslashes($row[$fields . '_height']) . "', ";
$pak .= "'" . addslashes($row[$fields . '_width']) . "', ";
if ($mode == 'emoticons')
{
$pak .= "'" . addslashes($row['emoticon']) . "', ";
$pak .= "'" . addslashes($row['code']) . "', ";
}
$pak .= "\n";
}
while ($row = $db->sql_fetchrow($result));
}
$db->sql_freeresult($result);
if ($pak != '')
{
$db->sql_close();
header('Content-Type: text/x-delimtext; name="' . $fields . '.pak"');
header('Content-disposition: attachment; filename=' . $fields . '.pak"');
echo $pak;
exit;
}
else
{
trigger_error($user->lang['NO_' . $fields . '_EXPORT']);
}
break;
case 'move_up':
case 'move_down':
$image_order = intval($_GET['order']);
$order_total = $image_order * 2 + (($action == 'move_up') ? -1 : 1);
$sql = 'UPDATE ' . $table . '
SET ' . $fields . "_order = $order_total - " . $fields . '_order
WHERE ' . $fields . "_order IN ($image_order, " . (($action == 'move_up') ? $image_order - 1 : $image_order + 1) . ')';
$db->sql_query($sql);
$cache->destroy('icons');
// No break; here, display the smilies admin back
default:
// By default, check that smile_order is valid and fix it if necessary
$result = $db->sql_query('SELECT * FROM ' . $table . ' ORDER BY ' . $fields . '_order');
if ($row = $db->sql_fetchrow($result))
{
$order = 0;
do
{
++$order;
if ($row[$fields . '_order'] != $order)
{
$db->sql_query('UPDATE ' . $table . '
SET ' . $fields . '_order = ' . $order . '
WHERE ' . $fields . '_id = ' . $row[$fields . '_id']);
}
}
while ($row = $db->sql_fetchrow($result));
}
$db->sql_freeresult($result);
// Output the page
adm_page_header($user->lang[$lang]);
?>
<h1><?php echo $user->lang[$lang]; ?></h1>
<p><?php echo $user->lang[$lang .'_EXPLAIN']; ?></p>
<form method="post" action="admin_icons.<?php echo $phpEx . $SID . '&amp;mode=' . $mode ?>"><table cellspacing="1" cellpadding="0" border="0" align="center">
<tr>
<td align="right"> &nbsp;&nbsp; <a href="admin_icons.<?php echo $phpEx . $SID . '&amp;mode=' . $mode . '&amp;action=import'; ?>"><?php echo $user->lang['IMPORT_' . $lang]; ?></a> | <a href="admin_icons.<?php echo $phpEx . $SID . '&amp;mode=' . $mode . '&amp;action=export'; ?>"><?php echo $user->lang['EXPORT_' . $lang]; ?></a></td>
</tr>
<tr>
<td><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th><?php echo $user->lang[$lang]; ?></th>
<?php
if ($mode == 'emoticons')
{
?>
<th><?php echo $user->lang['CODE']; ?></th>
<th><?php echo $user->lang['EMOTION']; ?></th>
<?php
}
?>
<th><?php echo $user->lang['ACTION']; ?></th>
<th><?php echo $user->lang['REORDER']; ?></th>
</tr>
<?php
$spacer = FALSE;
$sql = 'SELECT *
FROM ' . $table . '
ORDER BY display_on_posting DESC, ' . $fields . '_order ASC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if (!$spacer && !$row['display_on_posting'])
{
$spacer = TRUE;
?>
<tr>
<td class="row3" colspan="<?php echo ($mode == 'emoticons') ? 5 : 3; ?>" align="center"><?php echo $user->lang[$lang . '_NOT_DISPLAYED'] ?></td>
</tr>
<?php
}
$row_class = ($row_class != 'row1') ? 'row1' : 'row2';
$alt_text = ($mode == 'emoticon') ? htmlspecialchars($row['code']) : '';
?>
<tr>
<td class="<?php echo $row_class; ?>" align="center"><img src="<?php echo './../' . $img_path . '/' . $row[$fields . '_url']; ?>" width="<?php echo $row[$fields . '_width']; ?>" height="<?php echo $row[$fields . '_height']; ?>" alt="<?php echo $alt_text; ?>" title="<?php echo $alt_text; ?>" /></td>
<?php
if ($mode == 'emoticons')
{
?>
<td class="<?php echo $row_class; ?>" align="center"><?php echo htmlspecialchars($row['code']); ?></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo $row['emoticon']; ?></td>
<?php
}
?>
<td class="<?php echo $row_class; ?>" align="center"><a href="<?php echo "admin_icons.$phpEx$SID&amp;mode=$mode&amp;action=edit&amp;id=" . $row[$fields . '_id']; ?>"><?php echo $user->lang['EDIT']; ?></a> | <a href="<?php echo "admin_icons.$phpEx$SID&amp;mode=$mode&amp;action=delete&amp;id=" . $row[$fields . '_id']; ?>"><?php echo $user->lang['DELETE']; ?></a></td>
<td class="<?php echo $row_class; ?>" align="center"><a href="<?php echo "admin_icons.$phpEx$SID&amp;mode=$mode&amp;action=move_up&amp;order=" . $row[$fields . '_order']; ?>"><?php echo $user->lang['MOVE_UP']; ?></a> <br /> <a href="<?php echo "admin_icons.$phpEx$SID&amp;mode=$mode&amp;action=move_down&amp;order=" . $row[$fields . '_order']; ?>"><?php echo $user->lang['MOVE_DOWN']; ?></a></td>
</tr>
<?php
}
$db->sql_freeresult($result);
?>
<tr>
<td class="cat" colspan="<?php echo ($mode == 'emoticons') ? 5 : 3; ?>" align="center"><input type="submit" name="add" value="<?php echo $user->lang['ADD_' . $lang]; ?>" class="btnmain" /></td>
</tr>
</table></td>
</tr>
</table></form>
<?php
adm_page_footer();
break;
}
?>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,94 @@
<?php
/***************************************************************************
* admin_board.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if (!empty($setmodules))
{
$module['GENERAL']['PHP_INFO'] = ($auth->acl_get('a_server')) ? basename(__FILE__) . $SID : '';
return;
}
define('IN_PHPBB', 1);
// Load default header
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
// Check permissions
if (!$auth->acl_get('a_server'))
{
trigger_error($user->lang['NO_ADMIN']);
}
ob_start();
phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_VARIABLES);
$phpinfo = ob_get_contents();
ob_end_clean();
// Get used layout
$layout = (preg_match('#bgcolor#i', $phpinfo)) ? 'old' : 'new';
// Here we play around a little with the PHP Info HTML to try and stylise
// it along phpBB's lines ... hopefully without breaking anything. The idea
// for this was nabbed from the PHP annotated manual
preg_match_all('#<body[^>]*>(.*)</body>#siU', $phpinfo, $output);
switch ($layout)
{
case 'old':
$output = preg_replace('#<table#', '<table class="bg"', $output[1][0]);
$output = preg_replace('# bgcolor="\#(\w){6}"#', '', $output);
$output = preg_replace('#(\w),(\w)#', '\1, \2', $output);
$output = preg_replace('#border="0" cellpadding="3" cellspacing="1" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output);
$output = preg_replace('#<tr valign="top"><td align="left">(.*?<a .*?</a>)(.*?)</td></tr>#s', '<tr class="row1"><td style="{background-color: #9999cc;}"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td style="{background-color: #9999cc;}">\2</td><td style="{background-color: #9999cc;}">\1</td></tr></table></td></tr>', $output);
$output = preg_replace('#<tr valign="baseline"><td[ ]{0,1}><b>(.*?)</b>#', '<tr><td class="row1" nowrap="nowrap">\1', $output);
$output = preg_replace('#<td align="(center|left)">#', '<td class="row2">', $output);
$output = preg_replace('#<td>#', '<td class="row2">', $output);
$output = preg_replace('#valign="middle"#', '', $output);
$output = preg_replace('#<tr >#', '<tr>', $output);
$output = preg_replace('#<hr(.*?)>#', '', $output);
$output = preg_replace('#<h1 align="center">#i', '<h1>', $output);
$output = preg_replace('#<h2 align="center">#i', '<h2>', $output);
break;
case 'new':
$output = preg_replace('#<table#', '<table class="bg" align="center"', $output[1][0]);
$output = preg_replace('#(\w),(\w)#', '\1, \2', $output);
$output = preg_replace('#border="0" cellpadding="3" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output);
$output = preg_replace('#<tr class="v"><td>(.*?<a .*?</a>)(.*?)</td></tr>#s', '<tr class="row1"><td><table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td>\2</td><td>\1</td></tr></table></td></tr>', $output);
$output = preg_replace('#<td>#', '<td style="{background-color: #9999cc;}">', $output);
$output = preg_replace('#class="e"#', 'class="row1" nowrap="nowrap"', $output);
$output = preg_replace('#class="v"#', 'class="row2"', $output);
$output = preg_replace('# class="h"#', '', $output);
$output = preg_replace('#<hr />#', '', $output);
preg_match_all('#<div class="center">(.*)</div>#siU', $output, $output);
$output = $output[1][0];
break;
}
adm_page_header($user->lang['PHP_INFO']);
echo '<h1>' . $user->lang['PHP_INFO'] . '</h1>';
echo '<p>' . $user->lang['PHP_INFO_EXPLAIN'] . '</p>';
echo $output;
adm_page_footer();
?>

233
phpBB/adm/admin_prune.php Normal file
View File

@@ -0,0 +1,233 @@
<?php
/***************************************************************************
* admin_prune.php
* -------------------
* begin : Mon Jul 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
****************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if (!empty($setmodules))
{
if (!$auth->acl_get('a_prune'))
{
return;
}
$module['FORUM']['PRUNE'] = basename(__FILE__) . $SID . '&amp;mode=forums';
return;
}
define('IN_PHPBB', 1);
// Include files
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
// Do we have permission?
if (!$auth->acl_get('a_prune'))
{
trigger_error($user->lang['NO_ADMIN']);
}
// Get the forum ID for pruning
$forum_id = (isset($_REQUEST['f'])) ? array_map('intval', $_REQUEST['f']) : 0;
// Check for submit to be equal to Prune. If so then proceed with the pruning.
if (isset($_POST['submit']))
{
$prunedays = (isset($_POST['prunedays'])) ? intval($_POST['prunedays']) : 0;
$prune_flags = 0;
$prune_flags += (!empty($_POST['prune_old_polls'])) ? 2 : 0;
$prune_flags += (!empty($_POST['prune_announce'])) ? 4 : 0;
$prune_flags += (!empty($_POST['prune_sticky'])) ? 8 : 0;
// Convert days to seconds for timestamp functions...
$prunedate = time() - ($prunedays * 86400);
adm_page_header($user->lang['PRUNE']);
?>
<h1><?php echo $user->lang['PRUNE']; ?></h1>
<p><?php echo $user->lang['PRUNE_SUCCESS']; ?></p>
<table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th><?php echo $user->lang['FORUM']; ?></th>
<th><?php echo $user->lang['TOPICS_PRUNED']; ?></th>
<th><?php echo $user->lang['POSTS_PRUNED']; ?></th>
</tr>
<?php
$sql_forum = ($forum_id) ? ' AND forum_id IN (' . implode(', ', $forum_id) . ')' : '';
// Get a list of forum's or the data for the forum that we are pruning.
$sql = 'SELECT forum_id, forum_name
FROM ' . FORUMS_TABLE . '
WHERE forum_type = ' . FORUM_POST . "
$sql_forum
ORDER BY left_id ASC";
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
$prune_ids = array();
$log_data = '';
do
{
if ($auth->acl_get('f_list', $row['forum_id']))
{
$p_result = prune($row['forum_id'], $prunedate, $prune_flags, FALSE);
$prune_ids[] = $row['forum_id'];
$row_class = ($row_class == 'row1') ? 'row2' : 'row1';
?>
<tr>
<td class="<?php echo $row_class; ?>" align="center"><?php echo $row['forum_name']; ?></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo $p_result['topics']; ?></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo $p_result['posts']; ?></td>
</tr>
<?php
$log_data .= (($log_data != '') ? ', ' : '') . $row['forum_name'];
}
}
while ($row = $db->sql_fetchrow($result));
// Sync all pruned forums at once
sync('forum', 'forum_id', $prune_ids, TRUE);
add_log('admin', 'LOG_PRUNE', $log_data);
}
else
{
?>
<tr>
<td class="row1" align="center"><?php echo $user->lang['NO_PRUNE']; ?></td>
</tr>
<?php
}
$db->sql_freeresult($result);
?>
</table>
<br clear="all" />
<?php
adm_page_footer();
}
adm_page_header($user->lang['PRUNE']);
?>
<h1><?php echo $user->lang['PRUNE']; ?></h1>
<p><?php echo $user->lang['FORUM_PRUNE_EXPLAIN']; ?></p>
<?php
// If they haven't selected a forum for pruning yet then
// display a select box to use for pruning.
if (!$forum_id)
{
?>
<form method="post" action="<?php echo "admin_prune.$phpEx$SID"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th align="center"><?php echo $user->lang['SELECT_FORUM']; ?></th>
</tr>
<tr>
<td class="row1" align="center"><select name="f[]" multiple="true" size="5"><?php echo make_forum_select(false, false, false); ?></select></td>
</tr>
<tr>
<td class="cat" align="center"><input class="btnmain" type="submit" value="<?php echo $user->lang['LOOK_UP_FORUM']; ?>" />&nbsp; <input type="reset" value="<?php echo $user->lang['RESET']; ?>" class="btnlite" /></td>
</tr>
</table></form>
<?php
}
else
{
$sql = 'SELECT forum_id, forum_name
FROM ' . FORUMS_TABLE . '
WHERE forum_id IN (' . implode(', ', $forum_id) . ')';
$result = $db->sql_query($sql);
if (!($row = $db->sql_fetchrow($result)))
{
trigger_error($user->lang['NO_FORUM']);
}
$forum_list = $s_hidden_fields = '';
do
{
$forum_list .= (($forum_list != '') ? ', ' : '') . '<b>' . $row['forum_name'] . '</b>';
$s_hidden_fields .= '<input type="hidden" name="f[]" value="' . $row['forum_id'] . '" />';
}
while ($row = $db->sql_fetchrow($result));
$db->sql_freeresult($result);
$l_selected_forums = (sizeof($forum_id) == 1) ? 'SELECTED_FORUM' : 'SELECTED_FORUMS';
?>
<h2><?php echo $user->lang['FORUM']; ?></h2>
<p><?php echo $user->lang[$l_selected_forums] . ': ' . $forum_list; ?></p>
<form method="post" action="<?php echo "admin_prune.$phpEx$SID"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $user->lang['FORUM_PRUNE']; ?></th>
</tr>
<tr>
<td class="row1"><?php echo $user->lang['PRUNE_NOT_POSTED']; ?></td>
<td class="row2"><input type="text" name="prune_days" size="4" /></td>
</tr>
<tr>
<td class="row1"><?php echo $user->lang['PRUNE_OLD_POLLS'] ?>: <br /><span class="gensmall"><?php echo $user->lang['PRUNE_OLD_POLLS_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="prune_old_polls" value="1" /> <?php echo $user->lang['YES']; ?> &nbsp; <input type="radio" name="prune_old_polls" value="0" checked="checked" /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><?php echo $user->lang['PRUNE_ANNOUNCEMENTS'] ?>: </td>
<td class="row2"><input type="radio" name="prune_announce" value="1" /> <?php echo $user->lang['YES']; ?> &nbsp; <input type="radio" name="prune_announce" value="0" checked="checked" /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><?php echo $user->lang['PRUNE_STICKY'] ?>: </td>
<td class="row2"><input type="radio" name="prune_sticky" value="1" /> <?php echo $user->lang['YES']; ?> &nbsp; <input type="radio" name="prune_sticky" value="0" checked="checked" /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><input type="submit" name="submit" value="<?php echo $user->lang['SUBMIT']; ?>" class="btnmain"></td>
</tr>
</table></form>
<?php
}
adm_page_footer();
?>

View File

@@ -0,0 +1,263 @@
<?php
/***************************************************************************
* admin_prune_users.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if (!empty($setmodules))
{
if (!$auth->acl_get('a_userdel'))
{
return;
}
$module['USER']['PRUNE_USERS'] = basename(__FILE__) . $SID;
return;
}
define('IN_PHPBB', 1);
// Include files
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
// Do we have forum admin permissions?
if (!$auth->acl_get('a_userdel'))
{
trigger_error($user->lang['NO_ADMIN']);
}
// Set mode
$mode = (isset($_REQUEST['mode'])) ? htmlspecialchars($_REQUEST['mode']) : '';
// Do prune
if (isset($_POST['prune']))
{
if (empty($_POST['confirm']))
{
$values = array('prune', 'deactivate', 'delete', 'users', 'username', 'email', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'deleteposts');
$l_message = '<form method="post" action="admin_prune_users.' . $phpEx . $SID . '">' . $user->lang['Confirm_prune_users'] . '<br /><br /><input class="btnlite" type="submit" name="confirm" value="' . $user->lang['Yes'] . '" />&nbsp;&nbsp;<input class="btnlite" type="submit" name="cancel" value="' . $user->lang['No'] . '" />';
foreach ($values as $field)
{
$l_message .= (!empty($_POST[$field])) ? '<input type="hidden" name="' . $field . '" value="' . urlencode($_POST[$field]) . '" />' : '';
}
$l_message .= '</form>';
adm_page_header($user->lang['Prune_users']);
?>
<h1><?php echo $user->lang['PRUNE_USERS']; ?></h1>
<p><?php echo $user->lang['PRUNE_USERS_EXPLAIN']; ?></p>
<?php
page_message($user->lang['CONFIRM'], $l_message, false);
adm_page_footer();
}
else if (isset($_POST['confirm']))
{
if (!empty($_POST['users']))
{
$users = explode("\n", urldecode($_POST['users']));
$where_sql = '';
foreach ($users as $username)
{
$where_sql .= (($where_sql != '') ? ', ' : '') . '\'' . trim($username) . '\'';
}
$where_sql = " AND username IN ($where_sql)";
}
else
{
$username = (!empty($_POST['username'])) ? urldecode($_POST['username']) : '';
$email = (!empty($_POST['email'])) ? urldecode($_POST['email']) : '';
$joined_select = (!empty($_POST['joined_select'])) ? $_POST['joined_select'] : 'lt';
$active_select = (!empty($_POST['active_select'])) ? $_POST['active_select'] :'lt';
$count_select = (!empty($_POST['count_select'])) ? $_POST['count_select'] : 'eq';
$joined = (!empty($_POST['joined'])) ? explode('-', $_POST['joined']) : array();
$active = (!empty($_POST['active'])) ? explode('-', $_POST['active']) :array();
$count = (!empty($_POST['count'])) ? intval($_POST['count']) : '';
$key_match = array('lt' => '<', 'gt' => '>', 'eq' => '=');
$sort_by_types = array('username', 'user_email', 'user_posts', 'user_regdate', 'user_lastvisit');
$where_sql = '';
$where_sql .= ($username) ? " AND username LIKE '" . str_replace('*', '%', $username) ."'" : '';
$where_sql .= ($email) ? " AND user_email LIKE '" . str_replace('*', '%', $email) ."' " : '';
$where_sql .= ($joined) ? " AND user_regdate " . $key_match[$joined_select] . " " . gmmktime(0, 0, 0, intval($joined[1]), intval($joined[2]), intval($joined[0])) : '';
$where_sql .= ($count) ? " AND user_posts " . $key_match[$count_select] . " $count " : '';
$where_sql .= ($active) ? " AND user_lastvisit " . $key_match[$active_select] . " " . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : '';
}
$sql = 'SELECT username, user_id FROM ' . USERS_TABLE . '
WHERE user_id <> ' . ANONYMOUS . "
$where_sql";
$result = $db->sql_query($sql);
$where_sql = '';
$user_ids = array();
$usernames = array();
if ($row = $db->sql_fetchrow($result))
{
do
{
$where_sql .= (($where_sql != '') ? ', ' : '') . $row['user_id'];
$user_ids[] = $row['user_id'];
$usernames[] = $row['username'];
}
while ($row = $db->sql_fetchrow($result));
$where_sql = " AND user_id IN ($where_sql)";
}
$db->sql_freeresult($result);
if ($where_sql != '')
{
$sql = '';
if (!empty($_POST['delete']))
{
if (!empty($_POST['deleteposts']))
{
// Call unified post deletion routine?
$l_log = 'LOG_PRUNE_USER_DEL_DEL';
}
else
{
for($i = 0; $i < sizeof($user_ids); $i++)
{
$sql = 'UPDATE ' . POSTS_TABLE . '
SET poster_id = ' . ANONYMOUS . ", post_username = '" . $usernames[$i] . "'
WHERE user_id = " . $userids[$i];
// $db->sql_query($sql);
}
$l_log = 'LOG_PRUNE_USER_DEL_ANON';
}
$sql = 'DELETE FROM ' . USERS_TABLE;
}
else if (!empty($_POST['deactivate']))
{
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_active = 0";
$l_log = 'LOG_PRUNE_USER_DEAC';
}
$sql .= ' WHERE user_id <> ' . ANONYMOUS . "
$where_sql";
// $db->sql_query($sql);
add_log('admin', $l_log, implode(', ', $usernames));
unset($user_ids);
unset($usernames);
}
trigger_error($user->lang['SUCCESS_USER_PRUNE']);
}
}
// Front end
$find_count = array('lt' => $user->lang['LESS_THAN'], 'eq' => $user->lang['EQUAL_TO'], 'gt' => $user->lang['MORE_THAN']);
$s_find_count = '';
foreach ($find_count as $key => $value)
{
$selected = ($key == 'eq') ? ' selected="selected"' : '';
$s_find_count .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
}
$find_time = array('lt' => $user->lang['BEFORE'], 'gt' => $user->lang['AFTER']);
$s_find_join_time = '';
foreach ($find_time as $key => $value)
{
$s_find_join_time .= '<option value="' . $key . '">' . $value . '</option>';
}
$s_find_active_time = '';
foreach ($find_time as $key => $value)
{
$s_find_active_time .= '<option value="' . $key . '">' . $value . '</option>';
}
//
//
//
adm_page_header($user->lang['PRUNE_USERS']);
?>
<h1><?php echo $user->lang['PRUNE_USERS']; ?></h1>
<p><?php echo $user->lang['PRUNE_USERS_EXPLAIN']; ?></p>
<form method="post" name="post" action="<?php echo "admin_prune_users.$phpEx$SID"; ?>"><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $user->lang['PRUNE_USERS']; ?></th>
</tr>
<tr>
<td class="row1" width="40%"><b><?php echo $user->lang['USERNAME']; ?>: </b></td>
<td class="row2"><input class="post" type="text" name="username" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['EMAIL']; ?>: </b></td>
<td class="row2"><input class="post" type="text" name="email" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['JOINED']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['Joined_explain']; ?></span></td>
<td class="row2"><select name="joined_select"><?php echo $s_find_join_time; ?></select> <input class="post" type="text" name="joined" maxlength="10" size="10" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['LAST_ACTIVE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['Last_active_explain']; ?></span></td>
<td class="row2"><select name="active_select"><?php echo $s_find_active_time; ?></select> <input class="post" type="text" name="active" maxlength="10" size="10" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['POSTS']; ?>: </b></td>
<td class="row2"><select name="count_select"><?php echo $s_find_count; ?></select> <input class="post" type="text" name="count" /></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['PRUNE_USERS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['SELECT_USERS_EXPLAIN']; ?></span></td>
<td class="row2"><textarea name="users" cols="40" rows="5"></textarea></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['DELETE_USER_POSTS']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['DELETE_USER_POSTS_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="deleteposts" value="1" /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="deleteposts" value="0" checked="checked" /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['DEACTIVATE_DELETE']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['DEACTIVATE_DELETE_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="action" value="delete" /> <?php echo $user->lang['DELETE_USERS']; ?>&nbsp;&nbsp;<input type="radio" name="action" value="deactivate" checked="checked" /> <?php echo $user->lang['DEACTIVATE']; ?></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><input class="btnlite" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>" />&nbsp;&nbsp;<input type="submit" name="usersubmit" value="<?php echo $user->lang['FIND_USERNAME']; ?>" class="btnlite" onClick="window.open('<?php echo "../search.$phpEx$SID&amp;mode=searchuser&amp;field=users"; ?>', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=650');return false;" /><input type="hidden" name="prune" value="1" /></td>
</tr>
</table></form>
<?php
adm_page_footer();
?>

333
phpBB/adm/admin_ranks.php Normal file
View File

@@ -0,0 +1,333 @@
<?php
/***************************************************************************
* admin_ranks.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if (!empty($setmodules))
{
if (!$auth->acl_get('a_ranks'))
{
return;
}
$module['USER']['RANKS'] = basename(__FILE__) . $SID;
return;
}
define('IN_PHPBB', 1);
// Let's set the root dir for phpBB
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
// Do we have permission?
if (!$auth->acl_get('a_ranks'))
{
trigger_error($user->lang['NO_ADMIN']);
}
// Check mode
if (isset($_REQUEST['mode']))
{
$mode = $_REQUEST['mode'];
}
else
{
// These could be entered via a form button
if (isset($_POST['add']))
{
$mode = 'add';
}
else if (isset($_POST['save']))
{
$mode = 'save';
}
else
{
$mode = '';
}
}
$rank_id = (isset($_GET['id'])) ? intval($_GET['id']) : 0;
//
switch ($mode)
{
case 'edit':
case 'add':
$data = $ranks = $existing_imgs = array();
$result = $db->sql_query('SELECT *
FROM ' . RANKS_TABLE . '
ORDER BY rank_special DESC, rank_min DESC');
if ($row = $db->sql_fetchrow($result))
{
do
{
$existing_imgs[] = $row['rank_image'];
if ($mode == 'edit' && $rank_id == $row['rank_id'])
{
$ranks = $row;
}
}
while ($row = $db->sql_fetchrow($result));
}
$db->sql_freeresult($result);
$imglist = filelist($phpbb_root_path . $config['ranks_path'], '');
$edit_img = $filename_list = '';
foreach ($imglist as $path => $img_ary)
{
foreach ($img_ary as $img)
{
$img = substr($path, 1) . (($path != '') ? '/' : '') . $img;
if (!in_array($img, $existing_imgs) || $mode == 'edit')
{
if ($ranks && $img == $ranks['rank_image'])
{
$selected = ' selected="selected"';
$edit_img = $img;
}
else
{
$selected = '';
}
$filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . '</option>';
}
}
}
$filename_list = '<option value=""' . (($edit_img == '') ? ' selected="selected"' : '') . '>----------</option>' . $filename_list;
unset($existing_imgs);
unset($imglist);
// They want to add a new rank, show the form.
$s_hidden_fields = '<input type="hidden" name="mode" value="save" />';
adm_page_header($user->lang['RANKS']);
?>
<script language="javascript" type="text/javascript" defer="defer">
<!--
function update_image(newimage)
{
document.image.src = (newimage) ? "<?php echo $phpbb_root_path . $config['ranks_path']; ?>/" + newimage : "../images/spacer.gif";
}
function update_image_dimensions()
{
if (document.image.height && document.forms[0].height)
{
document.forms[0].height.value = document.image.height;
document.forms[0].width.value = document.image.width;
}
}
//-->
</script>
<h1><?php echo $user->lang['RANKS']; ?></h1>
<p><?php echo $user->lang['RANKS_EXPLAIN']; ?></p>
<form method="post" action="<?php echo "admin_ranks.$phpEx$SID&amp;id=$rank_id"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $user->lang['RANKS']; ?></th>
</tr>
<tr>
<td class="row1" width="40%"><?php echo $user->lang['RANK_TITLE']; ?>: </td>
<td class="row2"><input class="post" type="text" name="title" size="25" maxlength="40" value="<?php echo $ranks['rank_title']; ?>" /></td>
</tr>
<tr>
<td class="row1" width="40%"><?php echo $user->lang['RANK_IMAGE']; ?>:</td>
<td class="row2"><table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="middle"><select name="rank_image" onchange="update_image(this.options[selectedIndex].value);"><?php echo $filename_list ?></select></td>
<td>&nbsp;&nbsp;</td>
<td valign="middle"><img src="<?php echo ($edit_img) ? $phpbb_root_path . $config['ranks_path'] . '/' . $edit_img : '../images/spacer.gif' ?>" name="image" border="0" alt="" title="" onload="update_image_dimensions()" /></td>
</tr>
</table></td>
</tr>
<tr>
<td class="row1"><?php echo $user->lang['RANK_SPECIAL']; ?>: </td>
<td class="row2"><input type="radio" name="special_rank" value="1"<?php echo ($ranks['rank_special']) ? ' checked="checked"' : ''; ?> /><?php echo $user->lang['YES']; ?> &nbsp;&nbsp;<input type="radio" name="special_rank" value="0"<?php echo (!$ranks['rank_special']) ? ' checked="checked"' : ''; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
<tr>
<td class="row1"><?php echo $user->lang['RANK_MINIMUM']; ?>: </td>
<td class="row2"><input class="post" type="text" name="min_posts" size="5" maxlength="10" value="<?php echo ($ranks['rank_special']) ? '' : $ranks['rank_min']; ?>" /></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><?php echo $s_hidden_fields; ?><input type="submit" name="submit" value="<?php echo $user->lang['SUBMIT']; ?>" class="btnmain" />&nbsp;&nbsp;<input type="reset" value="<?php echo $user->lang['RESET']; ?>" class="btnlite" /></td>
</tr>
</table></form>
<?php
adm_page_footer();
break;
case 'save':
//
// Ok, they sent us our info, let's update it.
//
$rank_id = (isset($_REQUEST['id'])) ? intval($_REQUEST['id']) : 0;
$rank_title = (isset($_POST['title'])) ? trim($_POST['title']) : '';
$special_rank = (!empty($_POST['special_rank'])) ? 1 : 0;
$min_posts = (isset($_POST['min_posts'])) ? intval($_POST['min_posts']) : -1;
$rank_image = (isset($_POST['rank_image'])) ? trim(htmlspecialchars($_POST['rank_image'])) : '';
if ($special_rank == 1)
{
$min_posts = -1;
}
// The rank image has to be a jpg, gif or png
if ($rank_image != '' && !preg_match('#(\.gif|\.png|\.jpg|\.jpeg)$#i', $rank_image))
{
$rank_image = '';
}
if ($rank_id)
{
$sql = "UPDATE " . RANKS_TABLE . "
SET rank_title = '" . $db->sql_escape($rank_title) . "', rank_special = $special_rank, rank_min = $min_posts, rank_image = '" . $db->sql_escape($rank_image) . "'
WHERE rank_id = $rank_id";
$message = $user->lang['RANK_UPDATED'];
}
else
{
$sql = "INSERT INTO " . RANKS_TABLE . " (rank_title, rank_special, rank_min, rank_image)
VALUES ('" . $db->sql_escape($rank_title) . "', $special_rank, $min_posts, '" . $db->sql_escape($rank_image) . "')";
$message = $user->lang['RANK_ADDED'];
}
$db->sql_query($sql);
$cache->destroy('ranks');
trigger_error($message);
break;
case 'delete':
// Ok, they want to delete their rank
$rank_id = (isset($_REQUEST['id'])) ? intval($_REQUEST['id']) : 0;
if ($rank_id)
{
$sql = "DELETE FROM " . RANKS_TABLE . "
WHERE rank_id = $rank_id";
$db->sql_query($sql);
$sql = "UPDATE " . USERS_TABLE . "
SET user_rank = 0
WHERE user_rank = $rank_id";
$db->sql_query($sql);
$cache->destroy('ranks');
trigger_error($user->lang['RANK_REMOVED']);
}
else
{
trigger_error($user->lang['MUST_SELECT_RANK']);
}
break;
default:
adm_page_header($user->lang['RANKS']);
?>
<h1><?php echo $user->lang['RANKS']; ?></h1>
<p><?php echo $user->lang['RANKS_EXPLAIN']; ?></p>
<form method="post" action="<?php echo "admin_ranks.$phpEx$SID"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th><?php echo $user->lang['RANK_IMAGE']; ?></th>
<th><?php echo $user->lang['RANK_TITLE']; ?></th>
<th><?php echo $user->lang['RANK_MINIMUM']; ?></th>
<th><?php echo $user->lang['ACTION']; ?></th>
</tr>
<?php
// Show the default page
$sql = "SELECT * FROM " . RANKS_TABLE . "
ORDER BY rank_min ASC, rank_special ASC";
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
do
{
$row_class = ($row_class != 'row1') ? 'row1' : 'row2';
?>
<tr>
<td class="<?php echo $row_class; ?>" align="center"><?php
if ($row['rank_image'])
{
?><img src="<?php echo $phpbb_root_path . $config['ranks_path'] . '/' . $row['rank_image']; ?>"" border="0" alt="<?php echo $row['rank_title']; ?>" title="<?php echo $row['rank_title']; ?>" /><?php
}
else
{
echo '-';
}
?></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo $row['rank_title']; ?></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo ($row['rank_special']) ? '-' : $row['rank_min']; ?></td>
<td class="<?php echo $row_class; ?>" align="center">&nbsp;<a href="<?php echo "admin_ranks.$phpEx$SID&amp;mode=edit&amp;id=" . $row['rank_id']; ?>"><?php echo $user->lang['EDIT']; ?></a> | <a href="<?php echo "admin_ranks.$phpEx$SID&amp;mode=delete&amp;id=" . $row['rank_id']; ?>"><?php echo $user->lang['DELETE']; ?></a>&nbsp;</td>
</tr>
<?php
}
while ($row = $db->sql_fetchrow($result));
}
?>
<tr>
<td class="cat" colspan="5" align="center"><input type="submit" class="btnmain" name="add" value="<?php echo $user->lang['ADD_RANK']; ?>" /></td>
</tr>
</table></form>
<?php
adm_page_footer();
break;
}
?>

332
phpBB/adm/admin_search.php Normal file
View File

@@ -0,0 +1,332 @@
<?php
/***************************************************************************
* admin_search.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if (!empty($setmodules))
{
if (!$auth->acl_get('a_search'))
{
return;
}
$module['DB']['SEARCH_INDEX'] = basename(__FILE__) . $SID;
return;
}
define('IN_PHPBB', 1);
// Include files
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/functions_posting.'.$phpEx);
// Check permissions
if (!$auth->acl_get('a_search'))
{
trigger_error($user->lang['NO_ADMIN']);
}
// Start indexing
if (isset($_POST['start']) || isset($_GET['batchstart']))
{
$batchsize = 200; // Process this many posts per batch
$batchstart = (!isset($_GET['batchstart'])) ? $row['min_post_id'] : $_GET['batchstart'];
$batchcount = (!isset($_GET['batchcount'])) ? 1 : $_GET['batchcount'];
$loopcount = 0;
$batchend = $batchstart + $batchsize;
// Search re-indexing is tough on the server ... so we'll check the load
// each loop and if we're on a 1min load of 3 or more we'll re-load the page
// and try again. No idea how well this will work in practice so we'll see ...
if (file_exists('/proc/loadavg'))
{
if ($load = @file('/proc/loadavg'))
{
list($load) = explode(' ', $load[0]);
if ($load > 3)
{
redirect("admin_search.$phpEx$SID&batchstart=$batchstart&batchcount=$batch_count");
}
}
}
// Try and load stopword and synonym files
$stopword_array = array();
$synonym_array = array();
$dir = opendir($phpbb_root_path . 'language/');
while ($file = readdir($dir))
{
if (preg_match('#^lang_#', $file) && !is_file($phpbb_root_path . 'language/' . $file) && !is_link($phpbb_root_path . 'language/' . $file))
{
unset($tmp_array);
$tmp_array = @file($phpbb_root_path . 'language/' . $file . '/search_stopwords.txt');
if (is_array($tmp_array))
{
$stopword_array = array_unique(array_merge($stopword_array, $tmp_array));
}
unset($tmp_array);
$tmp_array = @file($phpbb_root_path . 'language/' . $file . '/search_synonyms.txt');
if (is_array($tmp_array))
{
$synonym_array = array_unique(array_merge($synonym_array, $tmp_array));
}
}
}
closedir($dir);
if (!isset($_GET['batchstart']))
{
// Take board offline
set_config('board_disable', 1);
// Empty existing tables
$db->sql_query("TRUNCATE " . SEARCH_TABLE);
$db->sql_query("TRUNCATE " . SEARCH_WORD_TABLE);
$db->sql_query("TRUNCATE " . SEARCH_MATCH_TABLE);
}
// Fetch a batch of posts_text entries
$sql = "SELECT COUNT(*) AS total, MAX(post_id) AS max_post_id, MIN(post_id) AS min_post_id
FROM " . POSTS_TEXT_TABLE;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$totalposts = $row['total'];
$max_post_id = $row['max_post_id'];
$db->sql_freeresult($result);
$sql = "SELECT *
FROM " . POSTS_TEXT_TABLE . "
WHERE post_id
BETWEEN $batchstart
AND $batchend";
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
do
{
$post_id = $row['post_id'];
$search_raw_words = array();
$search_raw_words['text'] = split_words(clean_words('post', $row['post_text'], $stopword_array, $synonym_array));
$search_raw_words['title'] = split_words(clean_words('post', $row['post_subject'], $stopword_array, $synonym_array));
$word = array();
$word_insert_sql = array();
foreach ($search_raw_words as $word_in => $search_matches)
{
$word_insert_sql[$word_in] = '';
if (!empty($search_matches))
{
for ($i = 0; $i < count($search_matches); $i++)
{
$search_matches[$i] = trim($search_matches[$i]);
if ($search_matches[$i] != '')
{
$word[] = $search_matches[$i];
$word_insert_sql[$word_in] .= ($word_insert_sql[$word_in] != '') ? ", '" . $search_matches[$i] . "'" : "'" . $search_matches[$i] . "'";
}
}
}
}
if (count($word))
{
$word_text_sql = '';
$word = array_unique($word);
for($i = 0; $i < count($word); $i++)
{
$word_text_sql .= (($word_text_sql != '') ? ', ' : '') . "'" . $word[$i] . "'";
}
$check_words = array();
switch(SQL_LAYER)
{
case 'postgresql':
case 'msaccess':
case 'mssql-odbc':
case 'oracle':
case 'db2':
$sql = "SELECT word_id, word_text
FROM " . SEARCH_WORD_TABLE . "
WHERE word_text IN ($word_text_sql)";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$check_words[$row['word_text']] = $row['word_id'];
}
break;
}
$value_sql = '';
$match_word = array();
for ($i = 0; $i < count($word); $i++)
{
$new_match = true;
if (isset($check_words[$word[$i]]))
{
$new_match = false;
}
if ($new_match)
{
switch(SQL_LAYER)
{
case 'mysql':
case 'mysql4':
$value_sql .= (($value_sql != '') ? ', ' : '') . "('" . $word[$i] . "')";
break;
case 'mssql':
case 'sqlite':
$value_sql .= (($value_sql != '') ? ' UNION ALL ' : '') . "SELECT '" . $word[$i] . "'";
break;
default:
$sql = 'INSERT INTO ' . SEARCH_WORD_TABLE . " (word_text)
VALUES ('" . $word[$i] . "')";
$db->sql_query($sql);
break;
}
}
}
if ($value_sql != '')
{
switch (SQL_LAYER)
{
case 'mysql':
case 'mysql4':
$sql = 'INSERT IGNORE INTO ' . SEARCH_WORD_TABLE . " (word_text)
VALUES $value_sql";
break;
case 'mssql':
case 'sqlite':
$sql = 'INSERT INTO ' . SEARCH_WORD_TABLE . " (word_text)
$value_sql";
break;
}
$db->sql_query($sql);
}
}
foreach ($word_insert_sql as $word_in => $match_sql)
{
$title_match = ($word_in == 'title') ? 1 : 0;
if ($match_sql != '')
{
$sql = 'INSERT INTO ' . SEARCH_MATCH_TABLE . " (post_id, word_id, title_match)
SELECT $post_id, word_id, $title_match
FROM " . SEARCH_WORD_TABLE . "
WHERE word_text IN ($match_sql)";
$db->sql_query($sql);
}
}
}
while ($row = $db->sql_fetchrow($result));
}
$db->sql_freeresult($result);
// Remove common words after the first 2 batches and after every 4th batch after that.
if ($batchcount % 4 == 3)
{
// remove_common('global', $config['common_search']);
}
$batchcount++;
if (($batchstart + $batchsize) < $max_post_id)
{
redirect("Location: admin_search.$phpEx$SID&batchstart=" . ($batchstart + $batchsize) . "&batchcount=$batch_count");
}
else
{
set_config('board_disable', 0);
adm_page_header($user->lang['SEARCH_INDEX']);
?>
<h1><?php echo $user->lang['SEARCH_INDEX']; ?></h1>
<p><?php echo $user->lang['SEARCH_INDEX_COMPLETE']; ?></p>
<?php
adm_page_footer();
}
exit;
}
else if (isset($_POST['cancel']))
{
set_config('board_disable', 0);
adm_page_header($user->lang['SEARCH_INDEX']);
?>
<h1><?php echo $user->lang['SEARCH_INDEX']; ?></h1>
<p><?php echo $user->lang['SEARCH_INDEX_CANCEL']; ?></p>
<?php
adm_page_footer();
}
else
{
adm_page_header($user->lang['Search_index']);
?>
<h1><?php echo $user->lang['SEARCH_INDEX']; ?></h1>
<p><?php echo $user->lang['SEARCH_INDEX_EXPLAIN']; ?></p>
<form method="post" action="<?php echo "admin_search.$phpEx$SID"; ?>"><table cellspacing="1" cellpadding="4" border="0" align="center" bgcolor="#98AAB1">
<tr>
<td class="cat" height="28" align="center">&nbsp;<input type="submit" name="start" value="<?php echo $user->lang['START']; ?>" class="btnmain" /> &nbsp; <input type="submit" name="cancel" value="<?php echo $user->lang['CANCEL']; ?>" class="btnmain" />&nbsp;</td>
</tr>
</table></form>
<?php
adm_page_footer();
}
?>

3373
phpBB/adm/admin_styles.php Normal file

File diff suppressed because it is too large Load Diff

353
phpBB/adm/admin_users.php Normal file
View File

@@ -0,0 +1,353 @@
<?php
/***************************************************************************
* admin_users.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if (!empty($setmodules))
{
if (!$auth->acl_gets('a_user', 'a_useradd', 'a_userdel'))
{
return;
}
$module['USER']['MANAGE'] = basename(__FILE__) . $SID;
return;
}
define('IN_PHPBB', 1);
// Include files
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require('pagestart.' . $phpEx);
// Set mode
$mode = (isset($_REQUEST['mode'])) ? htmlspecialchars($_REQUEST['mode']) : '';
$action = (isset($_REQUEST['action'])) ? htmlspecialchars($_REQUEST['action']) : 'main';
// Begin program
if (isset($_POST['username']) || isset($_REQUEST['u']))
{
// Grab relevant userdata
if (isset($_REQUEST['u']))
{
$user_id = intval($_REQUEST['u']);
if(!($userdata = get_userdata($user_id)))
{
trigger_error($user->lang['NO_USER']);
}
}
else
{
if(!$userdata = get_userdata($_POST['username']))
{
trigger_error($user->lang['NO_USER']);
}
}
// Update entry in DB
if ($_POST['deleteuser'] && !$userdata['user_founder'])
{
if (!$auth->acl_get('a_userdel'))
{
trigger_error($user->lang['NO_ADMIN']);
}
$db->sql_transaction();
$sql = 'UPDATE ' . POSTS_TABLE . '
SET poster_id = ' . ANONYMOUS . "
WHERE poster_id = $user_id";
$db->sql_query($sql);
$sql = 'UPDATE ' . TOPICS_TABLE . '
SET topic_poster = ' . ANONYMOUS . "
WHERE topic_poster = $user_id";
$db->sql_query($sql);
$table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE);
foreach ($table_ary as $table)
{
$sql = "DELETE FROM $table
WHERE user_id = $user_id";
$db->sql_query($sql);
}
$db->sql_transaction('commit');
trigger_error($user->lang['User_deleted']);
}
// Output relevant page
adm_page_header($user->lang['MANAGE']);
?>
<form method="post" action="admin_users.<?php echo $phpEx . $SID; ?>&amp;mode=<?php echo $mode; ?>&amp;u=<?php echo $userdata['user_id']; ?>"><table width="90%" cellspacing="3" cellpadding="0" border="0" align="center">
<tr>
<td align="right"><b>Main</b> | <a href="admin_users.<?php echo $phpEx . $SID; ?>&amp;u=<?php echo $userdata['user_id']; ?>&amp;action=profile">Profile</a> | <a href="admin_users.<?php echo $phpEx . $SID; ?>&amp;u=<?php echo $userdata['user_id']; ?>&amp;action=pref">Preferences</a> | <a href="admin_users.<?php echo $phpEx . $SID; ?>&amp;u=<?php echo $userdata['user_id']; ?>&amp;action=avatar">Avatar</a> | <a href="admin_users.<?php echo $phpEx . $SID; ?>&amp;u=<?php echo $userdata['user_id']; ?>&amp;action=permissions">Permissions</a></td>
</tr>
<?php
switch ($action)
{
case 'main':
?>
<tr>
<td><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0">
<tr>
<td class="row1">Username: <br /><span class="gensmall">Click profile to edit</span></td>
<td class="row2"><?php echo $userdata['username']; ?> [ <a href="admin_ban.<?php echo $phpEx . $SID; ?>&amp;mode=user&amp;ban=<?php echo $userdata['username']; ?>&amp;bansubmit=true">Ban</a> ]</td>
</tr>
<tr>
<td class="row1">Registered: </td>
<td class="row2"><?php echo $user->format_date($userdata['user_regdate']); ?></td>
</tr>
<tr>
<td class="row1">Registered from IP: </td>
<td class="row2"><?php if ($userdata['user_ip']) { echo $userdata['user_ip']; ?> [ <a href="admin_users.<?php echo $phpEx . $SID; ?>&amp;u=<?php echo $userdata['user_id']; ?>&amp;mode=main&amp;do=iplookup">Lookup</a> | <a href="admin_ban.<?php echo $phpEx . $SID; ?>&amp;mode=ip&amp;ban=<?php echo $userdata['user_ip']; ?>&amp;bansubmit=true">Ban</a> ] <?php } else { echo 'Unknown'; } ?></td>
</tr>
<?php
if (isset($_GET['do']) && $_GET['do'] == 'iplookup')
{
if ($userdata['user_ip'] != '' && $domain = gethostbyaddr($userdata['user_ip']))
{
?>
<tr>
<th colspan="2">IP whois for <?php echo $domain; ?></th>
</tr>
<tr>
<td class="row1" colspan="2"><?php
if ($ipwhois = ipwhois($userdata['user_ip']))
{
echo '<br /><pre align="left">' . trim($ipwhois) . '</pre>';
}
?></td>
</tr>
<?php
}
}
?>
<tr>
<td class="row1">Total/Average posts by this user: </td>
<td class="row2"></td>
</tr>
<tr>
<td class="row1"></td>
<td class="row2"></td>
</tr>
</table></td>
</tr>
</table></form>
<?php
break;
case 'permissions':
$userauth = new auth();
$userauth->acl($userdata);
foreach ($acl_options['global'] as $option_name => $option_id)
{
$type = substr($option_name, 0, strpos('_', $option_name) +1);
$global[$type][$option_name] = $userauth->acl_get($option_name);
}
$sql = "SELECT forum_id, forum_name
FROM " . FORUMS_TABLE . "
ORDER BY left_id";
$result = $db->sql_query($sql);
$permissions = array();
while($row = $db->sql_fetchrow($result))
{
$forum_data[$row['forum_id']] = $row['forum_name'];
foreach ($acl_options['local'] as $option_name => $option_id)
{
$local[$row['forum_id']][$option_name] = $userauth->acl_get($option_name, $row['forum_id']);
}
}
?>
<tr>
<td colspan="2"><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<td class="cat" colspan="3" align="right">Select permission set: <select name="acl_type"><?php
$acl_types = '<option>Global Settings</option><option>---------------</option>';
$acl_types .= '<option value="a">' . $user->lang['ADMINISTRATOR'] . '</option><option value="u">' . $user->lang['USER'] . '</option>';
$acl_types .= '<option>Forum Settings</option><option>---------------</option>';
$acl_types .= make_forum_select(false, false, false);
echo $acl_types;
?></select>&nbsp;</td>
</tr>
<tr>
<th>&nbsp;<?php echo $user->lang['Option']; ?>&nbsp;</th>
<th>&nbsp;<?php echo $user->lang['Allow']; ?>&nbsp;</th>
<th>&nbsp;<?php echo $user->lang['Deny']; ?>&nbsp;</th>
</tr>
<?php
foreach ($global as $type => $auth_ary)
{
foreach ($auth_ary as $option => $allow)
{
if ($option != $type .'_')
{
$row_class = ($row_class == 'row1') ? 'row2' : 'row1';
$l_can_cell = (!empty($user->lang['acl_' . $option])) ? $user->lang['acl_' . $option] : ucfirst(preg_replace('#.*?_#', '', $option));
$allow_type = ($allow == ACL_ALLOW) ? ' checked="checked"' : '';
$deny_type = ($allow == ACL_DENY) ? ' checked="checked"' : '';
?>
<tr>
<td class="<?php echo $row_class; ?>"><?php echo $l_can_cell; ?></td>
<td class="<?php echo $row_class; ?>" align="center"><input type="radio"<?php echo $allow_type; ?> /></td>
<td class="<?php echo $row_class; ?>" align="center"><input type="radio"<?php echo $deny_type; ?> /></td>
</tr>
<?php
}
}
}
?>
</table></td>
</tr>
<tr>
<?php
foreach ($local as $forum_id => $auth_ary)
{
?>
<td class="row1"><?php echo $forum_data[$forum_id]; ?></td>
<td><table cellspacing="1" cellpadding="0" border="0">
<?php
foreach ($auth_ary as $option => $allow)
{
echo '<tr><td>' . $user->lang['acl_' . $option] . ' => ' . (($allow) ? 'Allowed' : 'Denied') . '</td></tr>';
}
?>
</table></td>
</tr>
<?php
}
break;
}
adm_page_footer();
}
// Do we have permission?
if (!$auth->acl_get('a_user'))
{
trigger_error($user->lang['No_admin']);
}
adm_page_header($user->lang['Manage']);
?>
<h1><?php echo $user->lang['User_admin']; ?></h1>
<p><?php echo $user->lang['User_admin_explain']; ?></p>
<form method="post" name="post" action="admin_users.<?php echo $phpEx.$SID; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th align="center"><?php echo $user->lang['Select_a_User']; ?></th>
</tr>
<tr>
<td class="row1" align="center"><input type="text" class="post" name="username" maxlength="50" size="20" /> <input type="submit" name="submituser" value="<?php echo $user->lang['Look_up_user']; ?>" class="btnmain" /> <input type="submit" name="usersubmit" value="<?php echo $user->lang['Find_username']; ?>" class="btnlite" onclick="window.open('<?php echo "../memberlist.$phpEx$SID&amp;mode=searchuser&amp;field=username"; ?>', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;" /></td>
</tr>
</table></form>
<?php
adm_page_footer();
// ---------
// FUNCTIONS
function ipwhois($ip)
{
$ipwhois = '';
$match = array(
'#RIPE\.NET#is' => 'whois.ripe.net',
'#whois\.apnic\.net#is' => 'whois.apnic.net',
'#nic\.ad\.jp#is' => 'whois.nic.ad.jp',
'#whois\.registro\.br#is' => 'whois.registro.br'
);
if (($fsk = fsockopen('whois.arin.net', 43)))
{
@fputs($fsk, "$ip\n");
while (!feof($fsk))
{
$ipwhois .= fgets($fsk, 1024);
}
fclose($fsk);
}
foreach (array_keys($match) as $server)
{
if (preg_match($server, $ipwhois))
{
$ipwhois = '';
if (($fsk = fsockopen($match[$server], 43)))
{
@fputs($fsk, "$ip\n");
while (!feof($fsk))
{
$ipwhois .= fgets($fsk, 1024);
}
fclose($fsk);
}
break;
}
}
return $ipwhois;
}
// FUNCTIONS
// ---------
?>

View File

@@ -0,0 +1,227 @@
<?php
/***************************************************************************
* admin_viewlogs.php
* -------------------
* begin : Friday, May 11, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if (!empty($setmodules))
{
if (!$auth->acl_get('a_'))
{
return;
}
$filename = basename(__FILE__);
$module['LOG']['ADMIN_LOGS'] = $filename . "$SID&amp;mode=admin";
$module['LOG']['MOD_LOGS'] = $filename . "$SID&amp;mode=mod";
$module['LOG']['CRITICAL_LOGS'] = $filename . "$SID&amp;mode=critical";
return;
}
define('IN_PHPBB', 1);
// Include files
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
// Do we have styles admin permissions?
if (!$auth->acl_get('a_'))
{
trigger_error($user->lang['NO_ADMIN']);
}
// Set some variables
$forum_id = (isset($_REQUEST['f'])) ? intval($_REQUEST['f']) : 0;
$start = (isset($_GET['start'])) ? intval($_GET['start']) : 0;
$mode = (isset($_REQUEST['mode'])) ? $_REQUEST['mode'] : 'admin';
// Sort keys
$sort_days = (!empty($_REQUEST['st'])) ? max(intval($_REQUEST['st']), 0) : 0;
$sort_key = (!empty($_REQUEST['sk'])) ? htmlspecialchars($_REQUEST['sk']) : 't';
$sort_dir = (!empty($_REQUEST['sd'])) ? htmlspecialchars($_REQUEST['sd']) : 'd';
// Define some vars depending on which logs we're looking at
$log_type = ($mode == 'admin') ? LOG_ADMIN : (($mode == 'mod') ? LOG_MOD : LOG_CRITICAL);
$l_title = $user->lang[strtoupper($mode) . '_LOGS'];
$l_title_explain = $user->lang[strtoupper($mode) . '_LOGS_EXPLAIN'];
// Delete entries if requested and able
if ((isset($_POST['delmarked']) || isset($_POST['delall'])) && $auth->acl_get('a_clearlogs'))
{
$where_sql = '';
if (isset($_POST['delmarked']) && isset($_POST['mark']))
{
foreach ($_POST['mark'] as $marked)
{
$where_sql .= (($where_sql != '') ? ', ' : '') . intval($marked);
}
$where_sql = "WHERE log_type = $log_type AND log_id IN ($where_sql)";
}
$sql = "DELETE FROM " . LOG_TABLE . "
$where_sql";
$db->sql_query($sql);
add_log('admin', 'log_' . $mode . '_clear');
}
// Sorting
$limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 364 => $user->lang['1_YEAR']);
$sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']);
$sort_by_sql = array('u' => 'l.user_id', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation');
$s_limit_days = $s_sort_key = $s_sort_dir = '';
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir);
// Define where and sort sql for use in displaying logs
$sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0;
$sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
// Output page
adm_page_header($l_title);
?>
<h1><?php echo $l_title; ?></h1>
<p><?php echo $l_title_explain; ?></p>
<form method="post" action="<?php echo "admin_viewlogs.$phpEx$SID&amp;mode=$mode"; ?>">
<?php
// Define forum list if we're looking @ mod logs
if ($mode == 'mod')
{
$forum_box = '<option value="0">' . $user->lang['ALL_FORUMS'] . '</option>' . make_forum_select($forum_id);
?>
<table width="100%" cellpadding="1" cellspacing="1" border="0">
<tr>
<td align="right"><?php echo $user->lang['SELECT_FORUM']; ?>: <select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit() }"><?php echo $forum_box; ?></select> <input class="btnlite" type="submit" value="<?php echo $user->lang['GO']; ?>" /></td>
</tr>
</table>
<?php
}
?>
<table class="bg" width="100%" cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="cat" colspan="5" height="28" align="center"><?php echo $user->lang['DISPLAY_LOG']; ?>: &nbsp;<?php echo $s_limit_days; ?>&nbsp;<?php echo $user->lang['SORT_BY']; ?>: <?php echo $s_sort_key; ?> <?php echo $s_sort_dir; ?>&nbsp;<input class="btnlite" type="submit" value="<?php echo $user->lang['GO']; ?>" name="sort" /></td>
</tr>
<tr>
<th width="15%" height="25" nowrap="nowrap"><?php echo $user->lang['USERNAME']; ?></th>
<th width="15%" nowrap="nowrap"><?php echo $user->lang['IP']; ?></th>
<th width="20%" nowrap="nowrap"><?php echo $user->lang['TIME']; ?></th>
<th width="45%" nowrap="nowrap"><?php echo $user->lang['ACTION']; ?></th>
<th nowrap="nowrap"><?php echo $user->lang['MARK']; ?></th>
</tr>
<?php
//
// Grab log data
//
$log_data = array();
$log_count = 0;
view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, $sql_where, $sql_sort);
if ($log_count)
{
for($i = 0; $i < sizeof($log_data); $i++)
{
$row_class = ($row_class == 'row1') ? 'row2' : 'row1';
?>
<tr>
<td class="<?php echo $row_class; ?>" nowrap="nowrap"><?php echo $log_data[$i]['username']; ?></td>
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"><?php echo $log_data[$i]['ip']; ?></td>
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"><?php echo $user->format_date($log_data[$i]['time']); ?></td>
<td class="<?php echo $row_class; ?>"><?php echo $log_data[$i]['action']; ?></td>
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"><input type="checkbox" name="mark[]" value="<?php echo $log_data[$i]['id']; ?>" /></td>
</tr>
<?php
}
if ($auth->acl_get('a_clearlogs'))
{
?>
<tr>
<td class="cat" colspan="5" height="28" align="right"><input class="btnlite" type="submit" name="delmarked" value="<?php echo $user->lang['DELETE_MARKED']; ?>" />&nbsp; <input class="btnlite" type="submit" name="delall" value="<?php echo $user->lang['DELETE_ALL']; ?>" />&nbsp;</td>
</tr>
<?php
}
}
else
{
?>
<tr>
<td class="row1" colspan="5" align="center" nowrap="nowrap"><?php echo $user->lang['NO_ENTRIES']; ?></td>
</tr>
<?php
}
?>
</table>
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="top">&nbsp;<span class="nav"><?php echo on_page($log_count, $config['topics_per_page'], $start); ?></span></td>
<td align="right" valign="top" nowrap="nowrap"><span class="nav"><?php
if ($auth->acl_get('a_clearlogs'))
{
?><b><a href="javascript:marklist(true);"><?php echo $user->lang['MARK_ALL']; ?></a> :: <a href="javascript:marklist(false);"><?php echo $user->lang['UNMARK_ALL']; ?></a></b>&nbsp;<br /><br /><?php
}
echo generate_pagination("admin_viewlogs.$phpEx$SID&amp;mode=$mode&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir", $log_count, $config['topics_per_page'], $start); ?></span></td>
</tr>
</table></form>
<script language="Javascript" type="text/javascript">
<!--
function marklist(status)
{
for (i = 0; i < document.log.length; i++)
{
document.log.elements[i].checked = status;
}
}
//-->
</script>
<?php
adm_page_footer();
?>

229
phpBB/adm/admin_words.php Normal file
View File

@@ -0,0 +1,229 @@
<?php
/***************************************************************************
* admin_words.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if (!empty($setmodules))
{
if (!$auth->acl_get('a_words'))
{
return;
}
$module['POST']['WORD_CENSOR'] = basename(__FILE__) . $SID;
return;
}
define('IN_PHPBB', 1);
// Include files
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
// Do we have forum admin permissions?
if (!$auth->acl_get('a_words'))
{
trigger_error($user->lang['NO_ADMIN']);
}
// What do we want to do?
if (isset($_REQUEST['mode']))
{
$mode = $_REQUEST['mode'];
}
else
{
// These could be entered via a form button
if (isset($_POST['add']))
{
$mode = 'add';
}
else if (isset($_POST['save']))
{
$mode = 'save';
}
else
{
$mode = '';
}
}
if ($mode != '')
{
switch ($mode)
{
case 'edit':
case 'add':
$word_id = (isset($_GET['id'])) ? intval($_GET['id']) : 0;
$s_hidden_fields = '';
if ($mode == 'edit')
{
if (!$word_id)
{
trigger_error($user->lang['NO_WORD']);
}
$sql = "SELECT *
FROM " . WORDS_TABLE . "
WHERE word_id = $word_id";
$result = $db->sql_query($sql);
$word_info = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$s_hidden_fields .= '<input type="hidden" name="id" value="' . $word_id . '" />';
}
adm_page_header($user->lang['WORDS_TITLE']);
?>
<h1><?php echo $user->lang['WORDS_TITLE']; ?></h1>
<p><?php echo $user->lang['WORDS_EXPLAIN']; ?></p>
<form method="post" action="<?php echo "admin_words.$phpEx$SID"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2"><?php echo $user->lang['EDIT_WORD']; ?></th>
</tr>
<tr>
<td class="row1"><?php echo $user->lang['WORD']; ?></td>
<td class="row2"><input class="post" type="text" name="word" value="<?php echo $word_info['word']; ?>" /></td>
</tr>
<tr>
<td class="row1"><?php echo $user->lang['REPLACEMENT']; ?></td>
<td class="row2"><input class="post" type="text" name="replacement" value="<?php echo $word_info['replacement']; ?>" /></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><?php echo $s_hidden_fields; ?><input class="btnmain" type="submit" name="save" value="<?php echo $user->lang['SUBMIT']; ?>" /></td>
</tr>
</table></form>
<?php
adm_page_footer();
break;
case 'save':
$word_id = (isset($_POST['id'])) ? intval($_POST['id']) : 0;
$word = (isset($_POST['word'])) ? trim($_POST['word']) : '';
$replacement = (isset($_POST['replacement'])) ? trim($_POST['replacement']) : '';
if ($word == '' || $replacement == '')
{
trigger_error($user->lang['ENTER_WORD']);
}
$sql = ($word_id) ? "UPDATE " . WORDS_TABLE . " SET word = '" . $db->sql_escape($word) . "', replacement = '" . $db->sql_escape($replacement) . "' WHERE word_id = $word_id" : "INSERT INTO " . WORDS_TABLE . " (word, replacement) VALUES ('" . $db->sql_escape($word) . "', '" . $db->sql_escape($replacement) . "')";
$db->sql_query($sql);
$cache->destroy('word_censors');
$log_action = ($word_id) ? 'log_edit_word' : 'log_add_word';
add_log('admin', $log_action, stripslashes($word));
$message = ($word_id) ? $user->lang['WORD_UPDATED'] : $user->lang['WORD_ADDED'];
break;
case 'delete':
if (isset($_POST['id']) || isset($_GET['id']))
{
$word_id = (isset($_POST['id'])) ? intval($_POST['id']) : intval($_GET['id']);
}
else
{
trigger_error($user->lang['NO_WORD']);
}
$sql = "DELETE FROM " . WORDS_TABLE . "
WHERE word_id = $word_id";
$db->sql_query($sql);
$cache->destroy('word_censors');
add_log('admin', 'log_delete_word');
$message = $user->lang['WORD_REMOVE'];
break;
}
trigger_error($message);
}
else
{
adm_page_header($user->lang['WORDS_TITLE']);
?>
<h1><?php echo $user->lang['WORDS_TITLE']; ?></h1>
<p><?php echo $user->lang['WORDS_EXPLAIN']; ?></p>
<form method="post" action="admin_words.<?php echo $phpEx . $SID; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th><?php echo $user->lang['WORD']; ?></th>
<th><?php echo $user->lang['REPLACEMENT']; ?></th>
<th colspan="2"><?php echo $user->lang['ACTION']; ?></th>
</tr>
<?php
$sql = "SELECT *
FROM " . WORDS_TABLE . "
ORDER BY word";
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
do
{
$row_class = ($row_class == 'row1') ? 'row2' : 'row1';
?>
<tr>
<td class="<?php echo $row_class; ?>" align="center"><?php echo $row['word']; ?></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo $row['replacement']; ?></td>
<td class="<?php echo $row_class; ?>">&nbsp;<a href="<?php echo "admin_words.$phpEx$SID&amp;mode=edit&amp;id=" . $row['word_id']; ?>"><?php echo $user->lang['EDIT']; ?></a>&nbsp;</td>
<td class="<?php echo $row_class; ?>">&nbsp;<a href="<?php echo "admin_words.$phpEx$SID&amp;mode=delete&amp;id=" . $row['word_id']; ?>"><?php echo $user->lang['DELETE']; ?></a>&nbsp;</td>
</tr>
<?php
}
while ($row = $db->sql_fetchrow($result));
}
$db->sql_freeresult($result);
?>
<tr>
<td class="cat" colspan="5" height="28" align="center"><?php echo $s_hidden_fields; ?><input class="btnmain" type="submit" name="add" value="<?php echo $user->lang['ADD_WORD']; ?>" /></td>
</tr>
</table></form>
<?php
adm_page_footer();
}
?>

View File

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 677 B

After

Width:  |  Height:  |  Size: 677 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

View File

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

647
phpBB/adm/index.php Normal file
View File

@@ -0,0 +1,647 @@
<?php
// -------------------------------------------------------------
//
// $Id$
//
// FILENAME : adm/index.php
// STARTED : Sat Feb 13, 2001
// COPYRIGHT : <20> 2003 phpBB Group
// WWW : http://www.phpbb.com/
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
//
// -------------------------------------------------------------
define('IN_PHPBB', 1);
// Include files
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
// Do we have any admin permissions at all?
if (!$auth->acl_get('a_'))
{
trigger_error($user->lang['NO_ADMIN']);
}
// Define some vars
$pane = (!empty($_GET['pane'])) ? htmlspecialchars($_GET['pane']) : '';
// Generate relevant output
if ($pane == 'top')
{
adm_page_header('', '', false);
?>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td><a href="<?php echo "../index.$phpEx$SID"; ?>" target="_top"><img src="images/header_left.jpg" width="200" height="60" alt="phpBB Logo" title="phpBB Logo" border="0"/></a></td>
<td width="100%" background="images/header_bg.jpg" height="60" align="right" nowrap="nowrap"><span class="maintitle"><?php echo $user->lang['ADMIN_TITLE']; ?></span> &nbsp; &nbsp; &nbsp;</td>
</tr>
</table>
<?php
adm_page_footer(false);
}
else if ($pane == 'left')
{
// Cheat and use the meta tag to change some stylesheet info
adm_page_header('', '<style type="text/css">body {background-color: #98AAB1}</style>', false);
// Grab module information using Bart's "neat-o-module" system (tm)
$dir = @opendir('.');
$setmodules = 1;
while ($file = @readdir($dir))
{
if (preg_match('#^admin_(.*?)\.' . $phpEx . '$#', $file))
{
include($file);
}
}
@closedir($dir);
unset($setmodules);
?>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="100%"><table width="100%" cellpadding="4" cellspacing="1" border="0">
<tr>
<th class="menu" height="25">&#0187; <?php echo $user->lang['RETURN_TO']; ?></th>
</tr>
<tr>
<td class="row1"><a class="genmed" href="<?php echo "index.$phpEx$SID"; ?>&amp;pane=right" target="main"><?php echo $user->lang['ADMIN_INDEX']; ?></a></td>
</tr>
<tr>
<td class="row2"><a class="genmed" href="<?php echo "../index.$phpEx$SID"; ?>" target="_top"><?php echo $user->lang['FORUM_INDEX']; ?></a></td>
</tr>
<?php
if (is_array($module))
{
@ksort($module);
foreach ($module as $cat => $action_ary)
{
$cat = (!empty($user->lang[$cat . '_CAT'])) ? $user->lang[$cat . '_CAT'] : preg_replace('#_#', ' ', $cat);
?>
<tr>
<th class="menu" height="25">&#0187; <?php echo $cat; ?></th>
</tr>
<?php
@ksort($action_ary);
$row_class = '';
foreach ($action_ary as $action => $file)
{
if (!empty($file))
{
$action = (!empty($user->lang[$action])) ? $user->lang[$action] : preg_replace('/_/', ' ', $action);
$row_class = ($row_class == 'row1') ? 'row2' : 'row1';
?>
<tr>
<td class="<?php echo $row_class; ?>"><a class="genmed" href="<?php echo $file; ?>" target="main"><?php echo $action; ?></a></td>
</tr>
<?php
}
}
}
}
?>
</table></td>
</tr>
</table>
</body>
</html>
<?php
// Output footer but don't include copyright info
adm_page_footer(false);
}
elseif ($pane == 'right')
{
if ((isset($_POST['activate']) || isset($_POST['delete'])) && !empty($_POST['mark']))
{
if (!$auth->acl_get('a_user'))
{
trigger_error($user->lang['NO_ADMIN']);
}
if (is_array($_POST['mark']))
{
$in_sql = '';
foreach ($_POST['mark'] as $user_id)
{
$in_sql .= (($in_sql != '') ? ', ' : '') . intval($user_id);
}
if ($in_sql != '')
{
$sql = (isset($_POST['activate'])) ? 'UPDATE ' . USERS_TABLE . " SET user_active = 1 WHERE user_id IN ($in_sql)" : "DELETE FROM " . USERS_TABLE . " WHERE user_id IN ($in_sql)";
$db->sql_query($sql);
if (!isset($_POST['delete']))
{
set_config('num_users', $config['num_users'] + sizeof($mark));
}
$log_action = (isset($_POST['activate'])) ? 'log_index_activate' : 'log_index_delete';
add_log('admin', $log_action, sizeof($_POST['mark']));
}
}
}
else if (isset($_POST['remind']))
{
if (!$auth->acl_get('a_user'))
{
trigger_error($user->lang['NO_ADMIN']);
}
if (empty($config['email_enable']))
{
trigger_error($user->lang['EMAIL_DISABLED']);
}
if (is_array($_POST['mark']))
{
$in_sql = '';
foreach ($_POST['mark'] as $user_id)
{
$in_sql .= (($in_sql != '') ? ', ' : '') . intval($user_id);
}
if ($in_sql != '')
{
$sql = "SELECT user_id, username, user_email, user_lang, user_regdate, user_actkey
FROM " . USERS_TABLE . "
WHERE user_id IN ($in_sql)";
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer();
$board_url = generate_board_url() . '/ucp.' . $phpEx;
$usernames = '';
do
{
$emailer->use_template('user_remind_inactive', $row['user_lang']);
$emailer->to($row['user_email'], $row['username']);
$emailer->assign_vars(array(
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']),
'USERNAME' => $row['username'],
'SITENAME' => $config['sitename'],
'REGISTER_DATE' => $user->format_date($row['user_regdate']),
'U_ACTIVATE' => $board_url . '&mode=activate&u=' . $row['user_id'] . '&k=' . $row['user_actkey'])
);
$emailer->send();
$emailer->reset();
$usernames .= (($usernames != '') ? ', ' : '') . $row['username'];
}
while ($row = $db->sql_fetchrow($result));
add_log('admin', 'LOG_INDEX_REMIND', $usernames);
}
$db->sql_freeresult($result);
}
}
}
else if (isset($_POST['online']))
{
if (!$auth->acl_get('a_defaults'))
{
trigger_error($user->lang['NO_ADMIN']);
}
set_config('record_online_users', 1);
set_config('record_online_date', time());
add_log('admin', 'LOG_RESET_ONLINE');
}
else if (isset($_POST['stats']))
{
if (!$auth->acl_get('a_defaults'))
{
trigger_error($user->lang['NO_ADMIN']);
}
$sql = "SELECT COUNT(post_id) AS stat
FROM " . POSTS_TABLE . "
WHERE post_approved = 1";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
set_config('num_posts', $row['stat']);
$sql = "SELECT COUNT(topic_id) AS stat
FROM " . TOPICS_TABLE . "
WHERE topic_approved = 1";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
set_config('num_topics', $row['stat']);
$sql = "SELECT COUNT(user_id) AS stat
FROM " . USERS_TABLE . "
WHERE user_active = 1";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
set_config('num_users', $row['stat']);
add_log('admin', 'LOG_RESYNC_STATS');
}
else if (isset($_POST['date']))
{
if (!$auth->acl_get('a_defaults'))
{
trigger_error($user->lang['NO_ADMIN']);
}
set_config('board_startdate', time() - 1);
add_log('admin', 'LOG_RESET_DATE');
}
// Get forum statistics
$total_posts = $config['num_posts'];
$total_topics = $config['num_topics'];
$total_users = $config['num_users'];
$start_date = $user->format_date($config['board_startdate']);
$boarddays = (time() - $config['board_startdate']) / 86400;
$posts_per_day = sprintf('%.2f', $total_posts / $boarddays);
$topics_per_day = sprintf('%.2f', $total_topics / $boarddays);
$users_per_day = sprintf('%.2f', $total_users / $boarddays);
$avatar_dir_size = 0;
if ($avatar_dir = @opendir($phpbb_root_path . $config['avatar_path']))
{
while ($file = @readdir($avatar_dir))
{
if ($file != '.' && $file != '..')
{
$avatar_dir_size += @filesize($phpbb_root_path . $config['avatar_path'] . '/' . $file);
}
}
@closedir($avatar_dir);
// This bit of code translates the avatar directory size into human readable format
// Borrowed the code from the PHP.net annoted manual, origanally written by:
// Jesse (jesse@jess.on.ca)
if ($avatar_dir_size >= 1048576)
{
$avatar_dir_size = round($avatar_dir_size / 1048576 * 100) / 100 . ' MB';
}
else if ($avatar_dir_size >= 1024)
{
$avatar_dir_size = round($avatar_dir_size / 1024 * 100) / 100 . ' KB';
}
else
{
$avatar_dir_size = $avatar_dir_size . ' Bytes';
}
}
else
{
// Couldn't open Avatar dir.
$avatar_dir_size = $user->lang['Not_available'];
}
if ($posts_per_day > $total_posts)
{
$posts_per_day = $total_posts;
}
if ($topics_per_day > $total_topics)
{
$topics_per_day = $total_topics;
}
if ($users_per_day > $total_users)
{
$users_per_day = $total_users;
}
// DB size ... MySQL only
// This code is heavily influenced by a similar routine
// in phpMyAdmin 2.2.0
if (preg_match('/^mysql/', SQL_LAYER))
{
$result = $db->sql_query('SELECT VERSION() AS mysql_version');
if ($row = $db->sql_fetchrow($result))
{
$version = $row['mysql_version'];
if (preg_match('#^(3\.23|4\.)#', $version))
{
$db_name = (preg_match('#^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)#', $version)) ? "`$dbname`" : $dbname;
$sql = "SHOW TABLE STATUS
FROM " . $db_name;
$result = $db->sql_query($sql);
$dbsize = 0;
while ($row = $db->sql_fetchrow($result))
{
if ($row['Type'] != 'MRG_MyISAM')
{
if ($table_prefix != '')
{
if (strstr($row['Name'], $table_prefix))
{
$dbsize += $row['Data_length'] + $row['Index_length'];
}
}
else
{
$dbsize += $row['Data_length'] + $row['Index_length'];
}
}
}
}
else
{
$dbsize = $user->lang['NOT_AVAILABLE'];
}
}
else
{
$dbsize = $user->lang['NOT_AVAILABLE'];
}
}
else if (preg_match('#^mssql#', SQL_LAYER))
{
$sql = "SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize
FROM sysfiles";
$result = $db->sql_query($sql);
$dbsize = ($row = $db->sql_fetchrow($result)) ? intval($row['dbsize']) : $user->lang['NOT_AVAILABLE'];
}
else
{
$dbsize = $user->lang['NOT_AVAILABLE'];
}
if (is_int($dbsize))
{
$dbsize = ($dbsize >= 1048576) ? sprintf('%.2f MB', ($dbsize / 1048576)) : (($dbsize >= 1024) ? sprintf('%.2f KB', ($dbsize / 1024)) : sprintf('%.2f Bytes', $dbsize));
}
adm_page_header($user->lang['ADMIN_INDEX']);
?>
<script language="Javascript" type="text/javascript">
<!--
function marklist(status)
{
for (i = 0; i < document.inactive.length; i++)
{
document.inactive.elements[i].checked = status;
}
}
//-->
</script>
<h1><?php echo $user->lang['WELCOME_PHPBB']; ?></h1>
<p><?php echo $user->lang['ADMIN_INTRO']; ?></p>
<h1><?php echo $user->lang['FORUM_STATS']; ?></h1>
<form name="statistics" method="post" action="index.<?php echo $phpEx . $SID; ?>&amp;pane=right"><table class="bg" width="100%" cellpadding="4" cellspacing="1" border="0">
<tr>
<th width="25%" nowrap="nowrap" height="25"><?php echo $user->lang['STATISTIC']; ?></th>
<th width="25%"><?php echo $user->lang['VALUE']; ?></th>
<th width="25%" nowrap="nowrap"><?php echo $user->lang['STATISTIC']; ?></th>
<th width="25%"><?php echo $user->lang['VALUE']; ?></th>
</tr>
<tr>
<td class="row1" nowrap="nowrap"><?php echo $user->lang['NUMBER_POSTS']; ?>:</td>
<td class="row2"><b><?php echo $total_posts; ?></b></td>
<td class="row1" nowrap="nowrap"><?php echo $user->lang['POSTS_PER_DAY']; ?>:</td>
<td class="row2"><b><?php echo $posts_per_day; ?></b></td>
</tr>
<tr>
<td class="row1" nowrap="nowrap"><?php echo $user->lang['NUMBER_TOPICS']; ?>:</td>
<td class="row2"><b><?php echo $total_topics; ?></b></td>
<td class="row1" nowrap="nowrap"><?php echo $user->lang['TOPICS_PER_DAY']; ?>:</td>
<td class="row2"><b><?php echo $topics_per_day; ?></b></td>
</tr>
<tr>
<td class="row1" nowrap="nowrap"><?php echo $user->lang['NUMBER_USERS']; ?>:</td>
<td class="row2"><b><?php echo $total_users; ?></b></td>
<td class="row1" nowrap="nowrap"><?php echo $user->lang['USERS_PER_DAY']; ?>:</td>
<td class="row2"><b><?php echo $users_per_day; ?></b></td>
</tr>
<tr>
<td class="row1" nowrap="nowrap"><?php echo $user->lang['BOARD_STARTED']; ?>:</td>
<td class="row2"><b><?php echo $start_date; ?></b></td>
<td class="row1" nowrap="nowrap"><?php echo $user->lang['AVATAR_DIR_SIZE']; ?>:</td>
<td class="row2"><b><?php echo $avatar_dir_size; ?></b></td>
</tr>
<tr>
<td class="row1" nowrap="nowrap"><?php echo $user->lang['DATABASE_SIZE']; ?>:</td>
<td class="row2"><b><?php echo $dbsize; ?></b></td>
<td class="row1" nowrap="nowrap"><?php echo $user->lang['GZIP_COMPRESSION']; ?>:</td>
<td class="row2"><b><?php echo ($config['gzip_compress']) ? $user->lang['ON'] : $user->lang['OFF']; ?></b></td>
</tr>
<tr>
<td class="cat" colspan="4" align="right"><input class="btnlite" type="submit" name="online" value="<?php echo $user->lang['RESET_ONLINE']; ?>" /> &nbsp;<input class="btnlite" type="submit" name="date" value="<?php echo $user->lang['RESET_DATE']; ?>" /> &nbsp;<input class="btnlite" type="submit" name="stats" value="<?php echo $user->lang['RESYNC_STATS']; ?>" />&nbsp;</td>
</tr>
</table></form>
<h1><?php echo $user->lang['ADMIN_LOG']; ?></h1>
<p><?php echo $user->lang['ADMIN_LOG_INDEX_EXPLAIN']; ?></p>
<table class="bg" width="100%" cellpadding="4" cellspacing="1" border="0">
<tr>
<th width="15%" height="25" nowrap="nowrap"><?php echo $user->lang['USERNAME']; ?></th>
<th width="15%"><?php echo $user->lang['IP']; ?></th>
<th width="20%"><?php echo $user->lang['TIME']; ?></th>
<th width="45%" nowrap="nowrap"><?php echo $user->lang['ACTION']; ?></th>
</tr>
<?php
view_log('admin', $log_data, $log_count, 5);
for($i = 0; $i < sizeof($log_data); $i++)
{
$row_class = ($row_class == 'row1') ? 'row2' : 'row1';
?>
<tr>
<td class="<?php echo $row_class; ?>"><?php echo $log_data[$i]['username']; ?></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo $log_data[$i]['ip']; ?></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo $user->format_date($log_data[$i]['time']); ?></td>
<td class="<?php echo $row_class; ?>"><?php echo $log_data[$i]['action']; ?></td>
</tr>
<?php
}
if ($auth->acl_get('a_user'))
{
?>
</table>
<h1><?php echo $user->lang['INACTIVE_USERS']; ?></h1>
<p><?php echo $user->lang['INACTIVE_USERS_EXPLAIN']; ?></p>
<form method="post" name="inactive" action="<?php echo "index.$phpEx$SID&amp;pane=right"; ?>"><table class="bg" width="100%" cellpadding="4" cellspacing="1" border="0">
<tr>
<th width="45%" height="25" nowrap="nowrap"><?php echo $user->lang['USERNAME']; ?></th>
<th width="45%"><?php echo $user->lang['JOINED']; ?></th>
<th width="5%" nowrap="nowrap"><?php echo $user->lang['MARK']; ?></th>
</tr>
<?php
$sql = 'SELECT user_id, username, user_regdate
FROM ' . USERS_TABLE . '
WHERE user_active = 0
AND user_id <> ' . ANONYMOUS . '
ORDER BY user_regdate ASC';
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
do
{
$row_class = ($row_class == 'row1') ? 'row2' : 'row1';
?>
<tr>
<td class="<?php echo $row_class; ?>"><a href="<?php echo "admin_users.$phpEx$SID&amp;u=" . $row['user_id']; ?>"><?php echo $row['username']; ?></a></td>
<td class="<?php echo $row_class; ?>"><?php echo $user->format_date($row['user_regdate']); ?></td>
<td class="<?php echo $row_class; ?>">&nbsp;<input type="checkbox" name="mark[]" value="<?php echo $row['user_id']; ?>" />&nbsp;</td>
</tr>
<?php
}
while ($row = $db->sql_fetchrow($result));
?>
<tr>
<td class="cat" colspan="3" height="28" align="right"><input class="btnlite" type="submit" name="activate" value="<?php echo $user->lang['ACTIVATE']; ?>" />&nbsp; <?php
if (!empty($config['email_enable']))
{
?><input class="btnlite" type="submit" name="remind" value="<?php echo $user->lang['REMIND']; ?>" />&nbsp; <?php
}
?><input class="btnlite" type="submit" name="delete" value="<?php echo $user->lang['DELETE']; ?>" />&nbsp;</td>
</tr>
<?php
}
else
{
?>
<tr>
<td class="row1" colspan="3" align="center"><?php echo $user->lang['NO_INACTIVE_USERS']; ?></td>
</tr>
<?php
}
?>
</table>
<table width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<td align="right" valign="top" nowrap="nowrap"><b><span class="gensmall"><a href="javascript:marklist(true);" class="gensmall"><?php echo $user->lang['MARK_ALL']; ?></a> :: <a href="javascript:marklist(false);" class="gensmall"><?php echo $user->lang['UNMARK_ALL']; ?></a></span></b></td>
</tr>
</table></form>
<?php
}
adm_page_footer();
}
else
{
//
// Output the frameset ...
//
header("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Content-type: text/html; charset=" . $user->lang['ENCODING']);
$adm_url = "index.$phpEx$SID&amp;pane=right";
/*
// Allows non-admin pages to link to admin pages
// eg: http://forums.foo.com/adm/index.php?sid=&mod=admin_forums&f=1
if (!empty($_GET['mod']) && preg_match('/admin_([a-z]+)/', $_GET['mod'], $m))
{
if (file_exists($phpbb_root_path . 'adm/admin_' . $m[1] . '.' . $phpEx))
{
$adm_url = 'admin_' . $m[1] . '.' . $phpEx . $SID;
$adm_url .= (!empty($_GET['mode'])) ? '&amp;mode=' . htmlspecialchars($_GET['mode']) : '';
$adm_url .= (!empty($_GET['f'])) ? '&amp;f=' . intval($_GET['f']) : '';
$adm_url .= (!empty($_GET['u'])) ? '&amp;u=' . intval($_GET['u']) : '';
$adm_url .= (!empty($_GET['g'])) ? '&amp;g=' . intval($_GET['g']) : '';
}
}
*/
?>
<html>
<head>
<title><?php echo $user->lang['ADMIN_TITLE']; ?></title>
</head>
<frameset rows="60, *" border="0" framespacing="0" frameborder="NO">
<frame src="<?php echo "index.$phpEx$SID&amp;pane=top"; ?>" name="title" noresize marginwidth="0" marginheight="0" scrolling="NO">
<frameset cols="155,*" rows="*" border="2" framespacing="0" frameborder="yes">
<frame src="<?php echo "index.$phpEx$SID&amp;pane=left"; ?>" name="nav" marginwidth="3" marginheight="3" scrolling="yes">
<frame src="<?php echo $adm_url ?>" name="main" marginwidth="0" marginheight="0" scrolling="auto">
</frameset>
</frameset>
<noframes>
<body bgcolor="white" text="#000000">
<p><?php echo $user->lang['NO_FRAMES']; ?></p>
</body>
</noframes>
</html>
<?php
exit;
}
?>

188
phpBB/adm/pagestart.php Normal file
View File

@@ -0,0 +1,188 @@
<?php
/***************************************************************************
* pagestart.php
* -------------------
* begin : Thursday, Aug 2, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if (!defined('IN_PHPBB'))
{
die('Hacking attempt');
}
define('IN_ADMIN', true);
define('NEED_SID', true);
require($phpbb_root_path . 'common.'.$phpEx);
require($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
// Start session management
$user->start();
$user->setup();
// Did user forget to login? Give 'em a chance to here ...
if ($user->data['user_id'] == ANONYMOUS)
{
login_box("index.$phpEx$SID", '', $user->lang['LOGIN_ADMIN']);
}
$auth->acl($user->data);
// End session management
// -----------------------------
// Functions
function adm_page_header($sub_title, $meta = '', $table_html = true)
{
global $config, $db, $user, $phpEx;
define('HEADER_INC', true);
// gzip_compression
if ($config['gzip_compress'])
{
if (extension_loaded('zlib') && !headers_sent())
{
ob_start('ob_gzhandler');
}
}
header("Content-type: text/html; charset=" . $user->lang['ENCODING']);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $user->lang['ENCODING']; ?>">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" href="subSilver.css" type="text/css">
<?php
echo $meta;
?>
<style type="text/css">
<!--
th { background-image: url('images/cellpic3.gif') }
td.cat { background-image: url('images/cellpic1.gif') }
//-->
</style>
<title><?php echo $config['sitename'] . ' - ' . $page_title; ?></title>
</head>
<body>
<?php
if ($table_html)
{
?>
<a name="top"></a>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td colspan="2" height="25" align="right" nowrap="nowrap"><span class="subtitle">&#0187; <i><?php echo $sub_title; ?></i></span> &nbsp;&nbsp;</td>
</tr>
</table>
<table width="95%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td><br clear="all" />
<?php
}
}
function adm_page_footer($copyright_html = true)
{
global $cache, $config, $db, $phpEx;
if (!empty($cache))
{
$cache->unload();
}
// Close our DB connection.
$db->sql_close();
?>
</td>
</tr>
</table>
<?php
if ($copyright_html)
{
?>
<div class="copyright" align="center">Powered by phpBB <?php echo $config['version']; ?> &copy; 2002 <a href="http://www.phpbb.com/" target="_phpbb">phpBB Group</a></div>
<br clear="all" />
</body>
</html>
<?php
}
exit;
}
function adm_page_message($title, $message, $show_header = false)
{
global $phpEx, $SID, $user;
if ($show_header)
{
?>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td><a href="../index.<?php echo $phpEx . $SID; ?>"><img src="images/header_left.jpg" width="200" height="60" alt="phpBB Logo" title="phpBB Logo" border="0"/></a></td>
<td width="100%" background="images/header_bg.jpg" height="60" align="right" nowrap="nowrap"><span class="maintitle"><?php echo $user->lang['ADMIN_TITLE']; ?></span> &nbsp; &nbsp; &nbsp;</td>
</tr>
</table>
<?php
}
?>
<br /><br />
<table class="bg" width="80%" cellpadding="4" cellspacing="1" border="0" align="center">
<tr>
<th><?php echo $title; ?></th>
</tr>
<tr>
<td class="row1" align="center"><?php echo $message; ?></td>
</tr>
</table>
<br />
<?php
}
// End Functions
// -----------------------------
?>

222
phpBB/adm/subSilver.css Normal file
View File

@@ -0,0 +1,222 @@
/*
$Id$
The original "subSilver" theme for phpBB2
Created by subBlue design :: http://www.subBlue.com
Updated for phpBB 2.2 by psoTFX :: phpBB Group
Copyright (c) 2002 phpBB Group
*/
body {
background-color: white;
font-family: Verdana, Arial, Helvetica, sans-serif;
margin: 0px;
border: 0px;
padding: 0px;
scrollbar-face-color: #DEE3E7;
scrollbar-highlight-color: white;
scrollbar-shadow-color: #DEE3E7;
scrollbar-3dlight-color: #D1D7DC;
scrollbar-arrow-color: #006699;
scrollbar-track-color: #EFEFEF;
scrollbar-darkshadow-color: #98AAB1;
}
p {
font-size: 8pt;
}
.maintitle, h1 {
font: bold 18pt 'Trebuchet MS', Verdana, sans-serif;
text-decoration:none;
line-height: 120%;
}
h2 {
font: bold 12pt Arial, Helvetica, sans-serif;
text-decoration:none;
line-height: 120%;
}
.maintitle {
color: #12749B
}
.subtitle {
font: bold 12pt Arial, Helvetica, sans-serif;
}
.blue {
color: #006699;
}
.syntaxbg { color: #FFFFFF; }
.syntaxcomment { color: #FF8000; }
.syntaxdefault { color: #0000BB; }
.syntaxhtml { color: #000000; }
.syntaxkeyword { color: #007700; }
.syntaxstring { color: #DD0000; }
/*
Anchors
*/
a:link, a:active, a:visited {
color: #006699;
text-decoration: none;
}
a:hover {
color: #DD6900;
text-decoration: underline;
}
a.nav {
color: #006699;
text-decoration: none;
}
a.nav:hover {
text-decoration: underline;
}
/*
Non-tag specific
*/
.gen, .gensmall {
color: black;
}
.gen {
font-size: 8pt;
}
.gensmall {
font-size: 7pt;
}
.nav {
color: black;
font: bold 11px;
}
.forumlink {
font: bold 120% Verdana, Arial, Helvetica, sans-serif;
}
.name {
color: black;
font-size: 11px;
}
.postdetails {
color: black;
font-size: 10px;
}
.copyright {
color: #444444;
font: 8pt Verdana, Arial, Helvetica, sans-serif;
letter-spacing: -1px;
}
.error { color: #FF0000 }
/*
Tables
*/
table.bg {
background-color: #ACBBC6
}
th, td {
font: normal 8pt Verdana, Arial, Helvetica, sans-serif;
}
th {
height: 25px;
background-color: #006699;
color: #FFA34F;
font-weight: bold;
font-size: 11px;
}
th.menu {
text-align: left;
}
td.cat {
height: 28px;
background-color: #D1D7DC;
}
.row1 {
background-color: #EFEFEF;
}
.row2 {
background-color: #DEE3E7;
}
.row3 {
background-color: #D1D7DC;
}
.sourcenum {
color: gray;
font-family: 'Courier New', monospace;
font-size: 9pt;
font-weight: bold;
line-height: 160%;
}
.source {
font-family: 'Courier New', monospace;
font-size: 9pt;
line-height: 160%;
}
/*
Misc
*/
hr {
height: 0px;
border: solid #D1D7DC 0px;
border-top-width: 1px;
}
/*
Forms
*/
input {
text-indent: 2px;
}
textarea, select, input.post, input.mainoption, input.liteoption {
border: 1px solid;
}
input, textarea, select {
color: black;
font: normal 8pt Verdana, Arial, Helvetica, sans-serif;
border-color: black;
}
input.text {
font-family: 'Courier New', courier;
}
input.checkbox {
height: 16px;
width: 16px;
}
option.sep {
color: white;
background-color: #006699;
}
textarea.edit {
font: 9pt 'Courier New', courier;
line-height:125%;
}
.btnmain {
background-color: #FAFAFA;
font-weight: bold;
border-width: 1px;
}
.btnlite {
background-color: #FAFAFA;
font-weight: normal;
border-width: 1px;
}

56
phpBB/adm/swatch.php Normal file
View File

@@ -0,0 +1,56 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<title>phpBB 2.2 Color Swatch</title>
<style type="text/css">
td {
border: solid 1px #333333;
}
.over {
border-color: white;
}
.out {
border-color: #333333;
}
</style>
<body bgcolor="#404040" text="#FFFFFF">
<script language="javascript" type="text/javascript">
<!--
var r = 0, g = 0, b = 0;
var numberList = new Array(6);
numberList[0] = "00";
numberList[1] = "33";
numberList[2] = "66";
numberList[3] = "99";
numberList[4] = "CC";
numberList[5] = "FF";
document.writeln('<table cellspacing="0" cellpadding="0" border="0">');
for(r = 0; r < 6; r++)
{
document.writeln('<tr>');
for(g = 0; g < 6; g++)
{
for(b = 0; b < 6; b++)
{
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
document.write('<td bgcolor="#' + color + '" onmouseover="this.className=\'over\'" onmouseout="this.className=\'out\'">');
document.write('<a href="javascript:cell(\'' + color + '\');"><img src="../images/spacer.gif" width="15" height="12" border="0" alt="#' + color + '" title="#' + color + '" /></a>');
document.writeln('</td>');
}
}
document.writeln('</tr>');
}
document.writeln('</table>');
function cell(color)
{
opener.document.forms['<?php echo htmlspecialchars(addslashes($_GET['form'])); ?>'].<?php echo htmlspecialchars(addslashes($_GET['name'])); ?>.value = '#' + color;
}
//-->
</script>
</body>
</html>

View File

@@ -1,316 +0,0 @@
<?php
/***************************************************************************
* admin_board.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['General']['Configuration'] = "$file?mode=config";
return;
}
//
// Let's set the root dir for phpBB
//
$phpbb_root_path = "../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
//
// Pull all config data
//
$sql = "SELECT *
FROM " . CONFIG_TABLE;
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not query config information in admin_board", "", __LINE__, __FILE__, $sql);
}
else
{
while( $row = $db->sql_fetchrow($result) )
{
$config_name = $row['config_name'];
$config_value = $row['config_value'];
$default_config[$config_name] = $config_value;
$new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name];
if( isset($HTTP_POST_VARS['submit']) )
{
$sql = "UPDATE " . CONFIG_TABLE . " SET
config_value = '" . str_replace("\'", "''", $new[$config_name]) . "'
WHERE config_name = '$config_name'";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql);
}
}
}
if( isset($HTTP_POST_VARS['submit']) )
{
$message = $lang['Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_config'], "<a href=\"" . append_sid("admin_board.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
}
$style_select = style_select($new['default_style'], 'default_style', "../templates");
$lang_select = language_select($new['default_lang'], 'default_lang', "../language");
$timezone_select = tz_select($new['board_timezone'], 'board_timezone');
$disable_board_yes = ( $new['board_disable'] ) ? "checked=\"checked\"" : "";
$disable_board_no = ( !$new['board_disable'] ) ? "checked=\"checked\"" : "";
$cookie_secure_yes = ( $new['cookie_secure'] ) ? "checked=\"checked\"" : "";
$cookie_secure_no = ( !$new['cookie_secure'] ) ? "checked=\"checked\"" : "";
$html_tags = $new['allow_html_tags'];
$override_user_style_yes = ( $new['override_user_style'] ) ? "checked=\"checked\"" : "";
$override_user_style_no = ( !$new['override_user_style'] ) ? "checked=\"checked\"" : "";
$html_yes = ( $new['allow_html'] ) ? "checked=\"checked\"" : "";
$html_no = ( !$new['allow_html'] ) ? "checked=\"checked\"" : "";
$bbcode_yes = ( $new['allow_bbcode'] ) ? "checked=\"checked\"" : "";
$bbcode_no = ( !$new['allow_bbcode'] ) ? "checked=\"checked\"" : "";
$activation_none = ( $new['require_activation'] == USER_ACTIVATION_NONE ) ? "checked=\"checked\"" : "";
$activation_user = ( $new['require_activation'] == USER_ACTIVATION_SELF ) ? "checked=\"checked\"" : "";
$activation_admin = ( $new['require_activation'] == USER_ACTIVATION_ADMIN ) ? "checked=\"checked\"" : "";
$board_email_form_yes = ( $new['board_email_form'] ) ? "checked=\"checked\"" : "";
$board_email_form_no = ( !$new['board_email_form'] ) ? "checked=\"checked\"" : "";
$gzip_yes = ( $new['gzip_compress'] ) ? "checked=\"checked\"" : "";
$gzip_no = ( !$new['gzip_compress'] ) ? "checked=\"checked\"" : "";
$privmsg_on = ( !$new['privmsg_disable'] ) ? "checked=\"checked\"" : "";
$privmsg_off = ( $new['privmsg_disable'] ) ? "checked=\"checked\"" : "";
$prune_yes = ( $new['prune_enable'] ) ? "checked=\"checked\"" : "";
$prune_no = ( !$new['prune_enable'] ) ? "checked=\"checked\"" : "";
$smile_yes = ( $new['allow_smilies'] ) ? "checked=\"checked\"" : "";
$smile_no = ( !$new['allow_smilies'] ) ? "checked=\"checked\"" : "";
$sig_yes = ( $new['allow_sig'] ) ? "checked=\"checked\"" : "";
$sig_no = ( !$new['allow_sig'] ) ? "checked=\"checked\"" : "";
$namechange_yes = ( $new['allow_namechange'] ) ? "checked=\"checked\"" : "";
$namechange_no = ( !$new['allow_namechange'] ) ? "checked=\"checked\"" : "";
$avatars_local_yes = ( $new['allow_avatar_local'] ) ? "checked=\"checked\"" : "";
$avatars_local_no = ( !$new['allow_avatar_local'] ) ? "checked=\"checked\"" : "";
$avatars_remote_yes = ( $new['allow_avatar_remote'] ) ? "checked=\"checked\"" : "";
$avatars_remote_no = ( !$new['allow_avatar_remote'] ) ? "checked=\"checked\"" : "";
$avatars_upload_yes = ( $new['allow_avatar_upload'] ) ? "checked=\"checked\"" : "";
$avatars_upload_no = ( !$new['allow_avatar_upload'] ) ? "checked=\"checked\"" : "";
$smtp_yes = ( $new['smtp_delivery'] ) ? "checked=\"checked\"" : "";
$smtp_no = ( !$new['smtp_delivery'] ) ? "checked=\"checked\"" : "";
$template->set_filenames(array(
"body" => "admin/board_config_body.tpl")
);
//
// Escape any quotes in the site description for proper display in the text
// box on the admin page
//
$new['site_desc'] = str_replace('"', '&quot;', $new['site_desc']);
$new['sitename'] = str_replace('"', '&quot;', strip_tags($new['sitename']));
$template->assign_vars(array(
"S_CONFIG_ACTION" => append_sid("admin_board.$phpEx"),
"L_YES" => $lang['Yes'],
"L_NO" => $lang['No'],
"L_CONFIGURATION_TITLE" => $lang['General_Config'],
"L_CONFIGURATION_EXPLAIN" => $lang['Config_explain'],
"L_GENERAL_SETTINGS" => $lang['General_settings'],
"L_SERVER_NAME" => $lang['Server_name'],
"L_SERVER_NAME_EXPLAIN" => $lang['Server_name_explain'],
"L_SERVER_PORT" => $lang['Server_port'],
"L_SERVER_PORT_EXPLAIN" => $lang['Server_port_explain'],
"L_SCRIPT_PATH" => $lang['Script_path'],
"L_SCRIPT_PATH_EXPLAIN" => $lang['Script_path_explain'],
"L_SITE_NAME" => $lang['Site_name'],
"L_SITE_DESCRIPTION" => $lang['Site_desc'],
"L_DISABLE_BOARD" => $lang['Board_disable'],
"L_DISABLE_BOARD_EXPLAIN" => $lang['Board_disable_explain'],
"L_ACCT_ACTIVATION" => $lang['Acct_activation'],
"L_NONE" => $lang['Acc_None'],
"L_USER" => $lang['Acc_User'],
"L_ADMIN" => $lang['Acc_Admin'],
"L_COOKIE_SETTINGS" => $lang['Cookie_settings'],
"L_COOKIE_SETTINGS_EXPLAIN" => $lang['Cookie_settings_explain'],
"L_COOKIE_DOMAIN" => $lang['Cookie_domain'],
"L_COOKIE_NAME" => $lang['Cookie_name'],
"L_COOKIE_PATH" => $lang['Cookie_path'],
"L_COOKIE_SECURE" => $lang['Cookie_secure'],
"L_COOKIE_SECURE_EXPLAIN" => $lang['Cookie_secure_explain'],
"L_SESSION_LENGTH" => $lang['Session_length'],
"L_PRIVATE_MESSAGING" => $lang['Private_Messaging'],
"L_INBOX_LIMIT" => $lang['Inbox_limits'],
"L_SENTBOX_LIMIT" => $lang['Sentbox_limits'],
"L_SAVEBOX_LIMIT" => $lang['Savebox_limits'],
"L_DISABLE_PRIVATE_MESSAGING" => $lang['Disable_privmsg'],
"L_ENABLED" => $lang['Enabled'],
"L_DISABLED" => $lang['Disabled'],
"L_ABILITIES_SETTINGS" => $lang['Abilities_settings'],
"L_MAX_POLL_OPTIONS" => $lang['Max_poll_options'],
"L_FLOOD_INTERVAL" => $lang['Flood_Interval'],
"L_FLOOD_INTERVAL_EXPLAIN" => $lang['Flood_Interval_explain'],
"L_BOARD_EMAIL_FORM" => $lang['Board_email_form'],
"L_BOARD_EMAIL_FORM_EXPLAIN" => $lang['Board_email_form_explain'],
"L_TOPICS_PER_PAGE" => $lang['Topics_per_page'],
"L_POSTS_PER_PAGE" => $lang['Posts_per_page'],
"L_HOT_THRESHOLD" => $lang['Hot_threshold'],
"L_DEFAULT_STYLE" => $lang['Default_style'],
"L_OVERRIDE_STYLE" => $lang['Override_style'],
"L_OVERRIDE_STYLE_EXPLAIN" => $lang['Override_style_explain'],
"L_DEFAULT_LANGUAGE" => $lang['Default_language'],
"L_DATE_FORMAT" => $lang['Date_format'],
"L_SYSTEM_TIMEZONE" => $lang['System_timezone'],
"L_ENABLE_GZIP" => $lang['Enable_gzip'],
"L_ENABLE_PRUNE" => $lang['Enable_prune'],
"L_ALLOW_HTML" => $lang['Allow_HTML'],
"L_ALLOW_BBCODE" => $lang['Allow_BBCode'],
"L_ALLOWED_TAGS" => $lang['Allowed_tags'],
"L_ALLOWED_TAGS_EXPLAIN" => $lang['Allowed_tags_explain'],
"L_ALLOW_SMILIES" => $lang['Allow_smilies'],
"L_SMILIES_PATH" => $lang['Smilies_path'],
"L_SMILIES_PATH_EXPLAIN" => $lang['Smilies_path_explain'],
"L_ALLOW_SIG" => $lang['Allow_sig'],
"L_MAX_SIG_LENGTH" => $lang['Max_sig_length'],
"L_MAX_SIG_LENGTH_EXPLAIN" => $lang['Max_sig_length_explain'],
"L_ALLOW_NAME_CHANGE" => $lang['Allow_name_change'],
"L_AVATAR_SETTINGS" => $lang['Avatar_settings'],
"L_ALLOW_LOCAL" => $lang['Allow_local'],
"L_ALLOW_REMOTE" => $lang['Allow_remote'],
"L_ALLOW_REMOTE_EXPLAIN" => $lang['Allow_remote_explain'],
"L_ALLOW_UPLOAD" => $lang['Allow_upload'],
"L_MAX_FILESIZE" => $lang['Max_filesize'],
"L_MAX_FILESIZE_EXPLAIN" => $lang['Max_filesize_explain'],
"L_MAX_AVATAR_SIZE" => $lang['Max_avatar_size'],
"L_MAX_AVATAR_SIZE_EXPLAIN" => $lang['Max_avatar_size_explain'],
"L_AVATAR_STORAGE_PATH" => $lang['Avatar_storage_path'],
"L_AVATAR_STORAGE_PATH_EXPLAIN" => $lang['Avatar_storage_path_explain'],
"L_AVATAR_GALLERY_PATH" => $lang['Avatar_gallery_path'],
"L_AVATAR_GALLERY_PATH_EXPLAIN" => $lang['Avatar_gallery_path_explain'],
"L_COPPA_SETTINGS" => $lang['COPPA_settings'],
"L_COPPA_FAX" => $lang['COPPA_fax'],
"L_COPPA_MAIL" => $lang['COPPA_mail'],
"L_COPPA_MAIL_EXPLAIN" => $lang['COPPA_mail_explain'],
"L_EMAIL_SETTINGS" => $lang['Email_settings'],
"L_ADMIN_EMAIL" => $lang['Admin_email'],
"L_EMAIL_SIG" => $lang['Email_sig'],
"L_EMAIL_SIG_EXPLAIN" => $lang['Email_sig_explain'],
"L_USE_SMTP" => $lang['Use_SMTP'],
"L_USE_SMTP_EXPLAIN" => $lang['Use_SMTP_explain'],
"L_SMTP_SERVER" => $lang['SMTP_server'],
"L_SMTP_USERNAME" => $lang['SMTP_username'],
"L_SMTP_USERNAME_EXPLAIN" => $lang['SMTP_username_explain'],
"L_SMTP_PASSWORD" => $lang['SMTP_password'],
"L_SMTP_PASSWORD_EXPLAIN" => $lang['SMTP_password_explain'],
"L_SUBMIT" => $lang['Submit'],
"L_RESET" => $lang['Reset'],
"SERVER_NAME" => $new['server_name'],
"SCRIPT_PATH" => $new['script_path'],
"SERVER_PORT" => $new['server_port'],
"SITENAME" => $new['sitename'],
"SITE_DESCRIPTION" => $new['site_desc'],
"S_DISABLE_BOARD_YES" => $disable_board_yes,
"S_DISABLE_BOARD_NO" => $disable_board_no,
"ACTIVATION_NONE" => USER_ACTIVATION_NONE,
"ACTIVATION_NONE_CHECKED" => $activation_none,
"ACTIVATION_USER" => USER_ACTIVATION_SELF,
"ACTIVATION_USER_CHECKED" => $activation_user,
"ACTIVATION_ADMIN" => USER_ACTIVATION_ADMIN,
"ACTIVATION_ADMIN_CHECKED" => $activation_admin,
"BOARD_EMAIL_FORM_ENABLE" => $board_email_form_yes,
"BOARD_EMAIL_FORM_DISABLE" => $board_email_form_no,
"MAX_POLL_OPTIONS" => $new['max_poll_options'],
"FLOOD_INTERVAL" => $new['flood_interval'],
"TOPICS_PER_PAGE" => $new['topics_per_page'],
"POSTS_PER_PAGE" => $new['posts_per_page'],
"HOT_TOPIC" => $new['hot_threshold'],
"STYLE_SELECT" => $style_select,
"OVERRIDE_STYLE_YES" => $override_user_style_yes,
"OVERRIDE_STYLE_NO" => $override_user_style_no,
"LANG_SELECT" => $lang_select,
"L_DATE_FORMAT_EXPLAIN" => $lang['Date_format_explain'],
"DEFAULT_DATEFORMAT" => $new['default_dateformat'],
"TIMEZONE_SELECT" => $timezone_select,
"S_PRIVMSG_ENABLED" => $privmsg_on,
"S_PRIVMSG_DISABLED" => $privmsg_off,
"INBOX_LIMIT" => $new['max_inbox_privmsgs'],
"SENTBOX_LIMIT" => $new['max_sentbox_privmsgs'],
"SAVEBOX_LIMIT" => $new['max_savebox_privmsgs'],
"COOKIE_DOMAIN" => $new['cookie_domain'],
"COOKIE_NAME" => $new['cookie_name'],
"COOKIE_PATH" => $new['cookie_path'],
"SESSION_LENGTH" => $new['session_length'],
"S_COOKIE_SECURE_ENABLED" => $cookie_secure_yes,
"S_COOKIE_SECURE_DISABLED" => $cookie_secure_no,
"GZIP_YES" => $gzip_yes,
"GZIP_NO" => $gzip_no,
"PRUNE_YES" => $prune_yes,
"PRUNE_NO" => $prune_no,
"HTML_TAGS" => $html_tags,
"HTML_YES" => $html_yes,
"HTML_NO" => $html_no,
"BBCODE_YES" => $bbcode_yes,
"BBCODE_NO" => $bbcode_no,
"SMILE_YES" => $smile_yes,
"SMILE_NO" => $smile_no,
"SIG_YES" => $sig_yes,
"SIG_NO" => $sig_no,
"SIG_SIZE" => $new['max_sig_chars'],
"NAMECHANGE_YES" => $namechange_yes,
"NAMECHANGE_NO" => $namechange_no,
"AVATARS_LOCAL_YES" => $avatars_local_yes,
"AVATARS_LOCAL_NO" => $avatars_local_no,
"AVATARS_REMOTE_YES" => $avatars_remote_yes,
"AVATARS_REMOTE_NO" => $avatars_remote_no,
"AVATARS_UPLOAD_YES" => $avatars_upload_yes,
"AVATARS_UPLOAD_NO" => $avatars_upload_no,
"AVATAR_FILESIZE" => $new['avatar_filesize'],
"AVATAR_MAX_HEIGHT" => $new['avatar_max_height'],
"AVATAR_MAX_WIDTH" => $new['avatar_max_width'],
"AVATAR_PATH" => $new['avatar_path'],
"AVATAR_GALLERY_PATH" => $new['avatar_gallery_path'],
"SMILIES_PATH" => $new['smilies_path'],
"INBOX_PRIVMSGS" => $new['max_inbox_privmsgs'],
"SENTBOX_PRIVMSGS" => $new['max_sentbox_privmsgs'],
"SAVEBOX_PRIVMSGS" => $new['max_savebox_privmsgs'],
"EMAIL_FROM" => $new['board_email'],
"EMAIL_SIG" => $new['board_email_sig'],
"SMTP_YES" => $smtp_yes,
"SMTP_NO" => $smtp_no,
"SMTP_HOST" => $new['smtp_host'],
"SMTP_USERNAME" => $new['smtp_username'],
"SMTP_PASSWORD" => $new['smtp_password'],
"COPPA_MAIL" => $new['coppa_mail'],
"COPPA_FAX" => $new['coppa_fax'])
);
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
?>

File diff suppressed because it is too large Load Diff

View File

@@ -1,143 +0,0 @@
<?php
/***************************************************************************
* admin_disallow.php
* -------------------
* begin : Tuesday, Oct 05, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Users']['Disallow'] = append_sid($filename);
return;
}
//
// Include required files, get $phpEx and check permissions
//
$phpbb_root_path = "../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
if( isset($HTTP_POST_VARS['add_name']) )
{
include($phpbb_root_path . 'includes/functions_validate.'.$phpEx);
$disallowed_user = ( isset($HTTP_POST_VARS['disallowed_user']) ) ? $HTTP_POST_VARS['disallowed_user'] : $HTTP_GET_VARS['disallowed_user'];
$disallowed_user = preg_replace( '/\*/', '%', $disallowed_user );
if( !validate_username($disallowed_user) )
{
$message = $lang['Disallowed_already'];
}
else
{
$sql = "INSERT INTO " . DISALLOW_TABLE . " (disallow_username)
VALUES('" . str_replace("\'", "''", $disallowed_user) . "')";
$result = $db->sql_query( $sql );
if ( !$result )
{
message_die(GENERAL_ERROR, "Could not add disallowed user.", "",__LINE__, __FILE__, $sql);
}
$message = $lang['Disallow_successful'];
}
$message .= "<br /><br />" . sprintf($lang['Click_return_disallowadmin'], "<a href=\"" . append_sid("admin_disallow.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
else if( isset($HTTP_POST_VARS['delete_name']) )
{
$disallowed_id = ( isset($HTTP_POST_VARS['disallowed_id']) ) ? intval( $HTTP_POST_VARS['disallowed_id'] ) : intval( $HTTP_GET_VARS['disallowed_id'] );
$sql = "DELETE FROM " . DISALLOW_TABLE . "
WHERE disallow_id = $disallowed_id";
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't removed disallowed user.", "",__LINE__, __FILE__, $sql);
}
$message .= $lang['Disallowed_deleted'] . "<br /><br />" . sprintf($lang['Click_return_disallowadmin'], "<a href=\"" . append_sid("admin_disallow.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
//
// Grab the current list of disallowed usernames...
//
$sql = "SELECT *
FROM " . DISALLOW_TABLE;
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't get disallowed users.", "", __LINE__, __FILE__, $sql );
}
$disallowed = $db->sql_fetchrowset($result);
//
// Ok now generate the info for the template, which will be put out no matter
// what mode we are in.
//
$disallow_select = '<select name="disallowed_id">';
if( trim($disallowed) == "" )
{
$disallow_select .= '<option value="">' . $lang['no_disallowed'] . '</option>';
}
else
{
$user = array();
for( $i = 0; $i < count($disallowed); $i++ )
{
$disallowed[$i]['disallow_username'] = preg_replace('/%/', '*', $disallowed[$i]['disallow_username']);
$disallow_select .= '<option value="' . $disallowed[$i]['disallow_id'] . '">' . $disallowed[$i]['disallow_username'] . '</option>';
}
}
$disallow_select .= '</select>';
$template->set_filenames(array(
"body" => "admin/disallow_body.tpl")
);
$template->assign_vars(array(
"S_DISALLOW_SELECT" => $disallow_select,
"S_FORM_ACTION" => append_sid("admin_disallow.$phpEx"),
"L_INFO" => $output_info,
"L_DISALLOW_TITLE" => $lang['Disallow_control'],
"L_DISALLOW_EXPLAIN" => $lang['Disallow_explain'],
"L_DELETE" => $lang['Delete_disallow'],
"L_DELETE_DISALLOW" => $lang['Delete_disallow_title'],
"L_DELETE_EXPLAIN" => $lang['Delete_disallow_explain'],
"L_ADD" => $lang['Add_disallow'],
"L_ADD_DISALLOW" => $lang['Add_disallow_title'],
"L_ADD_EXPLAIN" => $lang['Add_disallow_explain'],
"L_USERNAME" => $lang['Username'])
);
$template->pparse("body");
?>

View File

@@ -1,198 +0,0 @@
<?php
/***************************************************************************
* admin_forum_prune.php
* -------------------
* begin : Mon Jul 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
****************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', true);
if ( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Forums']['Prune'] = $filename;
return;
}
//
// Load default header
//
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
require($phpbb_root_path . 'includes/prune.'.$phpEx);
require($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
//
// Get the forum ID for pruning
//
if( isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]) )
{
$forum_id = ( isset($HTTP_POST_VARS[POST_FORUM_URL]) ) ? $HTTP_POST_VARS[POST_FORUM_URL] : $HTTP_GET_VARS[POST_FORUM_URL];
if( $forum_id == -1 )
{
$forum_sql = '';
}
else
{
$forum_id = intval($forum_id);
$forum_sql = "AND forum_id = $forum_id";
}
}
else
{
$forum_id = '';
$forum_sql = '';
}
//
// Get a list of forum's or the data for the forum that we are pruning.
//
$sql = "SELECT f.*
FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c
WHERE c.cat_id = f.cat_id
$forum_sql
ORDER BY c.cat_order ASC, f.forum_order ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain list of forums for pruning', '', __LINE__, __FILE__, $sql);
}
$forum_rows = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_rows[] = $row;
}
//
// Check for submit to be equal to Prune. If so then proceed with the pruning.
//
if( isset($HTTP_POST_VARS['doprune']) )
{
$prunedays = ( isset($HTTP_POST_VARS['prunedays']) ) ? intval($HTTP_POST_VARS['prunedays']) : 0;
// Convert days to seconds for timestamp functions...
$prunedate = time() - ( $prunedays * 86400 );
$template->set_filenames(array(
'body' => 'admin/forum_prune_result_body.tpl')
);
for($i = 0; $i < count($forum_rows); $i++)
{
$p_result = prune($forum_rows[$i]['forum_id'], $prunedate);
sync('forum', $forum_rows[$i]['forum_id']);
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars('prune_results', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FORUM_NAME' => $forum_rows[$i]['forum_name'],
'FORUM_TOPICS' => $p_result['topics'],
'FORUM_POSTS' => $p_result['posts'])
);
}
$template->assign_vars(array(
'L_FORUM_PRUNE' => $lang['Forum_Prune'],
'L_FORUM' => $lang['Forum'],
'L_TOPICS_PRUNED' => $lang['Topics_pruned'],
'L_POSTS_PRUNED' => $lang['Posts_pruned'],
'L_PRUNE_RESULT' => $lang['Prune_success'])
);
}
else
{
//
// If they haven't selected a forum for pruning yet then
// display a select box to use for pruning.
//
if( empty($HTTP_POST_VARS[POST_FORUM_URL]) )
{
//
// Output a selection table if no forum id has been specified.
//
$template->set_filenames(array(
'body' => 'admin/forum_prune_select_body.tpl')
);
$select_list = '<select name="' . POST_FORUM_URL . '">';
$select_list .= '<option value="-1">' . $lang['All_Forums'] . '</option>';
for($i = 0; $i < count($forum_rows); $i++)
{
$select_list .= '<option value="' . $forum_rows[$i]['forum_id'] . '">' . $forum_rows[$i]['forum_name'] . '</option>';
}
$select_list .= '</select>';
//
// Assign the template variables.
//
$template->assign_vars(array(
'L_FORUM_PRUNE' => $lang['Forum_Prune'],
'L_SELECT_FORUM' => $lang['Select_a_Forum'],
'L_LOOK_UP' => $lang['Look_up_Forum'],
'S_FORUMPRUNE_ACTION' => append_sid("admin_forum_prune.$phpEx"),
'S_FORUMS_SELECT' => $select_list)
);
}
else
{
$forum_id = intval($HTTP_POST_VARS[POST_FORUM_URL]);
//
// Output the form to retrieve Prune information.
//
$template->set_filenames(array(
'body' => 'admin/forum_prune_body.tpl')
);
$forum_name = ( $forum_id == -1 ) ? $lang['All_Forums'] : $forum_rows[0]['forum_name'];
$prune_data = $lang['Prune_topics_not_posted'] . " ";
$prune_data .= '<input type="text" name="prunedays" size="4"> ' . $lang['Days'];
$hidden_input = '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '">';
//
// Assign the template variables.
//
$template->assign_vars(array(
'FORUM_NAME' => $forum_name,
'L_FORUM_PRUNE' => $lang['Forum_Prune'],
'L_FORUM_PRUNE_EXPLAIN' => $lang['Forum_Prune_explain'],
'L_DO_PRUNE' => $lang['Do_Prune'],
'S_FORUMPRUNE_ACTION' => append_sid("admin_forum_prune.$phpEx"),
'S_PRUNE_DATA' => $prune_data,
'S_HIDDEN_VARS' => $hidden_input)
);
}
}
//
// Actually output the page here.
//
$template->pparse('body');
include('page_footer_admin.'.$phpEx);
?>

View File

@@ -1,351 +0,0 @@
<?php
/***************************************************************************
* admin_forumauth.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Forums']['Permissions'] = $filename;
return;
}
//
// Load default header
//
$no_page_header = TRUE;
$phpbb_root_path = "../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
//
// Start program - define vars
//
// View Read Post Reply Edit Delete Sticky Announce Vote Poll
$simple_auth_ary = array(
0 => array(AUTH_ALL, AUTH_ALL, AUTH_ALL, AUTH_ALL, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_REG, AUTH_REG),
1 => array(AUTH_ALL, AUTH_ALL, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_REG, AUTH_REG),
2 => array(AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_REG, AUTH_REG),
3 => array(AUTH_ALL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_MOD, AUTH_ACL, AUTH_ACL),
4 => array(AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_MOD, AUTH_ACL, AUTH_ACL),
5 => array(AUTH_ALL, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD),
6 => array(AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD),
);
$simple_auth_types = array($lang['Public'], $lang['Registered'], $lang['Registered'] . " [" . $lang['Hidden'] . "]", $lang['Private'], $lang['Private'] . " [" . $lang['Hidden'] . "]", $lang['Moderators'], $lang['Moderators'] . " [" . $lang['Hidden'] . "]");
$forum_auth_fields = array("auth_view", "auth_read", "auth_post", "auth_reply", "auth_edit", "auth_delete", "auth_sticky", "auth_announce", "auth_vote", "auth_pollcreate");
$field_names = array(
"auth_view" => $lang['View'],
"auth_read" => $lang['Read'],
"auth_post" => $lang['Post'],
"auth_reply" => $lang['Reply'],
"auth_edit" => $lang['Edit'],
"auth_delete" => $lang['Delete'],
"auth_sticky" => $lang['Sticky'],
"auth_announce" => $lang['Announce'],
"auth_vote" => $lang['Vote'],
"auth_pollcreate" => $lang['Pollcreate']);
$forum_auth_levels = array("ALL", "REG", "PRIVATE", "MOD", "ADMIN");
$forum_auth_const = array(AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN);
if(isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]))
{
$forum_id = (isset($HTTP_POST_VARS[POST_FORUM_URL])) ? intval($HTTP_POST_VARS[POST_FORUM_URL]) : intval($HTTP_GET_VARS[POST_FORUM_URL]);
$forum_sql = "AND forum_id = $forum_id";
}
else
{
unset($forum_id);
$forum_sql = "";
}
if( isset($HTTP_GET_VARS['adv']) )
{
$adv = intval($HTTP_GET_VARS['adv']);
}
else
{
unset($adv);
}
//
// Start program proper
//
if( isset($HTTP_POST_VARS['submit']) )
{
$sql = "";
if(!empty($forum_id))
{
$sql = "UPDATE " . FORUMS_TABLE . " SET ";
if(isset($HTTP_POST_VARS['simpleauth']))
{
$simple_ary = $simple_auth_ary[$HTTP_POST_VARS['simpleauth']];
for($i = 0; $i < count($simple_ary); $i++)
{
$sql .= $forum_auth_fields[$i] . " = " . $simple_ary[$i];
if($i < count($simple_ary) - 1)
{
$sql .= ", ";
}
}
$sql .= " WHERE forum_id = $forum_id";
}
else
{
for($i = 0; $i < count($forum_auth_fields); $i++)
{
$value = $HTTP_POST_VARS[$forum_auth_fields[$i]];
if($forum_auth_fields[$i] == 'auth_vote')
{
if( $HTTP_POST_VARS['auth_vote'] == AUTH_ALL )
{
$value = AUTH_REG;
}
}
$sql .= $forum_auth_fields[$i] . " = " . $value;
if($i < count($forum_auth_fields) - 1)
{
$sql .= ", ";
}
}
$sql .= " WHERE forum_id = $forum_id";
}
if($sql != "")
{
if(!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't update auth table!", "", __LINE__, __FILE__, $sql);
}
}
$forum_sql = "";
$adv = 0;
}
$template->assign_vars(array(
"META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_forumauth.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">')
);
$message = $lang['Forum_auth_updated'] . '<br /><br />' . sprintf($lang['Click_return_forumauth'], '<a href="' . append_sid("admin_forumauth.$phpEx") . '">', "</a>");
message_die(GENERAL_MESSAGE, $message);
} // End of submit
//
// Get required information, either all forums if
// no id was specified or just the requsted if it
// was
//
$sql = "SELECT f.*
FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c
WHERE c.cat_id = f.cat_id
$forum_sql
ORDER BY c.cat_order ASC, f.forum_order ASC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain forum list", "", __LINE__, __FILE__, $sql);
}
$forum_rows = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
if( empty($forum_id) )
{
//
// Output the selection table if no forum id was
// specified
//
$template->set_filenames(array(
"body" => "admin/auth_select_body.tpl")
);
$select_list = '<select name="' . POST_FORUM_URL . '">';
for($i = 0; $i < count($forum_rows); $i++)
{
$select_list .= '<option value="' . $forum_rows[$i]['forum_id'] . '">' . $forum_rows[$i]['forum_name'] . '</option>';
}
$select_list .= '</select>';
$template->assign_vars(array(
"L_AUTH_TITLE" => $lang['Auth_Control_Forum'],
"L_AUTH_EXPLAIN" => $lang['Forum_auth_explain'],
"L_AUTH_SELECT" => $lang['Select_a_Forum'],
"L_LOOK_UP" => $lang['Look_up_Forum'],
"S_AUTH_ACTION" => append_sid("admin_forumauth.$phpEx"),
"S_AUTH_SELECT" => $select_list)
);
}
else
{
//
// Output the authorisation details if an id was
// specified
//
$template->set_filenames(array(
"body" => "admin/auth_forum_body.tpl")
);
$forum_name = $forum_rows[0]['forum_name'];
@reset($simple_auth_ary);
while( list($key, $auth_levels) = each($simple_auth_ary))
{
$matched = 1;
for($k = 0; $k < count($auth_levels); $k++)
{
$matched_type = $key;
if ( $forum_rows[0][$forum_auth_fields[$k]] != $auth_levels[$k] )
{
$matched = 0;
}
}
if ( $matched )
{
break;
}
}
//
// If we didn't get a match above then we
// automatically switch into 'advanced' mode
//
if(!isset($adv) && !$matched)
{
$adv = 1;
}
$s_column_span == 0;
if( empty($adv) )
{
$simple_auth = "<select name=\"simpleauth\">";
for($j = 0; $j < count($simple_auth_types); $j++)
{
if($matched_type == $j)
{
$simple_auth .= "<option value=\"$j\" selected>";
$simple_auth .= $simple_auth_types[$j];
$simple_auth .= "</option>";
}
else
{
$simple_auth .= "<option value=\"$j\">" . $simple_auth_types[$j] . "</option>";
}
}
$simple_auth .= "</select>";
$template->assign_block_vars("forum_auth_titles", array(
"CELL_TITLE" => $lang['Simple_mode'])
);
$template->assign_block_vars("forum_auth_data", array(
"S_AUTH_LEVELS_SELECT" => $simple_auth)
);
$s_column_span++;
}
else
{
//
// Output values of individual
// fields
//
for($j = 0; $j < count($forum_auth_fields); $j++)
{
$custom_auth[$j] = "&nbsp;<select name=\"" . $forum_auth_fields[$j] . "\">";
for($k = 0; $k < count($forum_auth_levels); $k++)
{
if ( $forum_rows[0][$forum_auth_fields[$j]] == $forum_auth_const[$k] )
{
$custom_auth[$j] .= "<option value=\"" . $forum_auth_const[$k] . "\" selected>";
$custom_auth[$j] .= $lang['Forum_' . $forum_auth_levels[$k]];
$custom_auth[$j] .= "</option>";
}
else
{
$custom_auth[$j] .= "<option value=\"" . $forum_auth_const[$k] . "\">". $lang['Forum_' . $forum_auth_levels[$k]] . "</option>";
}
}
$custom_auth[$j] .= "</select>&nbsp;";
$cell_title = $field_names[$forum_auth_fields[$j]];
$template->assign_block_vars("forum_auth_titles", array(
"CELL_TITLE" => $cell_title)
);
$template->assign_block_vars("forum_auth_data", array(
"S_AUTH_LEVELS_SELECT" => $custom_auth[$j])
);
$s_column_span++;
}
}
$adv_mode = (empty($adv)) ? "1" : "0";
$switch_mode = append_sid("admin_forumauth.$phpEx?" . POST_FORUM_URL . "=" . $forum_id . "&adv=". $adv_mode);
$switch_mode_text = ( empty($adv) ) ? $lang['Advanced_mode'] : $lang['Simple_mode'];
$u_switch_mode = '<a href="' . $switch_mode . '">' . $switch_mode_text . '</a>';
$s_hidden_fields = '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '">';
$template->assign_vars(array(
"FORUM_NAME" => $forum_name,
"L_AUTH_TITLE" => $lang['Auth_Control_Forum'],
"L_AUTH_EXPLAIN" => $lang['Forum_auth_explain'],
"L_SUBMIT" => $lang['Submit'],
"L_RESET" => $lang['Reset'],
"U_SWITCH_MODE" => $u_switch_mode,
"S_FORUMAUTH_ACTION" => append_sid("admin_forumauth.$phpEx"),
"S_COLUMN_SPAN" => $s_column_span,
"S_HIDDEN_FIELDS" => $s_hidden_fields)
);
}
include('page_header_admin.'.$phpEx);
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
?>

View File

@@ -1,936 +0,0 @@
<?php
/***************************************************************************
* admin_forums.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['Forums']['Manage'] = $file;
return;
}
//
// Load default header
//
$phpbb_root_path = "../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
$forum_auth_ary = array(
"auth_view" => AUTH_ALL,
"auth_read" => AUTH_ALL,
"auth_post" => AUTH_ALL,
"auth_reply" => AUTH_ALL,
"auth_edit" => AUTH_REG,
"auth_delete" => AUTH_REG,
"auth_sticky" => AUTH_REG,
"auth_announce" => AUTH_MOD,
"auth_vote" => AUTH_REG,
"auth_pollcreate" => AUTH_REG
);
//
// Mode setting
//
if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
}
else
{
$mode = "";
}
// ------------------
// Begin function block
//
function get_info($mode, $id)
{
global $db;
switch($mode)
{
case 'category':
$table = CATEGORIES_TABLE;
$idfield = 'cat_id';
$namefield = 'cat_title';
break;
case 'forum':
$table = FORUMS_TABLE;
$idfield = 'forum_id';
$namefield = 'forum_name';
break;
default:
message_die(GENERAL_ERROR, "Wrong mode for generating select list", "", __LINE__, __FILE__);
break;
}
$sql = "SELECT count(*) as total
FROM $table";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get Forum/Category information", "", __LINE__, __FILE__, $sql);
}
$count = $db->sql_fetchrow($result);
$count = $count['total'];
$sql = "SELECT *
FROM $table
WHERE $idfield = $id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get Forum/Category information", "", __LINE__, __FILE__, $sql);
}
if( $db->sql_numrows($result) != 1 )
{
message_die(GENERAL_ERROR, "Forum/Category doesn't exist or multiple forums/categories with ID $id", "", __LINE__, __FILE__);
}
$return = $db->sql_fetchrow($result);
$return['number'] = $count;
return $return;
}
function get_list($mode, $id, $select)
{
global $db;
switch($mode)
{
case 'category':
$table = CATEGORIES_TABLE;
$idfield = 'cat_id';
$namefield = 'cat_title';
break;
case 'forum':
$table = FORUMS_TABLE;
$idfield = 'forum_id';
$namefield = 'forum_name';
break;
default:
message_die(GENERAL_ERROR, "Wrong mode for generating select list", "", __LINE__, __FILE__);
break;
}
$sql = "SELECT *
FROM $table";
if( $select == 0 )
{
$sql .= " WHERE $idfield <> $id";
}
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get list of Categories/Forums", "", __LINE__, __FILE__, $sql);
}
$cat_list = "";
while( $row = $db->sql_fetchrow($result) )
{
$s = "";
if ($row[$idfield] == $id)
{
$s = " selected=\"selected\"";
}
$catlist .= "<option value=\"$row[$idfield]\"$s>" . $row[$namefield] . "</option>\n";
}
return($catlist);
}
function renumber_order($mode, $cat = 0)
{
global $db;
switch($mode)
{
case 'category':
$table = CATEGORIES_TABLE;
$idfield = 'cat_id';
$orderfield = 'cat_order';
$cat = 0;
break;
case 'forum':
$table = FORUMS_TABLE;
$idfield = 'forum_id';
$orderfield = 'forum_order';
$catfield = 'cat_id';
break;
default:
message_die(GENERAL_ERROR, "Wrong mode for generating select list", "", __LINE__, __FILE__);
break;
}
$sql = "SELECT * FROM $table";
if( $cat != 0)
{
$sql .= " WHERE $catfield = $cat";
}
$sql .= " ORDER BY $orderfield ASC";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get list of Categories", "", __LINE__, __FILE__, $sql);
}
$i = 10;
$inc = 10;
while( $row = $db->sql_fetchrow($result) )
{
$sql = "UPDATE $table
SET $orderfield = $i
WHERE $idfield = " . $row[$idfield];
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update order fields", "", __LINE__, __FILE__, $sql);
}
$i += 10;
}
}
//
// End function block
// ------------------
//
// Begin program proper
//
if( isset($HTTP_POST_VARS['addforum']) || isset($HTTP_POST_VARS['addcategory']) )
{
$mode = ( isset($HTTP_POST_VARS['addforum']) ) ? "addforum" : "addcat";
if( $mode == "addforum" )
{
list($cat_id) = each($HTTP_POST_VARS['addforum']);
//
// stripslashes needs to be run on this because slashes are added when the forum name is posted
//
$forumname = stripslashes($HTTP_POST_VARS['forumname'][$cat_id]);
}
}
if( !empty($mode) )
{
switch($mode)
{
case 'addforum':
case 'editforum':
//
// Show form to create/modify a forum
//
if ($mode == 'editforum')
{
// $newmode determines if we are going to INSERT or UPDATE after posting?
$l_title = $lang['Edit_forum'];
$newmode = 'modforum';
$buttonvalue = $lang['Update'];
$forum_id = intval($HTTP_GET_VARS[POST_FORUM_URL]);
$row = get_info('forum', $forum_id);
$cat_id = $row['cat_id'];
$forumname = $row['forum_name'];
$forumdesc = $row['forum_desc'];
$forumstatus = $row['forum_status'];
//
// start forum prune stuff.
//
if( $row['prune_enable'] )
{
$prune_enabled = "checked=\"checked\"";
$sql = "SELECT *
FROM " . PRUNE_TABLE . "
WHERE forum_id = $forum_id";
if(!$pr_result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Auto-Prune: Couldn't read auto_prune table.", __LINE__, __FILE__);
}
$pr_row = $db->sql_fetchrow($pr_result);
}
else
{
$prune_enabled = '';
}
}
else
{
$l_title = $lang['Create_forum'];
$newmode = 'createforum';
$buttonvalue = $lang['Create_forum'];
$forumdesc = '';
$forumstatus = FORUM_UNLOCKED;
$forum_id = '';
$prune_enabled = '';
}
$catlist = get_list('category', $cat_id, TRUE);
$forumstatus == ( FORUM_LOCKED ) ? $forumlocked = "selected=\"selected\"" : $forumunlocked = "selected=\"selected\"";
$statuslist = "<option value=\"" . FORUM_UNLOCKED . "\" $forumunlocked>Unlocked</option>\n";
$statuslist .= "<option value=\"" . FORUM_LOCKED . "\" $forumlocked>Locked</option>\n";
$template->set_filenames(array(
"body" => "admin/forum_edit_body.tpl")
);
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode .'" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
$template->assign_vars(array(
'S_FORUM_ACTION' => append_sid("admin_forums.$phpEx"),
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_SUBMIT_VALUE' => $buttonvalue,
'S_CAT_LIST' => $catlist,
'S_STATUS_LIST' => $statuslist,
'S_PRUNE_ENABLED' => $prune_enabled,
'L_FORUM_TITLE' => $l_title,
'L_FORUM_EXPLAIN' => $lang['Forum_edit_delete_explain'],
'L_FORUM_SETTINGS' => $lang['Forum_settings'],
'L_FORUM_NAME' => $lang['Forum_name'],
'L_CATEGORY' => $lang['Category'],
'L_FORUM_DESCRIPTION' => $lang['Forum_desc'],
'L_FORUM_STATUS' => $lang['Forum_status'],
'L_AUTO_PRUNE' => $lang['Forum_pruning'],
'L_ENABLED' => $lang['Enabled'],
'L_PRUNE_DAYS' => $lang['prune_days'],
'L_PRUNE_FREQ' => $lang['prune_freq'],
'L_DAYS' => $lang['Days'],
'PRUNE_DAYS' => ( isset($pr_row['prune_days']) ) ? $pr_row['prune_days'] : 7,
'PRUNE_FREQ' => ( isset($pr_row['prune_freq']) ) ? $pr_row['prune_freq'] : 1,
'FORUM_NAME' => $forumname,
'DESCRIPTION' => $forumdesc)
);
$template->pparse("body");
break;
case 'createforum':
//
// Create a forum in the DB
//
if( trim($HTTP_POST_VARS['forumname']) == "" )
{
message_die(GENERAL_ERROR, "Can't create a forum without a name");
}
$sql = "SELECT MAX(forum_order) AS max_order
FROM " . FORUMS_TABLE . "
WHERE cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]);
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get order number from forums table", "", __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$max_order = $row['max_order'];
$next_order = $max_order + 10;
$sql = "SELECT MAX(forum_id) AS max_id
FROM " . FORUMS_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get order number from forums table", "", __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$max_id = $row['max_id'];
$next_id = $max_id + 1;
//
// Default permissions of public ::
//
$field_sql = "";
$value_sql = "";
while( list($field, $value) = each($forum_auth_ary) )
{
$field_sql .= ", $field";
$value_sql .= ", $value";
}
// There is no problem having duplicate forum names so we won't check for it.
$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert row in forums table", "", __LINE__, __FILE__, $sql);
}
if( $HTTP_POST_VARS['prune_enable'] )
{
if( $HTTP_POST_VARS['prune_days'] == "" || $HTTP_POST_VARS['prune_freq'] == "")
{
message_die(GENERAL_MESSAGE, $lang['Set_prune_data']);
}
$sql = "INSERT INTO " . PRUNE_TABLE . " (forum_id, prune_days, prune_freq)
VALUES('" . $next_id . "', " . intval($HTTP_POST_VARS['prune_days']) . ", " . intval($HTTP_POST_VARS['prune_freq']) . ")";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert row in prune table", "", __LINE__, __FILE__, $sql);
}
}
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
break;
case 'modforum':
// Modify a forum in the DB
if( isset($HTTP_POST_VARS['prune_enable']))
{
if( $HTTP_POST_VARS['prune_enable'] != 1 )
{
$HTTP_POST_VARS['prune_enable'] = 0;
}
}
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update forum information", "", __LINE__, __FILE__, $sql);
}
if( $HTTP_POST_VARS['prune_enable'] == 1 )
{
if( $HTTP_POST_VARS['prune_days'] == "" || $HTTP_POST_VARS['prune_freq'] == "" )
{
message_die(GENERAL_MESSAGE, $lang['Set_prune_data']);
}
$sql = "SELECT *
FROM " . PRUNE_TABLE . "
WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get forum Prune Information","",__LINE__, __FILE__, $sql);
}
if( $db->sql_numrows($result) > 0 )
{
$sql = "UPDATE " . PRUNE_TABLE . "
SET prune_days = " . intval($HTTP_POST_VARS['prune_days']) . ", prune_freq = " . intval($HTTP_POST_VARS['prune_freq']) . "
WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
}
else
{
$sql = "INSERT INTO " . PRUNE_TABLE . " (forum_id, prune_days, prune_freq)
VALUES(" . intval($HTTP_POST_VARS[POST_FORUM_URL]) . ", " . intval($HTTP_POST_VARS['prune_days']) . ", " . intval($HTTP_POST_VARS['prune_freq']) . ")";
}
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't Update Forum Prune Information","",__LINE__, __FILE__, $sql);
}
}
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
break;
case 'addcat':
// Create a category in the DB
if( trim($HTTP_POST_VARS['categoryname']) == '')
{
message_die(GENERAL_ERROR, "Can't create a category without a name");
}
$sql = "SELECT MAX(cat_order) AS max_order
FROM " . CATEGORIES_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get order number from categories table", "", __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$max_order = $row['max_order'];
$next_order = $max_order + 10;
//
// There is no problem having duplicate forum names so we won't check for it.
//
$sql = "INSERT INTO " . CATEGORIES_TABLE . " (cat_title, cat_order)
VALUES ('" . $HTTP_POST_VARS['categoryname'] . "', $next_order)";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert row in categories table", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
break;
case 'editcat':
//
// Show form to edit a category
//
$newmode = 'modcat';
$buttonvalue = $lang['Update'];
$cat_id = intval($HTTP_GET_VARS[POST_CAT_URL]);
$row = get_info('category', $cat_id);
$cat_title = $row['cat_title'];
$template->set_filenames(array(
"body" => "admin/category_edit_body.tpl")
);
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode . '" /><input type="hidden" name="' . POST_CAT_URL . '" value="' . $cat_id . '" />';
$template->assign_vars(array(
'CAT_TITLE' => $cat_title,
'L_EDIT_CATEGORY' => $lang['Edit_Category'],
'L_EDIT_CATEGORY_EXPLAIN' => $lang['Edit_Category_explain'],
'L_CATEGORY' => $lang['Category'],
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_SUBMIT_VALUE' => $buttonvalue,
'S_FORUM_ACTION' => append_sid("admin_forums.$phpEx"))
);
$template->pparse("body");
break;
case 'modcat':
// Modify a category in the DB
$sql = "UPDATE " . CATEGORIES_TABLE . "
SET cat_title = '" . str_replace("\'", "''", $HTTP_POST_VARS['cat_title']) . "'
WHERE cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]);
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update forum information", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
break;
case 'deleteforum':
// Show form to delete a forum
$forum_id = intval($HTTP_GET_VARS[POST_FORUM_URL]);
$select_to = '<select name="to_id">';
$select_to .= "<option value=\"-1\"$s>" . $lang['Delete_all_posts'] . "</option>\n";
$select_to .= get_list('forum', $forum_id, 0);
$select_to .= '</select>';
$buttonvalue = $lang['Move_and_Delete'];
$newmode = 'movedelforum';
$foruminfo = get_info('forum', $forum_id);
$name = $foruminfo['forum_name'];
$template->set_filenames(array(
"body" => "admin/forum_delete_body.tpl")
);
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode . '" /><input type="hidden" name="from_id" value="' . $forum_id . '" />';
$template->assign_vars(array(
'NAME' => $name,
'L_FORUM_DELETE' => $lang['Forum_delete'],
'L_FORUM_DELETE_EXPLAIN' => $lang['Forum_delete_explain'],
'L_MOVE_CONTENTS' => $lang['Move_contents'],
'L_FORUM_NAME' => $lang['Forum_name'],
"S_HIDDEN_FIELDS" => $s_hidden_fields,
'S_FORUM_ACTION' => append_sid("admin_forums.$phpEx"),
'S_SELECT_TO' => $select_to,
'S_SUBMIT_VALUE' => $buttonvalue)
);
$template->pparse("body");
break;
case 'movedelforum':
//
// Move or delete a forum in the DB
//
$from_id = intval($HTTP_POST_VARS['from_id']);
$to_id = intval($HTTP_POST_VARS['to_id']);
$delete_old = intval($HTTP_POST_VARS['delete_old']);
// Either delete or move all posts in a forum
if($to_id == -1)
{
include($phpbb_root_path . "includes/prune.$phpEx");
prune($from_id, 0); // Delete everything from forum
}
else
{
$sql = "SELECT *
FROM " . FORUMS_TABLE . "
WHERE forum_id IN ($from_id, $to_id)";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't verify existence of forums", "", __LINE__, __FILE__, $sql);
}
if($db->sql_numrows($result) != 2)
{
message_die(GENERAL_ERROR, "Ambiguous forum ID's", "", __LINE__, __FILE__);
}
$sql = "UPDATE " . TOPICS_TABLE . "
SET forum_id = $to_id
WHERE forum_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't move topics to other forum", "", __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . POSTS_TABLE . "
SET forum_id = $to_id
WHERE forum_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't move posts to other forum", "", __LINE__, __FILE__, $sql);
}
sync('forum', $to_id);
}
$sql = "DELETE FROM " . FORUMS_TABLE . "
WHERE forum_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete forum", "", __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . AUTH_ACCESS_TABLE . "
WHERE forum_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete forum", "", __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . PRUNE_TABLE . "
WHERE forum_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete forum prune information!", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
break;
case 'deletecat':
//
// Show form to delete a category
//
$cat_id = intval($HTTP_GET_VARS[POST_CAT_URL]);
$buttonvalue = $lang['Move_and_Delete'];
$newmode = 'movedelcat';
$catinfo = get_info('category', $cat_id);
$name = $catinfo['cat_title'];
if ($catinfo['number'] == 1)
{
$sql = "SELECT count(*) as total
FROM ". FORUMS_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get Forum count", "", __LINE__, __FILE__, $sql);
}
$count = $db->sql_fetchrow($result);
$count = $count['total'];
if ($count > 0)
{
message_die(GENERAL_ERROR, $lang['Must_delete_forums']);
}
else
{
$select_to = $lang['Nowhere_to_move'];
}
}
else
{
$select_to = '<select name="to_id">';
$select_to .= get_list('category', $cat_id, 0);
$select_to .= '</select>';
}
$template->set_filenames(array(
"body" => "admin/forum_delete_body.tpl")
);
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode . '" /><input type="hidden" name="from_id" value="' . $cat_id . '" />';
$template->assign_vars(array(
'NAME' => $name,
'L_FORUM_DELETE' => $lang['Forum_delete'],
'L_FORUM_DELETE_EXPLAIN' => $lang['Forum_delete_explain'],
'L_MOVE_CONTENTS' => $lang['Move_contents'],
'L_FORUM_NAME' => $lang['Forum_name'],
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_FORUM_ACTION' => append_sid("admin_forums.$phpEx"),
'S_SELECT_TO' => $select_to,
'S_SUBMIT_VALUE' => $buttonvalue)
);
$template->pparse("body");
break;
case 'movedelcat':
//
// Move or delete a category in the DB
//
$from_id = intval($HTTP_POST_VARS['from_id']);
$to_id = intval($HTTP_POST_VARS['to_id']);
if (!empty($to_id))
{
$sql = "SELECT *
FROM " . CATEGORIES_TABLE . "
WHERE cat_id IN ($from_id, $to_id)";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't verify existence of categories", "", __LINE__, __FILE__, $sql);
}
if($db->sql_numrows($result) != 2)
{
message_die(GENERAL_ERROR, "Ambiguous category ID's", "", __LINE__, __FILE__);
}
$sql = "UPDATE " . FORUMS_TABLE . "
SET cat_id = $to_id
WHERE cat_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't move forums to other category", "", __LINE__, __FILE__, $sql);
}
}
$sql = "DELETE FROM " . CATEGORIES_TABLE ."
WHERE cat_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete category", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
break;
case 'forum_order':
//
// Change order of forums in the DB
//
$move = intval($HTTP_GET_VARS['move']);
$forum_id = intval($HTTP_GET_VARS[POST_FORUM_URL]);
$forum_info = get_info('forum', $forum_id);
$cat_id = $forum_info['cat_id'];
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_order = forum_order + $move
WHERE forum_id = $forum_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't change category order", "", __LINE__, __FILE__, $sql);
}
renumber_order('forum', $forum_info['cat_id']);
$show_index = TRUE;
break;
case 'cat_order':
//
// Change order of categories in the DB
//
$move = intval($HTTP_GET_VARS['move']);
$cat_id = intval($HTTP_GET_VARS[POST_CAT_URL]);
$sql = "UPDATE " . CATEGORIES_TABLE . "
SET cat_order = cat_order + $move
WHERE cat_id = $cat_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't change category order", "", __LINE__, __FILE__, $sql);
}
renumber_order('category');
$show_index = TRUE;
break;
case 'forum_sync':
sync('forum', intval($HTTP_GET_VARS[POST_FORUM_URL]));
$show_index = TRUE;
break;
default:
message_die(GENERAL_MESSAGE, $lang['No_mode']);
break;
}
if ($show_index != TRUE)
{
include('page_footer_admin.'.$phpEx);
exit;
}
}
//
// Start page proper
//
$template->set_filenames(array(
"body" => "admin/forum_admin_body.tpl")
);
$template->assign_vars(array(
'S_FORUM_ACTION' => append_sid("admin_forums.$phpEx"),
'L_FORUM_TITLE' => $lang['Forum_admin'],
'L_FORUM_EXPLAIN' => $lang['Forum_admin_explain'],
'L_CREATE_FORUM' => $lang['Create_forum'],
'L_CREATE_CATEGORY' => $lang['Create_category'],
'L_EDIT' => $lang['Edit'],
'L_DELETE' => $lang['Delete'],
'L_MOVE_UP' => $lang['Move_up'],
'L_MOVE_DOWN' => $lang['Move_down'],
'L_RESYNC' => $lang['Resync'])
);
$sql = "SELECT cat_id, cat_title, cat_order
FROM " . CATEGORIES_TABLE . "
ORDER BY cat_order";
if( !$q_categories = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not query categories list", "", __LINE__, __FILE__, $sql);
}
if( $total_categories = $db->sql_numrows($q_categories) )
{
$category_rows = $db->sql_fetchrowset($q_categories);
$sql = "SELECT *
FROM " . FORUMS_TABLE . "
ORDER BY cat_id, forum_order";
if(!$q_forums = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query forums information", "", __LINE__, __FILE__, $sql);
}
if( $total_forums = $db->sql_numrows($q_forums) )
{
$forum_rows = $db->sql_fetchrowset($q_forums);
}
//
// Okay, let's build the index
//
$gen_cat = array();
for($i = 0; $i < $total_categories; $i++)
{
$cat_id = $category_rows[$i]['cat_id'];
$template->assign_block_vars("catrow", array(
'S_ADD_FORUM_SUBMIT' => "addforum[$cat_id]",
'S_ADD_FORUM_NAME' => "forumname[$cat_id]",
'CAT_ID' => $cat_id,
'CAT_DESC' => $category_rows[$i]['cat_title'],
'U_CAT_EDIT' => append_sid("admin_forums.$phpEx?mode=editcat&amp;" . POST_CAT_URL . "=$cat_id"),
'U_CAT_DELETE' => append_sid("admin_forums.$phpEx?mode=deletecat&amp;" . POST_CAT_URL . "=$cat_id"),
'U_CAT_MOVE_UP' => append_sid("admin_forums.$phpEx?mode=cat_order&amp;move=-15&amp;" . POST_CAT_URL . "=$cat_id"),
'U_CAT_MOVE_DOWN' => append_sid("admin_forums.$phpEx?mode=cat_order&amp;move=15&amp;" . POST_CAT_URL . "=$cat_id"),
'U_VIEWCAT' => append_sid($phpbb_root_path."index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
);
for($j = 0; $j < $total_forums; $j++)
{
$forum_id = $forum_rows[$j]['forum_id'];
if ($forum_rows[$j]['cat_id'] == $cat_id)
{
$template->assign_block_vars("catrow.forumrow", array(
'FORUM_NAME' => $forum_rows[$j]['forum_name'],
'FORUM_DESC' => $forum_rows[$j]['forum_desc'],
'ROW_COLOR' => $row_color,
'NUM_TOPICS' => $forum_rows[$j]['forum_topics'],
'NUM_POSTS' => $forum_rows[$j]['forum_posts'],
'U_VIEWFORUM' => append_sid($phpbb_root_path."viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"),
'U_FORUM_EDIT' => append_sid("admin_forums.$phpEx?mode=editforum&amp;" . POST_FORUM_URL . "=$forum_id"),
'U_FORUM_DELETE' => append_sid("admin_forums.$phpEx?mode=deleteforum&amp;" . POST_FORUM_URL . "=$forum_id"),
'U_FORUM_MOVE_UP' => append_sid("admin_forums.$phpEx?mode=forum_order&amp;move=-15&amp;" . POST_FORUM_URL . "=$forum_id"),
'U_FORUM_MOVE_DOWN' => append_sid("admin_forums.$phpEx?mode=forum_order&amp;move=15&amp;" . POST_FORUM_URL . "=$forum_id"),
'U_FORUM_RESYNC' => append_sid("admin_forums.$phpEx?mode=forum_sync&amp;" . POST_FORUM_URL . "=$forum_id"))
);
}// if ... forumid == catid
} // for ... forums
} // for ... categories
}// if ... total_categories
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
?>

View File

@@ -1,359 +0,0 @@
<?php
/***************************************************************************
* admin_groups.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Groups']['Manage'] = $filename;
return;
}
//
// Load default header
//
$phpbb_root_path = "../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
if( isset($HTTP_POST_VARS[POST_GROUPS_URL]) || isset($HTTP_GET_VARS[POST_GROUPS_URL]) )
{
$group_id = ( isset($HTTP_POST_VARS[POST_GROUPS_URL]) ) ? intval($HTTP_POST_VARS[POST_GROUPS_URL]) : intval($HTTP_GET_VARS[POST_GROUPS_URL]);
}
else
{
$group_id = "";
}
//
// Mode setting
//
if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
}
else
{
$mode = "";
}
if( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) )
{
//
// Ok they are editing a group or creating a new group
//
$template->set_filenames(array(
"body" => "admin/group_edit_body.tpl")
);
if ( isset($HTTP_POST_VARS['edit']) )
{
//
// They're editing. Grab the vars.
//
$sql = "SELECT *
FROM " . GROUPS_TABLE . "
WHERE group_single_user <> " . TRUE . "
AND group_id = $group_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Error getting group information", "", __LINE__, __FILE__, $sql);
}
if( !$db->sql_numrows($result) )
{
message_die(GENERAL_MESSAGE, $lang['Group_not_exist']);
}
$group_info = $db->sql_fetchrow($result);
$mode = "editgroup";
$template->assign_block_vars("group_edit", array());
}
else if( isset($HTTP_POST_VARS['new']) )
{
$group_info = array (
"group_name" => "",
"group_description" => "",
"group_moderator" => "",
"group_type" => GROUP_OPEN);
$group_open = "checked=\"checked\"";
$mode = "newgroup";
}
//
// Ok, now we know everything about them, let's show the page.
//
$sql = "SELECT user_id, username
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY username";
$u_result = $db->sql_query($sql);
if( !$u_result )
{
message_die(GENERAL_ERROR, "Couldn't obtain user info for moderator list", "", __LINE__, __FILE__, $sql);
}
$user_list = $db->sql_fetchrowset($u_result);
for($i = 0; $i < count($user_list); $i++)
{
if( $user_list[$i]['user_id'] == $group_info['group_moderator'] )
{
$group_moderator = $user_list[$i]['username'];
}
}
$group_open = ( $group_info['group_type'] == GROUP_OPEN ) ? "checked=\"checked\"" : "";
$group_closed = ( $group_info['group_type'] == GROUP_CLOSED ) ? "checked=\"checked\"" : "";
$group_hidden = ( $group_info['group_type'] == GROUP_HIDDEN ) ? "checked=\"checked\"" : "";
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
$template->assign_vars(array(
"GROUP_NAME" => $group_info['group_name'],
"GROUP_DESCRIPTION" => $group_info['group_description'],
"GROUP_MODERATOR" => $group_moderator,
"L_GROUP_TITLE" => $lang['Group_administration'],
"L_GROUP_EDIT_DELETE" => ( isset($HTTP_POST_VARS['new']) ) ? $lang['New_group'] : $lang['Edit_group'],
"L_GROUP_NAME" => $lang['group_name'],
"L_GROUP_DESCRIPTION" => $lang['group_description'],
"L_GROUP_MODERATOR" => $lang['group_moderator'],
"L_FIND_USERNAME" => $lang['Find_username'],
"L_GROUP_STATUS" => $lang['group_status'],
"L_GROUP_OPEN" => $lang['group_open'],
"L_GROUP_CLOSED" => $lang['group_closed'],
"L_GROUP_HIDDEN" => $lang['group_hidden'],
"L_GROUP_DELETE" => $lang['group_delete'],
"L_GROUP_DELETE_CHECK" => $lang['group_delete_check'],
"L_SUBMIT" => $lang['Submit'],
"L_RESET" => $lang['Reset'],
"L_DELETE_MODERATOR" => $lang['delete_group_moderator'],
"L_DELETE_MODERATOR_EXPLAIN" => $lang['delete_moderator_explain'],
"L_YES" => $lang['Yes'],
"U_SEARCH_USER" => append_sid("../search.$phpEx?mode=searchuser"),
"S_GROUP_OPEN_TYPE" => GROUP_OPEN,
"S_GROUP_CLOSED_TYPE" => GROUP_CLOSED,
"S_GROUP_HIDDEN_TYPE" => GROUP_HIDDEN,
"S_GROUP_OPEN_CHECKED" => $group_open,
"S_GROUP_CLOSED_CHECKED" => $group_closed,
"S_GROUP_HIDDEN_CHECKED" => $group_hidden,
"S_GROUP_ACTION" => append_sid("admin_groups.$phpEx"),
"S_HIDDEN_FIELDS" => $s_hidden_fields)
);
$template->pparse('body');
}
else if( isset($HTTP_POST_VARS['group_update']) )
{
//
// Ok, they are submitting a group, let's save the data based on if it's new or editing
//
if( isset($HTTP_POST_VARS['group_delete']) )
{
$sql = "DELETE FROM " . GROUPS_TABLE . "
WHERE group_id = " . $group_id;
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update group", "", __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . USER_GROUP_TABLE . "
WHERE group_id = " . $group_id;
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update user_group", "", __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . AUTH_ACCESS_TABLE . "
WHERE group_id = " . $group_id;
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update auth_access", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Deleted_group'] . "<br /><br />" . sprintf($lang['Click_return_groupsadmin'], "<a href=\"" . append_sid("admin_groups.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");;
message_die(GENERAL_MESSAGE, $message);
}
else
{
$group_type = isset($HTTP_POST_VARS['group_type']) ? intval($HTTP_POST_VARS['group_type']) : GROUP_OPEN;
$group_name = isset($HTTP_POST_VARS['group_name']) ? trim($HTTP_POST_VARS['group_name']) : "";
$group_description = isset($HTTP_POST_VARS['group_description']) ? trim($HTTP_POST_VARS['group_description']) : "";
$group_moderator = isset($HTTP_POST_VARS['username']) ? $HTTP_POST_VARS['username'] : "";
$delete_old_moderator = isset($HTTP_POST_VARS['delete_old_moderator']) ? intval($HTTP_POST_VARS['delete_old_moderator']) : "";
if( $group_name == "" )
{
message_die(GENERAL_MESSAGE, $lang['No_group_name']);
}
else if( $group_moderator == "" )
{
message_die(GENERAL_MESSAGE, $lang['No_group_moderator']);
}
$this_userdata = get_userdata($group_moderator);
$group_moderator = $this_userdata['user_id'];
if( !$group_moderator )
{
message_die(GENERAL_MESSAGE, $lang['No_group_moderator']);
}
if( $mode == "editgroup" )
{
$sql = "SELECT *
FROM " . GROUPS_TABLE . "
WHERE group_single_user <> " . TRUE . "
AND group_id = " . $group_id;
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Error getting group information", "", __LINE__, __FILE__, $sql);
}
if( !$db->sql_numrows($result) )
{
message_die(GENERAL_MESSAGE, $lang['Group_not_exist']);
}
$group_info = $db->sql_fetchrow($result);
if ( $group_info['group_moderator'] != $group_moderator )
{
if ( $delete_old_moderator != "" )
{
$sql = "DELETE FROM " . USER_GROUP_TABLE . "
WHERE user_id = " . $group_info['group_moderator'] . "
AND group_id = " . $group_id;
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update group moderator", "", __LINE__, __FILE__, $sql);
}
}
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
VALUES (" . $group_id . ", " . $group_moderator . ", 0)";
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update group moderator", "", __LINE__, __FILE__, $sql);
}
}
$sql = "UPDATE " . GROUPS_TABLE . "
SET group_type = $group_type, group_name = '" . str_replace("\'", "''", $group_name) . "', group_description = '" . str_replace("\'", "''", $group_description) . "', group_moderator = $group_moderator
WHERE group_id = $group_id";
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update group", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Updated_group'] . "<br /><br />" . sprintf($lang['Click_return_groupsadmin'], "<a href=\"" . append_sid("admin_groups.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");;
message_die(GENERAL_MESSAGE, $message);
}
else if( $mode == "newgroup" )
{
$sql = "SELECT MAX(group_id) AS new_group_id
FROM " . GROUPS_TABLE;
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert new group", "", __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$new_group_id = $row['new_group_id'] + 1;
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_type, group_name, group_description, group_moderator, group_single_user)
VALUES ($new_group_id, $group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator, '0')";
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert new group", "", __LINE__, __FILE__, $sql);
}
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
VALUES ($new_group_id, $group_moderator, 0)";
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert new user-group info", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Added_new_group'] . "<br /><br />" . sprintf($lang['Click_return_groupsadmin'], "<a href=\"" . append_sid("admin_groups.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");;
message_die(GENERAL_MESSAGE, $message);
}
else
{
message_die(GENERAL_MESSAGE, $lang['Group_mode_not_selected']);
}
}
}
else
{
$sql = "SELECT group_id, group_name
FROM " . GROUPS_TABLE . "
WHERE group_single_user <> " . TRUE . "
ORDER BY group_name";
$g_result = $db->sql_query($sql);
$group_list = $db->sql_fetchrowset($g_result);
$select_list = "<select name=\"" . POST_GROUPS_URL . "\">";
for($i = 0; $i < count($group_list); $i++)
{
$select_list .= "<option value=\"" . $group_list[$i]['group_id'] . "\">" . $group_list[$i]['group_name'] . "</option>";
}
$select_list .= "</select>";
$template->set_filenames(array(
"body" => "admin/group_select_body.tpl")
);
$template->assign_vars(array(
"L_GROUP_TITLE" => $lang['Group_administration'],
"L_GROUP_EXPLAIN" => $lang['Group_admin_explain'],
"L_GROUP_SELECT" => $lang['Select_group'],
"L_LOOK_UP" => $lang['Look_up_group'],
"L_CREATE_NEW_GROUP" => $lang['New_group'],
"S_GROUP_ACTION" => append_sid("admin_groups.$phpEx"),
"S_GROUP_SELECT" => $select_list)
);
//
// Faking the IF... ELSE statements again...
//
if( count($group_list) > 0 )
{
$template->assign_block_vars("select_box", array());
}
$template->pparse('body');
}
include('page_footer_admin.'.$phpEx);
?>

View File

@@ -1,198 +0,0 @@
<?php
/***************************************************************************
* admin_mass_email.php
* -------------------
* begin : Thu May 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
****************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['General']['Mass_Email'] = $filename;
return;
}
//
// Load default header
//
$no_page_header = TRUE;
$phpbb_root_path = "../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
//
// Increase maximum execution time in case of a lot of users, but don't complain about it if it isn't
// allowed.
//
@set_time_limit(1200);
$message = "";
$subject = "";
//
// Do the job ...
//
if( isset($HTTP_POST_VARS['submit']) )
{
$group_id = intval($HTTP_POST_VARS[POST_GROUPS_URL]);
if( $group_id != -1 )
{
$sql = "SELECT u.user_email
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug
WHERE ug.group_id = $group_id
AND ug.user_pending <> " . TRUE . "
AND u.user_id = ug.user_id";
}
else
{
$sql = "SELECT user_email
FROM " . USERS_TABLE;
}
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Coult not select group members!", __LINE__, __FILE__, $sql);
}
if( !$db->sql_numrows($result) )
{
//
// Output a relevant GENERAL_MESSAGE about users/group
// not existing
//
}
$email_list = $db->sql_fetchrowset($g_result);
$subject = stripslashes($HTTP_POST_VARS["subject"]);
$message = stripslashes($HTTP_POST_VARS["message"]);
//
// Error checking needs to go here ... if no subject and/or
// no message then skip over the send and return to the form
//
$error = FALSE;
if( !$error )
{
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
//
// Let's do some checking to make sure that mass mail functions
// are working in win32 versions of php.
//
if( preg_match('/[c-z]:\\\.*/i', getenv('PATH')) && !$board_config['smtp_delivery'])
{
// We are running on windows, force delivery to use
// our smtp functions since php's are broken by default
$board_config['smtp_delivery'] = 1;
$board_config['smtp_host'] = get_cfg_var('SMTP');
}
$emailer = new emailer($board_config['smtp_delivery']);
$email_headers = "From: " . $board_config['board_email'] . "\n";
$bcc_list = "";
for($i = 0; $i < count($email_list); $i++)
{
if( $bcc_list != "" )
{
$bcc_list .= ", ";
}
$bcc_list .= $email_list[$i]['user_email'];
}
$email_headers .= "Bcc: $bcc_list\n";
$email_headers .= "Return-Path: " . $userdata['board_email'] . "\n";
$email_headers .= "X-AntiAbuse: Board servername - " . $server_name . "\n";
$email_headers .= "X-AntiAbuse: User_id - " . $userdata['user_id'] . "\n";
$email_headers .= "X-AntiAbuse: Username - " . $userdata['username'] . "\n";
$email_headers .= "X-AntiAbuse: User IP - " . decode_ip($user_ip) . "\r\n";
$emailer->use_template("admin_send_email");
$emailer->email_address($board_config['board_email']);
$emailer->set_subject($subject);
$emailer->extra_headers($email_headers);
$emailer->assign_vars(array(
"SITENAME" => $board_config['sitename'],
"BOARD_EMAIL" => $board_config['board_email'],
"MESSAGE" => $message)
);
$emailer->send();
$emailer->reset();
$message = $lang['Email_sent'] . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
}
//
// Initial selection
//
$sql = "SELECT group_id, group_name
FROM ".GROUPS_TABLE . "
WHERE group_single_user <> 1";
$g_result = $db->sql_query($sql);
$group_list = $db->sql_fetchrowset($g_result);
$select_list = '<select name = "' . POST_GROUPS_URL . '">';
$select_list .= '<option value = "-1">' . $lang['All_users'] . '</option>';
for($i = 0;$i < count($group_list); $i++)
{
$select_list .= "<option value = \"" . $group_list[$i]['group_id'];
$select_list .= "\">" . $group_list[$i]['group_name'] . "</option>";
}
$select_list .= "</select>";
//
// Generate page
//
include('page_header_admin.'.$phpEx);
$template->set_filenames(array(
"body" => "admin/user_email_body.tpl")
);
$template->assign_vars(array(
"MESSAGE" => $message,
"SUBJECT" => $subject,
"L_EMAIL_TITLE" => $lang['Email'],
"L_EMAIL_EXPLAIN" => $lang['Mass_email_explain'],
"L_COMPOSE" => $lang['Compose'],
"L_RECIPIENTS" => $lang['Recipients'],
"L_EMAIL_SUBJECT" => $lang['Subject'],
"L_EMAIL_MSG" => $lang['Message'],
"L_EMAIL" => $lang['Email'],
"L_NOTICE" => $notice,
"S_USER_ACTION" => append_sid('admin_mass_email.'.$phpEx),
"S_GROUP_SELECT" => $select_list)
);
$template->pparse('body');
include('page_footer_admin.'.$phpEx);
?>

View File

@@ -1,365 +0,0 @@
<?php
/***************************************************************************
* admin_ranks.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['Users']['Ranks'] = "$file";
return;
}
//
// Let's set the root dir for phpBB
//
$phpbb_root_path = "../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ($HTTP_GET_VARS['mode']) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
}
else
{
//
// These could be entered via a form button
//
if( isset($HTTP_POST_VARS['add']) )
{
$mode = "add";
}
else if( isset($HTTP_POST_VARS['save']) )
{
$mode = "save";
}
else
{
$mode = "";
}
}
if( $mode != "" )
{
if( $mode == "edit" || $mode == "add" )
{
//
// They want to add a new rank, show the form.
//
$rank_id = ( isset($HTTP_GET_VARS['id']) ) ? intval($HTTP_GET_VARS['id']) : 0;
$s_hidden_fields = "";
if( $mode == "edit" )
{
if( empty($rank_id) )
{
message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);
}
$sql = "SELECT * FROM " . RANKS_TABLE . "
WHERE rank_id = $rank_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain rank data", "", __LINE__, __FILE__, $sql);
}
$rank_info = $db->sql_fetchrow($result);
$s_hidden_fields .= '<input type="hidden" name="id" value="' . $rank_id . '" />';
}
else
{
$rank_info['rank_special'] = 0;
}
$s_hidden_fields .= '<input type="hidden" name="mode" value="save" />';
$rank_is_special = ( $rank_info['rank_special'] ) ? "checked=\"checked\"" : "";
$rank_is_not_special = ( !$rank_info['rank_special'] ) ? "checked=\"checked\"" : "";
$template->set_filenames(array(
"body" => "admin/ranks_edit_body.tpl")
);
$template->assign_vars(array(
"RANK" => $rank_info['rank_title'],
"SPECIAL_RANK" => $rank_is_special,
"NOT_SPECIAL_RANK" => $rank_is_not_special,
"MINIMUM" => ( $rank_is_special ) ? "" : $rank_info['rank_min'],
"IMAGE" => ( $rank_info['rank_image'] != "" ) ? $rank_info['rank_image'] : "",
"IMAGE_DISPLAY" => ( $rank_info['rank_image'] != "" ) ? '<img src="../' . $rank_info['rank_image'] . '" />' : "",
"L_RANKS_TITLE" => $lang['Ranks_title'],
"L_RANKS_TEXT" => $lang['Ranks_explain'],
"L_RANK_TITLE" => $lang['Rank_title'],
"L_RANK_SPECIAL" => $lang['Rank_special'],
"L_RANK_MINIMUM" => $lang['Rank_minimum'],
"L_RANK_IMAGE" => $lang['Rank_image'],
"L_RANK_IMAGE_EXPLAIN" => $lang['Rank_image_explain'],
"L_SUBMIT" => $lang['Submit'],
"L_RESET" => $lang['Reset'],
"L_YES" => $lang['Yes'],
"L_NO" => $lang['No'],
"S_RANK_ACTION" => append_sid("admin_ranks.$phpEx"),
"S_HIDDEN_FIELDS" => $s_hidden_fields)
);
}
else if( $mode == "save" )
{
//
// Ok, they sent us our info, let's update it.
//
$rank_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : 0;
$rank_title = ( isset($HTTP_POST_VARS['title']) ) ? trim($HTTP_POST_VARS['title']) : "";
$special_rank = ( $HTTP_POST_VARS['special_rank'] == 1 ) ? TRUE : 0;
$min_posts = ( isset($HTTP_POST_VARS['min_posts']) ) ? intval($HTTP_POST_VARS['min_posts']) : -1;
$rank_image = ( (isset($HTTP_POST_VARS['rank_image'])) ) ? trim($HTTP_POST_VARS['rank_image']) : "";
if( $rank_title == "" )
{
message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);
}
if( $special_rank == 1 )
{
$max_posts = -1;
$min_posts = -1;
}
//
// The rank image has to be a jpg, gif or png
//
if($rank_image != "")
{
if ( !preg_match("/(\.gif|\.png|\.jpg)$/is", $rank_image))
{
$rank_image = "";
}
}
if( $rank_id )
{
$sql = "UPDATE " . RANKS_TABLE . "
SET rank_title = '" . str_replace("\'", "''", $rank_title) . "', rank_special = $special_rank, rank_min = $min_posts, rank_image = '" . str_replace("\'", "''", $rank_image) . "'
WHERE rank_id = $rank_id";
$message = $lang['Rank_updated'];
}
else
{
$sql = "INSERT INTO " . RANKS_TABLE . " (rank_title, rank_special, rank_min, rank_image)
VALUES ('" . str_replace("\'", "''", $rank_title) . "', $special_rank, $min_posts, '" . str_replace("\'", "''", $rank_image) . "')";
$message = $lang['Rank_added'];
}
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update/insert into ranks table", "", __LINE__, __FILE__, $sql);
}
$message .= "<br /><br />" . sprintf($lang['Click_return_rankadmin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
else if( $mode == "delete" )
{
//
// Ok, they want to delete their rank
//
if( isset($HTTP_POST_VARS['id']) || isset($HTTP_GET_VARS['id']) )
{
$rank_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : intval($HTTP_GET_VARS['id']);
}
else
{
$rank_id = 0;
}
if( $rank_id )
{
$sql = "DELETE FROM " . RANKS_TABLE . "
WHERE rank_id = $rank_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete rank data", "", __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . USERS_TABLE . "
SET user_rank = 0
WHERE user_rank = $rank_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, $lang['No_update_ranks'], "", __LINE__, __FILE__, $sql);
}
$message = $lang['Rank_removed'] . "<br /><br />" . sprintf($lang['Click_return_rankadmin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
else
{
message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);
}
}
else
{
//
// They didn't feel like giving us any information. Oh, too bad, we'll just display the
// list then...
//
$template->set_filenames(array(
"body" => "admin/ranks_list_body.tpl")
);
$sql = "SELECT * FROM " . RANKS_TABLE . "
ORDER BY rank_min, rank_title";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain ranks data", "", __LINE__, __FILE__, $sql);
}
$rank_rows = $db->sql_fetchrowset($result);
$rank_count = count($rank_rows);
$template->assign_vars(array(
"L_RANKS_TITLE" => $lang['Ranks_title'],
"L_RANKS_TEXT" => $lang['Ranks_explain'],
"L_RANK" => $lang['Rank'],
"L_RANK_MINIMUM" => $lang['Rank_minimum'],
"L_SPECIAL_RANK" => $lang['Special_rank'],
"L_EDIT" => $lang['Edit'],
"L_DELETE" => $lang['Delete'],
"L_ADD_RANK" => $lang['Add_new_rank'],
"L_ACTION" => $lang['Action'],
"S_RANKS_ACTION" => append_sid("admin_ranks.$phpEx"))
);
for( $i = 0; $i < $rank_count; $i++)
{
$rank = $rank_rows[$i]['rank_title'];
$special_rank = $rank_rows[$i]['rank_special'];
$rank_id = $rank_rows[$i]['rank_id'];
$rank_min = $rank_rows[$i]['rank_min'];
if($special_rank)
{
$rank_min = $rank_max = "-";
}
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars("ranks", array(
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"RANK" => $rank,
"RANK_MIN" => $rank_min,
"SPECIAL_RANK" => ( $special_rank == 1 ) ? $lang['Yes'] : $lang['No'],
"U_RANK_EDIT" => append_sid("admin_ranks.$phpEx?mode=edit&amp;id=$rank_id"),
"U_RANK_DELETE" => append_sid("admin_ranks.$phpEx?mode=delete&amp;id=$rank_id"))
);
}
}
}
else
{
//
// Show the default page
//
$template->set_filenames(array(
"body" => "admin/ranks_list_body.tpl")
);
$sql = "SELECT * FROM " . RANKS_TABLE . "
ORDER BY rank_min ASC, rank_special ASC";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain ranks data", "", __LINE__, __FILE__, $sql);
}
$rank_count = $db->sql_numrows($result);
$rank_rows = $db->sql_fetchrowset($result);
$template->assign_vars(array(
"L_RANKS_TITLE" => $lang['Ranks_title'],
"L_RANKS_TEXT" => $lang['Ranks_explain'],
"L_RANK" => $lang['Rank_title'],
"L_RANK_MINIMUM" => $lang['Rank_minimum'],
"L_SPECIAL_RANK" => $lang['Rank_special'],
"L_EDIT" => $lang['Edit'],
"L_DELETE" => $lang['Delete'],
"L_ADD_RANK" => $lang['Add_new_rank'],
"L_ACTION" => $lang['Action'],
"S_RANKS_ACTION" => append_sid("admin_ranks.$phpEx"))
);
for($i = 0; $i < $rank_count; $i++)
{
$rank = $rank_rows[$i]['rank_title'];
$special_rank = $rank_rows[$i]['rank_special'];
$rank_id = $rank_rows[$i]['rank_id'];
$rank_min = $rank_rows[$i]['rank_min'];
if( $special_rank == 1 )
{
$rank_min = $rank_max = "-";
}
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$rank_is_special = ( $special_rank ) ? $lang['Yes'] : $lang['No'];
$template->assign_block_vars("ranks", array(
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"RANK" => $rank,
"SPECIAL_RANK" => $rank_is_special,
"RANK_MIN" => $rank_min,
"U_RANK_EDIT" => append_sid("admin_ranks.$phpEx?mode=edit&amp;id=$rank_id"),
"U_RANK_DELETE" => append_sid("admin_ranks.$phpEx?mode=delete&amp;id=$rank_id"))
);
}
}
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
?>

View File

@@ -1,541 +0,0 @@
<?php
/***************************************************************************
* admin_smilies.php
* -------------------
* begin : Thu May 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
****************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
/**************************************************************************
* This file will be used for modifying the smiley settings for a board.
**************************************************************************/
define('IN_PHPBB', 1);
//
// First we do the setmodules stuff for the admin cp.
//
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['General']['Smilies'] = $filename;
return;
}
//
// Load default header
//
if( isset($HTTP_GET_VARS['export_pack']) )
{
if ( $HTTP_GET_VARS['export_pack'] == "send" )
{
$no_page_header = true;
}
}
$phpbb_root_path = "../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
//
// Check to see what mode we should operate in.
//
if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
}
else
{
$mode = "";
}
$delimeter = '=+:';
//
// Read a listing of uploaded smilies for use in the add or edit smliey code...
//
$dir = @opendir($phpbb_root_path . $board_config['smilies_path']);
while($file = @readdir($dir))
{
if( !@is_dir($phpbb_root_path . $board_config['smilies_path'] . '/' . $file) )
{
$img_size = @getimagesize($phpbb_root_path . $board_config['smilies_path'] . '/' . $file);
if( $img_size[0] && $img_size[1] )
{
$smiley_images[] = $file;
}
else if( eregi('.pak$', $file) )
{
$smiley_paks[] = $file;
}
}
}
@closedir($dir);
//
// Select main mode
//
if( isset($HTTP_GET_VARS['import_pack']) || isset($HTTP_POST_VARS['import_pack']) )
{
//
// Import a list a "Smiley Pack"
//
$smile_pak = ( isset($HTTP_POST_VARS['smile_pak']) ) ? $HTTP_POST_VARS['smile_pak'] : $HTTP_GET_VARS['smile_pak'];
$clear_current = ( isset($HTTP_POST_VARS['clear_current']) ) ? $HTTP_POST_VARS['clear_current'] : $HTTP_GET_VARS['clear_current'];
$replace_existing = ( isset($HTTP_POST_VARS['replace']) ) ? $HTTP_POST_VARS['replace'] : $HTTP_GET_VARS['replace'];
if ( !empty($smile_pak) )
{
//
// The user has already selected a smile_pak file.. Import it.
//
if( !empty($clear_current) )
{
$sql = "DELETE
FROM " . SMILIES_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete current smilies", "", __LINE__, __FILE__, $sql);
}
}
else
{
$sql = "SELECT code
FROM ". SMILIES_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get current smilies", "", __LINE__, __FILE__, $sql);
}
$cur_smilies = $db->sql_fetchrowset($result);
for( $i = 0; $i < count($cur_smilies); $i++ )
{
$k = $cur_smilies[$i]['code'];
$smiles[$k] = 1;
}
}
$fcontents = @file($phpbb_root_path . $board_config['smilies_path'] . '/'. $smile_pak);
if( empty($fcontents) )
{
message_die(GENERAL_ERROR, "Couldn't read smiley pak file", "", __LINE__, __FILE__, $sql);
}
for( $i = 0; $i < count($fcontents); $i++ )
{
$smile_data = explode($delimeter, trim(addslashes($fcontents[$i])));
for( $j = 2; $j < count($smile_data); $j++)
{
//
// Replace > and < with the proper html_entities for matching.
//
$smile_data[$j] = str_replace("<", "&lt;", $smile_data[$j]);
$smile_data[$j] = str_replace(">", "&gt;", $smile_data[$j]);
$k = $smile_data[$j];
if( $smiles[$k] == 1 )
{
if( !empty($replace_existing) )
{
$sql = "UPDATE " . SMILIES_TABLE . "
SET smile_url = '" . str_replace("\'", "''", $smile_data[0]) . "', emoticon = '" . str_replace("\'", "''", $smile_data[1]) . "'
WHERE code = '" . str_replace("\'", "''", $smile_data[$j]) . "'";
}
else
{
$sql = '';
}
}
else
{
$sql = "INSERT INTO " . SMILIES_TABLE . " (code, smile_url, emoticon)
VALUES('" . str_replace("\'", "''", $smile_data[$j]) . "', '" . str_replace("\'", "''", $smile_data[0]) . "', '" . str_replace("\'", "''", $smile_data[1]) . "')";
}
if( $sql != '' )
{
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't update smilies!", "", __LINE__, __FILE__, $sql);
}
}
}
}
$message = $lang['smiley_import_success'] . "<br /><br />" . sprintf($lang['Click_return_smileadmin'], "<a href=\"" . append_sid("admin_smilies.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
else
{
//
// Display the script to get the smile_pak cfg file...
//
$smile_paks_select = "<select name='smile_pak'><option value=''>" . $lang['Select_pak'] . "</option>";
while( list($key, $value) = @each($smiley_paks) )
{
if ( !empty($value) )
{
$smile_paks_select .= "<option>" . $value . "</option>";
}
}
$smile_paks_select .= "</select>";
$hidden_vars = "<input type='hidden' name='mode' value='import'>";
$template->set_filenames(array(
"body" => "admin/smile_import_body.tpl")
);
$template->assign_vars(array(
"L_SMILEY_TITLE" => $lang['smiley_title'],
"L_SMILEY_EXPLAIN" => $lang['smiley_import_inst'],
"L_SMILEY_IMPORT" => $lang['smiley_import'],
"L_SELECT_LBL" => $lang['choose_smile_pak'],
"L_IMPORT" => $lang['import'],
"L_CONFLICTS" => $lang['smile_conflicts'],
"L_DEL_EXISTING" => $lang['del_existing_smileys'],
"L_REPLACE_EXISTING" => $lang['replace_existing'],
"L_KEEP_EXISTING" => $lang['keep_existing'],
"S_SMILEY_ACTION" => append_sid("admin_smilies.$phpEx"),
"S_SMILE_SELECT" => $smile_paks_select,
"S_HIDDEN_FIELDS" => $hidden_vars)
);
$template->pparse("body");
}
}
else if( isset($HTTP_POST_VARS['export_pack']) || isset($HTTP_GET_VARS['export_pack']) )
{
//
// Export our smiley config as a smiley pak...
//
if ( $HTTP_GET_VARS['export_pack'] == "send" )
{
$sql = "SELECT *
FROM " . SMILIES_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete smiley", "", __LINE__, __FILE__, $sql);
}
$resultset = $db->sql_fetchrowset($result);
$smile_pak = "";
for($i = 0; $i < count($resultset); $i++ )
{
$smile_pak .= $resultset[$i]['smile_url'] . $delimeter;
$smile_pak .= $resultset[$i]['emoticon'] . $delimeter;
$smile_pak .= $resultset[$i]['code'] . "\n";
}
header("Content-Type: text/x-delimtext; name=\"smiles.pak\"");
header("Content-disposition: attachment; filename=smiles.pak");
echo $smile_pak;
exit;
}
$message = sprintf($lang['export_smiles'], "<a href=\"" . append_sid("admin_smilies.$phpEx?export_pack=send", true) . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_smileadmin'], "<a href=\"" . append_sid("admin_smilies.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
else if( isset($HTTP_POST_VARS['add']) )
{
//
// Admin has selected to add a smiley.
//
$template->set_filenames(array(
"body" => "admin/smile_edit_body.tpl")
);
$filename_list = "";
for( $i = 0; $i < count($smiley_images); $i++ )
{
$filename_list .= '<option value="' . $smiley_images[$i] . '">' . $smiley_images[$i] . '</option>';
}
$s_hidden_fields = '<input type="hidden" name="mode" value="savenew" />';
$template->assign_vars(array(
"L_SMILEY_TITLE" => $lang['smiley_title'],
"L_SMILEY_CONFIG" => $lang['smiley_config'],
"L_SMILEY_EXPLAIN" => $lang['smiley_instr'],
"L_SMILEY_CODE" => $lang['smiley_code'],
"L_SMILEY_URL" => $lang['smiley_url'],
"L_SMILEY_EMOTION" => $lang['smiley_emot'],
"L_SUBMIT" => $lang['Submit'],
"L_RESET" => $lang['Reset'],
"SMILEY_IMG" => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smiley_images[0],
"S_SMILEY_ACTION" => append_sid("admin_smilies.$phpEx"),
"S_HIDDEN_FIELDS" => $s_hidden_fields,
"S_FILENAME_OPTIONS" => $filename_list,
"S_SMILEY_BASEDIR" => $phpbb_root_path . $board_config['smilies_path'])
);
$template->pparse("body");
}
else if ( $mode != "" )
{
switch( $mode )
{
case 'delete':
//
// Admin has selected to delete a smiley.
//
$smiley_id = ( !empty($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id'];
$sql = "DELETE FROM " . SMILIES_TABLE . "
WHERE smilies_id = " . $smiley_id;
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't delete smiley", "", __LINE__, __FILE__, $sql);
}
$message = $lang['smiley_del_success'] . "<br /><br />" . sprintf($lang['Click_return_smileadmin'], "<a href=\"" . append_sid("admin_smilies.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
break;
case 'edit':
//
// Admin has selected to edit a smiley.
//
$smiley_id = ( !empty($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id'];
$sql = "SELECT *
FROM " . SMILIES_TABLE . "
WHERE smilies_id = " . $smiley_id;
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, $lang['smile_edit_err'], "", __LINE__, __FILE__, $sql);
}
$smile_data = $db->sql_fetchrow($result);
$filename_list = "";
for( $i = 0; $i < count($smiley_images); $i++ )
{
if( $smiley_images[$i] == $smile_data['smile_url'] )
{
$smiley_selected = "selected=\"selected\"";
$smiley_edit_img = $smiley_images[$i];
}
else
{
$smiley_selected = "";
}
$filename_list .= '<option value="' . $smiley_images[$i] . '"' . $smiley_selected . '>' . $smiley_images[$i] . '</option>';
}
$template->set_filenames(array(
"body" => "admin/smile_edit_body.tpl")
);
$s_hidden_fields = '<input type="hidden" name="mode" value="save" /><input type="hidden" name="smile_id" value="' . $smile_data['smilies_id'] . '" />';
$template->assign_vars(array(
"SMILEY_CODE" => $smile_data['code'],
"SMILEY_EMOTICON" => $smile_data['emoticon'],
"L_SMILEY_TITLE" => $lang['smiley_title'],
"L_SMILEY_CONFIG" => $lang['smiley_config'],
"L_SMILEY_EXPLAIN" => $lang['smile_desc'],
"L_SMILEY_CODE" => $lang['smiley_code'],
"L_SMILEY_URL" => $lang['smiley_url'],
"L_SMILEY_EMOTION" => $lang['smiley_emot'],
"L_SUBMIT" => $lang['Submit'],
"L_RESET" => $lang['Reset'],
"SMILEY_IMG" => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smiley_edit_img,
"S_SMILEY_ACTION" => append_sid("admin_smilies.$phpEx"),
"S_HIDDEN_FIELDS" => $s_hidden_fields,
"S_FILENAME_OPTIONS" => $filename_list,
"S_SMILEY_BASEDIR" => $phpbb_root_path . $board_config['smilies_path'])
);
$template->pparse("body");
break;
case "save":
//
// Admin has submitted changes while editing a smiley.
//
//
// Get the submitted data, being careful to ensure that we only
// accept the data we are looking for.
//
$smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? $HTTP_POST_VARS['smile_code'] : $HTTP_GET_VARS['smile_code'];
$smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url'];
$smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion'];
$smile_id = ( isset($HTTP_POST_VARS['smile_id']) ) ? intval($HTTP_POST_VARS['smile_id']) : intval($HTTP_GET_VARS['smile_id']);
//
// Convert < and > to proper htmlentities for parsing.
//
$smile_code = str_replace('<', '&lt;', $smile_code);
$smile_code = str_replace('>', '&gt;', $smile_code);
//
// Proceed with updating the smiley table.
//
$sql = "UPDATE " . SMILIES_TABLE . "
SET code = '" . str_replace("\'", "''", $smile_code) . "', smile_url = '" . str_replace("\'", "''", $smile_url) . "', emoticon = '" . str_replace("\'", "''", $smile_emotion) . "'
WHERE smilies_id = $smile_id";
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't update smilies info", "", __LINE__, __FILE__, $sql);
}
$message = $lang['smiley_edit_success'] . "<br /><br />" . sprintf($lang['Click_return_smileadmin'], "<a href=\"" . append_sid("admin_smilies.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
break;
case "savenew":
//
// Admin has submitted changes while adding a new smiley.
//
//
// Get the submitted data being careful to ensure the the data
// we recieve and process is only the data we are looking for.
//
$smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? $HTTP_POST_VARS['smile_code'] : $HTTP_GET_VARS['smile_code'];
$smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url'];
$smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion'];
//
// Convert < and > to proper htmlentities for parsing.
//
$smile_code = str_replace('<', '&lt;', $smile_code);
$smile_code = str_replace('>', '&gt;', $smile_code);
//
// Save the data to the smiley table.
//
$sql = "INSERT INTO " . SMILIES_TABLE . " (code, smile_url, emoticon)
VALUES ('" . str_replace("\'", "''", $smile_code) . "', '" . str_replace("\'", "''", $smile_url) . "', '" . str_replace("\'", "''", $smile_emotion) . "')";
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't insert new smiley", "", __LINE__, __FILE__, $sql);
}
$message = $lang['smiley_add_success'] . "<br /><br />" . sprintf($lang['Click_return_smileadmin'], "<a href=\"" . append_sid("admin_smilies.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
break;
}
}
else
{
//
// This is the main display of the page before the admin has selected
// any options.
//
$sql = "SELECT *
FROM " . SMILIES_TABLE;
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't obtain smileys from database", "", __LINE__, __FILE__, $sql);
}
$smilies = $db->sql_fetchrowset($result);
$template->set_filenames(array(
"body" => "admin/smile_list_body.tpl")
);
$template->assign_vars(array(
"L_ACTION" => $lang['Action'],
"L_SMILEY_TITLE" => $lang['smiley_title'],
"L_SMILEY_TEXT" => $lang['smile_desc'],
"L_DELETE" => $lang['Delete'],
"L_EDIT" => $lang['Edit'],
"L_SMILEY_ADD" => $lang['smile_add'],
"L_CODE" => $lang['Code'],
"L_EMOT" => $lang['Emotion'],
"L_SMILE" => $lang['Smile'],
"L_IMPORT_PACK" => $lang['import_smile_pack'],
"L_EXPORT_PACK" => $lang['export_smile_pack'],
"S_HIDDEN_FIELDS" => $s_hidden_fields,
"S_SMILEY_ACTION" => append_sid("admin_smilies.$phpEx"))
);
//
// Loop throuh the rows of smilies setting block vars for the template.
//
for($i = 0; $i < count($smilies); $i++)
{
//
// Replace htmlentites for < and > with actual character.
//
$smilies[$i]['code'] = str_replace('&lt;', '<', $smilies[$i]['code']);
$smilies[$i]['code'] = str_replace('&gt;', '>', $smilies[$i]['code']);
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars("smiles", array(
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"SMILEY_IMG" => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'],
"CODE" => $smilies[$i]['code'],
"EMOT" => $smilies[$i]['emoticon'],
"U_SMILEY_EDIT" => append_sid("admin_smilies.$phpEx?mode=edit&amp;id=" . $smilies[$i]['smilies_id']),
"U_SMILEY_DELETE" => append_sid("admin_smilies.$phpEx?mode=delete&amp;id=" . $smilies[$i]['smilies_id']))
);
}
//
// Spit out the page.
//
$template->pparse("body");
}
//
// Page Footer
//
include('page_footer_admin.'.$phpEx);
?>

View File

@@ -1,937 +0,0 @@
<?php
/***************************************************************************
* admin_styles.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['Styles']['Add_new'] = "$file?mode=addnew";
$module['Styles']['Create_new'] = "$file?mode=create";
$module['Styles']['Manage'] = "$file";
$module['Styles']['Export'] = "$file?mode=export";
return;
}
//
// Load default header
//
//
// Check if the user has cancled a confirmation message.
//
$phpbb_root_path = "../";
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE;
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE;
if( empty($HTTP_POST_VARS['send_file']) )
{
$no_page_header = ( $cancel ) ? TRUE : FALSE;
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
}
if( $cancel )
{
header("Location: " . append_sid("admin_styles.$phpEx"));
}
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
}
else
{
$mode = "";
}
switch( $mode )
{
case "addnew":
$install_to = ( isset($HTTP_GET_VARS['install_to']) ) ? urldecode($HTTP_GET_VARS['install_to']) : $HTTP_POST_VARS['install_to'];
$style_name = ( isset($HTTP_GET_VARS['style']) ) ? urldecode($HTTP_GET_VARS['style']) : $HTTP_POST_VARS['style'];
if( isset($install_to) )
{
include($phpbb_root_path. "templates/" . $install_to . "/theme_info.cfg");
$template_name = $$install_to;
$found = FALSE;
for($i = 0; $i < count($template_name) && !$found; $i++)
{
if( $template_name[$i]['style_name'] == $style_name )
{
while(list($key, $val) = each($template_name[$i]))
{
$db_fields[] = $key;
$db_values[] = str_replace("\'", "''" , $val);
}
}
}
$sql = "INSERT INTO " . THEMES_TABLE . " (";
for($i = 0; $i < count($db_fields); $i++)
{
$sql .= $db_fields[$i];
if($i != (count($db_fields) - 1))
{
$sql .= ", ";
}
}
$sql .= ") VALUES (";
for($i = 0; $i < count($db_values); $i++)
{
$sql .= "'" . $db_values[$i] . "'";
if($i != (count($db_values) - 1))
{
$sql .= ", ";
}
}
$sql .= ")";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not insert theme data!", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Theme_installed'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
else
{
$installable_themes = array();
if( $dir = @opendir($phpbb_root_path. "templates/") )
{
while( $sub_dir = @readdir($dir) )
{
if( !is_file($phpbb_root_path . 'templates/' .$sub_dir) && !is_link($phpbb_root_path . 'templates/' .$sub_dir) && $sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS" )
{
if( @file_exists($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg") )
{
include($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg");
for($i = 0; $i < count($$sub_dir); $i++)
{
$working_data = $$sub_dir;
$style_name = $working_data[$i]['style_name'];
$sql = "SELECT themes_id
FROM " . THEMES_TABLE . "
WHERE style_name = '" . str_replace("\'", "''", $style_name) . "'";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query themes table!", "", __LINE__, __FILE__, $sql);
}
if(!$db->sql_numrows($result))
{
$installable_themes[] = $working_data[$i];
}
}
}
}
}
$template->set_filenames(array(
"body" => "admin/styles_addnew_body.tpl")
);
$template->assign_vars(array(
"L_STYLES_TITLE" => $lang['Styles_admin'],
"L_STYLES_ADD_TEXT" => $lang['Styles_addnew_explain'],
"L_STYLE" => $lang['Style'],
"L_TEMPLATE" => $lang['Template'],
"L_INSTALL" => $lang['Install'],
"L_ACTION" => $lang['Action'])
);
for($i = 0; $i < count($installable_themes); $i++)
{
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars("styles", array(
"ROW_CLASS" => $row_class,
"ROW_COLOR" => "#" . $row_color,
"STYLE_NAME" => $installable_themes[$i]['style_name'],
"TEMPLATE_NAME" => $installable_themes[$i]['template_name'],
"U_STYLES_INSTALL" => append_sid("admin_styles.$phpEx?mode=addnew&amp;style=" . urlencode($installable_themes[$i]['style_name']) . "&amp;install_to=" . urlencode($installable_themes[$i]['template_name'])))
);
}
$template->pparse("body");
}
closedir($dir);
}
break;
case "create":
case "edit":
$submit = ( isset($HTTP_POST_VARS['submit']) ) ? TRUE : 0;
if( $submit )
{
//
// DAMN! Thats alot of data to validate...
//
$updated['style_name'] = $HTTP_POST_VARS['style_name'];
$updated['template_name'] = $HTTP_POST_VARS['template_name'];
$updated['head_stylesheet'] = $HTTP_POST_VARS['head_stylesheet'];
$updated['body_background'] = $HTTP_POST_VARS['body_background'];
$updated['body_bgcolor'] = $HTTP_POST_VARS['body_bgcolor'];
$updated['body_text'] = $HTTP_POST_VARS['body_text'];
$updated['body_link'] = $HTTP_POST_VARS['body_link'];
$updated['body_vlink'] = $HTTP_POST_VARS['body_vlink'];
$updated['body_alink'] = $HTTP_POST_VARS['body_alink'];
$updated['body_hlink'] = $HTTP_POST_VARS['body_hlink'];
$updated['tr_color1'] = $HTTP_POST_VARS['tr_color1'];
$updated_name['tr_color1_name'] = $HTTP_POST_VARS['tr_color1_name'];
$updated['tr_color2'] = $HTTP_POST_VARS['tr_color2'];
$updated_name['tr_color2_name'] = $HTTP_POST_VARS['tr_color2_name'];
$updated['tr_color3'] = $HTTP_POST_VARS['tr_color3'];
$updated_name['tr_color3_name'] = $HTTP_POST_VARS['tr_color3_name'];
$updated['tr_class1'] = $HTTP_POST_VARS['tr_class1'];
$updated_name['tr_class1_name'] = $HTTP_POST_VARS['tr_class1_name'];
$updated['tr_class2'] = $HTTP_POST_VARS['tr_class2'];
$updated_name['tr_class2_name'] = $HTTP_POST_VARS['tr_class2_name'];
$updated['tr_class3'] = $HTTP_POST_VARS['tr_class3'];
$updated_name['tr_class3_name'] = $HTTP_POST_VARS['tr_class3_name'];
$updated['th_color1'] = $HTTP_POST_VARS['th_color1'];
$updated_name['th_color1_name'] = $HTTP_POST_VARS['th_color1_name'];
$updated['th_color2'] = $HTTP_POST_VARS['th_color2'];
$updated_name['th_color2_name'] = $HTTP_POST_VARS['th_color2_name'];
$updated['th_color3'] = $HTTP_POST_VARS['th_color3'];
$updated_name['th_color3_name'] = $HTTP_POST_VARS['th_color3_name'];
$updated['th_class1'] = $HTTP_POST_VARS['th_class1'];
$updated_name['th_class1_name'] = $HTTP_POST_VARS['th_class1_name'];
$updated['th_class2'] = $HTTP_POST_VARS['th_class2'];
$updated_name['th_class2_name'] = $HTTP_POST_VARS['th_class2_name'];
$updated['th_class3'] = $HTTP_POST_VARS['th_class3'];
$updated_name['th_class3_name'] = $HTTP_POST_VARS['th_class3_name'];
$updated['td_color1'] = $HTTP_POST_VARS['td_color1'];
$updated_name['td_color1_name'] = $HTTP_POST_VARS['td_color1_name'];
$updated['td_color2'] = $HTTP_POST_VARS['td_color2'];
$updated_name['td_color2_name'] = $HTTP_POST_VARS['td_color2_name'];
$updated['td_color3'] = $HTTP_POST_VARS['td_color3'];
$updated_name['td_color3_name'] = $HTTP_POST_VARS['td_color3_name'];
$updated['td_class1'] = $HTTP_POST_VARS['td_class1'];
$updated_name['td_class1_name'] = $HTTP_POST_VARS['td_class1_name'];
$updated['td_class2'] = $HTTP_POST_VARS['td_class2'];
$updated_name['td_class2_name'] = $HTTP_POST_VARS['td_class2_name'];
$updated['td_class3'] = $HTTP_POST_VARS['td_class3'];
$updated_name['td_class3_name'] = $HTTP_POST_VARS['td_class3_name'];
$updated['fontface1'] = $HTTP_POST_VARS['fontface1'];
$updated_name['fontface1_name'] = $HTTP_POST_VARS['fontface1_name'];
$updated['fontface2'] = $HTTP_POST_VARS['fontface2'];
$updated_name['fontface2_name'] = $HTTP_POST_VARS['fontface2_name'];
$updated['fontface3'] = $HTTP_POST_VARS['fontface3'];
$updated_name['fontface3_name'] = $HTTP_POST_VARS['fontface3_name'];
$updated['fontsize1'] = intval($HTTP_POST_VARS['fontsize1']);
$updated_name['fontsize1_name'] = $HTTP_POST_VARS['fontsize1_name'];
$updated['fontsize2'] = intval($HTTP_POST_VARS['fontsize2']);
$updated_name['fontsize2_name'] = $HTTP_POST_VARS['fontsize2_name'];
$updated['fontsize3'] = intval($HTTP_POST_VARS['fontsize3']);
$updated_name['fontsize3_name'] = $HTTP_POST_VARS['fontsize3_name'];
$updated['fontcolor1'] = $HTTP_POST_VARS['fontcolor1'];
$updated_name['fontcolor1_name'] = $HTTP_POST_VARS['fontcolor1_name'];
$updated['fontcolor2'] = $HTTP_POST_VARS['fontcolor2'];
$updated_name['fontcolor2_name'] = $HTTP_POST_VARS['fontcolor2_name'];
$updated['fontcolor3'] = $HTTP_POST_VARS['fontcolor3'];
$updated_name['fontcolor3_name'] = $HTTP_POST_VARS['fontcolor3_name'];
$updated['span_class1'] = $HTTP_POST_VARS['span_class1'];
$updated_name['span_class1_name'] = $HTTP_POST_VARS['span_class1_name'];
$updated['span_class2'] = $HTTP_POST_VARS['span_class2'];
$updated_name['span_class2_name'] = $HTTP_POST_VARS['span_class2_name'];
$updated['span_class3'] = $HTTP_POST_VARS['span_class3'];
$updated_name['span_class3_name'] = $HTTP_POST_VARS['span_class3_name'];
$style_id = intval($HTTP_POST_VARS['style_id']);
//
// Wheeeew! Thank heavens for copy and paste and search and replace :D
//
if($mode == "edit")
{
$sql = "UPDATE " . THEMES_TABLE . " SET ";
$count = 0;
while(list($key, $val) = each($updated))
{
if($count != 0)
{
$sql .= ", ";
}
//
// I don't like this but it'll keep MSSQL from throwing
// an error and save me alot of typing
//
$sql .= ( stristr($key, "fontsize") ) ? "$key = $val" : "$key = '" . str_replace("\'", "''", $val) . "'";
$count++;
}
$sql .= " WHERE themes_id = $style_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not update themes table!", "", __LINE__, __FILE__, $sql);
}
//
// Check if there's a names table entry for this style
//
$sql = "SELECT themes_id
FROM " . THEMES_NAME_TABLE . "
WHERE themes_id = $style_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not get data from themes_name table", "", __LINE__, __FILE__, $sql);
}
if($db->sql_numrows($result) > 0)
{
$sql = "UPDATE " . THEMES_NAME_TABLE . "
SET ";
$count = 0;
while(list($key, $val) = each($updated_name))
{
if($count != 0)
{
$sql .= ", ";
}
$sql .= "$key = '$val'";
$count++;
}
$sql .= " WHERE themes_id = $style_id";
}
else
{
//
// Nope, no names entry so we create a new one.
//
$sql = "INSERT INTO " . THEMES_NAME_TABLE . " (themes_id, ";
while(list($key, $val) = each($updated_name))
{
$fields[] = $key;
$vals[] = str_replace("\'", "''", $val);
}
for($i = 0; $i < count($fields); $i++)
{
if($i > 0)
{
$sql .= ", ";
}
$sql .= $fields[$i];
}
$sql .= ") VALUES ($style_id, ";
for($i = 0; $i < count($vals); $i++)
{
if($i > 0)
{
$sql .= ", ";
}
$sql .= "'" . $vals[$i] . "'";
}
$sql .= ")";
}
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not update themes name table!", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Theme_updated'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
else
{
//
// First, check if we already have a style by this name
//
$sql = "SELECT themes_id
FROM " . THEMES_TABLE . "
WHERE style_name = '" . str_replace("\'", "''", $updated['style_name']) . "'";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query themes table", "", __LINE__, __FILE__, $sql);
}
if($db->sql_numrows($result))
{
message_die(GENERAL_ERROR, $lang['Style_exists'], $lang['Error']);
}
while(list($key, $val) = each($updated))
{
$field_names[] = $key;
if(stristr($key, "fontsize"))
{
$values[] = "$val";
}
else
{
$values[] = "'" . str_replace("\'", "''", $val) . "'";
}
}
$sql = "INSERT
INTO " . THEMES_TABLE . " (";
for($i = 0; $i < count($field_names); $i++)
{
if($i != 0)
{
$sql .= ", ";
}
$sql .= $field_names[$i];
}
$sql .= ") VALUES (";
for($i = 0; $i < count($values); $i++)
{
if($i != 0)
{
$sql .= ", ";
}
$sql .= $values[$i];
}
$sql .= ")";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not update themes table!", "", __LINE__, __FILE__, $sql);
}
$style_id = $db->sql_nextid();
//
// Insert names data
//
$sql = "INSERT INTO " . THEMES_NAME_TABLE . " (themes_id, ";
while(list($key, $val) = each($updated_name))
{
$fields[] = $key;
$vals[] = $val;
}
for($i = 0; $i < count($fields); $i++)
{
if($i > 0)
{
$sql .= ", ";
}
$sql .= $fields[$i];
}
$sql .= ") VALUES ($style_id, ";
for($i = 0; $i < count($vals); $i++)
{
if($i > 0)
{
$sql .= ", ";
}
$sql .= "'" . $vals[$i] . "'";
}
$sql .= ")";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not insert themes name table!", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Theme_created'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
}
else
{
if($mode == "edit")
{
$themes_title = $lang['Edit_theme'];
$themes_explain = $lang['Edit_theme_explain'];
$style_id = $HTTP_GET_VARS['style_id'];
$selected_names = array();
$selected_values = array();
//
// Fetch the Theme Info from the db
//
$sql = "SELECT *
FROM " . THEMES_TABLE . "
WHERE themes_id = $style_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not get data from themes table", "", __LINE__, __FILE__, $sql);
}
if ( $selected_values = $db->sql_fetchrow($result) )
{
while(list($key, $val) = @each($selected_values))
{
$selected[$key] = $val;
}
}
//
// Fetch the Themes Name data
//
$sql = "SELECT *
FROM " . THEMES_NAME_TABLE . "
WHERE themes_id = $style_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not get data from themes name table", "", __LINE__, __FILE__, $sql);
}
if ( $selected_names = $db->sql_fetchrow($result) )
{
while(list($key, $val) = @each($selected_names))
{
$selected[$key] = $val;
}
}
$s_hidden_fields = '<input type="hidden" name="style_id" value="' . $style_id . '" />';
}
else
{
$themes_title = $lang['Create_theme'];
$themes_explain = $lang['Create_theme_explain'];
}
$template->set_filenames(array(
"body" => "admin/styles_edit_body.tpl")
);
if( $dir = @opendir($phpbb_root_path . 'templates/') )
{
$s_template_select = '<select name="template_name">';
while( $file = @readdir($dir) )
{
if( !is_file($phpbb_root_path . 'templates/' . $file) && !is_link($phpbb_root_path . 'templates/' . $file) && $file != "." && $file != ".." && $file != "CVS" )
{
if($file == $selected['template_name'])
{
$s_template_select .= '<option value="' . $file . '" selected="selected">' . $file . "</option>\n";
}
else
{
$s_template_select .= '<option value="' . $file . '">' . $file . "</option>\n";
}
}
}
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_template_dir']);
}
$s_hidden_fields .= '<input type="hidden" name="mode" value="' . $mode . '" />';
$template->assign_vars(array(
"L_THEMES_TITLE" => $themes_title,
"L_THEMES_EXPLAIN" => $themes_explain,
"L_THEME_NAME" => $lang['Theme_name'],
"L_TEMPLATE" => $lang['Template'],
"L_THEME_SETTINGS" => $lang['Theme_settings'],
"L_THEME_ELEMENT" => $lang['Theme_element'],
"L_SIMPLE_NAME" => $lang['Simple_name'],
"L_VALUE" => $lang['Value'],
"L_STYLESHEET" => $lang['Stylesheet'],
"L_BACKGROUND_IMAGE" => $lang['Background_image'],
"L_BACKGROUND_COLOR" => $lang['Background_color'],
"L_BODY_TEXT_COLOR" => $lang['Text_color'],
"L_BODY_LINK_COLOR" => $lang['Link_color'],
"L_BODY_VLINK_COLOR" => $lang['VLink_color'],
"L_BODY_ALINK_COLOR" => $lang['ALink_color'],
"L_BODY_HLINK_COLOR" => $lang['HLink_color'],
"L_TR_COLOR1" => $lang['Tr_color1'],
"L_TR_COLOR2" => $lang['Tr_color2'],
"L_TR_COLOR3" => $lang['Tr_color3'],
"L_TR_CLASS1" => $lang['Tr_class1'],
"L_TR_CLASS2" => $lang['Tr_class2'],
"L_TR_CLASS3" => $lang['Tr_class3'],
"L_TH_COLOR1" => $lang['Th_color1'],
"L_TH_COLOR2" => $lang['Th_color2'],
"L_TH_COLOR3" => $lang['Th_color3'],
"L_TH_CLASS1" => $lang['Th_class1'],
"L_TH_CLASS2" => $lang['Th_class2'],
"L_TH_CLASS3" => $lang['Th_class3'],
"L_TD_COLOR1" => $lang['Td_color1'],
"L_TD_COLOR2" => $lang['Td_color2'],
"L_TD_COLOR3" => $lang['Td_color3'],
"L_TD_CLASS1" => $lang['Td_class1'],
"L_TD_CLASS2" => $lang['Td_class2'],
"L_TD_CLASS3" => $lang['Td_class3'],
"L_FONTFACE_1" => $lang['fontface1'],
"L_FONTFACE_2" => $lang['fontface2'],
"L_FONTFACE_3" => $lang['fontface3'],
"L_FONTSIZE_1" => $lang['fontsize1'],
"L_FONTSIZE_2" => $lang['fontsize2'],
"L_FONTSIZE_3" => $lang['fontsize3'],
"L_FONTCOLOR_1" => $lang['fontcolor1'],
"L_FONTCOLOR_2" => $lang['fontcolor2'],
"L_FONTCOLOR_3" => $lang['fontcolor3'],
"L_SPAN_CLASS_1" => $lang['span_class1'],
"L_SPAN_CLASS_2" => $lang['span_class2'],
"L_SPAN_CLASS_3" => $lang['span_class3'],
"L_SAVE_SETTINGS" => $lang['Save_Settings'],
"THEME_NAME" => $selected['style_name'],
"HEAD_STYLESHEET" => $selected['head_stylesheet'],
"BODY_BACKGROUND" => $selected['body_background'],
"BODY_BGCOLOR" => $selected['body_bgcolor'],
"BODY_TEXT_COLOR" => $selected['body_text'],
"BODY_LINK_COLOR" => $selected['body_link'],
"BODY_VLINK_COLOR" => $selected['body_vlink'],
"BODY_ALINK_COLOR" => $selected['body_alink'],
"BODY_HLINK_COLOR" => $selected['body_hlink'],
"TR_COLOR1" => $selected['tr_color1'],
"TR_COLOR2" => $selected['tr_color2'],
"TR_COLOR3" => $selected['tr_color3'],
"TR_CLASS1" => $selected['tr_class1'],
"TR_CLASS2" => $selected['tr_class2'],
"TR_CLASS3" => $selected['tr_class3'],
"TH_COLOR1" => $selected['th_color1'],
"TH_COLOR2" => $selected['th_color2'],
"TH_COLOR3" => $selected['th_color3'],
"TH_CLASS1" => $selected['th_class1'],
"TH_CLASS2" => $selected['th_class2'],
"TH_CLASS3" => $selected['th_class3'],
"TD_COLOR1" => $selected['td_color1'],
"TD_COLOR2" => $selected['td_color2'],
"TD_COLOR3" => $selected['td_color3'],
"TD_CLASS1" => $selected['td_class1'],
"TD_CLASS2" => $selected['td_class2'],
"TD_CLASS3" => $selected['td_class3'],
"FONTFACE1" => $selected['fontface1'],
"FONTFACE2" => $selected['fontface2'],
"FONTFACE3" => $selected['fontface3'],
"FONTSIZE1" => $selected['fontsize1'],
"FONTSIZE2" => $selected['fontsize2'],
"FONTSIZE3" => $selected['fontsize3'],
"FONTCOLOR1" => $selected['fontcolor1'],
"FONTCOLOR2" => $selected['fontcolor2'],
"FONTCOLOR3" => $selected['fontcolor3'],
"SPAN_CLASS1" => $selected['span_class1'],
"SPAN_CLASS2" => $selected['span_class2'],
"SPAN_CLASS3" => $selected['span_class3'],
"TR_COLOR1_NAME" => $selected['tr_color1_name'],
"TR_COLOR2_NAME" => $selected['tr_color2_name'],
"TR_COLOR3_NAME" => $selected['tr_color3_name'],
"TR_CLASS1_NAME" => $selected['tr_class1_name'],
"TR_CLASS2_NAME" => $selected['tr_class2_name'],
"TR_CLASS3_NAME" => $selected['tr_class3_name'],
"TH_COLOR1_NAME" => $selected['th_color1_name'],
"TH_COLOR2_NAME" => $selected['th_color2_name'],
"TH_COLOR3_NAME" => $selected['th_color3_name'],
"TH_CLASS1_NAME" => $selected['th_class1_name'],
"TH_CLASS2_NAME" => $selected['th_class2_name'],
"TH_CLASS3_NAME" => $selected['th_class3_name'],
"TD_COLOR1_NAME" => $selected['td_color1_name'],
"TD_COLOR2_NAME" => $selected['td_color2_name'],
"TD_COLOR3_NAME" => $selected['td_color3_name'],
"TD_CLASS1_NAME" => $selected['td_class1_name'],
"TD_CLASS2_NAME" => $selected['td_class2_name'],
"TD_CLASS3_NAME" => $selected['td_class3_name'],
"FONTFACE1_NAME" => $selected['fontface1_name'],
"FONTFACE2_NAME" => $selected['fontface2_name'],
"FONTFACE3_NAME" => $selected['fontface3_name'],
"FONTSIZE1_NAME" => $selected['fontsize1_name'],
"FONTSIZE2_NAME" => $selected['fontsize2_name'],
"FONTSIZE3_NAME" => $selected['fontsize3_name'],
"FONTCOLOR1_NAME" => $selected['fontcolor1_name'],
"FONTCOLOR2_NAME" => $selected['fontcolor2_name'],
"FONTCOLOR3_NAME" => $selected['fontcolor3_name'],
"SPAN_CLASS1_NAME" => $selected['span_class1_name'],
"SPAN_CLASS2_NAME" => $selected['span_class2_name'],
"SPAN_CLASS3_NAME" => $selected['span_class3_name'],
"S_THEME_ACTION" => append_sid("admin_styles.$phpEx"),
"S_TEMPLATE_SELECT" => $s_template_select,
"S_HIDDEN_FIELDS" => $s_hidden_fields)
);
$template->pparse("body");
}
break;
case "export";
if($HTTP_POST_VARS['export_template'])
{
$template_name = $HTTP_POST_VARS['export_template'];
$sql = "SELECT *
FROM " . THEMES_TABLE . "
WHERE template_name = '$template_name'";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not get theme data for selected template", "", __LINE__, __FILE__, $sql);
}
$theme_rowset = $db->sql_fetchrowset($result);
if( count($theme_rowset) == 0 )
{
message_die(GENERAL_MESSAGE, $lang['No_themes']);
}
$theme_data = '<?php'."\n\n";
$theme_data .= "//\n// phpBB 2.x auto-generated theme config file for $template_name\n// Do not change anything in this file!\n//\n\n";
for($i = 0; $i < count($theme_rowset); $i++)
{
while(list($key, $val) = each($theme_rowset[$i]))
{
if(!intval($key) && $key != "0" && $key != "themes_id")
{
$theme_data .= '$' . $template_name . "[$i]['$key'] = \"" . addslashes($val) . "\";\n";
}
}
$theme_data .= "\n";
}
$theme_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused!
@umask(0111);
$fp = @fopen($phpbb_root_path . 'templates/' . $template_name . '/theme_info.cfg', 'w');
if( !$fp )
{
//
// Unable to open the file writeable do something here as an attempt
// to get around that...
//
$s_hidden_fields = '<input type="hidden" name="theme_info" value="' . htmlspecialchars($theme_data) . '" />';
$s_hidden_fields .= '<input type="hidden" name="send_file" value="1" /><input type="hidden" name="mode" value="export" />';
$download_form = '<form action="' . append_sid("admin_styles.$phpEx") . '" method="post"><input type="submit" name="submit" value="' . $lang['Download'] . '" />' . $s_hidden_fields;
$template->set_filenames(array(
"body" => "message_body.tpl")
);
$template->assign_vars(array(
"MESSAGE_TITLE" => $lang['Export_themes'],
"MESSAGE_TEXT" => $lang['Download_theme_cfg'] . "<br /><br />" . $download_form)
);
$template->pparse('body');
exit();
}
$result = @fputs($fp, $theme_data, strlen($theme_data));
fclose($fp);
$message = $lang['Theme_info_saved'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
else if($HTTP_POST_VARS['send_file'])
{
header("Content-Type: text/x-delimtext; name=\"theme_info.cfg\"");
header("Content-disposition: attachment; filename=theme_info.cfg");
echo stripslashes($HTTP_POST_VARS['theme_info']);
}
else
{
$template->set_filenames(array(
"body" => "admin/styles_exporter.tpl")
);
if( $dir = @opendir($phpbb_root_path . 'templates/') )
{
$s_template_select = '<select name="export_template">';
while( $file = @readdir($dir) )
{
if( !is_file($phpbb_root_path . 'templates/' . $file) && !is_link($phpbb_root_path . 'templates/' .$file) && $file != "." && $file != ".." && $file != "CVS" )
{
$s_template_select .= '<option value="' . $file . '">' . $file . "</option>\n";
}
}
$s_template_select .= '</select>';
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_template_dir']);
}
$template->assign_vars(array(
"L_STYLE_EXPORTER" => $lang['Export_themes'],
"L_EXPORTER_EXPLAIN" => $lang['Export_explain'],
"L_TEMPLATE_SELECT" => $lang['Select_template'],
"L_SUBMIT" => $lang['Submit'],
"S_EXPORTER_ACTION" => append_sid("admin_styles.$phpEx?mode=export"),
"S_TEMPLATE_SELECT" => $s_template_select)
);
$template->pparse("body");
}
break;
case "delete":
$style_id = ( isset($HTTP_GET_VARS['style_id']) ) ? intval($HTTP_GET_VARS['style_id']) : intval($HTTP_POST_VARS['style_id']);
if( !$confirm )
{
if($style_id == $board_config['default_style'])
{
message_die(GENERAL_MESSAGE, $lang['Cannot_remove_style']);
}
$hidden_fields = '<input type="hidden" name="mode" value="'.$mode.'" /><input type="hidden" name="style_id" value="'.$style_id.'" />';
//
// Set template files
//
$template->set_filenames(array(
"confirm" => "confirm_body.tpl")
);
$template->assign_vars(array(
"MESSAGE_TITLE" => $lang['Confirm'],
"MESSAGE_TEXT" => $lang['Confirm_delete_style'],
"L_YES" => $lang['Yes'],
"L_NO" => $lang['No'],
"S_CONFIRM_ACTION" => append_sid("admin_styles.$phpEx"),
"S_HIDDEN_FIELDS" => $hidden_fields)
);
$template->pparse("confirm");
}
else
{
//
// The user has confirmed the delete. Remove the style, the style element
// names and update any users who might be using this style
//
$sql = "DELETE FROM " . THEMES_TABLE . "
WHERE themes_id = $style_id";
if(!$result = $db->sql_query($sql, BEGIN_TRANSACTION))
{
message_die(GENERAL_ERROR, "Could not remove style data!", "", __LINE__, __FILE__, $sql);
}
//
// There may not be any theme name data so don't throw an error
// if the SQL dosan't work
//
$sql = "DELETE FROM " . THEMES_NAME_TABLE . "
WHERE themes_id = $style_id";
$db->sql_query($sql);
$sql = "UPDATE " . USERS_TABLE . "
SET user_style = " . $board_config['default_style'] . "
WHERE user_style = $style_id";
if(!$result = $db->sql_query($sql, END_TRANSACTION))
{
message_die(GENERAL_ERROR, "Could not update user style information", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Style_removed'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
break;
default:
$sql = "SELECT themes_id, template_name, style_name
FROM " . THEMES_TABLE . "
ORDER BY template_name";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not get style information!", "", __LINE__, __FILE__, $sql);
}
$style_rowset = $db->sql_fetchrowset($result);
$template->set_filenames(array(
"body" => "admin/styles_list_body.tpl")
);
$template->assign_vars(array(
"L_STYLES_TITLE" => $lang['Styles_admin'],
"L_STYLES_TEXT" => $lang['Styles_explain'],
"L_STYLE" => $lang['Style'],
"L_TEMPLATE" => $lang['Template'],
"L_EDIT" => $lang['Edit'],
"L_DELETE" => $lang['Delete'])
);
for($i = 0; $i < count($style_rowset); $i++)
{
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars("styles", array(
"ROW_CLASS" => $row_class,
"ROW_COLOR" => $row_color,
"STYLE_NAME" => $style_rowset[$i]['style_name'],
"TEMPLATE_NAME" => $style_rowset[$i]['template_name'],
"U_STYLES_EDIT" => append_sid("admin_styles.$phpEx?mode=edit&amp;style_id=" . $style_rowset[$i]['themes_id']),
"U_STYLES_DELETE" => append_sid("admin_styles.$phpEx?mode=delete&amp;style_id=" . $style_rowset[$i]['themes_id']))
);
}
$template->pparse("body");
break;
}
if( !$HTTP_POST_VARS['send_file'] )
{
include('page_footer_admin.'.$phpEx);
}
?>

View File

@@ -1,941 +0,0 @@
<?php
/***************************************************************************
* admin_ug_auth.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Users']['Permissions'] = $filename . "?mode=user";
$module['Groups']['Permissions'] = $filename . "?mode=group";
return;
}
//
// Load default header
//
$no_page_header = TRUE;
$phpbb_root_path = "../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
$params = array('mode' => 'mode', 'user_id' => POST_USERS_URL, 'group_id' => POST_GROUPS_URL, 'adv' => 'adv');
while( list($var, $param) = @each($params) )
{
if ( !empty($HTTP_POST_VARS[$param]) || !empty($HTTP_GET_VARS[$param]) )
{
$$var = ( !empty($HTTP_POST_VARS[$param]) ) ? $HTTP_POST_VARS[$param] : $HTTP_GET_VARS[$param];
}
else
{
$$var = "";
}
}
//
// Start program - define vars
//
$forum_auth_fields = array('auth_view', 'auth_read', 'auth_post', 'auth_reply', 'auth_edit', 'auth_delete', 'auth_sticky', 'auth_announce', 'auth_vote', 'auth_pollcreate');
$auth_field_match = array(
'auth_view' => AUTH_VIEW,
'auth_read' => AUTH_READ,
'auth_post' => AUTH_POST,
'auth_reply' => AUTH_REPLY,
'auth_edit' => AUTH_EDIT,
'auth_delete' => AUTH_DELETE,
'auth_sticky' => AUTH_STICKY,
'auth_announce' => AUTH_ANNOUNCE,
'auth_vote' => AUTH_VOTE,
'auth_pollcreate' => AUTH_POLLCREATE);
$field_names = array(
'auth_view' => $lang['View'],
'auth_read' => $lang['Read'],
'auth_post' => $lang['Post'],
'auth_reply' => $lang['Reply'],
'auth_edit' => $lang['Edit'],
'auth_delete' => $lang['Delete'],
'auth_sticky' => $lang['Sticky'],
'auth_announce' => $lang['Announce'],
'auth_vote' => $lang['Vote'],
'auth_pollcreate' => $lang['Pollcreate']);
// ---------------
// Start Functions
//
function check_auth($type, $key, $u_access, $is_admin)
{
$auth_user = 0;
if( count($u_access) )
{
for($j = 0; $j < count($u_access); $j++)
{
$result = 0;
switch($type)
{
case AUTH_ACL:
$result = $u_access[$j][$key];
case AUTH_MOD:
$result = $result || $u_access[$j]['auth_mod'];
case AUTH_ADMIN:
$result = $result || $is_admin;
break;
}
$auth_user = $auth_user || $result;
}
}
else
{
$auth_user = $is_admin;
}
return $auth_user;
}
//
// End Functions
// -------------
if ( isset($HTTP_POST_VARS['submit']) && ( ( $mode == 'user' && $user_id ) || ( $mode == 'group' && $group_id ) ) )
{
$user_level = '';
if ( $mode == 'user' )
{
//
// Get group_id for this user_id
//
$sql = "SELECT g.group_id, u.user_level
FROM " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u, " . GROUPS_TABLE . " g
WHERE u.user_id = $user_id
AND ug.user_id = u.user_id
AND g.group_id = ug.group_id
AND g.group_single_user = " . TRUE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select info from user/user_group table', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$group_id = $row['group_id'];
$user_level = $row['user_level'];
$db->sql_freeresult($result);
}
//
// Carry out requests
//
if ( $mode == 'user' && $HTTP_POST_VARS['userlevel'] == 'admin' && $user_level != ADMIN )
{
//
// Make user an admin (if already user)
//
if ( $userdata['user_id'] != $user_id )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . ADMIN . "
WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . AUTH_ACCESS_TABLE . "
WHERE group_id = $group_id
AND auth_mod = 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't delete auth access info", "", __LINE__, __FILE__, $sql);
}
//
// Delete any entries in auth_access, they are not required if user is becoming an
// admin
//
$sql = "UPDATE " . AUTH_ACCESS_TABLE . "
SET auth_view = 0, auth_read = 0, auth_post = 0, auth_reply = 0, auth_edit = 0, auth_delete = 0, auth_sticky = 0, auth_announce = 0
WHERE group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't update auth access", "", __LINE__, __FILE__, $sql);
}
}
$message = $lang['Auth_updated'] . '<br /><br />' . sprintf($lang['Click_return_userauth'], '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$mode") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
else
{
if ( $mode == 'user' && $HTTP_POST_VARS['userlevel'] == 'user' && $user_level == ADMIN )
{
//
// Make admin a user (if already admin) ... ignore if you're trying
// to change yourself from an admin to user!
//
if ( $userdata['user_id'] != $user_id )
{
$sql = "UPDATE " . AUTH_ACCESS_TABLE . "
SET auth_view = 0, auth_read = 0, auth_post = 0, auth_reply = 0, auth_edit = 0, auth_delete = 0, auth_sticky = 0, auth_announce = 0
WHERE group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update auth access', '', __LINE__, __FILE__, $sql);
}
//
// Update users level, reset to USER
//
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . USER . "
WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql);
}
}
$message = $lang['Auth_updated'] . '<br /><br />' . sprintf($lang['Click_return_userauth'], '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$mode") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');
}
else
{
$change_mod_list = ( isset($HTTP_POST_VARS['moderator']) ) ? $HTTP_POST_VARS['moderator'] : false;
if ( empty($adv) )
{
$change_acl_list = ( isset($HTTP_POST_VARS['private']) ) ? $HTTP_POST_VARS['private'] : false;
}
else
{
$change_acl_list = array();
for($j = 0; $j < count($forum_auth_fields); $j++)
{
$auth_field = $forum_auth_fields[$j];
while( list($forum_id, $value) = @each($HTTP_POST_VARS['private_' . $auth_field]) )
{
$change_acl_list[$forum_id][$auth_field] = $value;
}
}
}
$sql = "SELECT *
FROM " . FORUMS_TABLE . " f
ORDER BY forum_order";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain forum information", "", __LINE__, __FILE__, $sql);
}
$forum_access = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_access[] = $row;
}
$db->sql_freeresult($result);
$sql = ( $mode == 'user' ) ? "SELECT aa.* FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE. " g WHERE ug.user_id = $user_id AND g.group_id = ug.group_id AND aa.group_id = ug.group_id AND g.group_single_user = " . TRUE : "SELECT * FROM " . AUTH_ACCESS_TABLE . " WHERE group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain user/group permissions", "", __LINE__, __FILE__, $sql);
}
$auth_access = array();
while( $row = $db->sql_fetchrow($result) )
{
$auth_access[$row['forum_id']] = $row;
}
$db->sql_freeresult($result);
$forum_auth_action = array();
$update_acl_status = array();
$update_mod_status = array();
for($i = 0; $i < count($forum_access); $i++)
{
$forum_id = $forum_access[$i]['forum_id'];
if (
( isset($auth_access[$forum_id]['auth_mod']) && $change_mod_list[$forum_id]['auth_mod'] != $auth_access[$forum_id]['auth_mod'] ) ||
( !isset($auth_access[$forum_id]['auth_mod']) && !empty($change_mod_list[$forum_id]['auth_mod']) )
)
{
$update_mod_status[$forum_id] = $change_mod_list[$forum_id]['auth_mod'];
if ( !$update_mod_status[$forum_id] )
{
$forum_auth_action[$forum_id] = 'delete';
}
else if ( !isset($auth_access[$forum_id]['auth_mod']) )
{
$forum_auth_action[$forum_id] = 'insert';
}
else
{
$forum_auth_action[$forum_id] = 'update';
}
}
for($j = 0; $j < count($forum_auth_fields); $j++)
{
$auth_field = $forum_auth_fields[$j];
if( $forum_access[$i][$auth_field] == AUTH_ACL && isset($change_acl_list[$forum_id][$auth_field]) )
{
if ( ( empty($auth_access[$forum_id]['auth_mod']) &&
( isset($auth_access[$forum_id][$auth_field]) && $change_acl_list[$forum_id][$auth_field] != $auth_access[$forum_id][$auth_field] ) ||
( !isset($auth_access[$forum_id][$auth_field]) && !empty($change_acl_list[$forum_id][$auth_field]) ) ) ||
!empty($update_mod_status[$forum_id])
)
{
$update_acl_status[$forum_id][$auth_field] = ( !empty($update_mod_status[$forum_id]) ) ? 0 : $change_acl_list[$forum_id][$auth_field];
if ( isset($auth_access[$forum_id][$auth_field]) && empty($update_acl_status[$forum_id][$auth_field]) && $forum_auth_action[$forum_id] != 'insert' && $forum_auth_action[$forum_id] != 'update' )
{
$forum_auth_action[$forum_id] = 'delete';
}
else if ( !isset($auth_access[$forum_id][$auth_field]) && !( $forum_auth_action[$forum_id] == 'delete' && empty($update_acl_status[$forum_id][$auth_field]) ) )
{
$forum_auth_action[$forum_id] = 'insert';
}
else if ( isset($auth_access[$forum_id][$auth_field]) && !empty($update_acl_status[$forum_id][$auth_field]) )
{
$forum_auth_action[$forum_id] = 'update';
}
}
else if ( ( empty($auth_access[$forum_id]['auth_mod']) &&
( isset($auth_access[$forum_id][$auth_field]) && $change_acl_list[$forum_id][$auth_field] == $auth_access[$forum_id][$auth_field] ) ) && $forum_auth_action[$forum_id] == 'delete' )
{
$forum_auth_action[$forum_id] = 'update';
}
}
}
}
//
// Checks complete, make updates to DB
//
$delete_sql = '';
while( list($forum_id, $action) = @each($forum_auth_action) )
{
if ( $action == 'delete' )
{
$delete_sql .= ( ( $delete_sql != '' ) ? ', ' : '' ) . $forum_id;
}
else
{
if ( $action == 'insert' )
{
$sql_field = '';
$sql_value = '';
while ( list($auth_type, $value) = @each($update_acl_status[$forum_id]) )
{
$sql_field .= ( ( $sql_field != '' ) ? ', ' : '' ) . $auth_type;
$sql_value .= ( ( $sql_value != '' ) ? ', ' : '' ) . $value;
}
$sql_field .= ( ( $sql_field != '' ) ? ', ' : '' ) . 'auth_mod';
$sql_value .= ( ( $sql_value != '' ) ? ', ' : '' ) . ( ( !isset($update_mod_status[$forum_id]) ) ? 0 : $update_mod_status[$forum_id]);
$sql = "INSERT INTO " . AUTH_ACCESS_TABLE . " (forum_id, group_id, $sql_field)
VALUES ($forum_id, $group_id, $sql_value)";
}
else
{
$sql_values = '';
while ( list($auth_type, $value) = @each($update_acl_status[$forum_id]) )
{
$sql_values .= ( ( $sql_values != '' ) ? ', ' : '' ) . $auth_type . ' = ' . $value;
}
$sql_values .= ( ( $sql_values != '' ) ? ', ' : '' ) . 'auth_mod = ' . ( ( !isset($update_mod_status[$forum_id]) ) ? 0 : $update_mod_status[$forum_id]);
$sql = "UPDATE " . AUTH_ACCESS_TABLE . "
SET $sql_values
WHERE group_id = $group_id
AND forum_id = $forum_id";
}
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't update private forum permissions", "", __LINE__, __FILE__, $sql);
}
}
}
if ( $delete_sql != '' )
{
$sql = "DELETE FROM " . AUTH_ACCESS_TABLE . "
WHERE group_id = $group_id
AND forum_id IN ($delete_sql)";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't delete permission entries", "", __LINE__, __FILE__, $sql);
}
}
$l_auth_return = ( $mode == 'user' ) ? $lang['Click_return_userauth'] : $lang['Click_return_groupauth'];
$message = $lang['Auth_updated'] . '<br /><br />' . sprintf($l_auth_return, '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$mode") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');
}
//
// Update user level to mod for appropriate users
//
$sql = "SELECT u.user_id
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u
WHERE ug.group_id = aa.group_id
AND u.user_id = ug.user_id
AND u.user_level NOT IN (" . MOD . ", " . ADMIN . ")
GROUP BY u.user_id
HAVING SUM(aa.auth_mod) > 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain user/group permissions", "", __LINE__, __FILE__, $sql);
}
$set_mod = '';
while( $row = $db->sql_fetchrow($result) )
{
$set_mod .= ( ( $set_mod != '' ) ? ', ' : '' ) . $row['user_id'];
}
$db->sql_freeresult($result);
//
// Update user level to user for appropriate users
//
switch ( SQL_LAYER )
{
case 'postgresql':
$sql = "SELECT u.user_id
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa
WHERE ug.user_id = u.user_id
AND aa.group_id = ug.group_id
AND u.user_level NOT IN (" . USER . ", " . ADMIN . ")
GROUP BY u.user_id
HAVING SUM(aa.auth_mod) = 0
UNION (
SELECT u.user_id
FROM " . USERS_TABLE . " u
WHERE NOT EXISTS (
SELECT aa.auth_mod
FROM " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa
WHERE ug.user_id = u.user_id
AND aa.group_id = ug.group_id
)
AND u.user_level NOT IN (" . USER . ", " . ADMIN . ")
GROUP BY u.user_id
)";
break;
case 'oracle':
$sql = "SELECT u.user_id
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa
WHERE ug.user_id = u.user_id(+)
AND aa.group_id = ug.group_id(+)
AND u.user_level NOT IN (" . USER . ", " . ADMIN . ")
GROUP BY u.user_id
HAVING SUM(aa.auth_mod) = 0";
break;
default:
$sql = "SELECT u.user_id
FROM ( ( " . USERS_TABLE . " u
LEFT JOIN " . USER_GROUP_TABLE . " ug ON ug.user_id = u.user_id )
LEFT JOIN " . AUTH_ACCESS_TABLE . " aa ON aa.group_id = ug.group_id )
WHERE u.user_level NOT IN (" . USER . ", " . ADMIN . ")
GROUP BY u.user_id
HAVING SUM(aa.auth_mod) = 0";
break;
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain user/group permissions", "", __LINE__, __FILE__, $sql);
}
$unset_mod = "";
while( $row = $db->sql_fetchrow($result) )
{
$unset_mod .= ( ( $unset_mod != '' ) ? ', ' : '' ) . $row['user_id'];
}
$db->sql_freeresult($result);
if ( $set_mod != '' )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . MOD . "
WHERE user_id IN ($set_mod)";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't update user level", "", __LINE__, __FILE__, $sql);
}
}
if ( $unset_mod != '' )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . USER . "
WHERE user_id IN ($unset_mod)";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't update user level", "", __LINE__, __FILE__, $sql);
}
}
message_die(GENERAL_MESSAGE, $message);
}
}
else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id ) ) || ( $mode == 'group' && $group_id ) )
{
if ( isset($HTTP_POST_VARS['username']) )
{
$this_userdata = get_userdata($HTTP_POST_VARS['username']);
if ( !is_array($this_userdata) )
{
message_die(GENERAL_MESSAGE, $lang['No_such_user']);
}
$user_id = $this_userdata['user_id'];
}
//
// Front end
//
$sql = "SELECT *
FROM " . FORUMS_TABLE . " f
ORDER BY forum_order";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain forum information", "", __LINE__, __FILE__, $sql);
}
$forum_access = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_access[] = $row;
}
$db->sql_freeresult($result);
if( empty($adv) )
{
for($i = 0; $i < count($forum_access); $i++)
{
$forum_id = $forum_access[$i]['forum_id'];
$forum_auth_level[$forum_id] = AUTH_ALL;
for($j = 0; $j < count($forum_auth_fields); $j++)
{
$forum_access[$i][$forum_auth_fields[$j]] . ' :: ';
if ( $forum_access[$i][$forum_auth_fields[$j]] == AUTH_ACL )
{
$forum_auth_level[$forum_id] = AUTH_ACL;
$forum_auth_level_fields[$forum_id][] = $forum_auth_fields[$j];
}
}
}
}
$sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE ";
$sql .= ( $mode == 'user' ) ? "u.user_id = $user_id AND ug.user_id = u.user_id AND g.group_id = ug.group_id" : "g.group_id = $group_id AND ug.group_id = g.group_id AND u.user_id = ug.user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain user/group information", "", __LINE__, __FILE__, $sql);
}
$ug_info = array();
while( $row = $db->sql_fetchrow($result) )
{
$ug_info[] = $row;
}
$db->sql_freeresult($result);
$sql = ( $mode == 'user' ) ? "SELECT aa.*, g.group_single_user FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE. " g WHERE ug.user_id = $user_id AND g.group_id = ug.group_id AND aa.group_id = ug.group_id AND g.group_single_user = 1" : "SELECT * FROM " . AUTH_ACCESS_TABLE . " WHERE group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain user/group permissions", "", __LINE__, __FILE__, $sql);
}
$auth_access = array();
$auth_access_count = array();
while( $row = $db->sql_fetchrow($result) )
{
$auth_access[$row['forum_id']][] = $row;
$auth_access_count[$row['forum_id']]++;
}
$db->sql_freeresult($result);
$is_admin = ( $mode == 'user' ) ? ( ( $ug_info[0]['user_level'] == ADMIN && $ug_info[0]['user_id'] != ANONYMOUS ) ? 1 : 0 ) : 0;
for($i = 0; $i < count($forum_access); $i++)
{
$forum_id = $forum_access[$i]['forum_id'];
unset($prev_acl_setting);
for($j = 0; $j < count($forum_auth_fields); $j++)
{
$key = $forum_auth_fields[$j];
$value = $forum_access[$i][$key];
switch( $value )
{
case AUTH_ALL:
case AUTH_REG:
$auth_ug[$forum_id][$key] = 1;
break;
case AUTH_ACL:
$auth_ug[$forum_id][$key] = ( !empty($auth_access_count[$forum_id]) ) ? check_auth(AUTH_ACL, $key, $auth_access[$forum_id], $is_admin) : 0;
$auth_field_acl[$forum_id][$key] = $auth_ug[$forum_id][$key];
if ( isset($prev_acl_setting) )
{
if ( $prev_acl_setting != $auth_ug[$forum_id][$key] && empty($adv) )
{
$adv = 1;
}
}
$prev_acl_setting = $auth_ug[$forum_id][$key];
break;
case AUTH_MOD:
$auth_ug[$forum_id][$key] = ( !empty($auth_access_count[$forum_id]) ) ? check_auth(AUTH_MOD, $key, $auth_access[$forum_id], $is_admin) : 0;
break;
case AUTH_ADMIN:
$auth_ug[$forum_id][$key] = $is_admin;
break;
default:
$auth_ug[$forum_id][$key] = 0;
break;
}
}
//
// Is user a moderator?
//
$auth_ug[$forum_id]['auth_mod'] = ( !empty($auth_access_count[$forum_id]) ) ? check_auth(AUTH_MOD, 'auth_mod', $auth_access[$forum_id], 0) : 0;
}
$i = 0;
@reset($auth_ug);
while( list($forum_id, $user_ary) = @each($auth_ug) )
{
if ( empty($adv) )
{
if ( $forum_auth_level[$forum_id] == AUTH_ACL )
{
$allowed = 1;
for($j = 0; $j < count($forum_auth_level_fields[$forum_id]); $j++)
{
if ( !$auth_ug[$forum_id][$forum_auth_level_fields[$forum_id][$j]] )
{
$allowed = 0;
}
}
$optionlist_acl = '<select name="private[' . $forum_id . ']">';
if ( $is_admin || $user_ary['auth_mod'] )
{
$optionlist_acl .= '<option value="1">' . $lang['Allowed_Access'] . '</option>';
}
else if ( $allowed )
{
$optionlist_acl .= '<option value="1" selected="selected">' . $lang['Allowed_Access'] . '</option><option value="0">'. $lang['Disallowed_Access'] . '</option>';
}
else
{
$optionlist_acl .= '<option value="1">' . $lang['Allowed_Access'] . '</option><option value="0" selected="selected">' . $lang['Disallowed_Access'] . '</option>';
}
$optionlist_acl .= '</select>';
}
else
{
$optionlist_acl = '&nbsp;';
}
}
else
{
for($j = 0; $j < count($forum_access); $j++)
{
if ( $forum_access[$j]['forum_id'] == $forum_id )
{
for($k = 0; $k < count($forum_auth_fields); $k++)
{
$field_name = $forum_auth_fields[$k];
if( $forum_access[$j][$field_name] == AUTH_ACL )
{
$optionlist_acl_adv[$forum_id][$k] = '<select name="private_' . $field_name . '[' . $forum_id . ']">';
if( isset($auth_field_acl[$forum_id][$field_name]) && !($is_admin || $user_ary['auth_mod']) )
{
if( !$auth_field_acl[$forum_id][$field_name] )
{
$optionlist_acl_adv[$forum_id][$k] .= '<option value="1">' . $lang['ON'] . '</option><option value="0" selected="selected">' . $lang['OFF'] . '</option>';
}
else
{
$optionlist_acl_adv[$forum_id][$k] .= '<option value="1" selected="selected">' . $lang['ON'] . '</option><option value="0">' . $lang['OFF'] . '</option>';
}
}
else
{
if( $is_admin || $user_ary['auth_mod'] )
{
$optionlist_acl_adv[$forum_id][$k] .= '<option value="1">' . $lang['ON'] . '</option>';
}
else
{
$optionlist_acl_adv[$forum_id][$k] .= '<option value="1">' . $lang['ON'] . '</option><option value="0" selected="selected">' . $lang['OFF'] . '</option>';
}
}
$optionlist_acl_adv[$forum_id][$k] .= '</select>';
}
}
}
}
}
$optionlist_mod = '<select name="moderator[' . $forum_id . ']">';
$optionlist_mod .= ( $user_ary['auth_mod'] ) ? '<option value="1" selected="selected">' . $lang['Is_Moderator'] . '</option><option value="0">' . $lang['Not_Moderator'] . '</option>' : '<option value="1">' . $lang['Is_Moderator'] . '</option><option value="0" selected="selected">' . $lang['Not_Moderator'] . '</option>';
$optionlist_mod .= '</select>';
$row_class = ( !( $i % 2 ) ) ? 'row2' : 'row1';
$row_color = ( !( $i % 2 ) ) ? $theme['td_color1'] : $theme['td_color2'];
$template->assign_block_vars('forums', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FORUM_NAME' => $forum_access[$i]['forum_name'],
'U_FORUM_AUTH' => append_sid("admin_forumauth.$phpEx?f=" . $forum_access[$i]['forum_id']),
'S_MOD_SELECT' => $optionlist_mod)
);
if( !$adv )
{
$template->assign_block_vars('forums.aclvalues', array(
'S_ACL_SELECT' => $optionlist_acl)
);
}
else
{
for($j = 0; $j < count($forum_auth_fields); $j++)
{
$template->assign_block_vars('forums.aclvalues', array(
'S_ACL_SELECT' => $optionlist_acl_adv[$forum_id][$j])
);
}
}
$i++;
}
@reset($auth_user);
if ( $mode == 'user' )
{
$t_username = $ug_info[0]['username'];
$s_user_type = ( $is_admin ) ? '<select name="userlevel"><option value="admin" selected="selected">' . $lang['Auth_Admin'] . '</option><option value="user">' . $lang['Auth_User'] . '</option></select>' : '<select name="userlevel"><option value="admin">' . $lang['Auth_Admin'] . '</option><option value="user" selected="selected">' . $lang['Auth_User'] . '</option></select>';
}
else
{
$t_groupname = $ug_info[0]['group_name'];
}
$name = array();
$id = array();
for($i = 0; $i < count($ug_info); $i++)
{
if( ( $mode == 'user' && !$ug_info[$i]['group_single_user'] ) || $mode == 'group' )
{
$name[] = ( $mode == 'user' ) ? $ug_info[$i]['group_name'] : $ug_info[$i]['username'];
$id[] = ( $mode == 'user' ) ? intval($ug_info[$i]['group_id']) : intval($ug_info[$i]['user_id']);
}
}
if( count($name) )
{
$t_usergroup_list = '';
for($i = 0; $i < count($ug_info); $i++)
{
$t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$mode&amp;" . POST_GROUPS_URL . "=" . $id[$i]) . '">' . $name[$i] . '</a>';
}
}
else
{
$t_usergroup_list = $lang['None'];
}
$s_column_span = 2; // Two columns always present
if( !$adv )
{
$template->assign_block_vars('acltype', array(
'L_UG_ACL_TYPE' => $lang['Simple_Permission'])
);
$s_column_span++;
}
else
{
for($i = 0; $i < count($forum_auth_fields); $i++)
{
$cell_title = $field_names[$forum_auth_fields[$i]];
$template->assign_block_vars('acltype', array(
'L_UG_ACL_TYPE' => $cell_title)
);
$s_column_span++;
}
}
//
// Dump in the page header ...
//
include('page_header_admin.'.$phpEx);
$template->set_filenames(array(
"body" => 'admin/auth_ug_body.tpl')
);
$adv_switch = ( empty($adv) ) ? 1 : 0;
$u_ug_switch = ( $mode == 'user' ) ? POST_USERS_URL . "=" . $user_id : POST_GROUPS_URL . "=" . $group_id;
$switch_mode = append_sid("admin_ug_auth.$phpEx?mode=$mode&amp;" . $u_ug_switch . "&amp;adv=$adv_switch");
$switch_mode_text = ( empty($adv) ) ? $lang['Advanced_mode'] : $lang['Simple_mode'];
$u_switch_mode = '<a href="' . $switch_mode . '">' . $switch_mode_text . '</a>';
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="adv" value="' . $adv . '" />';
$s_hidden_fields .= ( $mode == 'user' ) ? '<input type="hidden" name="' . POST_USERS_URL . '" value="' . $user_id . '" />' : '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
if ( $mode == 'user' )
{
$template->assign_block_vars('switch_user_auth', array());
$template->assign_vars(array(
'USERNAME' => $t_username,
'USER_LEVEL' => $lang['User_Level'] . " : " . $s_user_type,
'USER_GROUP_MEMBERSHIPS' => $lang['Group_memberships'] . ' : ' . $t_usergroup_list)
);
}
else
{
$template->assign_block_vars("switch_group_auth", array());
$template->assign_vars(array(
'USERNAME' => $t_groupname,
'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list)
);
}
$template->assign_vars(array(
'L_USER_OR_GROUPNAME' => ( $mode == 'user' ) ? $lang['Username'] : $lang['Group_name'],
'L_USER_OR_GROUP' => ( $mode == 'user' ) ? $lang['User'] : $lang['Group'],
'L_AUTH_TITLE' => ( $mode == 'user' ) ? $lang['Auth_Control_User'] : $lang['Auth_Control_Group'],
'L_AUTH_EXPLAIN' => ( $mode == 'user' ) ? $lang['User_auth_explain'] : $lang['Group_auth_explain'],
'L_MODERATOR_STATUS' => $lang['Moderator_status'],
'L_PERMISSIONS' => $lang['Permissions'],
'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset'],
'U_USER_OR_GROUP' => append_sid("admin_ug_auth.$phpEx"),
'U_SWITCH_MODE' => $u_switch_mode,
'S_COLUMN_SPAN' => $s_column_span,
'S_AUTH_ACTION' => append_sid("admin_ug_auth.$phpEx"),
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
}
else
{
//
// Select a user/group
//
include('page_header_admin.'.$phpEx);
$template->set_filenames(array(
'body' => ( $mode == 'user' ) ? 'admin/user_select_body.tpl' : 'admin/auth_select_body.tpl')
);
if ( $mode == 'user' )
{
$template->assign_vars(array(
'L_FIND_USERNAME' => $lang['Find_username'],
'U_SEARCH_USER' => append_sid("../search.$phpEx?mode=searchuser"))
);
}
else
{
$sql = "SELECT group_id, group_name
FROM " . GROUPS_TABLE . "
WHERE group_single_user <> " . TRUE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't get group list", "", __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) )
{
$select_list = '<select name="' . POST_GROUPS_URL . '">';
do
{
$select_list .= '<option value="' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
}
while ( $row = $db->sql_fetchrow($result) );
$select_list .= '</select>';
}
$template->assign_vars(array(
'S_AUTH_SELECT' => $select_list)
);
}
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
$l_type = ( $mode == 'user' ) ? "USER" : "AUTH";
$template->assign_vars(array(
'L_' . $l_type . '_TITLE' => ( $mode == 'user' ) ? $lang['Auth_Control_User'] : $lang['Auth_Control_Group'],
'L_' . $l_type . '_EXPLAIN' => ( $mode == 'user' ) ? $lang['User_auth_explain'] : $lang['Group_auth_explain'],
'L_' . $l_type . '_SELECT' => ( $mode == 'user' ) ? $lang['Select_a_User'] : $lang['Select_a_Group'],
'L_LOOK_UP' => ( $mode == 'user' ) ? $lang['Look_up_User'] : $lang['Look_up_Group'],
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_' . $l_type . '_ACTION' => append_sid("admin_ug_auth.$phpEx"))
);
}
$template->pparse('body');
include('page_footer_admin.'.$phpEx);
?>

View File

@@ -1,485 +0,0 @@
<?php
/***************************************************************************
* admin_user_ban.php
* -------------------
* begin : Tuesday, Jul 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Users']['Ban_Management'] = $filename;
return;
}
//
// Load default header
//
$phpbb_root_path = "../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
//
// Start program
//
if( isset($HTTP_POST_VARS['submit']) )
{
$user_bansql = "";
$email_bansql = "";
$ip_bansql = "";
$user_list = array();
if( isset($HTTP_POST_VARS['ban_user']) )
{
$user_list_temp = $HTTP_POST_VARS['ban_user'];
for($i = 0; $i < count($user_list_temp); $i++)
{
$user_list[] = trim($user_list_temp[$i]);
}
}
$ip_list = array();
if( isset($HTTP_POST_VARS['ban_ip']) )
{
$ip_list_temp = explode(",", $HTTP_POST_VARS['ban_ip']);
for($i = 0; $i < count($ip_list_temp); $i++)
{
if( preg_match("/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})[ ]*\-[ ]*([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/", trim($ip_list_temp[$i]), $ip_range_explode) )
{
//
// Don't ask about all this, just don't ask ... !
//
$ip_1_counter = $ip_range_explode[1];
$ip_1_end = $ip_range_explode[5];
while($ip_1_counter <= $ip_1_end)
{
$ip_2_counter = ($ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[2] : 0;
$ip_2_end = ($ip_1_counter < $ip_1_end) ? 254 : $ip_range_explode[6];
if($ip_2_counter == 0 && $ip_2_end == 254)
{
$ip_2_counter = 255;
$ip_2_fragment = 255;
$ip_list[] = encode_ip("$ip_1_counter.255.255.255");
}
while($ip_2_counter <= $ip_2_end)
{
$ip_3_counter = ($ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[3] : 0;
$ip_3_end = ($ip_2_counter < $ip_2_end || $ip_1_counter < $ip_1_end) ? 254 : $ip_range_explode[7];
if($ip_3_counter == 0 && $ip_3_end == 254 )
{
$ip_3_counter = 255;
$ip_3_fragment = 255;
$ip_list[] = encode_ip("$ip_1_counter.$ip_2_counter.255.255");
}
while($ip_3_counter <= $ip_3_end)
{
$ip_4_counter = ($ip_3_counter == $ip_range_explode[3] && $ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[4] : 0;
$ip_4_end = ($ip_3_counter < $ip_3_end || $ip_2_counter < $ip_2_end) ? 254 : $ip_range_explode[8];
if($ip_4_counter == 0 && $ip_4_end == 254)
{
$ip_4_counter = 255;
$ip_4_fragment = 255;
$ip_list[] = encode_ip("$ip_1_counter.$ip_2_counter.$ip_3_counter.255");
}
while($ip_4_counter <= $ip_4_end)
{
$ip_list[] = encode_ip("$ip_1_counter.$ip_2_counter.$ip_3_counter.$ip_4_counter");
$ip_4_counter++;
}
$ip_3_counter++;
}
$ip_2_counter++;
}
$ip_1_counter++;
}
}
else if( preg_match("/^([\w\-_]\.?){2,}$/is", trim($ip_list_temp[$i])) )
{
$ip = gethostbynamel(trim($ip_list_temp[$i]));
for($j = 0; $j < count($ip); $j++)
{
if( !empty($ip[$j]) )
{
$ip_list[] = encode_ip($ip[$j]);
}
}
}
else if( preg_match("/^([0-9]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})$/", trim($ip_list_temp[$i])) )
{
$ip_list[] = encode_ip(str_replace("*", "255", trim($ip_list_temp[$i])));
}
}
}
$email_list = array();
if(isset($HTTP_POST_VARS['ban_email']))
{
$email_list_temp = explode(",", $HTTP_POST_VARS['ban_email']);
for($i = 0; $i < count($email_list_temp); $i++)
{
//
// This ereg match is based on one by php@unreelpro.com
// contained in the annotated php manual at php.com (ereg
// section)
//
if( eregi("^(([[:alnum:]\*]+([-_.][[:alnum:]\*]+)*\.?)|(\*))@([[:alnum:]]+([-_]?[[:alnum:]]+)*\.){1,3}([[:alnum:]]{2,6})$", trim($email_list_temp[$i])) )
{
$email_list[] = trim($email_list_temp[$i]);
}
}
}
$sql = "SELECT *
FROM " . BANLIST_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain banlist information", "", __LINE__, __FILE__, $sql);
}
$current_banlist = $db->sql_fetchrowset($result);
$kill_session_sql = "";
for($i = 0; $i < count($user_list); $i++)
{
$in_banlist = false;
for($j = 0; $j < count($current_banlist); $j++)
{
if($user_list[$i] == $current_banlist[$j]['ban_userid'])
{
$in_banlist = true;
}
}
if(!$in_banlist)
{
$kill_session_sql .= ( ($kill_session_sql != "") ? " OR " : "" ) . "session_user_id = $user_list[$i]";
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_userid)
VALUES (" . $user_list[$i] . ")";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert ban_userid info into database", "", __LINE__, __FILE__, $sql);
}
}
}
for($i = 0; $i < count($ip_list); $i++)
{
$in_banlist = false;
for($j = 0; $j < count($current_banlist); $j++)
{
if($ip_list[$i] == $current_banlist[$j]['ban_ip'])
{
$in_banlist = true;
}
}
if(!$in_banlist)
{
if( preg_match("/(ff\.)|(\.ff)/is", chunk_split($ip_list[$i], 2, ".")) )
{
$kill_ip_sql = "session_ip LIKE '" . str_replace(".", "", preg_replace("/(ff\.)|(\.ff)/is", "%", chunk_split($ip_list[$i], 2, "."))) . "'";
}
else
{
$kill_ip_sql = "session_ip = '" . $ip_list[$i] . "'";
}
$kill_session_sql .= ( ($kill_session_sql != "") ? " OR " : "" ) . $kill_ip_sql;
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_ip)
VALUES ('" . $ip_list[$i] . "')";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert ban_ip info into database", "", __LINE__, __FILE__, $sql);
}
}
}
//
// Now we'll delete all entries from the
// session table with any of the banned
// user or IP info just entered into the
// ban table ... this will force a session
// initialisation resulting in an instant
// ban
//
if( $kill_session_sql != "" )
{
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE $kill_session_sql";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete banned sessions from database", "", __LINE__, __FILE__, $sql);
}
}
for($i = 0; $i < count($email_list); $i++)
{
$in_banlist = false;
for($j = 0; $j < count($current_banlist); $j++)
{
if( $email_list[$i] == $current_banlist[$j]['ban_email'] )
{
$in_banlist = true;
}
}
if( !$in_banlist )
{
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_email)
VALUES ('" . str_replace("\'", "''", $email_list[$i]) . "')";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert ban_email info into database", "", __LINE__, __FILE__, $sql);
}
}
}
$where_sql = "";
if(isset($HTTP_POST_VARS['unban_user']))
{
$user_list = $HTTP_POST_VARS['unban_user'];
for($i = 0; $i < count($user_list); $i++)
{
if($user_list[$i] != -1)
{
if($where_sql != "")
{
$where_sql .= ", ";
}
$where_sql .= $user_list[$i];
}
}
}
if( isset($HTTP_POST_VARS['unban_ip']) )
{
$ip_list = $HTTP_POST_VARS['unban_ip'];
for($i = 0; $i < count($ip_list); $i++)
{
if($ip_list[$i] != -1)
{
if($where_sql != "")
{
$where_sql .= ", ";
}
$where_sql .= $ip_list[$i];
}
}
}
if( isset($HTTP_POST_VARS['unban_email']) )
{
$email_list = $HTTP_POST_VARS['unban_email'];
for($i = 0; $i < count($email_list); $i++)
{
if($email_list[$i] != -1)
{
if($where_sql != "")
{
$where_sql .= ", ";
}
$where_sql .= $email_list[$i];
}
}
}
if( $where_sql != "" )
{
$sql = "DELETE FROM " . BANLIST_TABLE . "
WHERE ban_id IN ($where_sql)";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete ban info from database", "", __LINE__, __FILE__, $sql);
}
}
$message = $lang['Ban_update_sucessful'] . "<br /><br />" . sprintf($lang['Click_return_banadmin'], "<a href=\"" . append_sid("admin_user_ban.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
else
{
$template->set_filenames(array(
'body' => 'admin/user_ban_body.tpl')
);
$template->assign_vars(array(
'L_BAN_TITLE' => $lang['Ban_control'],
'L_BAN_EXPLAIN' => $lang['Ban_explain'],
'L_BAN_EXPLAIN_WARN' => $lang['Ban_explain_warn'],
'L_IP_OR_HOSTNAME' => $lang['IP_hostname'],
'L_EMAIL_ADDRESS' => $lang['Email_address'],
'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset'],
'S_BANLIST_ACTION' => append_sid("admin_user_ban.$phpEx"))
);
$userban_count = 0;
$sql = "SELECT user_id, username
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY username ASC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select current user_id ban list', '', __LINE__, __FILE__, $sql);
}
$user_list = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$select_userlist = '';
for($i = 0; $i < count($user_list); $i++)
{
$select_userlist .= '<option value="' . $user_list[$i]['user_id'] . '">' . $user_list[$i]['username'] . '</option>';
$userban_count++;
}
$select_userlist = '<select name="ban_user[]" multiple="multiple" size="5">' . $select_userlist . '</select>';
$template->assign_vars(array(
'L_BAN_USER' => $lang['Ban_username'],
'L_BAN_USER_EXPLAIN' => $lang['Ban_username_explain'],
'L_BAN_IP' => $lang['Ban_IP'],
'L_BAN_IP_EXPLAIN' => $lang['Ban_IP_explain'],
'L_BAN_EMAIL' => $lang['Ban_email'],
'L_BAN_EMAIL_EXPLAIN' => $lang['Ban_email_explain'],
'S_BAN_USERLIST_SELECT' => $select_userlist)
);
$userban_count = 0;
$ipban_count = 0;
$emailban_count = 0;
$sql = "SELECT b.ban_id, u.user_id, u.username
FROM " . BANLIST_TABLE . " b, " . USERS_TABLE . " u
WHERE u.user_id = b.ban_userid
AND b.ban_userid <> 0
AND u.user_id <> " . ANONYMOUS . "
ORDER BY u.user_id ASC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select current user_id ban list', '', __LINE__, __FILE__, $sql);
}
$user_list = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$select_userlist = '';
for($i = 0; $i < count($user_list); $i++)
{
$select_userlist .= '<option value="' . $user_list[$i]['ban_id'] . '">' . $user_list[$i]['username'] . '</option>';
$userban_count++;
}
if( $select_userlist == '' )
{
$select_userlist = '<option value="-1">' . $lang['No_banned_users'] . '</option>';
}
$select_userlist = '<select name="unban_user[]" multiple="multiple" size="5">' . $select_userlist . '</select>';
$sql = "SELECT ban_id, ban_ip, ban_email
FROM " . BANLIST_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select current ip ban list', '', __LINE__, __FILE__, $sql);
}
$banlist = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$select_iplist = '';
$select_emaillist = '';
for($i = 0; $i < count($banlist); $i++)
{
$ban_id = $banlist[$i]['ban_id'];
if ( !empty($banlist[$i]['ban_ip']) )
{
$ban_ip = str_replace('255', '*', decode_ip($banlist[$i]['ban_ip']));
$select_iplist .= '<option value="' . $ban_id . '">' . $ban_ip . '</option>';
$ipban_count++;
}
else if ( !empty($banlist[$i]['ban_email']) )
{
$ban_email = $banlist[$i]['ban_email'];
$select_emaillist .= '<option value="' . $ban_id . '">' . $ban_email . '</option>';
$emailban_count++;
}
}
if ( $select_iplist == '' )
{
$select_iplist = '<option value="-1">' . $lang['No_banned_ip'] . '</option>';
}
if ( $select_emaillist == '' )
{
$select_emaillist = '<option value="-1">' . $lang['No_banned_email'] . '</option>';
}
$select_iplist = '<select name="unban_ip[]" multiple="multiple" size="5">' . $select_iplist . '</select>';
$select_emaillist = '<select name="unban_email[]" multiple="multiple" size="5">' . $select_emaillist . '</select>';
$template->assign_vars(array(
'L_UNBAN_USER' => $lang['Unban_username'],
'L_UNBAN_USER_EXPLAIN' => $lang['Unban_username_explain'],
'L_UNBAN_IP' => $lang['Unban_IP'],
'L_UNBAN_IP_EXPLAIN' => $lang['Unban_IP_explain'],
'L_UNBAN_EMAIL' => $lang['Unban_email'],
'L_UNBAN_EMAIL_EXPLAIN' => $lang['Unban_email_explain'],
'S_UNBAN_USERLIST_SELECT' => $select_userlist,
'S_UNBAN_IPLIST_SELECT' => $select_iplist,
'S_UNBAN_EMAILLIST_SELECT' => $select_emaillist,
'S_BAN_ACTION' => append_sid("admin_user_ban.$phpEx"))
);
}
$template->pparse('body');
include('page_footer_admin.'.$phpEx);
?>

File diff suppressed because it is too large Load Diff

View File

@@ -1,235 +0,0 @@
<?php
/***************************************************************************
* admin_words.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['General']['Word_Censor'] = "$file";
return;
}
//
// Load default header
//
$phpbb_root_path = "../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ($HTTP_GET_VARS['mode']) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
}
else
{
//
// These could be entered via a form button
//
if( isset($HTTP_POST_VARS['add']) )
{
$mode = "add";
}
else if( isset($HTTP_POST_VARS['save']) )
{
$mode = "save";
}
else
{
$mode = "";
}
}
if( $mode != "" )
{
if( $mode == "edit" || $mode == "add" )
{
$word_id = ( isset($HTTP_GET_VARS['id']) ) ? $HTTP_GET_VARS['id'] : 0;
$template->set_filenames(array(
"body" => "admin/words_edit_body.tpl")
);
$s_hidden_fields = '';
if( $mode == "edit" )
{
if( $word_id )
{
$sql = "SELECT *
FROM " . WORDS_TABLE . "
WHERE word_id = $word_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query words table", "Error", __LINE__, __FILE__, $sql);
}
$word_info = $db->sql_fetchrow($result);
$s_hidden_fields .= '<input type="hidden" name="id" value="' . $word_id . '" />';
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_word_selected']);
}
}
$template->assign_vars(array(
"WORD" => $word_info['word'],
"REPLACEMENT" => $word_info['replacement'],
"L_WORDS_TITLE" => $lang['Words_title'],
"L_WORDS_TEXT" => $lang['Words_explain'],
"L_WORD_CENSOR" => $lang['Edit_word_censor'],
"L_WORD" => $lang['Word'],
"L_REPLACEMENT" => $lang['Replacement'],
"L_SUBMIT" => $lang['Submit'],
"S_WORDS_ACTION" => append_sid("admin_words.$phpEx"),
"S_HIDDEN_FIELDS" => $s_hidden_fields)
);
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
}
else if( $mode == "save" )
{
$word_id = ( isset($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : 0;
$word = ( isset($HTTP_POST_VARS['word']) ) ? trim($HTTP_POST_VARS['word']) : "";
$replacement = ( isset($HTTP_POST_VARS['replacement']) ) ? trim($HTTP_POST_VARS['replacement']) : "";
if($word == "" || $replacement == "")
{
message_die(GENERAL_MESSAGE, $lang['Must_enter_word']);
}
if( $word_id )
{
$sql = "UPDATE " . WORDS_TABLE . "
SET word = '" . str_replace("\'", "''", $word) . "', replacement = '" . str_replace("\'", "''", $replacement) . "'
WHERE word_id = $word_id";
$message = $lang['Word_updated'];
}
else
{
$sql = "INSERT INTO " . WORDS_TABLE . " (word, replacement)
VALUES ('" . str_replace("\'", "''", $word) . "', '" . str_replace("\'", "''", $replacement) . "')";
$message = $lang['Word_added'];
}
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not insert data into words table", $lang['Error'], __LINE__, __FILE__, $sql);
}
$message .= "<br /><br />" . sprintf($lang['Click_return_wordadmin'], "<a href=\"" . append_sid("admin_words.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
else if( $mode == "delete" )
{
if( isset($HTTP_POST_VARS['id']) || isset($HTTP_GET_VARS['id']) )
{
$word_id = ( isset($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id'];
}
else
{
$word_id = 0;
}
if( $word_id )
{
$sql = "DELETE FROM " . WORDS_TABLE . "
WHERE word_id = $word_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not remove data from words table", $lang['Error'], __LINE__, __FILE__, $sql);
}
$message = $lang['Word_removed'] . "<br /><br />" . sprintf($lang['Click_return_wordadmin'], "<a href=\"" . append_sid("admin_words.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
else
{
message_die(GENERAL_MESSAGE, $lang['Must_specify_word']);
}
}
}
else
{
$template->set_filenames(array(
"body" => "admin/words_list_body.tpl")
);
$sql = "SELECT *
FROM " . WORDS_TABLE . "
ORDER BY word";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not query words table", $lang['Error'], __LINE__, __FILE__, $sql);
}
$word_rows = $db->sql_fetchrowset($result);
$word_count = count($word_rows);
$template->assign_vars(array(
"L_WORDS_TITLE" => $lang['Words_title'],
"L_WORDS_TEXT" => $lang['Words_explain'],
"L_WORD" => $lang['Word'],
"L_REPLACEMENT" => $lang['Replacement'],
"L_EDIT" => $lang['Edit'],
"L_DELETE" => $lang['Delete'],
"L_ADD_WORD" => $lang['Add_new_word'],
"L_ACTION" => $lang['Action'],
"S_WORDS_ACTION" => append_sid("admin_words.$phpEx"),
"S_HIDDEN_FIELDS" => '')
);
for($i = 0; $i < $word_count; $i++)
{
$word = $word_rows[$i]['word'];
$replacement = $word_rows[$i]['replacement'];
$word_id = $word_rows[$i]['word_id'];
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars("words", array(
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"WORD" => $word,
"REPLACEMENT" => $replacement,
"U_WORD_EDIT" => append_sid("admin_words.$phpEx?mode=edit&amp;id=$word_id"),
"U_WORD_DELETE" => append_sid("admin_words.$phpEx?mode=delete&amp;id=$word_id"))
);
}
}
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
?>

View File

@@ -1,590 +0,0 @@
<?php
/***************************************************************************
* (admin) index.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', 1);
//
// Load default header
//
$no_page_header = TRUE;
$phpbb_root_path = "../";
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
// ---------------
// Begin functions
//
function inarray($needle, $haystack)
{
for($i = 0; $i < sizeof($haystack); $i++ )
{
if( $haystack[$i] == $needle )
{
return true;
}
}
return false;
}
//
// End functions
// -------------
//
// Generate relevant output
//
if( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'left' )
{
$dir = @opendir(".");
$setmodules = 1;
while( $file = @readdir($dir) )
{
if( preg_match("/^admin_.*?\." . $phpEx . "$/", $file) )
{
include($file);
}
}
@closedir($dir);
unset($setmodules);
include('page_header_admin.'.$phpEx);
$template->set_filenames(array(
"body" => "admin/index_navigate.tpl")
);
$template->assign_vars(array(
"U_FORUM_INDEX" => append_sid("../index.$phpEx"),
"U_ADMIN_INDEX" => append_sid("index.$phpEx?pane=right"),
"L_FORUM_INDEX" => $lang['Main_index'],
"L_ADMIN_INDEX" => $lang['Admin_Index'],
"L_PREVIEW_FORUM" => $lang['Preview_forum'])
);
ksort($module);
while( list($cat, $action_array) = each($module) )
{
$cat = ( !empty($lang[$cat]) ) ? $lang[$cat] : preg_replace("/_/", " ", $cat);
$template->assign_block_vars("catrow", array(
"ADMIN_CATEGORY" => $cat)
);
ksort($action_array);
$row_count = 0;
while( list($action, $file) = each($action_array) )
{
$row_color = ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2'];
$action = ( !empty($lang[$action]) ) ? $lang[$action] : preg_replace("/_/", " ", $action);
$template->assign_block_vars("catrow.modulerow", array(
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"ADMIN_MODULE" => $action,
"U_ADMIN_MODULE" => append_sid($file))
);
$row_count++;
}
}
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
}
elseif( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' )
{
include('page_header_admin.'.$phpEx);
$template->set_filenames(array(
"body" => "admin/index_body.tpl")
);
$template->assign_vars(array(
"L_WELCOME" => $lang['Welcome_phpBB'],
"L_ADMIN_INTRO" => $lang['Admin_intro'],
"L_FORUM_STATS" => $lang['Forum_stats'],
"L_WHO_IS_ONLINE" => $lang['Who_is_Online'],
"L_LOCATION" => $lang['Location'],
"L_LAST_UPDATE" => $lang['Last_updated'],
"L_IP_ADDRESS" => $lang['IP_Address'],
"L_STATISTIC" => $lang['Statistic'],
"L_VALUE" => $lang['Value'],
"L_NUMBER_POSTS" => $lang['Number_posts'],
"L_POSTS_PER_DAY" => $lang['Posts_per_day'],
"L_NUMBER_TOPICS" => $lang['Number_topics'],
"L_TOPICS_PER_DAY" => $lang['Topics_per_day'],
"L_NUMBER_USERS" => $lang['Number_users'],
"L_USERS_PER_DAY" => $lang['Users_per_day'],
"L_BOARD_STARTED" => $lang['Board_started'],
"L_AVATAR_DIR_SIZE" => $lang['Avatar_dir_size'],
"L_DB_SIZE" => $lang['Database_size'],
"L_FORUM_LOCATION" => $lang['Forum_Location'],
"L_STARTED" => $lang['Login'],
"L_GZIP_COMPRESSION" => $lang['Gzip_compression'])
);
//
// Get forum statistics
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$total_topics = get_db_stat('topiccount');
$start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']);
$boarddays = ( time() - $board_config['board_startdate'] ) / 86400;
$posts_per_day = sprintf("%.2f", $total_posts / $boarddays);
$topics_per_day = sprintf("%.2f", $total_topics / $boarddays);
$users_per_day = sprintf("%.2f", $total_users / $boarddays);
$avatar_dir_size = 0;
if ($avatar_dir = @opendir($phpbb_root_path . $board_config['avatar_path']))
{
while( $file = @readdir($avatar_dir) )
{
if( $file != "." && $file != ".." )
{
$avatar_dir_size += @filesize($phpbb_root_path . $board_config['avatar_path'] . "/" . $file);
}
}
@closedir($avatar_dir);
//
// This bit of code translates the avatar directory size into human readable format
// Borrowed the code from the PHP.net annoted manual, origanally written by:
// Jesse (jesse@jess.on.ca)
//
if($avatar_dir_size >= 1048576)
{
$avatar_dir_size = round($avatar_dir_size / 1048576 * 100) / 100 . " MB";
}
else if($avatar_dir_size >= 1024)
{
$avatar_dir_size = round($avatar_dir_size / 1024 * 100) / 100 . " KB";
}
else
{
$avatar_dir_size = $avatar_dir_size . " Bytes";
}
}
else
{
// Couldn't open Avatar dir.
$avatar_dir_size = $lang['Not_available'];
}
if($posts_per_day > $total_posts)
{
$posts_per_day = $total_posts;
}
if($topics_per_day > $total_topics)
{
$topics_per_day = $total_topics;
}
if($users_per_day > $total_users)
{
$users_per_day = $total_users;
}
//
// DB size ... MySQL only
//
// This code is heavily influenced by a similar routine
// in phpMyAdmin 2.2.0
//
if( preg_match("/^mysql/", SQL_LAYER) )
{
$sql = "SELECT VERSION() AS mysql_version";
if($result = $db->sql_query($sql))
{
$row = $db->sql_fetchrow($result);
$version = $row['mysql_version'];
if( preg_match("/^(3\.23|4\.)/", $version) )
{
$db_name = ( preg_match("/^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)/", $version) ) ? "`$dbname`" : $dbname;
$sql = "SHOW TABLE STATUS
FROM " . $db_name;
if($result = $db->sql_query($sql))
{
$tabledata_ary = $db->sql_fetchrowset($result);
$dbsize = 0;
for($i = 0; $i < count($tabledata_ary); $i++)
{
if( $tabledata_ary[$i]['Type'] != "MRG_MyISAM" )
{
if( $table_prefix != "" )
{
if( strstr($tabledata_ary[$i]['Name'], $table_prefix) )
{
$dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length'];
}
}
else
{
$dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length'];
}
}
}
} // Else we couldn't get the table status.
}
else
{
$dbsize = $lang['Not_available'];
}
}
else
{
$dbsize = $lang['Not_available'];
}
}
else if( preg_match("/^mssql/", SQL_LAYER) )
{
$sql = "SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize
FROM sysfiles";
if( $result = $db->sql_query($sql) )
{
$dbsize = ( $row = $db->sql_fetchrow($result) ) ? intval($row['dbsize']) : $lang['Not_available'];
}
else
{
$dbsize = $lang['Not_available'];
}
}
else
{
$dbsize = $lang['Not_available'];
}
if ( is_integer($dbsize) )
{
if( $dbsize >= 1048576 )
{
$dbsize = sprintf("%.2f MB", ( $dbsize / 1048576 ));
}
else if( $dbsize >= 1024 )
{
$dbsize = sprintf("%.2f KB", ( $dbsize / 1024 ));
}
else
{
$dbsize = sprintf("%.2f Bytes", $dbsize);
}
}
$template->assign_vars(array(
"NUMBER_OF_POSTS" => $total_posts,
"NUMBER_OF_TOPICS" => $total_topics,
"NUMBER_OF_USERS" => $total_users,
"START_DATE" => $start_date,
"POSTS_PER_DAY" => $posts_per_day,
"TOPICS_PER_DAY" => $topics_per_day,
"USERS_PER_DAY" => $users_per_day,
"AVATAR_DIR_SIZE" => $avatar_dir_size,
"DB_SIZE" => $dbsize,
"GZIP_COMPRESSION" => ( $board_config['gzip_compress'] ) ? $lang['ON'] : $lang['OFF'])
);
//
// End forum statistics
//
//
// Get users online information.
//
$sql = "SELECT u.user_id, u.username, u.user_session_time, u.user_session_page, s.session_logged_in, s.session_ip, s.session_start
FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s
WHERE s.session_logged_in = " . TRUE . "
AND u.user_id = s.session_user_id
AND u.user_id <> " . ANONYMOUS . "
AND u.user_session_time >= " . ( time() - 300 ) . "
ORDER BY u.user_session_time DESC";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain regd user/online information.", "", __LINE__, __FILE__, $sql);
}
$onlinerow_reg = $db->sql_fetchrowset($result);
$sql = "SELECT session_page, session_logged_in, session_time, session_ip, session_start
FROM " . SESSIONS_TABLE . "
WHERE session_logged_in = 0
AND session_time >= " . ( time() - 300 ) . "
ORDER BY session_time DESC";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain guest user/online information.", "", __LINE__, __FILE__, $sql);
}
$onlinerow_guest = $db->sql_fetchrowset($result);
$sql = "SELECT forum_name, forum_id
FROM " . FORUMS_TABLE;
if($forums_result = $db->sql_query($sql))
{
while($forumsrow = $db->sql_fetchrow($forums_result))
{
$forum_data[$forumsrow['forum_id']] = $forumsrow['forum_name'];
}
}
else
{
message_die(GENERAL_ERROR, "Couldn't obtain user/online forums information.", "", __LINE__, __FILE__, $sql);
}
$reg_userid_ary = array();
if( count($onlinerow_reg) )
{
$registered_users = 0;
for($i = 0; $i < count($onlinerow_reg); $i++)
{
if( !inarray($onlinerow_reg[$i]['user_id'], $reg_userid_ary) )
{
$reg_userid_ary[] = $onlinerow_reg[$i]['user_id'];
$username = $onlinerow_reg[$i]['username'];
if( $onlinerow_reg[$i]['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
$registered_users++;
$hidden = FALSE;
}
else
{
$hidden_users++;
$hidden = TRUE;
}
if( $onlinerow_reg[$i]['user_session_page'] < 1 )
{
switch($onlinerow_reg[$i]['user_session_page'])
{
case PAGE_INDEX:
$location = $lang['Forum_index'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_POSTING:
$location = $lang['Posting_message'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_LOGIN:
$location = $lang['Logging_on'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_SEARCH:
$location = $lang['Searching_forums'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_PROFILE:
$location = $lang['Viewing_profile'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_VIEWONLINE:
$location = $lang['Viewing_online'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_VIEWMEMBERS:
$location = $lang['Viewing_member_list'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_PRIVMSGS:
$location = $lang['Viewing_priv_msgs'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "index.$phpEx?pane=right";
break;
default:
$location = $lang['Forum_index'];
$location_url = "index.$phpEx?pane=right";
}
}
else
{
$location_url = append_sid("admin_forums.$phpEx?mode=editforum&amp;" . POST_FORUM_URL . "=" . $onlinerow_reg[$i]['user_session_page']);
$location = $forum_data[$onlinerow_reg[$i]['user_session_page']];
}
$row_color = ( $registered_users % 2 ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( $registered_users % 2 ) ? $theme['td_class1'] : $theme['td_class2'];
$reg_ip = decode_ip($onlinerow_reg[$i]['session_ip']);
$template->assign_block_vars("reg_user_row", array(
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"USERNAME" => $username,
"STARTED" => create_date($board_config['default_dateformat'], $onlinerow_reg[$i]['session_start'], $board_config['board_timezone']),
"LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow_reg[$i]['user_session_time'], $board_config['board_timezone']),
"FORUM_LOCATION" => $location,
"IP_ADDRESS" => $reg_ip,
"U_WHOIS_IP" => "http://www.samspade.org/t/ipwhois?a=$reg_ip",
"U_USER_PROFILE" => append_sid("admin_users.$phpEx?mode=edit&amp;" . POST_USERS_URL . "=" . $onlinerow_reg[$i]['user_id']),
"U_FORUM_LOCATION" => append_sid($location_url))
);
}
}
}
else
{
$template->assign_vars(array(
"L_NO_REGISTERED_USERS_BROWSING" => $lang['No_users_browsing'])
);
}
//
// Guest users
//
if( count($onlinerow_guest) )
{
$guest_users = 0;
for($i = 0; $i < count($onlinerow_guest); $i++)
{
$guest_userip_ary[] = $onlinerow_guest[$i]['session_ip'];
$guest_users++;
if( $onlinerow_guest[$i]['session_page'] < 1 )
{
switch( $onlinerow_guest[$i]['session_page'] )
{
case PAGE_INDEX:
$location = $lang['Forum_index'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_POSTING:
$location = $lang['Posting_message'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_LOGIN:
$location = $lang['Logging_on'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_SEARCH:
$location = $lang['Searching_forums'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_PROFILE:
$location = $lang['Viewing_profile'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_VIEWONLINE:
$location = $lang['Viewing_online'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_VIEWMEMBERS:
$location = $lang['Viewing_member_list'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_PRIVMSGS:
$location = $lang['Viewing_priv_msgs'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "index.$phpEx?pane=right";
break;
default:
$location = $lang['Forum_index'];
$location_url = "index.$phpEx?pane=right";
}
}
else
{
$location_url = append_sid("admin_forums.$phpEx?mode=editforum&amp;" . POST_FORUM_URL . "=" . $onlinerow_guest[$i]['session_page']);
$location = $forum_data[$onlinerow_guest[$i]['session_page']];
}
$row_color = ( $guest_users % 2 ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( $guest_users % 2 ) ? $theme['td_class1'] : $theme['td_class2'];
$guest_ip = decode_ip($onlinerow_guest[$i]['session_ip']);
$template->assign_block_vars("guest_user_row", array(
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"USERNAME" => $lang['Guest'],
"STARTED" => create_date($board_config['default_dateformat'], $onlinerow_guest[$i]['session_start'], $board_config['board_timezone']),
"LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow_guest[$i]['session_time'], $board_config['board_timezone']),
"FORUM_LOCATION" => $location,
"IP_ADDRESS" => $guest_ip,
"U_WHOIS_IP" => "http://www.samspade.org/t/ipwhois?a=$guest_ip",
"U_FORUM_LOCATION" => append_sid($location_url))
);
}
}
else
{
$template->assign_vars(array(
"L_NO_GUESTS_BROWSING" => $lang['No_users_browsing'])
);
}
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
}
else
{
//
// Generate frameset
//
$template->set_filenames(array(
"body" => "admin/index_frameset.tpl")
);
$template->assign_vars(array(
"S_FRAME_NAV" => append_sid("index.$phpEx?pane=left"),
"S_FRAME_MAIN" => append_sid("index.$phpEx?pane=right"))
);
header ("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
$template->pparse("body");
exit;
}
?>

View File

@@ -1,84 +0,0 @@
<?php
/***************************************************************************
* page_footer_admin.php
* -------------------
* begin : Saturday, Jul 14, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
//
// Show the overall footer.
//
$current_time = time();
$template->set_filenames(array(
"page_footer" => "admin/page_footer.tpl")
);
$template->assign_vars(array(
"PHPBB_VERSION" => "2.0 " . $board_config['version'],
"TRANSLATION_INFO" => $lang['TRANSLATION_INFO'])
);
$template->pparse("page_footer");
//
// Output page creation time
//
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
//
// Close our DB connection.
//
$db->sql_close();
//
// Compress buffered output if required
// and send to browser
//
if( $do_gzip_compress )
{
//
// Borrowed from php.net!
//
$gzip_contents = ob_get_contents();
ob_end_clean();
$gzip_size = strlen($gzip_contents);
$gzip_crc = crc32($gzip_contents);
$gzip_contents = gzcompress($gzip_contents, 9);
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
echo pack("V", $gzip_crc);
echo pack("V", $gzip_size);
}
exit;
?>

View File

@@ -1,154 +0,0 @@
<?php
/***************************************************************************
* page_header_admin.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
define('HEADER_INC', true);
//
// gzip_compression
//
$do_gzip_compress = FALSE;
if($board_config['gzip_compress'])
{
$phpver = phpversion();
if($phpver >= '4.0.4pl1')
{
if(extension_loaded('zlib'))
{
ob_start('ob_gzhandler');
}
}
else if($phpver > '4.0')
{
if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip'))
{
if(extension_loaded('zlib'))
{
$do_gzip_compress = TRUE;
ob_start();
ob_implicit_flush(0);
header('Content-Encoding: gzip');
}
}
}
}
$template->set_filenames(array(
'header' => 'admin/page_header.tpl')
);
//
// The following assigns all _common_ variables that may be used at any point
// in a template. Note that all URL's should be wrapped in append_sid, as
// should all S_x_ACTIONS for forms.
//
$template->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'PAGE_TITLE' => $page_title,
'L_ADMIN' => $lang['Admin'],
'L_USERNAME' => $lang['Username'],
'L_PASSWORD' => $lang['Password'],
'L_INDEX' => $lang['Forum_Index'],
'L_REGISTER' => $lang['Register'],
'L_PROFILE' => $lang['Profile'],
'L_SEARCH' => $lang['Search'],
'L_PRIVATEMSGS' => $lang['Private_msgs'],
'L_MEMBERLIST' => $lang['Memberlist'],
'L_FAQ' => $lang['FAQ'],
'L_USERGROUPS' => $lang['Usergroups'],
'L_FORUM' => $lang['Forum'],
'L_TOPICS' => $lang['Topics'],
'L_REPLIES' => $lang['Replies'],
'L_VIEWS' => $lang['Views'],
'L_POSTS' => $lang['Posts'],
'L_LASTPOST' => $lang['Last_Post'],
'L_MODERATOR' => $lang['Moderator'],
'L_NONEWPOSTS' => $lang['No_new_posts'],
'L_NEWPOSTS' => $lang['New_posts'],
'L_POSTED' => $lang['Posted'],
'L_JOINED' => $lang['Joined'],
'L_AUTHOR' => $lang['Author'],
'L_MESSAGE' => $lang['Message'],
'L_BY' => $lang['by'],
'U_INDEX' => append_sid('../index.'.$phpEx),
'S_TIMEZONE' => sprintf($lang['All_times'], $lang[$board_config['board_timezone']]),
'S_LOGIN_ACTION' => append_sid('../login.'.$phpEx),
'S_JUMPBOX_ACTION' => append_sid('../viewforum.'.$phpEx),
'S_CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])),
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
'S_CONTENT_ENCODING' => $lang['ENCODING'],
'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
'T_HEAD_STYLESHEET' => $theme['head_stylesheet'],
'T_BODY_BACKGROUND' => $theme['body_background'],
'T_BODY_BGCOLOR' => '#'.$theme['body_bgcolor'],
'T_BODY_TEXT' => '#'.$theme['body_text'],
'T_BODY_LINK' => '#'.$theme['body_link'],
'T_BODY_VLINK' => '#'.$theme['body_vlink'],
'T_BODY_ALINK' => '#'.$theme['body_alink'],
'T_BODY_HLINK' => '#'.$theme['body_hlink'],
'T_TR_COLOR1' => '#'.$theme['tr_color1'],
'T_TR_COLOR2' => '#'.$theme['tr_color2'],
'T_TR_COLOR3' => '#'.$theme['tr_color3'],
'T_TR_CLASS1' => $theme['tr_class1'],
'T_TR_CLASS2' => $theme['tr_class2'],
'T_TR_CLASS3' => $theme['tr_class3'],
'T_TH_COLOR1' => '#'.$theme['th_color1'],
'T_TH_COLOR2' => '#'.$theme['th_color2'],
'T_TH_COLOR3' => '#'.$theme['th_color3'],
'T_TH_CLASS1' => $theme['th_class1'],
'T_TH_CLASS2' => $theme['th_class2'],
'T_TH_CLASS3' => $theme['th_class3'],
'T_TD_COLOR1' => '#'.$theme['td_color1'],
'T_TD_COLOR2' => '#'.$theme['td_color2'],
'T_TD_COLOR3' => '#'.$theme['td_color3'],
'T_TD_CLASS1' => $theme['td_class1'],
'T_TD_CLASS2' => $theme['td_class2'],
'T_TD_CLASS3' => $theme['td_class3'],
'T_FONTFACE1' => $theme['fontface1'],
'T_FONTFACE2' => $theme['fontface2'],
'T_FONTFACE3' => $theme['fontface3'],
'T_FONTSIZE1' => $theme['fontsize1'],
'T_FONTSIZE2' => $theme['fontsize2'],
'T_FONTSIZE3' => $theme['fontsize3'],
'T_FONTCOLOR1' => '#'.$theme['fontcolor1'],
'T_FONTCOLOR2' => '#'.$theme['fontcolor2'],
'T_FONTCOLOR3' => '#'.$theme['fontcolor3'],
'T_SPAN_CLASS1' => $theme['span_class1'],
'T_SPAN_CLASS2' => $theme['span_class2'],
'T_SPAN_CLASS3' => $theme['span_class3'])
);
$template->pparse('header');
?>

4
phpBB/cache/.htaccess vendored Normal file
View File

@@ -0,0 +1,4 @@
<Limit GET POST PUT>
Order Allow,Deny
Deny from All
</Limit>

View File

@@ -8,7 +8,6 @@
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
@@ -20,174 +19,274 @@
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
if (!defined('IN_PHPBB'))
{
die("Hacking attempt");
die('Hacking attempt');
}
error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
$starttime = explode(' ', microtime());
$starttime = $starttime[1] + $starttime[0];
error_reporting(E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
//error_reporting(E_ALL);
set_magic_quotes_runtime(0);
// Be paranoid with passed vars
if (@ini_get('register_globals'))
{
foreach ($_REQUEST as $var_name => $void)
{
unset(${$var_name});
}
}
// If magic quotes is off, addslashes
if (!get_magic_quotes_gpc())
{
$_GET = slash_input_data($_GET);
$_POST = slash_input_data($_POST);
$_COOKIE = slash_input_data($_COOKIE);
}
require($phpbb_root_path . 'config.'.$phpEx);
if (!defined('PHPBB_INSTALLED'))
{
header('Location: install/install.'.$phpEx);
exit;
}
// Load Extensions
if (!empty($load_extensions))
{
$load_extensions = explode(',', $load_extensions);
foreach ($load_extensions as $extension)
{
@dl(trim($extension));
}
}
// Include files
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
require($phpbb_root_path . 'includes/template.'.$phpEx);
require($phpbb_root_path . 'includes/session.'.$phpEx);
require($phpbb_root_path . 'includes/functions.'.$phpEx);
// User related
define('ANONYMOUS', 1);
define('USER_ACTIVATION_NONE', 0);
define('USER_ACTIVATION_SELF', 1);
define('USER_ACTIVATION_ADMIN', 2);
define('USER_ACTIVATION_DISABLE', 3);
define('USER_ACTIVATION_SELF_ADMIN', 4);
define('AVATAR_UPLOAD', 1);
define('AVATAR_REMOTE', 2);
define('AVATAR_GALLERY', 3);
// ACL
define('ACL_NO', 0);
define('ACL_YES', 1);
define('ACL_UNSET', -1);
// Group settings
define('GROUP_OPEN', 0);
define('GROUP_CLOSED', 1);
define('GROUP_HIDDEN', 2);
define('GROUP_SPECIAL', 3);
define('GROUP_FREE', 4);
// Forum/Topic states
define('FORUM_CAT', 0);
define('FORUM_POST', 1);
define('FORUM_LINK', 2);
define('ITEM_UNLOCKED', 0);
define('ITEM_LOCKED', 1);
define('ITEM_MOVED', 2);
// Topic types
define('POST_NORMAL', 0);
define('POST_STICKY', 1);
define('POST_ANNOUNCE', 2);
define('POST_GLOBAL', 3);
// Lastread types
define('TRACK_NORMAL', 0); // not used at the moment
define('TRACK_POSTED', 1);
// Log types
define('LOG_ADMIN', 0);
define('LOG_MOD', 1);
define('LOG_CRITICAL', 2);
// Private messaging
define('PRIVMSGS_READ_MAIL', 0);
define('PRIVMSGS_NEW_MAIL', 1);
define('PRIVMSGS_UNREAD_MAIL', 5);
// Download Modes - Attachments
define('INLINE_LINK', 1);
define('PHYSICAL_LINK', 2);
// Categories - Attachments
define('NONE_CAT', 0);
define('IMAGE_CAT', 1); // Inline Images
define('WM_CAT', 2); // Windows Media Files - Streaming
define('RM_CAT', 3); // Real Media Files - Streaming
define('THUMB_CAT', 4); // Not used within the database, only while displaying posts
//define('SWF_CAT', 5); // Replaced by [flash] ? or an additional possibility ?
// BBCode UID length
define('BBCODE_UID_LEN', 5);
// Table names
define('ACL_GROUPS_TABLE', $table_prefix.'auth_groups');
define('ACL_OPTIONS_TABLE', $table_prefix.'auth_options');
define('ACL_DEPS_TABLE', $table_prefix.'auth_deps');
define('ACL_PRESETS_TABLE', $table_prefix.'auth_presets');
define('ACL_USERS_TABLE', $table_prefix.'auth_users');
define('ATTACHMENTS_TABLE', $table_prefix.'attachments');
define('ATTACHMENTS_DESC_TABLE', $table_prefix.'attach_desc');
define('BANLIST_TABLE', $table_prefix.'banlist');
define('BBCODES_TABLE', $table_prefix.'bbcodes');
define('CACHE_TABLE', $table_prefix.'cache');
define('CONFIG_TABLE', $table_prefix.'config');
define('CONFIRM_TABLE', $table_prefix.'confirm');
define('DISALLOW_TABLE', $table_prefix.'disallow'); //
define('EXTENSIONS_TABLE', $table_prefix.'extensions');
define('EXTENSION_GROUPS_TABLE', $table_prefix.'extension_groups');
define('FORUMS_TABLE', $table_prefix.'forums');
define('FORUMS_TRACK_TABLE', $table_prefix.'forums_marking');
define('FORUMS_WATCH_TABLE', $table_prefix.'forums_watch');
define('GROUPS_TABLE', $table_prefix.'groups');
define('GROUPS_MODERATOR_TABLE', $table_prefix.'groups_moderator');
define('ICONS_TABLE', $table_prefix.'icons');
define('LANG_TABLE', $table_prefix.'lang');
define('LOG_TABLE', $table_prefix.'log');
define('MODERATOR_TABLE', $table_prefix.'moderator_cache');
define('POSTS_TABLE', $table_prefix.'posts');
define('POSTS_TEXT_TABLE', $table_prefix.'posts_text');
define('PRIVMSGS_TABLE', $table_prefix.'privmsgs');
define('PRIVMSGS_TEXT_TABLE', $table_prefix.'privmsgs_text');
define('RANKS_TABLE', $table_prefix.'ranks');
define('RATINGS_TABLE', $table_prefix.'ratings');
define('REPORTS_TABLE', $table_prefix.'reports');
define('REASONS_TABLE', $table_prefix.'reports_reasons');
define('SEARCH_TABLE', $table_prefix.'search_results');
define('SEARCH_WORD_TABLE', $table_prefix.'search_wordlist');
define('SEARCH_MATCH_TABLE', $table_prefix.'search_wordmatch');
define('SESSIONS_TABLE', $table_prefix.'sessions');
define('SMILIES_TABLE', $table_prefix.'smilies');
define('STYLES_TABLE', $table_prefix.'styles');
define('STYLES_TPL_TABLE', $table_prefix.'styles_template');
define('STYLES_TPLDATA_TABLE', $table_prefix.'styles_template_data');
define('STYLES_CSS_TABLE', $table_prefix.'styles_theme');
define('STYLES_IMAGE_TABLE', $table_prefix.'styles_imageset');
define('TOPICS_TABLE', $table_prefix.'topics');
define('TOPICS_TRACK_TABLE', $table_prefix.'topics_marking');
define('TOPICS_WATCH_TABLE', $table_prefix.'topics_watch');
define('UCP_MODULES_TABLE', $table_prefix.'ucp_modules');
define('USER_GROUP_TABLE', $table_prefix.'user_group');
define('USERS_TABLE', $table_prefix.'users');
define('WORDS_TABLE', $table_prefix.'words');
define('POLL_OPTIONS_TABLE', $table_prefix.'poll_results');
define('POLL_VOTES_TABLE', $table_prefix.'poll_voters');
// Set PHP error handler to ours
set_error_handler('msg_handler');
// Instantiate some basic classes
$user = new user();
$auth = new auth();
$template = new template();
$cache = new acm();
$db = new sql_db();
// Connect to DB
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
// Grab global variables, re-cache if necessary
if ($config = $cache->get('config'))
{
$sql = 'SELECT *
FROM ' . CONFIG_TABLE . '
WHERE is_dynamic = 1';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$config[$row['config_name']] = $row['config_value'];
}
}
else
{
$config = $cached_config = array();
$sql = 'SELECT *
FROM ' . CONFIG_TABLE;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if (!$row['is_dynamic'])
{
$cached_config[$row['config_name']] = $row['config_value'];
}
$config[$row['config_name']] = $row['config_value'];
}
$db->sql_freeresult($result);
$cache->put('config', $cached_config);
unset($cached_config);
}
/*
if (time() - $config['cache_interval'] >= $config['cache_last_gc'])
{
$cache->tidy($config['cache_gc']);
}
*/
// Handle email/cron queue.
if (time() - $config['queue_interval'] >= $config['last_queue_run'] && !defined('IN_ADMIN'))
{
if (file_exists($phpbb_root_path . 'cache/queue.' . $phpEx))
{
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$queue = new queue();
$queue->process();
}
}
// Warn about install/ directory
if (file_exists('install'))
{
// trigger_error('REMOVE_INSTALL');
}
// Show 'Board is disabled' message
if ($config['board_disable'] && !defined('IN_ADMIN') && !defined('IN_LOGIN'))
{
$message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
trigger_error($message);
}
//
// addslashes to vars if magic_quotes_gpc is off
// this is a security precaution to prevent someone
// trying to break out of a SQL statement.
//
if( !get_magic_quotes_gpc() )
function slash_input_data(&$data)
{
if( is_array($HTTP_GET_VARS) )
if (is_array($data))
{
while( list($k, $v) = each($HTTP_GET_VARS) )
foreach ($data as $k => $v)
{
if( is_array($HTTP_GET_VARS[$k]) )
{
while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) )
{
$HTTP_GET_VARS[$k][$k2] = addslashes($v2);
}
@reset($HTTP_GET_VARS[$k]);
}
else
{
$HTTP_GET_VARS[$k] = addslashes($v);
}
$data[$k] = (is_array($v)) ? slash_input_data($v) : addslashes($v);
}
@reset($HTTP_GET_VARS);
}
if( is_array($HTTP_POST_VARS) )
{
while( list($k, $v) = each($HTTP_POST_VARS) )
{
if( is_array($HTTP_POST_VARS[$k]) )
{
while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) )
{
$HTTP_POST_VARS[$k][$k2] = addslashes($v2);
}
@reset($HTTP_POST_VARS[$k]);
}
else
{
$HTTP_POST_VARS[$k] = addslashes($v);
}
}
@reset($HTTP_POST_VARS);
}
if( is_array($HTTP_COOKIE_VARS) )
{
while( list($k, $v) = each($HTTP_COOKIE_VARS) )
{
if( is_array($HTTP_COOKIE_VARS[$k]) )
{
while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) )
{
$HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2);
}
@reset($HTTP_COOKIE_VARS[$k]);
}
else
{
$HTTP_COOKIE_VARS[$k] = addslashes($v);
}
}
@reset($HTTP_COOKIE_VARS);
}
}
//
// Define some basic configuration arrays this also prevents
// malicious rewriting of language and otherarray values via
// URI params
//
$board_config = Array();
$userdata = Array();
$theme = Array();
$images = Array();
$lang = Array();
$gen_simple_header = FALSE;
@include($phpbb_root_path . 'config.'.$phpEx);
if( !defined("PHPBB_INSTALLED") )
{
header("Location: install.$phpEx");
}
include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/template.'.$phpEx);
include($phpbb_root_path . 'includes/sessions.'.$phpEx);
include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
//
// Mozilla navigation bar
// Default items that should be valid on all pages.
// Defined here and not in page_header.php so they can be redefined in the code
//
$nav_links['top'] = array (
'url' => append_sid($phpbb_root_dir."index.".$phpEx),
'title' => sprintf($lang['Forum_Index'], $board_config['sitename'])
);
$nav_links['search'] = array (
'url' => append_sid($phpbb_root_dir."search.".$phpEx),
'title' => $lang['Search']
);
$nav_links['help'] = array (
'url' => append_sid($phpbb_root_dir."faq.".$phpEx),
'title' => $lang['FAQ']
);
$nav_links['author'] = array (
'url' => append_sid($phpbb_root_dir."memberlist.".$phpEx),
'title' => $lang['Memberlist']
);
//
// Obtain and encode users IP
//
if( getenv('HTTP_X_FORWARDED_FOR') != '' )
{
$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR );
if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", getenv('HTTP_X_FORWARDED_FOR'), $ip_list) )
{
$private_ip = array('/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10..*/', '/^224..*/', '/^240..*/');
$client_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);
}
}
else
{
$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR );
}
$user_ip = encode_ip($client_ip);
//
// Setup forum wide options, if this fails
// then we output a CRITICAL_ERROR since
// basic forum information is not available
//
$sql = "SELECT *
FROM " . CONFIG_TABLE;
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}
else
{
while($row = $db->sql_fetchrow($result))
{
$board_config[$row['config_name']] = $row['config_value'];
}
}
//
// Show 'Board is disabled' message if needed.
//
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
return $data;
}
?>

View File

@@ -1,335 +0,0 @@
<?php
/***************************************************************************
* mysql.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if(!defined("SQL_LAYER"))
{
define("SQL_LAYER","mysql");
class sql_db
{
var $db_connect_id;
var $query_result;
var $row = array();
var $rowset = array();
var $num_queries = 0;
//
// Constructor
//
function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
{
$this->persistency = $persistency;
$this->user = $sqluser;
$this->password = $sqlpassword;
$this->server = $sqlserver;
$this->dbname = $database;
if($this->persistency)
{
$this->db_connect_id = @mysql_pconnect($this->server, $this->user, $this->password);
}
else
{
$this->db_connect_id = @mysql_connect($this->server, $this->user, $this->password);
}
if($this->db_connect_id)
{
if($database != "")
{
$this->dbname = $database;
$dbselect = @mysql_select_db($this->dbname);
if(!$dbselect)
{
@mysql_close($this->db_connect_id);
$this->db_connect_id = $dbselect;
}
}
return $this->db_connect_id;
}
else
{
return false;
}
}
//
// Other base methods
//
function sql_close()
{
if($this->db_connect_id)
{
if($this->query_result)
{
@mysql_free_result($this->query_result);
}
$result = @mysql_close($this->db_connect_id);
return $result;
}
else
{
return false;
}
}
//
// Base query method
//
function sql_query($query = "", $transaction = FALSE)
{
// Remove any pre-existing queries
unset($this->query_result);
if($query != "")
{
$this->num_queries++;
$this->query_result = @mysql_query($query, $this->db_connect_id);
}
if($this->query_result)
{
unset($this->row[$this->query_result]);
unset($this->rowset[$this->query_result]);
return $this->query_result;
}
else
{
return ( $transaction == END_TRANSACTION ) ? true : false;
}
}
//
// Other query methods
//
function sql_numrows($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @mysql_num_rows($query_id);
return $result;
}
else
{
return false;
}
}
function sql_affectedrows()
{
if($this->db_connect_id)
{
$result = @mysql_affected_rows($this->db_connect_id);
return $result;
}
else
{
return false;
}
}
function sql_numfields($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @mysql_num_fields($query_id);
return $result;
}
else
{
return false;
}
}
function sql_fieldname($offset, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @mysql_field_name($query_id, $offset);
return $result;
}
else
{
return false;
}
}
function sql_fieldtype($offset, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @mysql_field_type($query_id, $offset);
return $result;
}
else
{
return false;
}
}
function sql_fetchrow($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$this->row[$query_id] = @mysql_fetch_array($query_id);
return $this->row[$query_id];
}
else
{
return false;
}
}
function sql_fetchrowset($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
unset($this->rowset[$query_id]);
unset($this->row[$query_id]);
while($this->rowset[$query_id] = @mysql_fetch_array($query_id))
{
$result[] = $this->rowset[$query_id];
}
return $result;
}
else
{
return false;
}
}
function sql_fetchfield($field, $rownum = -1, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
if($rownum > -1)
{
$result = @mysql_result($query_id, $rownum, $field);
}
else
{
if(empty($this->row[$query_id]) && empty($this->rowset[$query_id]))
{
if($this->sql_fetchrow())
{
$result = $this->row[$query_id][$field];
}
}
else
{
if($this->rowset[$query_id])
{
$result = $this->rowset[$query_id][$field];
}
else if($this->row[$query_id])
{
$result = $this->row[$query_id][$field];
}
}
}
return $result;
}
else
{
return false;
}
}
function sql_rowseek($rownum, $query_id = 0){
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @mysql_data_seek($query_id, $rownum);
return $result;
}
else
{
return false;
}
}
function sql_nextid(){
if($this->db_connect_id)
{
$result = @mysql_insert_id($this->db_connect_id);
return $result;
}
else
{
return false;
}
}
function sql_freeresult($query_id = 0){
if(!$query_id)
{
$query_id = $this->query_result;
}
if ( $query_id )
{
unset($this->row[$query_id]);
unset($this->rowset[$query_id]);
@mysql_free_result($query_id);
return true;
}
else
{
return false;
}
}
function sql_error($query_id = 0)
{
$result["message"] = @mysql_error($this->db_connect_id);
$result["code"] = @mysql_errno($this->db_connect_id);
return $result;
}
} // class sql_db
} // if ... define
?>

View File

@@ -1,340 +0,0 @@
<?php
/***************************************************************************
* mysql4.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : supportphpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if(!defined("SQL_LAYER"))
{
define("SQL_LAYER","mysql4");
class sql_db
{
var $db_connect_id;
var $query_result;
var $row = array();
var $rowset = array();
var $num_queries = 0;
var $in_transaction = 0;
//
// Constructor
//
function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
{
$this->persistency = $persistency;
$this->user = $sqluser;
$this->password = $sqlpassword;
$this->server = $sqlserver;
$this->dbname = $database;
$this->db_connect_id = ($this->persistency) ? mysql_pconnect($this->server, $this->user, $this->password) : mysql_connect($this->server, $this->user, $this->password);
if( $this->db_connect_id )
{
if( $database != "" )
{
$this->dbname = $database;
$dbselect = mysql_select_db($this->dbname);
if( !$dbselect )
{
mysql_close($this->db_connect_id);
$this->db_connect_id = $dbselect;
}
}
return $this->db_connect_id;
}
else
{
return false;
}
}
//
// Other base methods
//
function sql_close()
{
if( $this->db_connect_id )
{
//
// Commit any remaining transactions
//
if( $this->in_transaction )
{
mysql_query("COMMIT", $this->db_connect_id);
}
return mysql_close($this->db_connect_id);
}
else
{
return false;
}
}
//
// Base query method
//
function sql_query($query = "", $transaction = FALSE)
{
//
// Remove any pre-existing queries
//
unset($this->query_result);
if( $query != "" )
{
$this->num_queries++;
if( $transaction == BEGIN_TRANSACTION && !$this->in_transaction )
{
$result = mysql_query("BEGIN", $this->db_connect_id);
if(!$result)
{
return false;
}
$this->in_transaction = TRUE;
}
$this->query_result = mysql_query($query, $this->db_connect_id);
}
else
{
if( $transaction == END_TRANSACTION && $this->in_transaction )
{
$result = mysql_query("COMMIT", $this->db_connect_id);
}
}
if( $this->query_result )
{
unset($this->row[$this->query_result]);
unset($this->rowset[$this->query_result]);
if( $transaction == END_TRANSACTION && $this->in_transaction )
{
$this->in_transaction = FALSE;
if ( !mysql_query("COMMIT", $this->db_connect_id) )
{
mysql_query("ROLLBACK", $this->db_connect_id);
return false;
}
}
return $this->query_result;
}
else
{
if( $this->in_transaction )
{
mysql_query("ROLLBACK", $this->db_connect_id);
$this->in_transaction = FALSE;
}
return false;
}
}
//
// Other query methods
//
function sql_numrows($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
return ( $query_id ) ? mysql_num_rows($query_id) : false;
}
function sql_affectedrows()
{
return ( $this->db_connect_id ) ? mysql_affected_rows($this->db_connect_id) : false;
}
function sql_numfields($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
return ( $query_id ) ? mysql_num_fields($query_id) : false;
}
function sql_fieldname($offset, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
return ( $query_id ) ? mysql_field_name($query_id, $offset) : false;
}
function sql_fieldtype($offset, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
return ( $query_id ) ? mysql_field_type($query_id, $offset) : false;
}
function sql_fetchrow($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
if( $query_id )
{
$this->row[$query_id] = mysql_fetch_array($query_id, MYSQL_ASSOC);
return $this->row[$query_id];
}
else
{
return false;
}
}
function sql_fetchrowset($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
if( $query_id )
{
unset($this->rowset[$query_id]);
unset($this->row[$query_id]);
while($this->rowset[$query_id] = mysql_fetch_array($query_id, MYSQL_ASSOC))
{
$result[] = $this->rowset[$query_id];
}
return $result;
}
else
{
return false;
}
}
function sql_fetchfield($field, $rownum = -1, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
if( $query_id )
{
if( $rownum > -1 )
{
$result = mysql_result($query_id, $rownum, $field);
}
else
{
if( empty($this->row[$query_id]) && empty($this->rowset[$query_id]) )
{
if( $this->sql_fetchrow() )
{
$result = $this->row[$query_id][$field];
}
}
else
{
if( $this->rowset[$query_id] )
{
$result = $this->rowset[$query_id][$field];
}
else if( $this->row[$query_id] )
{
$result = $this->row[$query_id][$field];
}
}
}
return $result;
}
else
{
return false;
}
}
function sql_rowseek($rownum, $query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
return ( $query_id ) ? mysql_data_seek($query_id, $rownum) : false;
}
function sql_nextid()
{
return ( $this->db_connect_id ) ? mysql_insert_id($this->db_connect_id) : false;
}
function sql_freeresult($query_id = 0)
{
if( !$query_id )
{
$query_id = $this->query_result;
}
if ( $query_id )
{
unset($this->row[$query_id]);
unset($this->rowset[$query_id]);
mysql_free_result($query_id);
return true;
}
else
{
return false;
}
}
function sql_error()
{
$result['message'] = mysql_error($this->db_connect_id);
$result['code'] = mysql_errno($this->db_connect_id);
return $result;
}
} // class sql_db
} // if ... define
?>

View File

@@ -1,244 +0,0 @@
/*
Basic DB data for phpBB2 devel (MSSQL)
$Id$
*/
BEGIN TRANSACTION;
/*
-- Config
*/
INSERT INTO phpbb_config (config_name, config_value) VALUES ('config_id','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sitename','yourdomain.com');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('site_desc','A _little_ text to describe your forum');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_name','phpbb2mysql');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_path','/');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_domain','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_secure','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_length','3600');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html_tags','b,i,u,pre');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_smilies','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_theme_create','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_local','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page','15');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page','50');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold','25');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_poll_options','10');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_chars','255');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_inbox_privmsgs','50');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sentbox_privmsgs','25');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_savebox_privmsgs','50');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_sig','Thanks, The Management');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email','youraddress@yourdomain.com');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval','15');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize','6144');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width','80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height','80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_path','images/avatars');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_gallery_path','images/avatars/gallery');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_path','images/smiles');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_dateformat','D M d, Y g:i a');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('prune_enable','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('privmsg_disable','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_fax', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_mail', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_users', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_users', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.yourdomain.tld');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', 'RC-4');
/*
-- Categories
*/
SET IDENTITY_INSERT phpbb_categories ON;
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 1);
SET IDENTITY_INSERT phpbb_categories OFF;
/*
-- Forums
*/
INSERT INTO phpbb_forums (forum_id, cat_id, forum_name, forum_desc, forum_status, forum_order, forum_posts, forum_topics, forum_last_post_id, prune_next, prune_enable, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 1, 'Test Forum 1', 'This is just a test forum, nothing special here.', '', 1, 1, 1, 1, '', 1, '', '', '', '', 1, 1, 3, 1, 1, 1, 3);
/*
-- Users
Default Admin --> username: admin
password: admin (change this or remove it once everything is working!)
*/
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', '', '', '', '', 0, 0);
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 2, 'Admin', 1, 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1);
/*
-- Ranks
*/
SET IDENTITY_INSERT phpbb_ranks ON;
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES (1, 'Site Admin', -1, 1, '');
SET IDENTITY_INSERT phpbb_ranks OFF;
/*
-- Groups
*/
INSERT INTO phpbb_groups (group_id, group_type, group_name, group_description, group_moderator, group_single_user) VALUES (1, 1, 'Anonymous', 'Personal User', '', 1);
INSERT INTO phpbb_groups (group_id, group_type, group_name, group_description, group_moderator, group_single_user) VALUES (2, 1, 'Admin', 'Personal User', '', 1);
/*
-- User -> Group
*/
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (1, -1, '');
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (2, 2, '');
/*
-- Demo Topic
*/
SET IDENTITY_INSERT phpbb_topics ON;
INSERT INTO phpbb_topics (topic_id, topic_title, topic_poster, topic_time, topic_views, topic_replies, forum_id, topic_status, topic_type, topic_vote, topic_first_post_id, topic_last_post_id, topic_moved_id) VALUES (1, 'Welcome to phpBB 2', 2, '972086460', 0, 0, 1, 0, 0, 0, 1, 1, '');
SET IDENTITY_INSERT phpbb_topics OFF;
/*
-- Demo Post
*/
SET IDENTITY_INSERT phpbb_posts ON;
INSERT INTO phpbb_posts (post_id, topic_id, forum_id, poster_id, post_time, post_username, poster_ip) VALUES (1, 1, 1, 2, 972086460, NULL, '7F000001');
INSERT INTO phpbb_posts_text (post_id, post_subject, post_text) VALUES (1, NULL, 'This is an example post in your phpBB 2 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!');
SET IDENTITY_INSERT phpbb_posts OFF;
/*
-- Themes
*/
SET IDENTITY_INSERT phpbb_themes ON;
INSERT INTO phpbb_themes (themes_id, template_name, style_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (1, 'subSilver', 'subSilver', 'subSilver.css', '', 'E5E5E5', '000000', '006699', '5493B4', '', 'DD6900', 'EFEFEF', 'DEE3E7', 'D1D7DC', '', '', '', '98AAB1', '006699', 'FFFFFF', 'cellpic1.gif', 'cellpic3.gif', 'cellpic2.jpg', 'FAFAFA', 'FFFFFF', '', 'row1', 'row2', '', 'Verdana, Arial, Helvetica, sans-serif', 'Trebuchet MS', 'Courier, ''Courier New'', sans-serif', 10, 11, 12, '444444', '006600', 'FFA34F', '', '', '');
SET IDENTITY_INSERT phpbb_themes OFF;
INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, tr_class1_name, tr_class2_name, tr_class3_name, th_color1_name, th_color2_name, th_color3_name, th_class1_name, th_class2_name, th_class3_name, td_color1_name, td_color2_name, td_color3_name, td_class1_name, td_class2_name, td_class3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, span_class1_name, span_class2_name, span_class3_name) VALUES (1, 'The lightest row colour', 'The medium row color', 'The darkest row colour', '', '', '', 'Border round the whole page', 'Outer table border', 'Inner table border', 'Silver gradient picture', 'Blue gradient picture', 'Fade-out gradient on index', 'Background for quote boxes', 'All white areas', '', 'Background for topic posts', '2nd background for topic posts', '', 'Main fonts', 'Additional topic title font', 'Form fonts', 'Smallest font size', 'Medium font size', 'Normal font size (post body etc)', 'Quote & copyright text', 'Code text colour', 'Main table header text colour', '', '', '');
/*
-- Smilies
*/
SET IDENTITY_INSERT phpbb_smilies ON;
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 1, ':D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 2, ':-D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 3, ':grin:', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 4, ':)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 5, ':-)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 6, ':smile:', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 7, ':(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 8, ':-(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 9, ':sad:', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 10, ':o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 11, ':-o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 12, ':eek:', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, '8O', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, '8-O', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':shock:', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, ':-?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, ':???:', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, '8)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, '8-)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':cool:', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':lol:', 'icon_lol.gif', 'Laughing');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':-x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':mad:', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':-P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':razz:', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':oops:', 'icon_redface.gif', 'Embarassed');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':cry:', 'icon_cry.gif', 'Crying or Very sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':twisted:', 'icon_twisted.gif', 'Twisted Evil');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ':wink:', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ';)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ';-)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':!:', 'icon_exclaim.gif', 'Exclamation');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':?:', 'icon_question.gif', 'Question');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':idea:', 'icon_idea.gif', 'Idea');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':arrow:', 'icon_arrow.gif', 'Arrow');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':-|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 43, ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 44, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
SET IDENTITY_INSERT phpbb_smilies OFF;
/*
-- Search Words
*/
SET IDENTITY_INSERT phpbb_search_wordlist ON;
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 1, 'example', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 2, 'post', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 3, 'phpbb', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 4, 'installation', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 5, 'delete', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 6, 'topic', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 7, 'forum', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 8, 'since', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 9, 'everything', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 10, 'seems', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 11, 'working', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 12, 'welcome', 0 );
SET IDENTITY_INSERT phpbb_search_wordlist OFF;
/*
-- Search Word Matches
*/
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 1, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 2, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 4, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 5, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 6, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 7, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 8, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 9, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 10, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 11, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 12, 1, 1 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 1 );
COMMIT;

View File

@@ -1,185 +0,0 @@
#
# Basic DB data for phpBB2 devel
#
# $Id$
# -- Config
INSERT INTO phpbb_config (config_name, config_value) VALUES ('config_id','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sitename','yourdomain.com');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('site_desc','A _little_ text to describe your forum');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_name','phpbb2mysql');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_path','/');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_domain','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_secure','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_length','3600');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html_tags','b,i,u,pre');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_smilies','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_theme_create','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_local','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page','15');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page','50');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold','25');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_poll_options','10');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_chars','255');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_inbox_privmsgs','50');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sentbox_privmsgs','25');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_savebox_privmsgs','50');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_sig','Thanks, The Management');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email','youraddress@yourdomain.com');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval','15');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize','6144');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width','80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height','80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_path','images/avatars');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_gallery_path','images/avatars/gallery');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_path','images/smiles');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_dateformat','D M d, Y g:i a');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('prune_enable','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('privmsg_disable','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_fax', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_mail', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_users', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.myserver.tld');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', 'RC-4');
# -- Categories
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 10);
# -- Forums
INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order, forum_posts, forum_topics, forum_last_post_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 'Test Forum 1', 'This is just a test forum.', 1, 10, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 1, 1, 1, 3);
# -- Users
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', '', '', '', '', 0, 0);
# -- username: admin password: admin (change this or remove it once everything is working!)
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 2, 'Admin', 1, 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1);
# -- Ranks
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( 1, 'Site Admin', -1, 1, NULL);
# -- Groups
INSERT INTO phpbb_groups (group_id, group_name, group_description, group_single_user) VALUES (1, 'Anonymous', 'Personal User', 1);
INSERT INTO phpbb_groups (group_id, group_name, group_description, group_single_user) VALUES (2, 'Admin', 'Personal User', 1);
# -- User -> Group
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (1, -1, 0);
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (2, 2, 0);
# -- Demo Topic
INSERT INTO phpbb_topics (topic_id, topic_title, topic_poster, topic_time, topic_views, topic_replies, forum_id, topic_status, topic_type, topic_vote, topic_first_post_id, topic_last_post_id) VALUES (1, 'Welcome to phpBB 2', 2, '972086460', 0, 0, 1, 0, 0, 0, 1, 1);
# -- Demo Post
INSERT INTO phpbb_posts (post_id, topic_id, forum_id, poster_id, post_time, post_username, poster_ip) VALUES (1, 1, 1, 2, 972086460, NULL, '7F000001');
INSERT INTO phpbb_posts_text (post_id, post_subject, post_text) VALUES (1, NULL, 'This is an example post in your phpBB 2 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!');
# -- Themes
INSERT INTO phpbb_themes (themes_id, template_name, style_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (1, 'subSilver', 'subSilver', 'subSilver.css', '', 'E5E5E5', '000000', '006699', '5493B4', '', 'DD6900', 'EFEFEF', 'DEE3E7', 'D1D7DC', '', '', '', '98AAB1', '006699', 'FFFFFF', 'cellpic1.gif', 'cellpic3.gif', 'cellpic2.jpg', 'FAFAFA', 'FFFFFF', '', 'row1', 'row2', '', 'Verdana, Arial, Helvetica, sans-serif', 'Trebuchet MS', 'Courier, \'Courier New\', sans-serif', 10, 11, 12, '444444', '006600', 'FFA34F', '', '', '');
INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, tr_class1_name, tr_class2_name, tr_class3_name, th_color1_name, th_color2_name, th_color3_name, th_class1_name, th_class2_name, th_class3_name, td_color1_name, td_color2_name, td_color3_name, td_class1_name, td_class2_name, td_class3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, span_class1_name, span_class2_name, span_class3_name) VALUES (1, 'The lightest row colour', 'The medium row color', 'The darkest row colour', '', '', '', 'Border round the whole page', 'Outer table border', 'Inner table border', 'Silver gradient picture', 'Blue gradient picture', 'Fade-out gradient on index', 'Background for quote boxes', 'All white areas', '', 'Background for topic posts', '2nd background for topic posts', '', 'Main fonts', 'Additional topic title font', 'Form fonts', 'Smallest font size', 'Medium font size', 'Normal font size (post body etc)', 'Quote & copyright text', 'Code text colour', 'Main table header text colour', '', '', '');
# -- Smilies
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 1, ':D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 2, ':-D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 3, ':grin:', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 4, ':)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 5, ':-)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 6, ':smile:', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 7, ':(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 8, ':-(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 9, ':sad:', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 10, ':o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 11, ':-o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 12, ':eek:', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, '8O', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, '8-O', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':shock:', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, ':-?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, ':???:', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, '8)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, '8-)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':cool:', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':lol:', 'icon_lol.gif', 'Laughing');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':-x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':mad:', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':-P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':razz:', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':oops:', 'icon_redface.gif', 'Embarassed');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':cry:', 'icon_cry.gif', 'Crying or Very sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':twisted:', 'icon_twisted.gif', 'Twisted Evil');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ':wink:', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ';)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ';-)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':!:', 'icon_exclaim.gif', 'Exclamation');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':?:', 'icon_question.gif', 'Question');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':idea:', 'icon_idea.gif', 'Idea');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':arrow:', 'icon_arrow.gif', 'Arrow');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':-|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 43, ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 44, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
# -- wordlist
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 1, 'example', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 2, 'post', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 3, 'phpbb', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 4, 'installation', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 5, 'delete', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 6, 'topic', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 7, 'forum', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 8, 'since', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 9, 'everything', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 10, 'seems', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 11, 'working', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 12, 'welcome', 0 );
# -- wordmatch
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 1, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 2, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 4, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 5, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 6, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 7, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 8, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 9, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 10, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 11, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 12, 1, 1 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 1 );

View File

@@ -1,558 +0,0 @@
#
# phpBB2 - MySQL schema
#
# $Id$
#
#
# Table structure for table 'phpbb_auth_access'
#
CREATE TABLE phpbb_auth_access (
group_id mediumint(8) DEFAULT '0' NOT NULL,
forum_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
auth_view tinyint(1) DEFAULT '0' NOT NULL,
auth_read tinyint(1) DEFAULT '0' NOT NULL,
auth_post tinyint(1) DEFAULT '0' NOT NULL,
auth_reply tinyint(1) DEFAULT '0' NOT NULL,
auth_edit tinyint(1) DEFAULT '0' NOT NULL,
auth_delete tinyint(1) DEFAULT '0' NOT NULL,
auth_sticky tinyint(1) DEFAULT '0' NOT NULL,
auth_announce tinyint(1) DEFAULT '0' NOT NULL,
auth_vote tinyint(1) DEFAULT '0' NOT NULL,
auth_pollcreate tinyint(1) DEFAULT '0' NOT NULL,
auth_attachments tinyint(1) DEFAULT '0' NOT NULL,
auth_mod tinyint(1) DEFAULT '0' NOT NULL,
KEY group_id (group_id),
KEY forum_id (forum_id)
);
#
# Table structure for table 'phpbb_user_group'
#
CREATE TABLE phpbb_user_group (
group_id mediumint(8) DEFAULT '0' NOT NULL,
user_id mediumint(8) DEFAULT '0' NOT NULL,
user_pending tinyint(1),
KEY group_id (group_id),
KEY user_id (user_id)
);
#
# Table structure for table 'phpbb_groups'
#
CREATE TABLE phpbb_groups (
group_id mediumint(8) NOT NULL auto_increment,
group_type tinyint(4) DEFAULT '1' NOT NULL,
group_name varchar(40) NOT NULL,
group_description varchar(255) NOT NULL,
group_moderator mediumint(8) DEFAULT '0' NOT NULL,
group_single_user tinyint(1) DEFAULT '1' NOT NULL,
PRIMARY KEY (group_id),
KEY group_single_user (group_single_user)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_banlist'
#
CREATE TABLE phpbb_banlist (
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
ban_userid mediumint(8) NOT NULL,
ban_ip char(8) NOT NULL,
ban_email varchar(255),
PRIMARY KEY (ban_id),
KEY ban_ip_user_id (ban_ip, ban_userid)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_categories'
#
CREATE TABLE phpbb_categories (
cat_id mediumint(8) UNSIGNED NOT NULL auto_increment,
cat_title varchar(100),
cat_order mediumint(8) UNSIGNED NOT NULL,
PRIMARY KEY (cat_id),
KEY cat_order (cat_order)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_config'
#
CREATE TABLE phpbb_config (
config_name varchar(255) NOT NULL,
config_value varchar(255) NOT NULL,
PRIMARY KEY (config_name)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_disallow'
#
CREATE TABLE phpbb_disallow (
disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
disallow_username varchar(25),
PRIMARY KEY (disallow_id)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_forum_prune'
#
CREATE TABLE phpbb_forum_prune (
prune_id mediumint(8) UNSIGNED NOT NULL auto_increment,
forum_id smallint(5) UNSIGNED NOT NULL,
prune_days tinyint(4) UNSIGNED NOT NULL,
prune_freq tinyint(4) UNSIGNED NOT NULL,
PRIMARY KEY(prune_id),
KEY forum_id (forum_id)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_forums'
#
CREATE TABLE phpbb_forums (
forum_id smallint(5) UNSIGNED NOT NULL,
cat_id mediumint(8) UNSIGNED NOT NULL,
forum_name varchar(150),
forum_desc text,
forum_status tinyint(4) DEFAULT '0' NOT NULL,
forum_order mediumint(8) UNSIGNED DEFAULT '1' NOT NULL,
forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
prune_next int(11),
prune_enable tinyint(1) DEFAULT '0' NOT NULL,
auth_view tinyint(2) DEFAULT '0' NOT NULL,
auth_read tinyint(2) DEFAULT '0' NOT NULL,
auth_post tinyint(2) DEFAULT '0' NOT NULL,
auth_reply tinyint(2) DEFAULT '0' NOT NULL,
auth_edit tinyint(2) DEFAULT '0' NOT NULL,
auth_delete tinyint(2) DEFAULT '0' NOT NULL,
auth_sticky tinyint(2) DEFAULT '0' NOT NULL,
auth_announce tinyint(2) DEFAULT '0' NOT NULL,
auth_vote tinyint(2) DEFAULT '0' NOT NULL,
auth_pollcreate tinyint(2) DEFAULT '0' NOT NULL,
auth_attachments tinyint(2) DEFAULT '0' NOT NULL,
PRIMARY KEY (forum_id),
KEY forums_order (forum_order),
KEY cat_id (cat_id),
KEY forum_last_post_id (forum_last_post_id)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_posts'
#
CREATE TABLE phpbb_posts (
post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
poster_id mediumint(8) DEFAULT '0' NOT NULL,
post_time int(11) DEFAULT '0' NOT NULL,
poster_ip char(8) NOT NULL,
post_username varchar(25),
enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
enable_html tinyint(1) DEFAULT '0' NOT NULL,
enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
enable_sig tinyint(1) DEFAULT '1' NOT NULL,
post_edit_time int(11),
post_edit_count smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (post_id),
KEY forum_id (forum_id),
KEY topic_id (topic_id),
KEY poster_id (poster_id),
KEY post_time (post_time)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_posts_text'
#
CREATE TABLE phpbb_posts_text (
post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_uid char(10) NOT NULL,
post_subject char(60),
post_text text,
PRIMARY KEY (post_id)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_privmsgs'
#
CREATE TABLE phpbb_privmsgs (
privmsgs_id mediumint(8) UNSIGNED NOT NULL auto_increment,
privmsgs_type tinyint(4) DEFAULT '0' NOT NULL,
privmsgs_subject varchar(255) DEFAULT '0' NOT NULL,
privmsgs_from_userid mediumint(8) DEFAULT '0' NOT NULL,
privmsgs_to_userid mediumint(8) DEFAULT '0' NOT NULL,
privmsgs_date int(11) DEFAULT '0' NOT NULL,
privmsgs_ip char(8) NOT NULL,
privmsgs_enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
privmsgs_enable_html tinyint(1) DEFAULT '0' NOT NULL,
privmsgs_enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
privmsgs_attach_sig tinyint(1) DEFAULT '1' NOT NULL,
PRIMARY KEY (privmsgs_id),
KEY privmsgs_from_userid (privmsgs_from_userid),
KEY privmsgs_to_userid (privmsgs_to_userid)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_privmsgs_text'
#
CREATE TABLE phpbb_privmsgs_text (
privmsgs_text_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL,
privmsgs_text text,
PRIMARY KEY (privmsgs_text_id)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_ranks'
#
CREATE TABLE phpbb_ranks (
rank_id smallint(5) UNSIGNED NOT NULL auto_increment,
rank_title varchar(50) NOT NULL,
rank_min mediumint(8) DEFAULT '0' NOT NULL,
rank_special tinyint(1) DEFAULT '0',
rank_image varchar(255),
PRIMARY KEY (rank_id)
);
# --------------------------------------------------------
#
# Table structure for table `phpbb_search_results`
#
CREATE TABLE phpbb_search_results (
search_id int(11) UNSIGNED NOT NULL default '0',
session_id char(32) NOT NULL default '',
search_array text NOT NULL,
PRIMARY KEY (search_id),
KEY session_id (session_id)
);
# --------------------------------------------------------
#
# Table structure for table `phpbb_search_wordlist`
#
CREATE TABLE phpbb_search_wordlist (
word_text varchar(50) binary NOT NULL default '',
word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
word_common tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (word_text),
KEY word_id (word_id)
);
# --------------------------------------------------------
#
# Table structure for table `phpbb_search_wordmatch`
#
CREATE TABLE phpbb_search_wordmatch (
post_id mediumint(8) UNSIGNED NOT NULL default '0',
word_id mediumint(8) UNSIGNED NOT NULL default '0',
title_match tinyint(1) NOT NULL default '0',
KEY word_id (word_id)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_sessions'
#
# Note that if you're running 3.23.x you may want to make
# this table a type HEAP. This type of table is stored
# within system memory and therefore for big busy boards
# is likely to be noticeably faster than continually
# writing to disk ...
#
# I must admit I read about this type on vB's board.
# Hey, I never said you cannot get basic ideas from
# competing boards, just that I find it's best not to
# look at any code ... !
#
CREATE TABLE phpbb_sessions (
session_id char(32) DEFAULT '' NOT NULL,
session_user_id mediumint(8) DEFAULT '0' NOT NULL,
session_start int(11) DEFAULT '0' NOT NULL,
session_time int(11) DEFAULT '0' NOT NULL,
session_ip char(8) DEFAULT '0' NOT NULL,
session_page int(11) DEFAULT '0' NOT NULL,
session_logged_in tinyint(1) DEFAULT '0' NOT NULL,
PRIMARY KEY (session_id),
KEY session_user_id (session_user_id),
KEY session_id_ip_user_id (session_id, session_ip, session_user_id)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_smilies'
#
CREATE TABLE phpbb_smilies (
smilies_id smallint(5) UNSIGNED NOT NULL auto_increment,
code varchar(50),
smile_url varchar(100),
emoticon varchar(75),
PRIMARY KEY (smilies_id)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_themes'
#
CREATE TABLE phpbb_themes (
themes_id mediumint(8) UNSIGNED NOT NULL auto_increment,
template_name varchar(30) NOT NULL default '',
style_name varchar(30) NOT NULL default '',
head_stylesheet varchar(100) default NULL,
body_background varchar(100) default NULL,
body_bgcolor varchar(6) default NULL,
body_text varchar(6) default NULL,
body_link varchar(6) default NULL,
body_vlink varchar(6) default NULL,
body_alink varchar(6) default NULL,
body_hlink varchar(6) default NULL,
tr_color1 varchar(6) default NULL,
tr_color2 varchar(6) default NULL,
tr_color3 varchar(6) default NULL,
tr_class1 varchar(25) default NULL,
tr_class2 varchar(25) default NULL,
tr_class3 varchar(25) default NULL,
th_color1 varchar(6) default NULL,
th_color2 varchar(6) default NULL,
th_color3 varchar(6) default NULL,
th_class1 varchar(25) default NULL,
th_class2 varchar(25) default NULL,
th_class3 varchar(25) default NULL,
td_color1 varchar(6) default NULL,
td_color2 varchar(6) default NULL,
td_color3 varchar(6) default NULL,
td_class1 varchar(25) default NULL,
td_class2 varchar(25) default NULL,
td_class3 varchar(25) default NULL,
fontface1 varchar(50) default NULL,
fontface2 varchar(50) default NULL,
fontface3 varchar(50) default NULL,
fontsize1 tinyint(4) default NULL,
fontsize2 tinyint(4) default NULL,
fontsize3 tinyint(4) default NULL,
fontcolor1 varchar(6) default NULL,
fontcolor2 varchar(6) default NULL,
fontcolor3 varchar(6) default NULL,
span_class1 varchar(25) default NULL,
span_class2 varchar(25) default NULL,
span_class3 varchar(25) default NULL,
img_size_poll smallint(5) UNSIGNED,
img_size_privmsg smallint(5) UNSIGNED,
PRIMARY KEY (themes_id)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_themes_name'
#
CREATE TABLE phpbb_themes_name (
themes_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
tr_color1_name char(50),
tr_color2_name char(50),
tr_color3_name char(50),
tr_class1_name char(50),
tr_class2_name char(50),
tr_class3_name char(50),
th_color1_name char(50),
th_color2_name char(50),
th_color3_name char(50),
th_class1_name char(50),
th_class2_name char(50),
th_class3_name char(50),
td_color1_name char(50),
td_color2_name char(50),
td_color3_name char(50),
td_class1_name char(50),
td_class2_name char(50),
td_class3_name char(50),
fontface1_name char(50),
fontface2_name char(50),
fontface3_name char(50),
fontsize1_name char(50),
fontsize2_name char(50),
fontsize3_name char(50),
fontcolor1_name char(50),
fontcolor2_name char(50),
fontcolor3_name char(50),
span_class1_name char(50),
span_class2_name char(50),
span_class3_name char(50),
PRIMARY KEY (themes_id)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_topics'
#
CREATE TABLE phpbb_topics (
topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
forum_id smallint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_title char(60) NOT NULL,
topic_poster mediumint(8) DEFAULT '0' NOT NULL,
topic_time int(11) DEFAULT '0' NOT NULL,
topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_status tinyint(3) DEFAULT '0' NOT NULL,
topic_vote tinyint(1) DEFAULT '0' NOT NULL,
topic_type tinyint(3) DEFAULT '0' NOT NULL,
topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (topic_id),
KEY forum_id (forum_id),
KEY topic_moved_id (topic_moved_id),
KEY topic_status (topic_status),
KEY topic_type (topic_type)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_topics_watch'
#
CREATE TABLE phpbb_topics_watch (
topic_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
user_id mediumint(8) NOT NULL DEFAULT '0',
notify_status tinyint(1) NOT NULL default '0',
KEY topic_id (topic_id),
KEY user_id (user_id),
KEY notify_status (notify_status)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_users'
#
CREATE TABLE phpbb_users (
user_id mediumint(8) NOT NULL auto_increment,
user_active tinyint(1) DEFAULT '1',
username varchar(25) NOT NULL,
user_password varchar(32) NOT NULL,
user_session_time int(11) DEFAULT '0' NOT NULL,
user_session_page smallint(5) DEFAULT '0' NOT NULL,
user_lastvisit int(11) DEFAULT '0' NOT NULL,
user_regdate int(11) DEFAULT '0' NOT NULL,
user_level tinyint(4) DEFAULT '0',
user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_timezone float DEFAULT '0' NOT NULL,
user_style tinyint(4),
user_lang varchar(255),
user_dateformat varchar(14) DEFAULT 'd M Y H:i' NOT NULL,
user_new_privmsg smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
user_unread_privmsg smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
user_last_privmsg int(11) DEFAULT '0' NOT NULL,
user_emailtime int(11),
user_viewemail tinyint(1),
user_attachsig tinyint(1),
user_allowhtml tinyint(1) DEFAULT '1',
user_allowbbcode tinyint(1) DEFAULT '1',
user_allowsmile tinyint(1) DEFAULT '1',
user_allowavatar tinyint(1) DEFAULT '1' NOT NULL,
user_allow_pm tinyint(1) DEFAULT '1' NOT NULL,
user_allow_viewonline tinyint(1) DEFAULT '1' NOT NULL,
user_notify tinyint(1) DEFAULT '1' NOT NULL,
user_notify_pm tinyint(1) DEFAULT '1' NOT NULL,
user_popup_pm tinyint(1) DEFAULT '0' NOT NULL,
user_rank int(11) DEFAULT '0',
user_avatar varchar(100),
user_avatar_type tinyint(4) DEFAULT '0' NOT NULL,
user_email varchar(255),
user_icq varchar(15),
user_website varchar(100),
user_from varchar(100),
user_sig text,
user_sig_bbcode_uid char(10),
user_aim varchar(255),
user_yim varchar(255),
user_msnm varchar(255),
user_occ varchar(100),
user_interests varchar(255),
user_actkey varchar(32),
user_newpasswd varchar(32),
PRIMARY KEY (user_id),
KEY user_session_time (user_session_time)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_vote_desc'
#
CREATE TABLE phpbb_vote_desc (
vote_id mediumint(8) UNSIGNED NOT NULL auto_increment,
topic_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
vote_text text NOT NULL,
vote_start int(11) NOT NULL DEFAULT '0',
vote_length int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (vote_id),
KEY topic_id (topic_id)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_vote_results'
#
CREATE TABLE phpbb_vote_results (
vote_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
vote_option_id tinyint(4) UNSIGNED NOT NULL DEFAULT '0',
vote_option_text varchar(255) NOT NULL,
vote_result int(11) NOT NULL DEFAULT '0',
KEY vote_option_id (vote_option_id),
KEY vote_id (vote_id)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_vote_voters'
#
CREATE TABLE phpbb_vote_voters (
vote_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
vote_user_id mediumint(8) NOT NULL DEFAULT '0',
vote_user_ip char(8) NOT NULL,
KEY vote_id (vote_id),
KEY vote_user_id (vote_user_id),
KEY vote_user_ip (vote_user_ip)
);
# --------------------------------------------------------
#
# Table structure for table 'phpbb_words'
#
CREATE TABLE phpbb_words (
word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
word char(100) NOT NULL,
replacement char(100) NOT NULL,
PRIMARY KEY (word_id)
);

View File

@@ -1,186 +0,0 @@
/*
* Basic DB data for phpBB2 devel
*
* $Id$
*/
-- Config
INSERT INTO phpbb_config VALUES ('board_disable','0');
INSERT INTO phpbb_config VALUES ('board_startdate','994190324');
INSERT INTO phpbb_config VALUES ('sitename','yourdomain.com');
INSERT INTO phpbb_config VALUES ('cookie_name','phpbb2oracle');
INSERT INTO phpbb_config VALUES ('cookie_path','/');
INSERT INTO phpbb_config VALUES ('cookie_domain','');
INSERT INTO phpbb_config VALUES ('cookie_secure','0');
INSERT INTO phpbb_config VALUES ('session_length','900');
INSERT INTO phpbb_config VALUES ('allow_html','0');
INSERT INTO phpbb_config VALUES ('allow_html_tags','b,i,u,pre');
INSERT INTO phpbb_config VALUES ('allow_bbcode','1');
INSERT INTO phpbb_config VALUES ('allow_smilies','1');
INSERT INTO phpbb_config VALUES ('allow_sig','1');
INSERT INTO phpbb_config VALUES ('allow_namechange','0');
INSERT INTO phpbb_config VALUES ('allow_theme_create','0');
INSERT INTO phpbb_config VALUES ('allow_avatar_local','0');
INSERT INTO phpbb_config VALUES ('allow_avatar_remote','1');
INSERT INTO phpbb_config VALUES ('allow_avatar_upload','1');
INSERT INTO phpbb_config VALUES ('override_user_style','0');
INSERT INTO phpbb_config VALUES ('posts_per_page','15');
INSERT INTO phpbb_config VALUES ('topics_per_page','50');
INSERT INTO phpbb_config VALUES ('hot_threshold','25');
INSERT INTO phpbb_config VALUES ('max_poll_options','10');
INSERT INTO phpbb_config VALUES ('max_sig_chars','255');
INSERT INTO phpbb_config VALUES ('max_inbox_privmsgs','50');
INSERT INTO phpbb_config VALUES ('max_sentbox_privmsgs','25');
INSERT INTO phpbb_config VALUES ('max_savebox_privmsgs','50');
INSERT INTO phpbb_config VALUES ('board_email_sig','Thanks, The Management');
INSERT INTO phpbb_config VALUES ('board_email','youraddress@yourdomain.com');
INSERT INTO phpbb_config VALUES ('smtp_delivery','0');
INSERT INTO phpbb_config VALUES ('smtp_host','');
INSERT INTO phpbb_config VALUES ('require_activation','0');
INSERT INTO phpbb_config VALUES ('require_admin_activation','0');
INSERT INTO phpbb_config VALUES ('flood_interval','15');
INSERT INTO phpbb_config VALUES ('avatar_filesize','6144');
INSERT INTO phpbb_config VALUES ('avatar_max_width','80');
INSERT INTO phpbb_config VALUES ('avatar_max_height','80');
INSERT INTO phpbb_config VALUES ('avatar_path','images/avatars');
INSERT INTO phpbb_config VALUES ('smilies_path','images/smiles');
INSERT INTO phpbb_config VALUES ('default_style','8');
INSERT INTO phpbb_config VALUES ('default_admin_style','2');
INSERT INTO phpbb_config VALUES ('default_lang','english');
INSERT INTO phpbb_config VALUES ('default_dateformat','D M d, Y g:i a');
INSERT INTO phpbb_config VALUES ('board_timezone','0');
INSERT INTO phpbb_config VALUES ('prune_enable','1');
INSERT INTO phpbb_config VALUES ('gzip_compress','1');
INSERT INTO phpbb_config VALUES ('record_online_users','0');
INSERT INTO phpbb_config VALUES ('record_online_date','0');
INSERT INTO phpbb_config VALUES ('script_path', '/phpBB2/');
INSERT INTO phpbb_config VALUES ('version', 'RC-4');
INSERT INTO phpbb_config VALUES ('server_name', 'www.yourdomain.tld');
INSERT INTO phpbb_config VALUES ('server_port', '80');
-- Categories
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 1);
-- Forums
INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order, forum_posts, forum_topics, forum_last_post_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 'Test Forum 1', 'This is just a test forum, nothing special here.', 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 3, 3, 3);
-- Users
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_autologin_key, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active, user_template) VALUES
( '-1', 'Anonymous', '0', '972086460', '1', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '0', '', '', '', '0', '0', '1', '1', '', '', '', '-8', 'D M d, Y g:i a', '', '', '0', '0');
-- username: admin password: admin (change this or remove it once everything is working!)
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_autologin_key, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( '2', 'Admin', '1', '972086460', '21232f297a57a5a743894a0e4a801fc3', '', 'admin@yourdomain.com', '', '', '', '', '', 'A Signature', '1', '2', '', '', '', '0', '0', '1', '0', '1', '1', '1', '1', '1', '', 'english', '-8', 'd M Y h:i a', '', '', '0', '1');
-- Ranks
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( '1', 'Site Admin', '-1', '1', '');
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( '2', 'Newbie', '0', '0', '');
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( '5', 'Here Often', '10', '0', '');
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( '6', 'Should Get Out More', '50', '0', '');
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( '7', 'Has No Life', '200', '0', '');
-- Groups
INSERT INTO phpbb_groups (group_id, group_name, group_description, group_single_user) VALUES (1, 'Anonymous', 'Personal User', 1);
INSERT INTO phpbb_groups (group_id, group_name, group_description, group_single_user) VALUES (2, 'Admin', 'Personal User', 1);
-- User -> Group
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (1, -1, 0);
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (2, 2, 0);
-- User Access (admin is set as ... an admin)
INSERT INTO phpbb_auth_access (group_id, forum_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_mod) VALUES (2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
-- Demo Topic
INSERT INTO phpbb_topics (topic_id, topic_title, topic_poster, topic_time, topic_views, topic_replies, forum_id, topic_status, topic_type, topic_last_post_id) VALUES (1, 'Demo Topic', 2, 972086460, 0, 0, 1, 0, 0, 1);
-- Demo Post
INSERT INTO phpbb_posts (post_id, topic_id, forum_id, poster_id, post_time, post_username, poster_ip) VALUES (1, 1, 1, 2, 972086460, '', '7F000001');
INSERT INTO phpbb_posts_text (post_id, post_subject, post_text) VALUES (1, 'This is the subject', 'This is a demo post in the demo topic, what do you think of it?');
-- Themes
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (1,'Original default','Default','','','','','','','','','','','','','','','','','','','','','CCCCCC','DDDDDD','','','','','','','',NULL,NULL,NULL,'','','','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (2,'PSO [ Grey ]','PSO', '','','FFFFFF','000000','002266','004411','','','','','','','','','000000','D2D2D2','BCBCBC','','','','EDEDED','DEDEDE','','row1','row2','','verdana,serif','arial,helvetica','courier',1,2,3,'','','','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (3,'PSO [ Wheat ] ','PSO','','','FFFFFF','000000','002266','004411','','','','','','','','','001100','E5CCA5','D4A294','','','','EBE4D9','DAD1C4','','row1','row2','','verdana,serif','arial,helvetica','courier',1,2,3,'000000','','','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (4,'PSO [ Ocean ]','PSO','','','DFF5FF','000000','011001','2100cc','','','','','','','','','000000','A7C1CB','7897A8','','','','83D7CC','A0CCE0','','row1','row2','','verdana,serif','arial,helvetica','courier',1,2,3,'','','','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (6,'PSO [ Blue ]','PSO','','','FFFFFF','000000','417FB9','4E6172','0000AA','','','','','','','','000000','90BAE2','5195D4','','','','cde3f2','daedFd','','row1','row2','','verdana,serif','arial,helvetica','courier',1,2,3,'000000','','','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (7,'PSO [ Cool Midnight ]','PSO', '','','444444','ECECEC','EDF2F2','DDEDED','FFFFFF','EDF2F2','','','','','','','000000','80707F','66555F','','','','60707D','667A80','','row1','row2','','Verdana,serif','Arial,Helvetica,sans-serif','courier',NULL,NULL,NULL,'ECECEC','ECECEC','ECECEC','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (8,'PSO [ Pastel Purple ]','PSO','','','FFFFFF','000000','445588','337744','','','','','','','','','CCCCDD','CCCCDD','DDDDEE','','','','EFEFEF','FEFEFE','','row1','row2','','Verdana,serif','Arial,Helvetica,sans-serif','courier',1,2,3,'','','0000EE','','','');
INSERT INTO phpbb_themes (themes_id, template_name, style_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (9,'subSilver','subSilver','subSilver','','E5E5E5','000000','006699','5584AA','FF9933','EDF2F2','EFEFEF','DEE3E7','c2cdd6','','','','CBD3D9','BCBCBC','1B7CAD','','','','AEBDC4','006699','FFFFFF','row1','row2','','Verdana,Arial,Helvetica,sans-serif','Verdana,Arial,Helvetica,sans-serif','courier','','','','004c75','004c75','004c75','','','');
-- Smilies
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '1', ':D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '2', ':-D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '3', ':grin:', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '4', ':)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '5', ':-)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '6', ':smile:', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '7', ':(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '8', ':-(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '9', ':sad:', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '10', ':o', 'icon_eek.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '11', ':-o', 'icon_eek.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '12', ':eek:', 'icon_eek.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '13', ':?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '14', ':-?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '15', ':???:', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '16', '8)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '17', '8-)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '18', ':cool:', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '19', ':lol:', 'icon_lol.gif', 'Laughing');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '20', ':x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '21', ':-x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '22', ':mad:', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '23', ':P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '24', ':-P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '25', ':razz:', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '26', ':oops:', 'icon_redface.gif', 'Embarassed');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '27', ':cry:', 'icon_cry.gif', 'Crying or Very sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '28', ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '29', ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '30', ':wink:', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '31', ';)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '32', ';-)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '33', ':!:', 'icon_exclaim.gif', 'Exclamation');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '34', ':?:', 'icon_question.gif', 'Question');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '35', ':idea:', 'icon_idea.gif', 'Idea');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '36', ':arrow:', 'icon_arrow.gif', 'Arrow');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '37', ':|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '38', ':-|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '39', ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '40', ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
-- Words
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '1', 'asshole', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '2', 'assram*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '3', 'asswipe', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '4', 'asstool*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '5', 'bastard', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '6', 'bitch', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '7', 'bollock*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '8', 'crap*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '9', '*crap', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '10', 'cunt*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '11', 'dickweed', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '12', 'dickwad', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '13', 'dickhead', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '14', '*fuck*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '15', 'fuk*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '16', 'masturbat*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '17', 'piss*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '18', 'prick', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '19', 'pussy', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '20', '*shit*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '21', 'slut', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '22', 'tits', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '23', '*wank*', '*beep*');
COMMIT;

View File

@@ -1,217 +0,0 @@
/*
phpBB2 Oracle 8i Triggers File - (c) 2001 The phpBB Group
$Id$
*/
/* --------------------------------------------------------
Trigger structure for table phpbb_groups
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_PHPBB_GROUPS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "GROUP_ID" ON "PHPBB"."PHPBB_GROUPS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_GROUPS_ID_SEQ.NEXTVAL
INTO :NEW.group_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_banlist
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_PHPBB_BANLIST_ID_SEQ"
BEFORE INSERT OR UPDATE OF "BAN_ID" ON "PHPBB"."PHPBB_BANLIST"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_BANLIST_ID_SEQ.NEXTVAL
INTO :NEW.ban_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_categories
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_CATEGORIES_ID_SEQ"
BEFORE INSERT OR UPDATE OF "CAT_ID" ON "PHPBB"."PHPBB_CATEGORIES"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_CATEGORIES_ID_SEQ.NEXTVAL
INTO :NEW.cat_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_disallow
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_DISALLOW_ID_SEQ"
BEFORE INSERT OR UPDATE OF "DISALLOW_ID" ON "PHPBB"."PHPBB_DISALLOW"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_DISALLOW_ID_SEQ.NEXTVAL
INTO :NEW.disallow_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_forums
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_FORUMS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "FORUM_ID" ON "PHPBB"."PHPBB_FORUMS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_FORUMS_ID_SEQ.NEXTVAL
INTO :NEW.forum_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_forum_prune
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_FORUM_PRUNE_ID_SEQ"
BEFORE INSERT OR UPDATE OF "PRUNE_ID" ON "PHPBB"."PHPBB_FORUM_PRUNE"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_FORUM_PRUNE_ID_SEQ.NEXTVAL
INTO :NEW.prune_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_posts
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_POSTS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "POST_ID" ON "PHPBB"."PHPBB_POSTS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_POSTS_ID_SEQ.NEXTVAL
INTO :NEW.post_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_privmsgs
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_PRIVMSGS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "PRIVMSGS_ID" ON "PHPBB"."PHPBB_PRIVMSGS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_PRIVMSGS_ID_SEQ.NEXTVAL
INTO :NEW.privmsgs_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_ranks
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_RANK_ID_SEQ"
BEFORE INSERT OR UPDATE OF "RANK_ID" ON "PHPBB"."PHPBB_RANKS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_RANKS_ID_SEQ.NEXTVAL
INTO :NEW.rank_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_smilies
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_SMILIES_ID_SEQ"
BEFORE INSERT OR UPDATE OF "SMILIES_ID" ON "PHPBB"."PHPBB_SMILIES"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_SMILIES_ID_SEQ.NEXTVAL
INTO :NEW.smilies_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_themes
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_THEMES_ID_SEQ"
BEFORE INSERT OR UPDATE OF "THEMES_ID" ON "PHPBB"."PHPBB_THEMES"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_THEMES_ID_SEQ.NEXTVAL
INTO :NEW.themes_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_topics
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_TOPICS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "TOPIC_ID" ON "PHPBB"."PHPBB_TOPICS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_TOPICS_ID_SEQ.NEXTVAL
INTO :NEW.topic_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_users
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_USERS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "USER_ID" ON "PHPBB"."PHPBB_USERS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_USERS_ID_SEQ.NEXTVAL
INTO :NEW.user_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_vote_desc
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_VOTE_DESC_ID_SEQ"
BEFORE INSERT OR UPDATE OF "VOTE_ID" ON "PHPBB"."PHPBB_VOTE_DESC"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_VOTE_DESC_ID_SEQ.NEXTVAL
INTO :NEW.vote_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_words
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_WORDS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "WORD_ID" ON "PHPBB"."PHPBB_WORDS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_WORDS_ID_SEQ.NEXTVAL
INTO :NEW.word_id
FROM DUAL;
END;
/
COMMIT;

View File

@@ -1,184 +0,0 @@
/*
* Basic DB data for phpBB2 devel
*
* $Id$
*/
-- Config
INSERT INTO phpbb_config (config_name, config_value) VALUES ('config_id','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sitename','yourdomain.com');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('site_desc','A _little_ text to describe your forum');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_name','phpbb2mysql');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_path','/');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_domain','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_secure','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_length','3600');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html_tags','b,i,u,pre');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_smilies','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_theme_create','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_local','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page','15');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page','50');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold','25');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_poll_options','10');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_chars','255');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_inbox_privmsgs','50');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sentbox_privmsgs','25');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_savebox_privmsgs','50');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_sig','Thanks, The Management');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email','youraddress@yourdomain.com');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval','15');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize','6144');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width','80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height','80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_path','images/avatars');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_gallery_path','images/avatars/gallery');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_path','images/smiles');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_dateformat','D M d, Y g:i a');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('prune_enable','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('privmsg_disable','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_fax', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_mail', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_users', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.yourdomain.tld');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', 'RC-4');
-- Categories
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 10);
-- Forums
INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order, forum_posts, forum_topics, forum_last_post_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 'Test Forum 1', 'This is just a test forum.', 1, 10, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 1, 1, 1, 3);
-- Users
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', '', '', '', '', 0, 0);
-- username: admin password: admin (change this or remove it once everything is working!)
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 2, 'Admin', 1, 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1);
-- Ranks
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( 1, 'Site Admin', -1, 1, NULL);
-- Groups
INSERT INTO phpbb_groups (group_id, group_name, group_description, group_single_user) VALUES (1, 'Anonymous', 'Personal User', 1);
INSERT INTO phpbb_groups (group_id, group_name, group_description, group_single_user) VALUES (2, 'Admin', 'Personal User', 1);
-- User -> Group
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (1, -1, 0);
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (2, 2, 0);
-- Demo Topic
INSERT INTO phpbb_topics (topic_id, topic_title, topic_poster, topic_time, topic_views, topic_replies, forum_id, topic_status, topic_type, topic_vote, topic_first_post_id, topic_last_post_id) VALUES (1, 'Welcome to phpBB 2', 2, '972086460', 0, 0, 1, 0, 0, 0, 1, 1);
-- Demo Post
INSERT INTO phpbb_posts (post_id, topic_id, forum_id, poster_id, post_time, post_username, poster_ip) VALUES (1, 1, 1, 2, 972086460, NULL, '7F000001');
INSERT INTO phpbb_posts_text (post_id, post_subject, post_text) VALUES (1, NULL, 'This is an example post in your phpBB 2 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!');
-- Themes
INSERT INTO phpbb_themes (themes_id, template_name, style_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (1, 'subSilver', 'subSilver', 'subSilver.css', NULL, 'E5E5E5', '000000', '006699', '5493B4', '', 'DD6900', 'EFEFEF', 'DEE3E7', 'D1D7DC', NULL, NULL, NULL, '98AAB1', '006699', 'FFFFFF', 'cellpic1.gif', 'cellpic3.gif', 'cellpic2.jpg', 'FAFAFA', 'FFFFFF', NULL, 'row1', 'row2', NULL, 'Verdana, Arial, Helvetica, sans-serif', 'Trebuchet MS', 'Courier, ''Courier New'', sans-serif', 10, 11, 12, '444444', '006600', 'FFA34F', NULL, NULL, NULL);
INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, tr_class1_name, tr_class2_name, tr_class3_name, th_color1_name, th_color2_name, th_color3_name, th_class1_name, th_class2_name, th_class3_name, td_color1_name, td_color2_name, td_color3_name, td_class1_name, td_class2_name, td_class3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, span_class1_name, span_class2_name, span_class3_name) VALUES (1, 'The lightest row colour', 'The medium row color', 'The darkest row colour', NULL, NULL, NULL, 'Border round the whole page', 'Outer table border', 'Inner table border', 'Silver gradient picture', 'Blue gradient picture', 'Fade-out gradient on index', 'Background for quote boxes', 'All white areas', NULL, 'Background for topic posts', '2nd background for topic posts', NULL, 'Main fonts', 'Additional topic title font', 'Form fonts', 'Smallest font size', 'Medium font size', 'Normal font size (post body etc)', 'Quote & copyright text', 'Code text colour', 'Main table header text colour', NULL, NULL, NULL);
-- Smilies
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':grin:', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':smile:', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':sad:', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':eek:', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( '8O', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( '8-O', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':shock:', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':???:', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( '8)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( '8-)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':cool:', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':lol:', 'icon_lol.gif', 'Laughing');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':mad:', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':razz:', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':oops:', 'icon_redface.gif', 'Embarassed');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':cry:', 'icon_cry.gif', 'Crying or Very sad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':twisted:', 'icon_twisted.gif', 'Twisted Evil');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':wink:', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ';)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ';-)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':!:', 'icon_exclaim.gif', 'Exclamation');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':?:', 'icon_question.gif', 'Question');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':idea:', 'icon_idea.gif', 'Idea');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':arrow:', 'icon_arrow.gif', 'Arrow');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
-- wordlist
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 1, 'example', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 2, 'post', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 3, 'phpbb', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 4, 'installation', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 5, 'delete', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 6, 'topic', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 7, 'forum', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 8, 'since', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 9, 'everything', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 10, 'seems', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 11, 'working', 0 );
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 12, 'welcome', 0 );
-- wordmatch
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 1, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 2, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 4, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 5, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 6, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 7, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 8, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 9, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 10, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 11, 1, 0 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 12, 1, 1 );
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 1 );

View File

@@ -1,218 +0,0 @@
<?php
/***************************************************************************
* bbcode_conversion.php
* -------------------
* begin : Tuesday, March 20, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id:
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
*
***************************************************************************/
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
//
// Do not change anything below this line.
//
include('../extension.inc');
include('../config.'.$phpEx);
include('../includes/constants.'.$phpEx);
include('../functions/functions.'.$phpEx);
include('../includes/db.'.$phpEx);
include('../functions/bbcode.'.$phpEx);
set_time_limit(60*60); // Increase maximum execution time to 60 minutes.
$backup_name = "backup_post_text";
$table_name = POSTS_TEXT_TABLE;
$sql = "CREATE TABLE $backup_name (
post_id int(10) DEFAULT '0' NOT NULL,
post_text text,
PRIMARY KEY (post_id)
);";
echo "<p>Creating backup table.. </p>\n";
flush();
$result = $db->sql_query($sql);
if (!$result)
{
$db_error = $db->sql_error();
die("Error doing DB backup table creation. Reason: " . $db_error["message"]);
}
$sql = "insert into $backup_name select * from $table_name";
echo "<p>Populating backup table.. </p>\n";
flush();
$result = $db->sql_query($sql);
if (!$result)
{
$db_error = $db->sql_error();
die("Error doing DB backup table data moving. Reason: " . $db_error["message"]);
}
$sql = "SELECT p.post_id, t.post_text FROM " . POSTS_TABLE . " p, " . POSTS_TEXT_TABLE . " t WHERE (p.post_id = t.post_id)";
if(!$result = $db->sql_query($sql))
{
die("error getting posts to work on");
}
if(!$total_rows = $db->sql_numrows($result))
{
die("error getting rowcount");
}
echo "<p><b>Found $total_rows total rows to work on. </b></p>\n";
flush();
$row = $db->sql_fetchrowset($result);
for($i = 0; $i < $total_rows; $i++)
{
$post_id = $row[$i]['post_id'];
$text = $row[$i]['post_text'];
// undo 1.2.x encoding..
$text = bbdecode($text);
$text = undo_make_clickable($text);
$text = str_replace("<BR>", "\n", $text);
// make a uid
$uid = make_bbcode_uid();
// do 2.x first-pass encoding..
$text = bbencode_first_pass($text, $uid);
$text = addslashes($text);
// put the uid in the database.
$sql = "UPDATE " . POSTS_TABLE . " SET bbcode_uid='" . $uid . "' WHERE (post_id = $post_id)";
$result = $db->sql_query($sql);
if (!$result)
{
$db_error = $db->sql_error();
die("Error doing DB update in posts table. Reason: " . $db_error["message"] . " sql: $sql");
}
// Put the post text back in the database.
$sql = "UPDATE " . POSTS_TEXT_TABLE . " SET post_text='" . $text . "' WHERE (post_id = $post_id)";
$result = $db->sql_query($sql);
if (!$result)
{
$db_error = $db->sql_error();
die("Error doing DB update in post text table. Reason: " . $db_error["message"] . " sql: $sql");
}
if (($i % 100) == 0)
{
echo "Done post: <b> $i </b><br>\n";
flush();
}
}
echo "<p><b>Done.</b></p>\n";
// -------------------------------------------------------------------------------
// Everything below here is 1.x BBCode functions.
// -------------------------------------------------------------------------------
function bbdecode($message) {
// Undo [code]
$code_start_html = "<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Code:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><PRE>";
$code_end_html = "</PRE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode End -->";
$message = str_replace($code_start_html, "[code]", $message);
$message = str_replace($code_end_html, "[/code]", $message);
// Undo [quote]
$quote_start_html = "<!-- BBCode Quote Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Quote:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><BLOCKQUOTE>";
$quote_end_html = "</BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode Quote End -->";
$message = str_replace($quote_start_html, "[quote]", $message);
$message = str_replace($quote_end_html, "[/quote]", $message);
// Undo [b] and [i]
$message = preg_replace("#<!-- BBCode Start --><B>(.*?)</B><!-- BBCode End -->#s", "[b]\\1[/b]", $message);
$message = preg_replace("#<!-- BBCode Start --><I>(.*?)</I><!-- BBCode End -->#s", "[i]\\1[/i]", $message);
// Undo [url] (long form)
$message = preg_replace("#<!-- BBCode u2 Start --><A HREF=\"([a-z]+?://)(.*?)\" TARGET=\"_blank\">(.*?)</A><!-- BBCode u2 End -->#s", "[url=\\1\\2]\\3[/url]", $message);
// Undo [url] (short form)
$message = preg_replace("#<!-- BBCode u1 Start --><A HREF=\"([a-z]+?://)(.*?)\" TARGET=\"_blank\">(.*?)</A><!-- BBCode u1 End -->#s", "[url]\\3[/url]", $message);
// Undo [email]
$message = preg_replace("#<!-- BBCode Start --><A HREF=\"mailto:(.*?)\">(.*?)</A><!-- BBCode End -->#s", "[email]\\1[/email]", $message);
// Undo [img]
$message = preg_replace("#<!-- BBCode Start --><IMG SRC=\"(.*?)\" BORDER=\"0\"><!-- BBCode End -->#s", "[img]\\1[/img]", $message);
// Undo lists (unordered/ordered)
// <li> tags:
$message = str_replace("<!-- BBCode --><LI>", "[*]", $message);
// [list] tags:
$message = str_replace("<!-- BBCode ulist Start --><UL>", "[list]", $message);
// [list=x] tags:
$message = preg_replace("#<!-- BBCode olist Start --><OL TYPE=([A1])>#si", "[list=\\1]", $message);
// [/list] tags:
$message = str_replace("</UL><!-- BBCode ulist End -->", "[/list]", $message);
$message = str_replace("</OL><!-- BBCode olist End -->", "[/list]", $message);
return($message);
}
/**
* Nathan Codding - Feb 6, 2001
* Reverses the effects of make_clickable(), for use in editpost.
* - Does not distinguish between "www.xxxx.yyyy" and "http://aaaa.bbbb" type URLs.
*
*/
function undo_make_clickable($text) {
$text = preg_replace("#<!-- BBCode auto-link start --><a href=\"(.*?)\" target=\"_blank\">.*?</a><!-- BBCode auto-link end -->#i", "\\1", $text);
$text = preg_replace("#<!-- BBcode auto-mailto start --><a href=\"mailto:(.*?)\">.*?</a><!-- BBCode auto-mailto end -->#i", "\\1", $text);
return $text;
}
?>

View File

@@ -263,61 +263,51 @@ function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $m
$post_message = prepare_message($text, $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
$sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, bbcode_uid, enable_bbcode, enable_html, enable_smilies, enable_sig)
VALUES ($new_topic_id, $forum_id, $user_id, '$post_username', $current_time, '$user_ip', '$bbcode_uid', $bbcode_on, $html_on, $smilies_on, $attach_sig)";
$sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, attach_id, icon_id, post_username, post_time, poster_ip, post_approved, bbcode_uid, enable_bbcode, enable_html, enable_smilies, enable_sig, post_subject, post_text)
VALUES ($new_topic_id, $forum_id, $user_id, 0, 0, '$post_username', $current_time, '$user_ip', 1, '$bbcode_uid', $bbcode_on, $html_on, $smilies_on, $attach_sig, '$post_subject', '$post_message')";
$result = $db->sql_query($sql);
if($result)
if ($result)
{
$new_post_id = $db->sql_nextid();
$sql = "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, post_text)
VALUES ($new_post_id, '$post_subject', '$post_message')";
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_last_post_id = $new_post_id";
if($mode == "reply")
{
$sql .= ", topic_replies = topic_replies + 1 ";
}
$sql .= " WHERE topic_id = $new_topic_id";
if($db->sql_query($sql))
{
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_last_post_id = $new_post_id";
if($mode == "reply")
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1";
if($mode == "newtopic")
{
$sql .= ", topic_replies = topic_replies + 1 ";
$sql .= ", forum_topics = forum_topics + 1";
}
$sql .= " WHERE topic_id = $new_topic_id";
$sql .= " WHERE forum_id = $forum_id";
if($db->sql_query($sql))
{
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1";
if($mode == "newtopic")
{
$sql .= ", forum_topics = forum_topics + 1";
}
$sql .= " WHERE forum_id = $forum_id";
$sql = "UPDATE " . USERS_TABLE . "
SET user_posts = user_posts + 1
WHERE user_id = " . $user_id;
if($db->sql_query($sql))
if($db->sql_query($sql, END_TRANSACTION))
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_posts = user_posts + 1
WHERE user_id = " . $user_id;
if($db->sql_query($sql, END_TRANSACTION))
{
// SUCCESS.
return true;
}
else
{
message_die(GENERAL_ERROR, "Error updating users table", "", __LINE__, __FILE__, $sql);
}
// SUCCESS.
return true;
}
else
{
message_die(GENERAL_ERROR, "Error updating forums table", "", __LINE__, __FILE__, $sql);
message_die(GENERAL_ERROR, "Error updating users table", "", __LINE__, __FILE__, $sql);
}
}
else
{
message_die(GENERAL_ERROR, "Error updating topics table", "", __LINE__, __FILE__, $sql);
message_die(GENERAL_ERROR, "Error updating forums table", "", __LINE__, __FILE__, $sql);
}
}
else
@@ -329,14 +319,13 @@ function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $m
WHERE post_id = $new_post_id";
$db->sql_query($sql);
}
message_die(GENERAL_ERROR, "Error inserting data into posts text table", "", __LINE__, __FILE__, $sql);
message_die(GENERAL_ERROR, "Error updating topics table", "", __LINE__, __FILE__, $sql);
}
}
else
{
message_die(GENERAL_ERROR, "Error inserting data into posts table", "", __LINE__, __FILE__, $sql);
}
}
@@ -470,8 +459,4 @@ function make_user($username)
}
?>
?>

View File

@@ -1,65 +0,0 @@
<?php
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
//
// Do not change anything below this line.
//
$phpbb_root_path = "../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
$sql = "ALTER TABLE " . USERS_TABLE . "
ADD user_avatar_type TINYINT(4) DEFAULT '0' NOT NULL";
if( !$result = $db->sql_query($sql) )
{
die("Couldn't alter users table");
}
$sql = "SELECT user_id, user_avatar
FROM " . USERS_TABLE;
if( $result = $db->sql_query($sql) )
{
$rowset = $db->sql_fetchrowset($result);
for($i = 0; $i < count($rowset); $i++)
{
if( ereg("^http", $rowset[$i]['user_avatar']))
{
$sql_type = USER_AVATAR_REMOTE;
}
else if( $rowset[$i]['user_avatar'] != "" )
{
$sql_type = USER_AVATAR_UPLOAD;
}
else
{
$sql_type = USER_AVATAR_NONE;
}
$sql = "UPDATE " . USERS_TABLE . "
SET user_avatar_type = $sql_type
WHERE user_id = " . $rowset[$i]['user_id'];
if( !$result = $db->sql_query($sql) )
{
die("Couldn't update users table- " . $i);
}
}
}
echo "<BR><BR>COMPLETE<BR>";
?>

View File

@@ -1,96 +0,0 @@
<?php
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
//
// Do not change anything below this line.
//
$phpbb_root_path = "../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
function query($sql, $errormsg)
{
global $db;
if(!$result = $db->sql_query($sql))
{
print "<br><font color=\"red\">\n";
print "$errormsg<br>";
$sql_error = $db->sql_error();
print $sql_error['code'] .": ". $sql_error['message']. "<br>\n";
print "<pre>$sql</pre>";
print "</font>\n";
return FALSE;
}
else
{
return $result;
}
}
if($HTTP_GET_VARS['delete'] == 'true')
{
$sql = "ALTER TABLE ".POSTS_TABLE."
DROP bbcode_uid";
query($sql, "Didn't manage to drop the bbcode_uid table in ".POSTS_TABLE);
print "All done now. Deleted the bbcode_uid column from the posts table.<p>";
exit;
}
$sql = "ALTER TABLE ".POSTS_TEXT_TABLE."
ADD bbcode_uid char(10) NOT NULL";
print "Adding bbcode_uid field to ".POSTS_TEXT_TABLE.".<br>\n";
$result = query($sql, "Couldn't get add bbcode_uid field to ".POSTS_TEXT_TABLE.".");
$sql = "
SELECT
count(*) as total,
max(post_id) as maxid
FROM ". POSTS_TABLE;
$result = query($sql, "Couldn't get max post_id.");
$maxid = $db->sql_fetchrow($result);
$totalposts = $maxid['total'];
$maxid = $maxid['maxid'];
$batchsize = 200;
print "Going to convert BBcode in posts with $batchsize messages at a time and $totalposts in total.<br>\n";
for($i = 0; $i <= $maxid; $i += $batchsize)
{
$batchstart = $i + 1;
$batchend = $i + $batchsize;
print "Moving BBcode UID in post number $batchstart to $batchend<br>\n";
flush();
$sql = "
SELECT
post_id,
bbcode_uid
FROM "
.POSTS_TABLE."
WHERE
post_id BETWEEN $batchstart AND $batchend";
$result = query($sql, "Couldn't get ". POSTS_TABLE .".post_id $batchstart to $batchend");
while($row = mysql_fetch_array($result))
{
query("UPDATE ".POSTS_TEXT_TABLE." set bbcode_uid = '". $row['bbcode_uid']. "' WHERE post_id = ".$row['post_id'], "Was unable to update the posts text table with the BBcode_uid");
}
}
echo "Click <a href=\"$PHP_SELF?delete=true\">HERE</a> to remove the bbcode_uid table from the POSTS table (if you didn't get any serious error messages).<p>";
$db->sql_close();
?>

View File

@@ -1,110 +0,0 @@
<?php
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
//
// Do not change anything below this line.
//
$phpbb_root_path = "../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
$sql = "SELECT *
FROM " . CONFIG_TABLE;
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}
else
{
$board_config = $db->sql_fetchrow($result);
}
$newconfigtable = $table_prefix . "newconfig";
$sql = "SELECT config_name, config_value FROM ". CONFIG_TABLE;
if( $result = $db->sql_query($sql) )
{
die("Don't run this script twice!<br>\n");
}
$sql = " CREATE TABLE $newconfigtable (
config_name varchar(255) NOT NULL,
config_value varchar(255) NOT NULL,
PRIMARY KEY (config_name)
)";
print "Creating temporary table: $newconfigtable<p>\n";
if( !$result = $db->sql_query($sql) )
{
print("Couldn't create new config table<br>\n");
}
$error = 0;
while (list($name, $value) = each($board_config))
{
if(is_int($name))
{
// Skip numeric array elements (we only want the associative array)
continue;
}
// Rename sys_template
if ($name == 'sys_template')
{
$name = 'board_template';
}
// Rename system_timezone
if ($name == 'system_timezone')
{
$name = 'board_timezone';
}
print "$name = $value<br>\n";
$value = addslashes($value);
$sql = "INSERT INTO $newconfigtable (config_name, config_value) VALUES ('$name', '$value')";
if( !$result = $db->sql_query($sql) )
{
print("Couldn't insert '$name' into new config table");
$error = 1;
}
}
if ($error != 1)
{
print "Dropping old table<p>\n";
$sql = "DROP TABLE ". CONFIG_TABLE;
if( !$result = $db->sql_query($sql) )
{
die("Couldn't drop old table");
}
print "Renaming $newconfigtable to ".CONFIG_TABLE."<p>\n";
$sql = "ALTER TABLE $newconfigtable RENAME ".CONFIG_TABLE;
if( !$result = $db->sql_query($sql) )
{
die("Couldn't rename new config table");
}
print "Renaming ".SESSIONS_TABLE." to ".$table_prefix."sessions<br>\n";
$sql = "ALTER TABLE ".SESSIONS_TABLE." RENAME ".$table_prefix."sessions";
if( !$result = $db->sql_query($sql) )
{
die("Couldn't rename session table");
}
}
$db->sql_close();
echo "<BR><BR>COMPLETE<BR>";
?>

View File

@@ -1,181 +0,0 @@
<?php
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
//
// Do not change anything below this line.
//
$phpbb_root_path = "../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
//
// Alter table ...
//
echo "Alter tables ... ";
echo $sql = "ALTER TABLE " . PRIVMSGS_TABLE . "
ADD privmsgs_enable_bbcode TINYINT(1) DEFAULT '1' NOT NULL,
ADD privmsgs_enable_html TINYINT(1) DEFAULT '0' NOT NULL,
ADD privmsgs_enable_smilies TINYINT(1) DEFAULT '1' NOT NULL,
ADD privmsgs_attach_sig TINYINT(1) DEFAULT '1' NOT NULL";
if( !$result = $db->sql_query($sql) )
{
die("Couldn't alter privmsgs table");
}
echo $sql = "ALTER TABLE " . PRIVMSGS_TEXT_TABLE . "
ADD privmsgs_bbcode_uid CHAR(10) AFTER privmsgs_text_id";
if( !$result = $db->sql_query($sql) )
{
die("Couldn't alter privmsgs text table");
}
echo "COMPLETE<BR>";
//
// Move bbcode ...
//
echo "Move bbcode uid's ... ";
$sql = "SELECT privmsgs_id, privmsgs_bbcode_uid
FROM " . PRIVMSGS_TABLE;
if( $result = $db->sql_query($sql) )
{
$rowset = $db->sql_fetchrowset($result);
for($i = 0; $i < count($rowset); $i++)
{
$sql = "UPDATE " . PRIVMSGS_TEXT_TABLE . "
SET privmsgs_bbcode_uid = '" . $rowset[$i]['privmsgs_bbcode_uid'] . "'
WHERE privmsgs_text_id = " . $rowset[$i]['privmsgs_id'];
if( !$result = $db->sql_query($sql) )
{
die("Couldn't update privmsgs text bbcode - " . $i);
}
}
$sql = "ALTER TABLE " . PRIVMSGS_TABLE . "
DROP privmsgs_bbcode_uid";
if( !$result = $db->sql_query($sql) )
{
die("Couldn't alter privmsgs table - drop privmsgs_bbcode_uid");
}
}
echo "COMPLETE<BR>";
//
// Stripslashes from titles
//
echo "Strip subject slashes ... ";
$sql = "SELECT privmsgs_subject , privmsgs_id, privmsgs_to_userid, privmsgs_from_userid
FROM " . PRIVMSGS_TABLE;
if( $result = $db->sql_query($sql) )
{
$rowset = $db->sql_fetchrowset($result);
for($i = 0; $i < count($rowset); $i++)
{
$sql = "UPDATE " . PRIVMSGS_TABLE . "
SET privmsgs_subject = '" . addslashes(stripslashes($rowset[$i]['privmsgs_subject'])) . "'
WHERE privmsgs_id = " . $rowset[$i]['privmsgs_id'];
if( !$result = $db->sql_query($sql) )
{
die("Couldn't update subjects - $i");
}
}
}
echo "COMPLETE<BR>";
//
// Update sigs
//
echo "Remove [addsig], stripslashes and update privmsgs table sig enable ...";
$sql = "SELECT privmsgs_text_id , privmsgs_text
FROM " . PRIVMSGS_TEXT_TABLE;
if( $result = $db->sql_query($sql) )
{
$rowset = $db->sql_fetchrowset($result);
$attach_sql = "";
$non_attach_sql = "";
for($i = 0; $i < count($rowset); $i++)
{
if( ereg("\[addsig]$", $rowset[$i]['privmsgs_text']))
{
if( $attach_sql != "" )
{
$attach_sql .= ", ";
}
$attach_sql .= $rowset[$i]['privmsgs_text_id'];
$sql = "UPDATE " . PRIVMSGS_TEXT_TABLE . "
SET privmsgs_text = '" . addslashes(preg_replace("/\[addsig\]/is", "", stripslashes($rowset[$i]['privmsgs_text']))) . "'
WHERE privmsgs_text_id = " . $rowset[$i]['privmsgs_text_id'];
if( !$result = $db->sql_query($sql) )
{
die("Couldn't update privmsgs text - " . $i);
}
}
else
{
$sql = "UPDATE " . PRIVMSGS_TEXT_TABLE . "
SET privmsgs_text = '" . addslashes(stripslashes($rowset[$i]['privmsgs_text'])) . "'
WHERE privmsgs_text_id = " . $rowset[$i]['privmsgs_text_id'];
if( !$result = $db->sql_query($sql) )
{
die("Couldn't update privmsgs text - " . $i);
}
if( $non_attach_sql != "" )
{
$non_attach_sql .= ", ";
}
$non_attach_sql .= $rowset[$i]['privmsgs_text_id'];
}
}
if( $attach_sql != "" )
{
$sql = "UPDATE " . PRIVMSGS_TABLE . "
SET privmsgs_attach_sig = 1
WHERE privmsgs_id IN ($attach_sql)";
if( !$result = $db->sql_query($sql) )
{
die("Couldn't update privmsgs table attach_sig - ");
}
}
if( $non_attach_sql != "" )
{
$sql = "UPDATE " . PRIVMSGS_TABLE . "
SET privmsgs_attach_sig = 0
WHERE privmsgs_id IN ($non_attach_sql)";
if( !$result = $db->sql_query($sql) )
{
die("Couldn't update privmsgs table non_attach_sig - ");
}
}
}
echo "COMPLETE<BR>";
$db->sql_close();
?>

View File

@@ -1,93 +0,0 @@
<?php
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
//
// Do not change anything below this line.
//
$phpbb_root_path = "../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
$sql = "SELECT post_id, post_text
FROM " . POSTS_TEXT_TABLE;
if( $result = $db->sql_query($sql) )
{
$rowset = $db->sql_fetchrowset($result);
$attach_sql = "";
$non_attach_sql = "";
for($i = 0; $i < count($rowset); $i++)
{
if( ereg("\[addsig]$", $rowset[$i]['post_text']))
{
if( $attach_sql != "" )
{
$attach_sql .= ", ";
}
$attach_sql .= $rowset[$i]['post_id'];
$sql = "UPDATE " . POSTS_TEXT_TABLE . "
SET post_text = '" . addslashes(preg_replace("/\[addsig\]/is", "", $rowset[$i]['post_text'])) . "'
WHERE post_id = " . $rowset[$i]['post_id'];
if( !$result = $db->sql_query($sql) )
{
die("Couldn't update post_text - " . $i);
}
}
else
{
if( $non_attach_sql != "" )
{
$non_attach_sql .= ", ";
}
$non_attach_sql .= $rowset[$i]['post_id'];
}
}
echo "<BR>";
if( $attach_sql != "" )
{
echo $sql = "UPDATE " . POSTS_TABLE . "
SET enable_sig = 1
WHERE post_id IN ($attach_sql)";
if( !$result = $db->sql_query($sql) )
{
die("Couldn't update post table attach_sig - ");
}
}
echo "<BR>";
if( $non_attach_sql != "" )
{
echo $sql = "UPDATE " . POSTS_TABLE . "
SET enable_sig = 0
WHERE post_id IN ($non_attach_sql)";
if( !$result = $db->sql_query($sql) )
{
die("Couldn't update post table non_attach_sig - ");
}
}
}
$db->sql_close();
echo "<BR><BR>COMPLETE<BR>";
?>

View File

@@ -1,84 +0,0 @@
<html>
<body>
<?php
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
//
// Do not change anything below this line.
//
chdir("../");
include('extension.inc');
include('config.'.$phpEx);
include('includes/constants.'.$phpEx);
include('includes/db.'.$phpEx);
$months = array(
"Jan" => 1,
"Feb" => 2,
"Mar" => 3,
"Apr" => 4,
"May" => 5,
"Jun" => 6,
"Jul" => 7,
"Aug" => 8,
"Sep" => 9,
"Oct" => 10,
"Nov" => 11,
"Dec" => 12
);
$sql = "SELECT user_id, user_regdate FROM ".USERS_TABLE;
$result = $db->sql_query($sql);
if(!$result)
{
die("OOpppps, that didn't work!");
}
$all_old_dates = $db->sql_fetchrowset($result);
$sql = "ALTER TABLE ".USERS_TABLE."
CHANGE user_regdate user_regdate INT (11) NOT NULL";
$result = $db->sql_query($sql);
if(!$result)
{
die("Opps, that didn't work either ... oh damn!");
}
for($i = 0; $i < count($all_old_dates); $i++)
{
if(is_string($all_old_dates[$i]['user_regdate']))
{
if(eregi("^([a-zA-Z]{3}) ([0-9]+), ([0-9]{4})", $all_old_dates[$i]['user_regdate'], $result))
{
echo $all_old_dates[$i]['user_regdate']." : ";
echo $new_time = gmmktime(0, 1, 0, $months[$result[1]], $result[2], $result[3]);
echo " : ".gmdate("M d, Y", $new_time)."<br>";
$sql = "UPDATE phpbb_users
SET user_regdate = '$new_time'
WHERE user_id = '".$all_old_dates[$i]['user_id']."'";
$result = $db->sql_query($sql);
if(!$result)
{
die("Oh damn it, now that's really broken it!");
}
}
}
}
echo "<br>That's All Folks!";
?>
</body>
</html>

View File

@@ -1,64 +0,0 @@
<?php
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
//
// Do not change anything below this line.
//
$phpbb_root_path = "../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
echo "Inserting new config vars<br /><br />\n";
echo "server_name :: ";
flush();
$sql = "INSERT INTO " . CONFIG_TABLE . "
(config_name, config_value) VALUES ('server_name', 'www.myserver.tld')";
if( !$db->sql_query($sql) )
{
print "Failed inserting server_name config ... probably exists already<br />\n";
}
else
{
echo "DONE<br />\n";
}
echo "script_path :: ";
flush();
$sql = "INSERT INTO " . CONFIG_TABLE . "
(config_name, config_value) VALUES ('script_path', '/phpBB2/')";
if( !$db->sql_query($sql) )
{
print "Failed inserting script_path config ... probably exists already<br />\n";
}
else
{
echo "DONE<br />\n";
}
echo "server_port :: ";
flush();
$sql = "INSERT INTO " . CONFIG_TABLE . "
(config_name, config_value) VALUES ('server_port', '80')";
if( !$db->sql_query($sql) )
{
print "Failed inserting server_port config ... probably exists already<br />\n";
}
else
{
echo "DONE<br />\n";
}
$db->sql_close();
echo "<br />COMPLETE<br />\n";
?>

View File

@@ -0,0 +1,209 @@
<?php
/***************************************************************************
* merge_clean_posts.php
* -------------------
* begin : Tuesday, February 25, 2003
* copyright : (C) 2003 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
@set_time_limit(2400);
$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
define('IN_PHPBB', 1);
define('ANONYMOUS', 1);
$phpbb_root_path='./../';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
require($phpbb_root_path . 'includes/acm/cache_' . $acm_type . '.'.$phpEx);
include($phpbb_root_path . 'db/' . $dbms . '.'.$phpEx);
$cache = new acm();
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
// Just Do it (tm)
$sql = "RENAME TABLE {$table_prefix}posts TO {$table_prefix}posts_temp";
$db->sql_query($sql);
$sql = "CREATE TABLE {$table_prefix}posts
SELECT p.*, pt.post_subject, pt.post_text, pt.post_checksum, pt.bbcode_bitfield, pt.bbcode_uid
FROM {$table_prefix}posts_temp p, {$table_prefix}posts_text pt
WHERE pt.post_id = p.post_id";
$db->sql_query($sql);
switch (SQL_LAYER)
{
case 'mysql':
case 'mysql4':
$sql = 'ALTER TABLE ' . $table_prefix . 'posts
ADD PRIMARY KEY (post_id),
ADD INDEX topic_id (topic_id),
ADD INDEX poster_ip (poster_ip),
ADD INDEX post_approved (post_approved),
MODIFY COLUMN post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
ADD COLUMN post_encoding varchar(11) DEFAULT \'iso-8859-15\' NOT NULL';
break;
case 'mssql':
case 'mssql-odbc':
case 'msaccess':
break;
case 'postgresql':
break;
}
$db->sql_query($sql);
$sql = "UPDATE {$table_prefix}topics SET topic_poster = 1 WHERE topic_poster = 0 OR topic_poster IS NULL";
$db->sql_query($sql);
$sql = "UPDATE {$table_prefix}topics SET topic_last_poster_id = 1 WHERE topic_last_poster_id = 0 OR topic_last_poster_id IS NULL";
$db->sql_query($sql);
$sql = "UPDATE {$table_prefix}posts SET poster_id = 1 WHERE poster_id = 0 OR poster_id IS NULL";
$db->sql_query($sql);
$sql = "UPDATE {$table_prefix}users SET user_id = 1 WHERE user_id = 0";
$db->sql_query($sql);
$sql = "SELECT t.topic_id
FROM {$table_prefix}topics t
LEFT JOIN {$table_prefix}posts p ON p.topic_id = t.topic_id
WHERE p.topic_id IS NULL";
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
$del_sql = '';
do
{
$del_sql .= (($del_sql != '') ? ', ' : '') . $row['topic_id'];
}
while ($row = $db->sql_fetchrow($result));
$sql = "DELETE FROM {$table_prefix}topics
WHERE topic_id IN ($del_sql)";
$db->sql_query($sql);
}
$db->sql_freeresult($result);
$del_sql = '';
$sql = "SELECT topic_id, MIN(post_id) AS first_post_id, MAX(post_id) AS last_post_id, COUNT(post_id) AS total_posts
FROM {$table_prefix}posts
GROUP BY topic_id";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$del_sql .= (($del_sql != '') ? ', ' : '') . $row['topic_id'];
$sql = "UPDATE {$table_prefix}topics
SET topic_first_post_id = " . $row['first_post_id'] . ", topic_last_post_id = " . $row['last_post_id'] . ", topic_replies = " . ($row['total_posts'] - 1) . "
WHERE topic_id = " . $row['topic_id'];
$db->sql_query($sql);
}
$db->sql_freeresult($result);
$sql = "DELETE FROM {$table_prefix}topics WHERE topic_id NOT IN ($del_sql)";
$db->sql_query($sql);
$topic_count = $post_count = array();
$sql = "SELECT forum_id, COUNT(topic_id) AS topics
FROM {$table_prefix}topics
GROUP BY forum_id";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$topic_count[$row['forum_id']] = $row['topics'];
}
$db->sql_freeresult($result);
$sql = "SELECT forum_id, COUNT(post_id) AS posts
FROM {$table_prefix}posts
GROUP BY forum_id";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$post_count[$row['forum_id']] = $row['posts'];
}
$db->sql_freeresult($result);
switch (SQL_LAYER)
{
case 'oracle':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM " . $table_prefix . "forums f, " . $table_prefix . "posts p, " . $table_prefix . "users u
WHERE p.post_id = f.forum_last_post_id(+)
AND u.user_id = p.poster_id(+)";
break;
default:
$sql = "SELECT f.forum_id, p.post_time, p.post_username, u.username, u.user_id
FROM ((" . $table_prefix . "forums f
LEFT JOIN " . $table_prefix . "posts p ON p.post_id = f.forum_last_post_id)
LEFT JOIN " . $table_prefix . "users u ON u.user_id = p.poster_id)";
break;
}
$result = $db->sql_query($sql);
$sql_ary = array();
while ($row = $db->sql_fetchrow($result))
{
$forum_id = $row['forum_id'];
$sql_ary[] = "UPDATE " . $table_prefix . "forums
SET forum_last_poster_id = " . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? $row['user_id'] : ANONYMOUS) . ", forum_last_poster_name = '" . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? addslashes($row['username']) : addslashes($row['post_username'])) . "', forum_last_post_time = " . $row['post_time'] . ", forum_posts = " . (($post_count[$forum_id]) ? $post_count[$forum_id] : 0) . ", forum_topics = " . (($topic_count[$forum_id]) ? $topic_count[$forum_id] : 0) . "
WHERE forum_id = $forum_id";
$sql = "SELECT t.topic_id, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
FROM " . $table_prefix . "topics t, " . $table_prefix . "users u, " . $table_prefix . "posts p, " . $table_prefix . "posts p2, " . $table_prefix . "users u2
WHERE t.forum_id = $forum_id
AND u.user_id = t.topic_poster
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id";
$result2 = $db->sql_query($sql);
while ($row2 = $db->sql_fetchrow($result2))
{
$sql_ary[] = "UPDATE " . $table_prefix . "topics
SET topic_poster = " . $row2['user_id'] . ", topic_first_poster_name = '" . ((!empty($row2['user_id']) && $row2['user_id'] != ANONYMOUS) ? addslashes($row2['username']) : addslashes($row2['post_username'])) . "', topic_last_poster_id = " . ((!empty($row2['id2']) && $row2['id2'] != ANONYMOUS) ? $row2['id2'] : ANONYMOUS) . ", topic_last_post_time = " . $row2['post_time'] . ", topic_last_poster_name = '" . ((!empty($row2['id2']) && $row2['id2'] != ANONYMOUS) ? addslashes($row2['user2']) : addslashes($row2['post_username2'])) . "'
WHERE topic_id = " . $row2['topic_id'];
}
$db->sql_freeresult($result2);
unset($row2);
}
$db->sql_freeresult($result);
foreach ($sql_ary as $sql)
{
$sql . "<br />";
$db->sql_query($sql);
}
echo "<p><b>Done</b></p>\n";
?>

View File

@@ -1,42 +0,0 @@
<html>
<body>
<?php
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
//
// Do not change anything below this line.
//
$phpbb_root_path = "../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
echo "\n<br >\n" . $sql = "INSERT INTO " . CONFIG_TABLE . "
(config_name, config_value) VALUES ('record_online_users', '1')";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert config key 'record_online_users'", "", __LINE__, __FILE__, $sql);
}
echo "\n<br >\n" . $sql = "INSERT INTO " . CONFIG_TABLE . "
(config_name, config_value) VALUES ('record_online_date', '".time()."')";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert config key 'record_online_date'", "", __LINE__, __FILE__, $sql);
}
echo "\n<br />\nCOMPLETE";
?>
</body>
</html>

View File

@@ -1,82 +0,0 @@
<?php
/***************************************************************************
* revar_lang_files.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
$vars = array('lang_main' => 'lang', 'lang_admin' => 'lang', 'lang_faq' => 'faq', 'lang_bbcode' => 'faq');
$dirname = "./../language";
$dir = opendir($dirname);
while ( $file = readdir($dir) )
{
if ( ereg("^lang_", $file) && !is_file($dirname . "/" . $file) && !is_link($dirname . "/" . $file) )
{
foreach($vars as $lang_file => $lang_var)
{
$$lang_var = array();
include($dirname . "/" . $file . "/" . $lang_file . '.php');
$store = "";
while( list($key, $value) = each($$lang_var) )
{
if ( !is_array($value) )
{
$key = ( is_string($key) ) ? "'$key'" : $key;
$store .= ( ( $store != "" ) ? ", \n\t" : "" ) . "$key => '" . addslashes($value) . "'";
}
else
{
$key = ( is_string($key) ) ? "'$key'" : $key;
$store .= ( ( $store != "" ) ? ", \n\t" : "" ) . "$key => array(\n\t\t";
$store2 = "";
while( list($key2, $value2) = each($value) )
{
$key2 = ( is_string($key) ) ? "'$key2'" : $key2;
$store2 .= ( ( $store2 != "" ) ? ", \n\t\t" : "" ) . "$key2 => '" . addslashes($value2) . "'";
}
$store .= $store2 . "\n\t)";
}
}
$store = "<?php\n\$$lang_var = array(\n\t$store\n);\n?".">";
$fp = fopen($dirname . "/" . $file . "/" . $lang_file . '.php', 'w');
fwrite($fp, $store);
fclose($fp);
}
}
}
?>

View File

@@ -33,7 +33,7 @@ $synonym_array = file($phpbb_root_path . "language/lang_english/search_synonyms.
// Fetch a batch of posts_text entries
//
$sql = "SELECT COUNT(*) as total, MAX(post_id) as max_post_id
FROM ". POSTS_TEXT_TABLE;
FROM ". POSTS_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
$error = $db->sql_error();
@@ -56,7 +56,7 @@ for(;$postcounter <= $max_post_id; $postcounter += $batchsize)
$batchcount++;
$sql = "SELECT *
FROM " . POSTS_TEXT_TABLE . "
FROM " . POSTS_TABLE . "
WHERE post_id
BETWEEN $batchstart
AND $batchend";

View File

@@ -1 +1,34 @@
Please see: http://www.phpbb.com/credits.php for a list of all the people involved in phpBB.
/* ********************************************************************** *\
/* *\
/* phpBB 2.2 <20> Copyright 2003 phpBB Group *\
/* *\
/* [ http://www.phpbb.com/ ] *\
/* *\
/* ********************************************************************** *\
phpBB Project Manager : theFinn (James Atkinson)
phpBB Lead Developer : psoTFX (Paul S. Owen)
phpBB Developers : Ashe (Ludovic Arnaud)
Acyd Burn (Meik Sievertsen)
phpBB Group : theFinn (James Atkinson)
psoTFX (Paul S. Owen)
BartVB (Bart Van Bragt)
AbelaJohnB (John Abela)
ffeingol (Frank Feingold)
dougk_f77 (Doug Kelly)
nathan (Nathan Codding)
The_Systech (Jonathan Haase)
Original subSilver by subBlue Design, Tom Beddard, <20> 2001 phpBB Group
phpBB 2.2 contains code from the following applications:
LGPL licenced:
Smarty <20> 2001, 2002 by ispi of Lincoln, Inc, http://smarty.php.net/
GPL licenced:
phpMyAdmin <20> 2001,2003 phpMyAdmin Devel team, http://www.phpmyadmin.net/
Jabber class <20> 2003 Carlo Zottmann, http://phpjabber.g-blog.net

88
phpBB/docs/auth_api.html Normal file
View File

@@ -0,0 +1,88 @@
<html>
<head>
<link rel="stylesheet" href="../templates/subSilver/subSilver.css" type="text/css" />
<style type="text/css">
<!--
p,ul,td {font-size:10pt;}
h2 {font-size:15pt;font-weight:bold;color:red}
h3 {font-size:12pt;color:blue}
//-->
</style>
</head>
<body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#006699">
<table width="100%" border="0" cellspacing="0" cellpadding="10" align="center">
<tr>
<td class="bodyline"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<h1>Using the <i><u>auth</u></i> class</h1>
<h2>What is it?</h2>
<p>The <i><u>auth</u></i> class contains methods related to authorisation users to access various board functions, e.g. posting, viewing, replying, logging in (and out), etc. If you need to check whether a user can carry out a task or handle user login/logouts this class is required.</p>
<h2>Initialisation</h2>
<p>To use any methods contained with the <i><u>auth</u></i> class it first needs to be instantiated. This is best achieved early in the execution of the script in the following manner:
<pre>$auth = new auth();</pre>
<p>Once an instance of the object has been created you are free to call the various methods it contains. Please note that should you wish to use the <i><u>auth_admin</u></i> methods you will need to instantiate this seperately but in the same way.</p>
<h3><i>acl</i></h3>
<p>The <i>acl</i> method is the initialisation routine for all the acl functions. If you intend calling any acl method you must first call this. The method takes as its one and only required parameter a hash of userdata. This hash must contain at least the following information; user_id, user_permissions and user_founder. It is called in the following way:
<pre>$auth->acl(<i>userdata</i>);</pre>
<p>Where userdata is the hash containing the aforementioned data.</p>
<h3><i>acl_get</i></h3>
<p>This method is the primary way of determining what a user can and cannot do for a given option in, optionally, a given forum. The method should be called in the following way:</p>
<pre>$result = $auth->acl_get(<i>option</i>[, <i>forum</i>]);</pre>
<p>Where option is a string representing the required option, e.g. 'f_list', 'm_edit', 'a_adduser', etc. The optional forum term is the integer forum_id.</p>
<pThe method returns a positive integer when the user is allowed to carry out the option and a zero if denied.</p>
<h3><i>acl_gets</i></h3>
<p>This method is funtionally similar to <i>acl_get</i> in that it returns information on whether a user can or cannot carry out a given task. The difference here is the ability to test several different options in one go. This may be useful for testing whether a user is a moderator or an admin in one call. Rather than having to call and check <i>acl_get</i> twice.</p>
<p>The method should be called thus:</p>
<pre>$result = $auth->acl_gets(<i>option1</i>[, <i>option2</i>, ..., <i>optionN</i>, <i>forum</i>]);</pre>
<p>As with the <i>acl_get</i> method the options are strings representing the required permissions to check. The forum again is an integer representing a given forum_id.</p>
<h3><i>acl_cache</i></h3>
<p>This should be considered a private method and not be called externally. It handles the generation of the user_permissions data from the basic user and group authorisation data. When necessary this method is called automatically by <i>acl</i>.</p>
<h3><i>login</i></h3>
<p></p>
<h2>Admin related functions</h2>
<p>A number of additional methods are available related to <i><u>auth</u></i>. These handle more basic functions such as adding user and group permissions, new options and clearing the user cache. These methods are contained within a seperate class, <i><u>auth_admin</u></i>. This can be found in the functions_admin source.</p>
<p>To use any methods this class contains it first needs to be instantiated seperately from <i><u>auth</u></i>. This is achieved in the same way as <i><u>auth</u></i>:</p>
<pre>$authadmin = new auth_admin();</pre>
<p>This instance gives you access to both the methods of this specific class and that of <i><u>auth</u></i>.</p>
</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>

233
phpBB/download.php Normal file
View File

@@ -0,0 +1,233 @@
<?php
/***************************************************************************
* download.php
* -------------------
* begin : Thu, Apr 10, 2003
* copyright : (C) 2003 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
if ( defined('IN_PHPBB') )
{
die('Hacking attempt');
exit;
}
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$download_id = (isset($_REQUEST['id'])) ? intval($_REQUEST['id']) : FALSE;
$thumbnail = (isset($_REQUEST['thumb'])) ? intval($_REQUEST['thumb']) : FALSE;
function send_file_to_browser($attachment, $upload_dir, $category)
{
global $_SERVER, $HTTP_USER_AGENT, $HTTP_SERVER_VARS, $user, $db, $config;
$filename = ($upload_dir == '') ? $attachment['physical_filename'] : $upload_dir . '/' . $attachment['physical_filename'];
if (!file_exists($filename))
{
trigger_error($user->lang['ERROR_NO_ATTACHMENT'] . '<br /><br />' . sprintf($user->lang['FILE_NOT_FOUND_404'], $filename));
}
// Determine the Browser the User is using, because of some nasty incompatibilities.
// borrowed from phpMyAdmin. :)
if (!empty($_SERVER['HTTP_USER_AGENT']))
{
$HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
}
else if (!empty($HTTP_SERVER_VARS['HTTP_USER_AGENT']))
{
$HTTP_USER_AGENT = $HTTP_SERVER_VARS['HTTP_USER_AGENT'];
}
else if (!isset($HTTP_USER_AGENT))
{
$HTTP_USER_AGENT = '';
}
if (ereg('Opera(/| )([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version))
{
$browser_version = $log_version[2];
$browser_agent = 'opera';
}
else if (ereg('MSIE ([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version))
{
$browser_version = $log_version[1];
$browser_agent = 'ie';
}
else if (ereg('OmniWeb/([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version))
{
$browser_version = $log_version[1];
$browser_agent = 'omniweb';
}
else if (ereg('Netscape([0-9]{1})', $HTTP_USER_AGENT, $log_version))
{
$browser_version = $log_version[1];
$browser_agent = 'netscape';
}
else if (ereg('Mozilla/([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version))
{
$browser_version = $log_version[1];
$browser_agent = 'mozilla';
}
else if (ereg('Konqueror/([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version))
{
$browser_version = $log_version[1];
$browser_agent = 'konqueror';
}
else
{
$browser_version = 0;
$browser_agent = 'other';
}
// Correct the mime type - we force application/octetstream for all files, except images
// Please do not change this, it is a security precaution
if ($category == NONE_CAT && !strstr($attachment['mimetype'], 'image'))
{
$attachment['mimetype'] = ($browser_agent == 'ie' || $browser_agent == 'opera') ? 'application/octetstream' : 'application/octet-stream';
}
// Now the tricky part... let's dance
@ob_end_clean();
@ini_set('zlib.output_compression', 'Off');
header('Pragma: public');
header('Content-Transfer-Encoding: none');
// Send out the Headers
header('Content-Type: ' . $attachment['mimetype'] . '; name="' . $attachment['real_filename'] . '"');
header('Content-Disposition: inline; filename="' . $attachment['real_filename'] . '"');
// Now send the File Contents to the Browser
$size = @filesize($filename);
if ($size)
{
header("Content-length: $size");
}
readfile($filename);
exit;
}
// Start session management
$user->start();
$auth->acl($user->data);
$user->setup();
if (!$download_id)
{
trigger_error('NO_ATTACHMENT_SELECTED');
}
if (!$config['allow_attachments'])
{
trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED');
}
$sql = 'SELECT *
FROM ' . ATTACHMENTS_DESC_TABLE . "
WHERE attach_id = $download_id";
$result = $db->sql_query($sql);
if (!($attachment = $db->sql_fetchrow($result)))
{
trigger_error('ERROR_NO_ATTACHMENT');
}
// get forum_id for attachment authorization or private message authorization
$authorised = FALSE;
// Additional query, because of more than one attachment assigned to posts and private messages
$sql = 'SELECT a.*, p.forum_id, f.forum_password, f.parent_id
FROM ' . ATTACHMENTS_TABLE . ' a, ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
WHERE a.attach_id = ' . $attachment['attach_id'] . '
AND ((a.post_id = p.post_id AND p.forum_id = f.forum_id)
OR a.post_id = 0)';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if ($row['post_id'] && $auth->acl_get('f_download', $row['forum_id']))
{
if ($row['forum_password'])
{
// Do something else ... ?
login_forum_box($row);
}
$authorised = TRUE;
break;
}
else
{
if ($config['allow_pm_attach'] && ($user->data['user_id'] == $row['user_id_2'] || $user->data['user_id'] == $row['user_id_1']))
{
$authorised = TRUE;
break;
}
}
}
$db->sql_freeresult($result);
if (!$authorised)
{
trigger_error('SORRY_AUTH_VIEW_ATTACH');
}
$extensions = array();
obtain_attach_extensions($extensions);
// disallowed ?
if (!in_array($attachment['extension'], $extensions['_allowed_']))
{
trigger_error(sprintf($lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']));
}
$download_mode = intval($extensions[$attachment['extension']]['download_mode']);
if ($thumbnail)
{
$attachment['physical_filename'] = 'thumbs/t_' . $attachment['physical_filename'];
}
// Update download count
if (!$thumbnail)
{
$sql = 'UPDATE ' . ATTACHMENTS_DESC_TABLE . '
SET download_count = download_count + 1
WHERE attach_id = ' . $attachment['attach_id'];
$db->sql_query($sql);
}
// Determine the 'presenting'-method
if ($download_mode == PHYSICAL_LINK)
{
if ($config['use_ftp_upload'] && $config['upload_dir'] == '')
{
trigger_error($user->lang['PHYSICAL_DOWNLOAD_NOT_POSSIBLE']);
}
redirect($config['upload_dir'] . '/' . $attachment['physical_filename']);
}
else
{
send_file_to_browser($attachment, $config['upload_dir'], $extensions[$attachment['extension']]['display_cat']);
exit;
}
?>

View File

@@ -11,16 +11,15 @@
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
//
// Change this if your extension is not .php!
//
$phpEx = "php";
$phpEx = 'php';
$starttime = 0;
//
// For debug timing
//
$starttime = explode(' ', microtime());
$starttime = $starttime[1] + $starttime[0];
?>

View File

@@ -8,7 +8,6 @@
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
@@ -25,21 +24,17 @@ $phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_FAQ);
init_userprefs($userdata);
//
// End session management
//
$user->start();
$auth->acl($user->data);
$user->setup();
//
// Load the appropriate faq file
//
if( isset($HTTP_GET_VARS['mode']) )
if (isset($_GET['mode']))
{
switch( $HTTP_GET_VARS['mode'] )
switch($_GET['mode'])
{
case 'bbcode':
$lang_file = 'lang_bbcode';
@@ -56,11 +51,10 @@ else
$lang_file = 'lang_faq';
$l_title = $lang['FAQ'];
}
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx);
//
include($user->lang_path . $lang_file . '.' . $phpEx);
// Pull the array data from the lang pack
//
$j = 0;
$counter = 0;
$counter_2 = 0;
@@ -69,7 +63,7 @@ $faq_block_titles = array();
for($i = 0; $i < count($faq); $i++)
{
if( $faq[$i][0] != '--' )
if ($faq[$i][0] != '--')
{
$faq_block[$j][$counter]['id'] = $counter_2;
$faq_block[$j][$counter]['question'] = $faq[$i][0];
@@ -80,7 +74,7 @@ for($i = 0; $i < count($faq); $i++)
}
else
{
$j = ( $counter != 0 ) ? $j + 1 : 0;
$j = ($counter != 0) ? $j + 1 : 0;
$faq_block_titles[$j] = $faq[$i][1];
@@ -91,57 +85,50 @@ for($i = 0; $i < count($faq); $i++)
//
// Lets build a page ...
//
$page_title = $l_title;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'faq_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx, $forum_id);
$template->assign_vars(array(
'L_FAQ_TITLE' => $l_title,
'L_FAQ_TITLE' => $l_title,
'L_BACK_TO_TOP' => $lang['Back_to_top'])
);
for($i = 0; $i < count($faq_block); $i++)
{
if( count($faq_block[$i]) )
if (count($faq_block[$i]))
{
$template->assign_block_vars('faq_block', array(
'BLOCK_TITLE' => $faq_block_titles[$i])
);
$template->assign_block_vars('faq_block_link', array(
$template->assign_block_vars('faq_block_link', array(
'BLOCK_TITLE' => $faq_block_titles[$i])
);
for($j = 0; $j < count($faq_block[$i]); $j++)
{
$row_color = ( !($j % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($j % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars('faq_block.faq_row', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FAQ_QUESTION' => $faq_block[$i][$j]['question'],
'FAQ_ANSWER' => $faq_block[$i][$j]['answer'],
'FAQ_QUESTION' => $faq_block[$i][$j]['question'],
'FAQ_ANSWER' => $faq_block[$i][$j]['answer'],
'S_ROW_COUNT' => $j,
'U_FAQ_ID' => $faq_block[$i][$j]['id'])
);
$template->assign_block_vars('faq_block_link.faq_row_link', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FAQ_LINK' => $faq_block[$i][$j]['question'],
'FAQ_LINK' => $faq_block[$i][$j]['question'],
'S_ROW_COUNT' => $j,
'U_FAQ_LINK' => '#' . $faq_block[$i][$j]['id'])
);
}
}
}
$template->pparse('body');
page_header($l_title);
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
$template->set_filenames(array(
'body' => 'faq_body.html')
);
make_jumpbox('viewforum.'.$phpEx, $forum_id);
page_footer();
?>

0
phpBB/files/.htaccess Normal file
View File

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 679 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 940 B

Some files were not shown because too many files have changed in this diff Show More