1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-09-22 05:53:59 +02:00

Compare commits

..

391 Commits

Author SHA1 Message Date
(no author)
80d429a02d This commit was manufactured by cvs2svn to create tag
'release_3_0_B4'.

git-svn-id: file:///svn/phpbb/tags/release_3_0_B4@6680 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 21:41:56 +00:00
Meik Sievertsen
3041ca4ed7 version update
git-svn-id: file:///svn/phpbb/trunk@6679 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 21:41:56 +00:00
David M
3da0f4fe7f don't mind me, I just forgot something :D
git-svn-id: file:///svn/phpbb/trunk@6678 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 21:34:59 +00:00
Meik Sievertsen
1f8818d85d better layed out...
git-svn-id: file:///svn/phpbb/trunk@6677 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 21:33:49 +00:00
David M
f56c1a85d3 #5640
git-svn-id: file:///svn/phpbb/trunk@6676 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 21:24:15 +00:00
Nils Adermann
49e8de0ca2 - Throw error on incorrect search queries [Bug #5648]
git-svn-id: file:///svn/phpbb/trunk@6675 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 20:31:06 +00:00
Meik Sievertsen
1f118ba2ae #5610
git-svn-id: file:///svn/phpbb/trunk@6674 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 19:32:18 +00:00
Meik Sievertsen
8e297a038c hopefully fixed bug #5644 while also retaining the fix for bug #3572
testing this is appreciated.


git-svn-id: file:///svn/phpbb/trunk@6673 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 18:00:41 +00:00
Jonathan Stanley
82b8a1d96f #5592 et #5590
git-svn-id: file:///svn/phpbb/trunk@6672 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 16:15:13 +00:00
Meik Sievertsen
688ef7560a Using a different approach for the data updates (same as the schema updates)
git-svn-id: file:///svn/phpbb/trunk@6671 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 16:05:23 +00:00
Dominik Dröscher
22c729c41b #5642 This should be a little easier to manage.
git-svn-id: file:///svn/phpbb/trunk@6670 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 14:25:15 +00:00
Dominik Dröscher
883bfbf981 blah ..
git-svn-id: file:///svn/phpbb/trunk@6669 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 12:56:35 +00:00
Meik Sievertsen
07f860826f #5624
git-svn-id: file:///svn/phpbb/trunk@6668 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 12:56:17 +00:00
Dominik Dröscher
61e2a3f5c1 #4892
git-svn-id: file:///svn/phpbb/trunk@6667 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 12:45:26 +00:00
Dominik Dröscher
85a5dc01fe #5630
git-svn-id: file:///svn/phpbb/trunk@6666 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 11:37:42 +00:00
Dominik Dröscher
0bc076a0c3 #5632
git-svn-id: file:///svn/phpbb/trunk@6665 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 10:26:38 +00:00
Dominik Dröscher
d5593b154e #5606 and some beautification
git-svn-id: file:///svn/phpbb/trunk@6664 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-26 21:26:15 +00:00
Meik Sievertsen
12fb5f6aa2 - fixed bug within the user_add function
- fixed some updater bugs


git-svn-id: file:///svn/phpbb/trunk@6663 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-26 17:22:32 +00:00
Meik Sievertsen
4d6f84c320 fix for bug #5586
git-svn-id: file:///svn/phpbb/trunk@6662 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-26 15:31:12 +00:00
Meik Sievertsen
9fa4f1f012 - bug fixes for #5618, #5588 and #5584
- remove messenger->reset() calls (they are already performed on sending)


git-svn-id: file:///svn/phpbb/trunk@6661 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-26 15:01:13 +00:00
Meik Sievertsen
6583f90b8d - bug fixes for #5618, #5588 and #5584
- remove messenger->reset() calls (they are already performed on sending)


git-svn-id: file:///svn/phpbb/trunk@6660 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-26 14:55:18 +00:00
Nils Adermann
5c5330c29d Message for my last commit (no I didn't intent it to be "message"):
- include forums without search indexing in author searches and egosearch [Bug #5530, #4782]
- allow changing search options when there are no results if a pre-defined search is used
- added user_pass_convert flag for unconverted phpBB2 passwords and password conversion on first login
and for this commit:
- truncating dropdown in acp_styles and showing tooltip with complete string [Bug #5258]
- UTF-8 compatible font for OS X users in ACP
- destroy search cache on changing a post author [Bug #5538]


git-svn-id: file:///svn/phpbb/trunk@6659 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-26 14:41:59 +00:00
Meik Sievertsen
e3889a72e8 hard to spot...
git-svn-id: file:///svn/phpbb/trunk@6658 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-26 13:47:12 +00:00
Meik Sievertsen
dd5f0c320d use needle
git-svn-id: file:///svn/phpbb/trunk@6657 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-26 13:07:43 +00:00
Meik Sievertsen
52717466fb some tiny changes
git-svn-id: file:///svn/phpbb/trunk@6656 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-26 12:22:56 +00:00
Nils Adermann
870a3a1d8a message
git-svn-id: file:///svn/phpbb/trunk@6655 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-25 20:00:56 +00:00
Dominik Dröscher
38b8dc2841 #5600 I just liked the number
git-svn-id: file:///svn/phpbb/trunk@6654 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-25 10:03:31 +00:00
Dominik Dröscher
eb856283a6 Next try. IE does not have a simple variable to return the selection position / cursor position inside a textarea, so this can only be done with slow but functional hacks. Not even IE7 fixes this.
git-svn-id: file:///svn/phpbb/trunk@6653 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-25 01:10:51 +00:00
Dominik Dröscher
8f97dc8d78 Blah ...
git-svn-id: file:///svn/phpbb/trunk@6652 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-24 19:38:48 +00:00
Dominik Dröscher
2d31d53289 Editor updates with proper IE support. Needs a lot more testing, especially in non-Windows browsers
git-svn-id: file:///svn/phpbb/trunk@6651 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-24 18:18:17 +00:00
Meik Sievertsen
d529f78adb rather large update, most important things done:
- implemented provided patch/diff file for bug #5350 (Highway of Life) with some tiny changes and alterations
- more username/colour changes/fixes
- added a note about PM rule-dependant message removals so the user is not wondering too much if he can't remember his rules. :)
- some column changes to fix unicode issues
- bugfixes


git-svn-id: file:///svn/phpbb/trunk@6650 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-24 14:59:26 +00:00
Dominik Dröscher
a0c3a326bd While we are at it ...
git-svn-id: file:///svn/phpbb/trunk@6649 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-24 14:58:48 +00:00
Dominik Dröscher
40c4b1dcd7 grrr, this is what happens when you update another cvs repository with this repository in it
Well, my first Doug, time for celebration!


git-svn-id: file:///svn/phpbb/trunk@6648 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-24 14:48:47 +00:00
Dominik Dröscher
064f6fec43 New structure for the template files!
git-svn-id: file:///svn/phpbb/trunk@6647 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-24 14:45:13 +00:00
Dominik Dröscher
17ea1ecd5e Changed bbcode editor behaviour. All buttons (apart from the [*] one) now work the same way. This needs testing in as many browsers as possible. Known to be working in
IE6, FF2 on Windows, Opera 9

Probably issues on Konquerer, Safari, FF2 on MacOS (as per a forum post).

Feedback and ideas please here: http://area51.phpbb.com/phpBB/viewtopic.php?t=25884


git-svn-id: file:///svn/phpbb/trunk@6646 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-24 12:20:16 +00:00
Jonathan Stanley
f836b4a095 #5474 - ACP XHTML spring clean... fieldsets with missing legends added, and lone fieldsets which should belong to the accending fieldset have been (mostly) merged. Some outstanding issues with the permissions area (Dominik has some stuff for this at some point anyway) and the Custom Profile Fields bit, which should feature "Previous/Next" style buttons.
git-svn-id: file:///svn/phpbb/trunk@6645 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-24 02:04:43 +00:00
Jonathan Stanley
f26918b4e5 #5562
git-svn-id: file:///svn/phpbb/trunk@6644 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-23 20:56:19 +00:00
Meik Sievertsen
59f3e65aee fixes for bugs #5564, #5554 and #5462
git-svn-id: file:///svn/phpbb/trunk@6643 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-23 16:15:46 +00:00
Meik Sievertsen
6d6f433d2e davidmj came up with a simpler (and working in all cases!) approach. :) Bow to him...
git-svn-id: file:///svn/phpbb/trunk@6642 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-23 14:54:37 +00:00
Meik Sievertsen
945491d37d adding revision information
git-svn-id: file:///svn/phpbb/trunk@6641 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-23 14:26:58 +00:00
Meik Sievertsen
fbe7c6550b do not process if all ASCII
git-svn-id: file:///svn/phpbb/trunk@6640 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-23 12:44:12 +00:00
Meik Sievertsen
5a73807c9b new mail_encode function to make sure we abide to the rfc but not split in-between of multibyte characters. The used method is not 100% accurate, but a good compromise between compatibility, conformance and performance.
git-svn-id: file:///svn/phpbb/trunk@6639 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-23 11:53:52 +00:00
Meik Sievertsen
3f69e7278c document the recent change for sql_query_limit
git-svn-id: file:///svn/phpbb/trunk@6638 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-23 11:52:11 +00:00
David M
e67722c18b little bit of template tag cleaning
git-svn-id: file:///svn/phpbb/trunk@6637 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-23 03:32:47 +00:00
Dominik Dröscher
d6c5be3d73 blah
git-svn-id: file:///svn/phpbb/trunk@6636 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-22 12:20:17 +00:00
Dominik Dröscher
69e33a9d7d plop
git-svn-id: file:///svn/phpbb/trunk@6635 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-22 12:10:31 +00:00
Dominik Dröscher
2906dbdd8a Some more editor.js updates. Font styles (colour and size) do now center the cursor between the tags when not used on a selection. This could need some cross browser testing. Confirmed working in IE6, FF, Opera.
Please report feedback to:
http://area51.phpbb.com/phpBB/viewtopic.php?f=3&t=25884


git-svn-id: file:///svn/phpbb/trunk@6634 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-22 11:22:38 +00:00
Dominik Dröscher
73d0f7f846 #5546
git-svn-id: file:///svn/phpbb/trunk@6633 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-22 09:12:56 +00:00
Dominik Dröscher
d416503a39 Blah, making list bbcode button work again.
git-svn-id: file:///svn/phpbb/trunk@6632 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-22 09:02:06 +00:00
David M
1551f13bb2 #5562
major speed boost for Oracle :D

This took a while, every call to sql_query_limit() was checked out for having any implicit/explicit column issues... Hopefully, nothing has changed :D


git-svn-id: file:///svn/phpbb/trunk@6631 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-22 01:22:13 +00:00
Meik Sievertsen
6cb0276788 hmm, this was for debugging. :)
git-svn-id: file:///svn/phpbb/trunk@6630 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-21 18:23:43 +00:00
Meik Sievertsen
3b42f4297e decrease the barrier for E_ALL error reporting and email traces from DEBUG_EXTRA to DEBUG
git-svn-id: file:///svn/phpbb/trunk@6629 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-21 18:20:02 +00:00
Meik Sievertsen
ab9ec8064a - fixing a bunch of bugs
- moved the install trigger error to sessions and also disabled it for those having DEBUG_EXTRA enabled.
i hope not having introduced too many new bugs.


git-svn-id: file:///svn/phpbb/trunk@6628 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-21 18:15:53 +00:00
Meik Sievertsen
5be570b1f0 should have been fread.
git-svn-id: file:///svn/phpbb/trunk@6627 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-21 15:44:44 +00:00
Meik Sievertsen
74a08d9a7b changing the inline delivery method now the 20th time - gosh.
git-svn-id: file:///svn/phpbb/trunk@6626 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-21 15:08:18 +00:00
Dominik Dröscher
308d2820d9 #5238
git-svn-id: file:///svn/phpbb/trunk@6625 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-21 13:13:01 +00:00
Dominik Dröscher
3a85729945 insert_text now working properly in IE for smilies again
git-svn-id: file:///svn/phpbb/trunk@6624 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-21 06:39:50 +00:00
Dominik Dröscher
2c8cae5226 #5496
git-svn-id: file:///svn/phpbb/trunk@6623 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-20 17:37:54 +00:00
Dominik Dröscher
6fb406919f #5484
Making the account settings page a little more accessible.


git-svn-id: file:///svn/phpbb/trunk@6622 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-20 17:07:09 +00:00
Meik Sievertsen
c6892c6fc0 #5488
git-svn-id: file:///svn/phpbb/trunk@6621 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-20 16:44:37 +00:00
Dominik Dröscher
3e619c628c #5476
git-svn-id: file:///svn/phpbb/trunk@6620 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-20 16:42:31 +00:00
Meik Sievertsen
2774981b2d fix for bug #5490
- make sure bots are catched by the posting auth too.


git-svn-id: file:///svn/phpbb/trunk@6619 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-20 16:40:44 +00:00
Dominik Dröscher
e03fb0aafd New diff images replacing the dummy ones.
git-svn-id: file:///svn/phpbb/trunk@6618 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-20 15:42:11 +00:00
Dominik Dröscher
e6c8bb1409 some HTML fixes
git-svn-id: file:///svn/phpbb/trunk@6617 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-20 14:42:43 +00:00
Dominik Dröscher
6aabfc4bf7 #5358
Large logo images no longer destroy the layout.


git-svn-id: file:///svn/phpbb/trunk@6616 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-20 12:51:43 +00:00
Dominik Dröscher
c974d70bdb #5134
git-svn-id: file:///svn/phpbb/trunk@6615 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-20 12:35:05 +00:00
Meik Sievertsen
6a08242684 some tiny fixes.
git-svn-id: file:///svn/phpbb/trunk@6614 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-19 21:00:48 +00:00
David M
f782890332 ;-)
git-svn-id: file:///svn/phpbb/trunk@6613 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-19 20:26:40 +00:00
Meik Sievertsen
33bcb91d05 some tiny fixes.
git-svn-id: file:///svn/phpbb/trunk@6612 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-19 20:08:24 +00:00
David M
174d43d532 #5446
- slight opti thrown in :D


git-svn-id: file:///svn/phpbb/trunk@6611 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-19 15:23:19 +00:00
Meik Sievertsen
a7f0b3712a *** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@6610 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-19 15:18:29 +00:00
Meik Sievertsen
b934dab804 fix for #5422
git-svn-id: file:///svn/phpbb/trunk@6609 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-19 15:01:56 +00:00
David M
444113e7f4 #5452
git-svn-id: file:///svn/phpbb/trunk@6608 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-19 14:56:06 +00:00
David M
f31e170e99 #5466
git-svn-id: file:///svn/phpbb/trunk@6607 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-19 14:48:00 +00:00
David M
2e250d1cd8 #5450
git-svn-id: file:///svn/phpbb/trunk@6606 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-19 14:43:38 +00:00
David M
fff6d92158 #5428
git-svn-id: file:///svn/phpbb/trunk@6605 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-19 14:37:20 +00:00
Meik Sievertsen
8ce38c7504 some style related changes/fixes
git-svn-id: file:///svn/phpbb/trunk@6604 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-19 14:14:35 +00:00
Meik Sievertsen
8391d6d71d Where are you coming from $in? I do not think i invited you...
git-svn-id: file:///svn/phpbb/trunk@6603 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-19 00:41:16 +00:00
Meik Sievertsen
a8eb642053 let us be more strict while testing for writeable directories.
git-svn-id: file:///svn/phpbb/trunk@6602 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-18 17:26:53 +00:00
Meik Sievertsen
e264a62b73 - a handful of mcp fixed, the most important one is the change for check_ids() - it is now supporting ids from more than one forum too, making it possible to use some mcp features as designed initially. We really need to get our moderator team testing the mcp extensively.
- fixed some other tiny glitches
- if a forum category with subforums get changed to a link type forum give options of what to do with the subforums (#5334)
- other bugfixes


git-svn-id: file:///svn/phpbb/trunk@6601 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-18 16:27:35 +00:00
Meik Sievertsen
5f788b4d08 get editing user correctly
git-svn-id: file:///svn/phpbb/trunk@6600 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-18 10:37:10 +00:00
Meik Sievertsen
40f0a1ea15 - do not cache the activity queries, this is only a lot of overhead (haven't noticed the forums also get included)
- back to our known poster name display on viewtopic/topic review. :)


git-svn-id: file:///svn/phpbb/trunk@6599 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-18 10:05:58 +00:00
Jonathan Stanley
c2191ae9cc "Me fail English? That's unpossible!"
git-svn-id: file:///svn/phpbb/trunk@6598 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-17 23:21:30 +00:00
David M
f589ce3a84 #5376
- removed some unneeded globals


git-svn-id: file:///svn/phpbb/trunk@6597 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-17 21:51:16 +00:00
Meik Sievertsen
ac5a12c024 fix colour assignment. ;)
git-svn-id: file:///svn/phpbb/trunk@6596 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-17 19:40:21 +00:00
Meik Sievertsen
d9387842ac adjust some comments to work with phpdocumentor. :)
git-svn-id: file:///svn/phpbb/trunk@6595 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-17 19:37:57 +00:00
Jonathan Stanley
17f00978dd #5370
git-svn-id: file:///svn/phpbb/trunk@6594 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-17 16:41:22 +00:00
David M
8b0e11a4c9 #5362
- small opti/bugfix in normalizer


git-svn-id: file:///svn/phpbb/trunk@6593 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-16 20:16:36 +00:00
Meik Sievertsen
311c0d8e4f if the forum is originally postable the type actions are displayed if wanted to switch to category or link.
git-svn-id: file:///svn/phpbb/trunk@6592 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-16 19:12:00 +00:00
Meik Sievertsen
d08d844325 Do not rely on javascript being enabled here (for setting permissions js is a requirement)
git-svn-id: file:///svn/phpbb/trunk@6591 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-16 19:08:59 +00:00
Meik Sievertsen
db8e586893 forgot to commit this fix
git-svn-id: file:///svn/phpbb/trunk@6590 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-16 18:29:29 +00:00
Meik Sievertsen
c9cd0e1d91 ok, change from doing the same logic all over again we call a function to do it for us. Also allow template designers to choose which method to use by just adding a fully compiled username string (profile link + user colour). This commit may introduce problems.
git-svn-id: file:///svn/phpbb/trunk@6589 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-16 16:51:19 +00:00
Meik Sievertsen
683c8a10dd add missing language variables
git-svn-id: file:///svn/phpbb/trunk@6588 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-16 12:41:07 +00:00
David M
c904ba5691 this is hopeless, we just insert and hope for the best. thats all we can really do...
git-svn-id: file:///svn/phpbb/trunk@6587 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-15 20:48:38 +00:00
Dominik Dröscher
93bd37451c #5286
git-svn-id: file:///svn/phpbb/trunk@6586 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-15 17:17:50 +00:00
Dominik Dröscher
9622428fcd #5296
git-svn-id: file:///svn/phpbb/trunk@6585 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-15 16:52:44 +00:00
Meik Sievertsen
548cc2c10b - fixes for the following bugs:
#5326
#5318
#5304
#5290
#5288
#5278
#5276
#5272
#5266
- also fixed the "Call-time pass-by-reference" bug #5252
- within this step changed the normalize calls to require references.
- added captcha size variables to the class scope (suggestion was posted at area51)


git-svn-id: file:///svn/phpbb/trunk@6584 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-15 15:35:50 +00:00
Jonathan Stanley
979e36077f #5294 - Typographic heaven... curly quotes, em dashes and proper apostrophes. :)
git-svn-id: file:///svn/phpbb/trunk@6583 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-14 17:53:00 +00:00
Jonathan Stanley
503832ccce #5298 - Semantics schemantics... :P
git-svn-id: file:///svn/phpbb/trunk@6582 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-14 17:48:52 +00:00
David M
f6500e6730 @#$%&!
git-svn-id: file:///svn/phpbb/trunk@6581 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-13 22:44:54 +00:00
Meik Sievertsen
96d6f2aee0 after tagging we increase the version number to b4-dev to be able to properly go to b4 or rc1.
git-svn-id: file:///svn/phpbb/trunk@6580 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-12 20:45:49 +00:00
David M
714fdee6d0 *** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@6578 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-12 19:45:36 +00:00
Meik Sievertsen
d420932921 let the user activity queries only update every 5 minutes
git-svn-id: file:///svn/phpbb/trunk@6577 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-12 19:24:30 +00:00
Nils Adermann
2312fb8c0b - use a font supporting unicode on Mac
git-svn-id: file:///svn/phpbb/trunk@6576 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-12 19:09:42 +00:00
Meik Sievertsen
912e142b59 change version number
git-svn-id: file:///svn/phpbb/trunk@6575 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-12 19:08:20 +00:00
Meik Sievertsen
85ddd3ea84 ok, this should work now for mail() and smtpmail. We also removed the newline from the spacer for mail_encode due to php's mail() function choking up on subjects with newlines.
git-svn-id: file:///svn/phpbb/trunk@6574 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-12 18:44:42 +00:00
Meik Sievertsen
adea08faef /me slaps nils. :)
git-svn-id: file:///svn/phpbb/trunk@6573 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-12 18:41:49 +00:00
Meik Sievertsen
d89f60f182 consistant obtain_* functions
git-svn-id: file:///svn/phpbb/trunk@6572 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-12 15:35:43 +00:00
David M
b0217ddc11 banned usernames are now cached and normalized
git-svn-id: file:///svn/phpbb/trunk@6571 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-12 15:17:46 +00:00
David M
90b16076d3 blah blah blah :D
git-svn-id: file:///svn/phpbb/trunk@6570 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-12 14:42:45 +00:00
Nils Adermann
cf34efb06c message
git-svn-id: file:///svn/phpbb/trunk@6569 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-12 14:29:32 +00:00
Meik Sievertsen
fa9d7e4ab4 #5222
git-svn-id: file:///svn/phpbb/trunk@6568 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-12 14:13:26 +00:00
Jonathan Stanley
1586aa5e04 #5226
git-svn-id: file:///svn/phpbb/trunk@6567 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-11 17:42:50 +00:00
Jonathan Stanley
ac19d4b24c #5112
git-svn-id: file:///svn/phpbb/trunk@6566 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-11 17:13:34 +00:00
Meik Sievertsen
66c2a18b82 seems like capitalizing menu titles introduced some problems. :) Also it might look strange for some languages - so therefore it is better be done within the language file directly.
git-svn-id: file:///svn/phpbb/trunk@6565 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-11 16:20:11 +00:00
Meik Sievertsen
8cf0bc433e let utf8 mails work again. I hope this is not giving problems for "strange" mail setups.
git-svn-id: file:///svn/phpbb/trunk@6564 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-11 12:24:10 +00:00
David M
a098417514 - cleaned up firebirdsql
- cleaned up install


git-svn-id: file:///svn/phpbb/trunk@6563 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-10 14:56:18 +00:00
Meik Sievertsen
a5e32e5a94 keywords is a string...
git-svn-id: file:///svn/phpbb/trunk@6562 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-10 14:55:49 +00:00
Meik Sievertsen
3d0759974b - some fixes
- added script for easy adjustement of username_clean column within the users table (please see the note i added to the utf8_clean_string() function)


git-svn-id: file:///svn/phpbb/trunk@6561 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-10 13:49:52 +00:00
Graham Eames
805af6f437 Only show reports you can handle [#5136]
git-svn-id: file:///svn/phpbb/trunk@6560 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-07 20:49:51 +00:00
Nils Adermann
11d2a37032 - Bug #5090
git-svn-id: file:///svn/phpbb/trunk@6559 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-05 20:52:52 +00:00
Graham Eames
67af543695 Slight copy and paste error
git-svn-id: file:///svn/phpbb/trunk@6558 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-05 20:42:37 +00:00
Dominik Dröscher
0ec7ca8bf7 #5092
git-svn-id: file:///svn/phpbb/trunk@6557 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-05 19:33:03 +00:00
David M
811d6ef6d1 #5122
git-svn-id: file:///svn/phpbb/trunk@6556 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-05 19:03:24 +00:00
Meik Sievertsen
830276508b - #5120
- #5104


git-svn-id: file:///svn/phpbb/trunk@6555 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-05 18:13:35 +00:00
Graham Eames
88b698c989 Some additional changes to the FAQ. This is now more or less complete, although will be subject to modification if extra issues come to light which should be in it
git-svn-id: file:///svn/phpbb/trunk@6554 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-05 13:58:40 +00:00
Meik Sievertsen
7e864e367b forgot one
git-svn-id: file:///svn/phpbb/trunk@6553 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-04 17:25:27 +00:00
Meik Sievertsen
63c0c798c8 - use the $var_ary for settings in a more logical way (hopefully removes the clutter and shows where which variable is set how)
- hopefully utf8 passwords are working too now


git-svn-id: file:///svn/phpbb/trunk@6552 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-04 17:19:33 +00:00
David M
8b90d5998b #5094
git-svn-id: file:///svn/phpbb/trunk@6551 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-04 16:30:51 +00:00
David M
1544f45621 trimmed the highlight regex
git-svn-id: file:///svn/phpbb/trunk@6550 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-04 13:37:22 +00:00
David M
8b0ec6e02d - compress is nicer (fixed a bug :P)
- UTF-8 code is nicer (fixed a bug :P)
- new CAPTCHA. Replaced the old one for size and usability issues. The old CAPTCHA will most likely be released as a separate package


git-svn-id: file:///svn/phpbb/trunk@6549 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-03 23:09:16 +00:00
Meik Sievertsen
7ab232a455 ok, i am an idiot...
git-svn-id: file:///svn/phpbb/trunk@6548 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-03 21:05:25 +00:00
David M
b0989c3f4d #5030
git-svn-id: file:///svn/phpbb/trunk@6547 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-03 20:19:52 +00:00
Meik Sievertsen
1634814e16 - make sure the sql layer for mysql always states mysql4 and get to mysql if using mysql < 4
- assign some default vars to email templates (we always need some basic ones)


git-svn-id: file:///svn/phpbb/trunk@6546 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-03 17:50:39 +00:00
Meik Sievertsen
daa3288a36 - implemented the suggested html_entity_decode function made by david
- fixed string length checking by also decoding entities for the sake of checking
- used the new html_entity_decode function


git-svn-id: file:///svn/phpbb/trunk@6545 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-03 11:26:14 +00:00
Meik Sievertsen
a3bf1ed63e some updates; and hopefully not completely breaking redirects (again). :D You know, i like breaking things.
git-svn-id: file:///svn/phpbb/trunk@6544 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-02 15:23:33 +00:00
Jonathan Stanley
21a002e4ac Bleh. @_@ (#5068)
git-svn-id: file:///svn/phpbb/trunk@6543 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-01 20:48:50 +00:00
Graham Eames
1128bf8788 Changing regeneration of the rand seed
git-svn-id: file:///svn/phpbb/trunk@6542 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-31 20:31:51 +00:00
Graham Eames
ace934284a Missed that there were 2 open against this file
git-svn-id: file:///svn/phpbb/trunk@6541 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-30 20:56:31 +00:00
Graham Eames
6c0b443dd7 #5020
Note, this can give a wide list, we need to look at this further


git-svn-id: file:///svn/phpbb/trunk@6540 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-30 20:32:45 +00:00
Meik Sievertsen
12c75a0991 - temporarily disable x-sendfile support (we need to look into methods of checking if it is enabled/disabled or introducing a switch)
- finally allow custom permission settings files (in acp/ as well as in mods/)


git-svn-id: file:///svn/phpbb/trunk@6539 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-30 19:51:56 +00:00
Meik Sievertsen
c44f6ca080 some fixes
git-svn-id: file:///svn/phpbb/trunk@6538 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-30 16:20:11 +00:00
Nils Adermann
7e55e53d10 - Handle upper/lower case in memberlist properly [Bug #5012]
git-svn-id: file:///svn/phpbb/trunk@6537 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-29 14:59:19 +00:00
Dominik Dröscher
b65cadf414 #5024
Missing </code>.


git-svn-id: file:///svn/phpbb/trunk@6536 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-29 09:08:36 +00:00
Jonathan Stanley
59d78ec21b #4880
#4882
#4884
#4898
#4910
#4926
#4928
#4930
#4934
#4936
#4938
#4942
#4944
#4946
#4948
#4950
#4952
#4954
#4956
#4960
#4972
#4980


git-svn-id: file:///svn/phpbb/trunk@6535 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-28 21:17:42 +00:00
Jonathan Stanley
a23103ba54 #4834
git-svn-id: file:///svn/phpbb/trunk@6534 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-28 20:22:25 +00:00
Meik Sievertsen
8130bcf44e test new mailing list rules
git-svn-id: file:///svn/phpbb/trunk@6533 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-28 11:03:33 +00:00
Meik Sievertsen
15195facc2 two tiny bugfixes
git-svn-id: file:///svn/phpbb/trunk@6532 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-27 14:40:41 +00:00
Dominik Dröscher
7058666615 #4754
MSNM should work again (as before, only on IE).


git-svn-id: file:///svn/phpbb/trunk@6531 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-26 14:46:41 +00:00
Dominik Dröscher
0b838cec29 #4802
git-svn-id: file:///svn/phpbb/trunk@6530 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-26 12:20:55 +00:00
Dominik Dröscher
b399902357 Forgot this ...
git-svn-id: file:///svn/phpbb/trunk@6529 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-26 11:48:36 +00:00
Dominik Dröscher
6f4d0c4fa2 #4696
Quoting from topic review should now work in FF 1.5.0.x.

Note to Nils: We need a utf8_addslashes function. The standard addslashes will not cut it for UTF-8. :)


git-svn-id: file:///svn/phpbb/trunk@6528 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-26 11:27:57 +00:00
Meik Sievertsen
cd3eaf0e17 some bugfixes
git-svn-id: file:///svn/phpbb/trunk@6527 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-26 10:58:58 +00:00
David M
b79f709bfc #4988
git-svn-id: file:///svn/phpbb/trunk@6526 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-25 18:53:57 +00:00
David M
2399844bef #4962
git-svn-id: file:///svn/phpbb/trunk@6525 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-23 23:01:12 +00:00
David M
ad8fa012f5 This was caused by the removal of DEFAULT on some TEXT columns (MySQL really does not allow this). Only those using MySQL felt this issue :P
git-svn-id: file:///svn/phpbb/trunk@6524 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-23 22:32:37 +00:00
David M
a0201b4958 #4850
git-svn-id: file:///svn/phpbb/trunk@6523 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-23 21:07:45 +00:00
Meik Sievertsen
74e03ddf62 - capitalize on menus (much much much much much much more readable)
- remove unneccessary "effective" (the view and the explanation should already imply this) to gain more space - we need to be as short as possible if labeling menu items.


git-svn-id: file:///svn/phpbb/trunk@6522 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-23 15:13:45 +00:00
Graham Eames
eb0c49da11 Add an optional flag to allow the disabling of generating the cron image for pages if appropriate
git-svn-id: file:///svn/phpbb/trunk@6521 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-22 18:32:06 +00:00
Meik Sievertsen
b3ab2173a4 #4896
git-svn-id: file:///svn/phpbb/trunk@6520 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-22 15:02:50 +00:00
Meik Sievertsen
0de6e24865 ENT_COMPAT is the default, with ENT_QUOTES a few features will no longer work.
git-svn-id: file:///svn/phpbb/trunk@6519 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-22 13:46:55 +00:00
Graham Eames
55e848eff8 Minor typo when the FAQ got updated
git-svn-id: file:///svn/phpbb/trunk@6518 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-22 13:37:47 +00:00
Meik Sievertsen
22129be21f - now username changes should work as desired
- removed some extract() calls


git-svn-id: file:///svn/phpbb/trunk@6517 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-22 13:32:33 +00:00
Graham Eames
44ea780de6 Increase size of font size box
git-svn-id: file:///svn/phpbb/trunk@6516 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-21 16:14:23 +00:00
Graham Eames
7470dcf709 Move outputting of TO box since it's only relevant to one module and this will ensure it is displayed however that module is loaded [#4866]
git-svn-id: file:///svn/phpbb/trunk@6515 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-21 15:46:23 +00:00
Graham Eames
1df3ccc836 #4876
git-svn-id: file:///svn/phpbb/trunk@6514 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-21 15:11:01 +00:00
Meik Sievertsen
f4da66a932 - adjust unread query a bit to cope with large topics (thanks bart!)
- fixing some bugs
- more username_clean work


git-svn-id: file:///svn/phpbb/trunk@6513 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-20 13:48:44 +00:00
Meik Sievertsen
b572e0db8f remove debug code. ;)
git-svn-id: file:///svn/phpbb/trunk@6512 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-19 14:11:03 +00:00
Meik Sievertsen
fcd9b898f1 Revised attachment categories a bit
Fixes for the following bugs:
#4830
#4818
#4816
#4810
#4808
#4798
#4796
#4772
#4662
#4646
#4546
#4524
#4270

I hope not having introduced additional severe errors :)


git-svn-id: file:///svn/phpbb/trunk@6511 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-19 13:55:48 +00:00
David M
9a0ca3d334 - typo in functions.php
- #4826


git-svn-id: file:///svn/phpbb/trunk@6510 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-18 23:58:31 +00:00
David M
2d3af47407 #4812
#4804


git-svn-id: file:///svn/phpbb/trunk@6509 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-18 21:39:28 +00:00
Meik Sievertsen
025d0bf757 let the forum link work again
(we do not need the removed check because the board url is always prefixed, except for those urls having a valid scheme and host part)


git-svn-id: file:///svn/phpbb/trunk@6508 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-18 15:32:46 +00:00
David M
771c20a5a4 #4758
git-svn-id: file:///svn/phpbb/trunk@6507 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-16 22:12:52 +00:00
Dominik Dröscher
6f23849556 Remaining files from #4760
git-svn-id: file:///svn/phpbb/trunk@6506 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-16 17:59:22 +00:00
Dominik Dröscher
2917956fe5 #4760
No more eval()


git-svn-id: file:///svn/phpbb/trunk@6505 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-16 13:42:17 +00:00
Dominik Dröscher
1d1e6d4603 #4694
Updated insert_text and removed some code duplication.


git-svn-id: file:///svn/phpbb/trunk@6504 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-16 12:07:51 +00:00
David M
c7f9d94b75 looks like nobody ever found this bug :D
git-svn-id: file:///svn/phpbb/trunk@6503 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-15 19:22:25 +00:00
Graham Eames
dd5a27dc6f Allow fractional values for sizes [#4744]
git-svn-id: file:///svn/phpbb/trunk@6502 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-14 21:13:51 +00:00
David M
4d0ebfcdf2 #4720
git-svn-id: file:///svn/phpbb/trunk@6501 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-14 21:00:26 +00:00
David M
2cc31fee0e if we want a string, don't close the DB and cache
git-svn-id: file:///svn/phpbb/trunk@6500 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-14 19:05:51 +00:00
David M
44ba76d075 fix the dbal
git-svn-id: file:///svn/phpbb/trunk@6499 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-14 18:54:37 +00:00
Graham Eames
ca19477a97 Fix time limiting in mcp [#4730]
git-svn-id: file:///svn/phpbb/trunk@6498 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-14 16:58:07 +00:00
Meik Sievertsen
4afaca12dc - store sql_layer directly within the layer itself
- new method sql_multi_insert to circumvent db-specific hacks
(hopefully not introduced any parsing errors)


git-svn-id: file:///svn/phpbb/trunk@6497 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-14 14:56:46 +00:00
Graham Eames
46922674ea Remove unused constants
git-svn-id: file:///svn/phpbb/trunk@6496 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-14 13:21:46 +00:00
Graham Eames
72f1d4f25d Need to set the clean form on install
git-svn-id: file:///svn/phpbb/trunk@6495 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-14 13:02:04 +00:00
Nils Adermann
c65048bd91 - introducing clean usernames, needs to be tested more, I'm not sure I didn't miss anything
- homograph list should probably be extended


git-svn-id: file:///svn/phpbb/trunk@6494 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-13 22:10:18 +00:00
Graham Eames
23d25ddcd1 More FAQ changes, with thanks to Techie-Micheal for assistance with some of these
git-svn-id: file:///svn/phpbb/trunk@6493 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-13 19:29:43 +00:00
David M
15ec1c443f #4710
git-svn-id: file:///svn/phpbb/trunk@6492 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-13 02:00:30 +00:00
Graham Eames
1418beacfd Use correct template variable to allow sorting to work [#4712]
git-svn-id: file:///svn/phpbb/trunk@6491 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-12 20:24:26 +00:00
Graham Eames
b6546a1487 Censor last post topic [#4714]
git-svn-id: file:///svn/phpbb/trunk@6490 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-12 20:05:50 +00:00
David M
a2ac86744f #4718
git-svn-id: file:///svn/phpbb/trunk@6489 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-12 18:59:14 +00:00
Meik Sievertsen
f373eba5a4 comment out for the moment - it may be not fair to disallow "virtual" urls. :)
git-svn-id: file:///svn/phpbb/trunk@6488 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-12 15:33:24 +00:00
Meik Sievertsen
23ef85fa74 some test code, hopefully working for all occassions where we are using the functions...
git-svn-id: file:///svn/phpbb/trunk@6487 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-12 15:20:33 +00:00
Dominik Dröscher
c2567c38ff #4316
git-svn-id: file:///svn/phpbb/trunk@6486 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-12 12:37:13 +00:00
Dominik Dröscher
7255ab8f39 I hate duplicate CSS. That was the last one for tonight. I swear!
git-svn-id: file:///svn/phpbb/trunk@6485 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-11 22:56:42 +00:00
Dominik Dröscher
cd37633cde Nicer solution for the rtl problem. Thanks Jon!
git-svn-id: file:///svn/phpbb/trunk@6484 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-11 22:54:10 +00:00
Dominik Dröscher
7c328f2de0 Yes IE6, I like you as much as you like me.
git-svn-id: file:///svn/phpbb/trunk@6483 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-11 22:42:16 +00:00
Dominik Dröscher
a1df726e9f Some subsilver fixes:
#4628
#4448
#4014


git-svn-id: file:///svn/phpbb/trunk@6482 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-11 22:35:41 +00:00
Graham Eames
152a653fd4 #3980
git-svn-id: file:///svn/phpbb/trunk@6481 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-11 20:37:53 +00:00
David M
31463d2ccc #4700
git-svn-id: file:///svn/phpbb/trunk@6480 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-11 19:56:27 +00:00
Meik Sievertsen
d7ee6969d2 :)
git-svn-id: file:///svn/phpbb/trunk@6479 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-11 14:59:28 +00:00
Meik Sievertsen
99d968dd2e some fixes
git-svn-id: file:///svn/phpbb/trunk@6478 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-11 13:48:30 +00:00
Meik Sievertsen
97c72d7075 - make sure all sort keys are valid and selectable.
git-svn-id: file:///svn/phpbb/trunk@6477 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-11 10:43:20 +00:00
Meik Sievertsen
a765165cd1 do not use parse_str because it could lead to "unexpected" output which could lead to XSS
git-svn-id: file:///svn/phpbb/trunk@6476 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-11 07:02:29 +00:00
Meik Sievertsen
e168cd2793 ok, i do not why the db is setting the type for user id to string - but with this change bots should no longer "spawn" sessions. ;)
git-svn-id: file:///svn/phpbb/trunk@6475 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-10 13:59:02 +00:00
David M
23a6cf3efb #4622
stole this bug too :P


git-svn-id: file:///svn/phpbb/trunk@6474 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-10 02:04:55 +00:00
David M
c63392c89e new collation for MySQL >= 4.1.3, should be a tad faster
git-svn-id: file:///svn/phpbb/trunk@6473 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-10 01:46:59 +00:00
David M
e9df6f3546 #4680
this bothered me :P


git-svn-id: file:///svn/phpbb/trunk@6472 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-10 01:39:48 +00:00
David M
42dcd7929e hopefully no bugs...
- faster encoding and way faster decoding (hopefully)
- waaaaay faster strtoupper strtolower transforms
- more powerful utf8_substr
- removed two (now) useless functions

P.S.
decode and upper/lower all had bugs before :P


git-svn-id: file:///svn/phpbb/trunk@6471 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-09 17:44:06 +00:00
Meik Sievertsen
0b2aaae28b - forum image being an additional image instead of replacing forum indicators
- reasons fixes


git-svn-id: file:///svn/phpbb/trunk@6470 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-08 19:04:49 +00:00
Dominik Dröscher
f8be2a133b missing span
git-svn-id: file:///svn/phpbb/trunk@6469 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-08 14:31:03 +00:00
Graham Eames
91dcde955e Changes to language functionality.
Notes to translators:
* Language directory should where possible be named xx[_yy[_zz]] as appropriate for the language code (lower case with underscores to separate)
* USER_LANG should contain the relevant iso code which is returned with page content (ie en-gb for the default language pack)


git-svn-id: file:///svn/phpbb/trunk@6468 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-08 13:42:23 +00:00
Meik Sievertsen
9cfa28b502 remove useless information from tz array
git-svn-id: file:///svn/phpbb/trunk@6467 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-08 11:25:20 +00:00
Meik Sievertsen
9a73fb26b2 filenames and directories are lowercase only
git-svn-id: file:///svn/phpbb/trunk@6466 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-08 11:21:40 +00:00
David M
df20358f6d oops ;-)
git-svn-id: file:///svn/phpbb/trunk@6465 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-07 22:53:39 +00:00
David M
722ab535a6 Case folding! :D
git-svn-id: file:///svn/phpbb/trunk@6464 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-07 22:51:55 +00:00
Graham Eames
6972d28633 View profile now shows relevant add/remove links
git-svn-id: file:///svn/phpbb/trunk@6463 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-07 21:02:06 +00:00
Graham Eames
32c2ea4339 View profile now shows relevant add/remove links
git-svn-id: file:///svn/phpbb/trunk@6462 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-07 20:11:45 +00:00
Graham Eames
d7545025c3 Make the UTF tools available - recent changes require them in the install and they are likely to be needed in conversion as well
Fix some broken redirects
Change the structure of language packs we scan for.
	(language packs should be named in the form xx-yy - all lowercase with hyphens as the separator)


git-svn-id: file:///svn/phpbb/trunk@6461 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-07 19:07:42 +00:00
Jonathan Stanley
17f25374ad Set S_USER_LANG for the installer, though requires review since phpBB3
mandates that the language pack directory is in xx/xx-YY/xx-yy format, as browsers
 choke with non-hyphenated formats, eg: xx_YY/xx_yy/xx@Zzzz.


git-svn-id: file:///svn/phpbb/trunk@6460 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-07 17:54:53 +00:00
Meik Sievertsen
485935e1f1 he braces style is deprecated as of PHP 6
git-svn-id: file:///svn/phpbb/trunk@6459 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-07 17:40:07 +00:00
Meik Sievertsen
a7df65168c better not. ;)
git-svn-id: file:///svn/phpbb/trunk@6458 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-07 17:11:51 +00:00
Meik Sievertsen
c40783e6a2 strpos...
git-svn-id: file:///svn/phpbb/trunk@6457 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-07 16:49:44 +00:00
Meik Sievertsen
eac1b02843 role_name does not need to be case-insensitive
git-svn-id: file:///svn/phpbb/trunk@6456 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-07 15:53:17 +00:00
Meik Sievertsen
f27edc4b5b for some things we do not need the utf8 function. :)
git-svn-id: file:///svn/phpbb/trunk@6455 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-07 15:47:55 +00:00
Graham Eames
66c78d114b The zebra ran into a paint factory
git-svn-id: file:///svn/phpbb/trunk@6454 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-07 14:12:50 +00:00
Graham Eames
e4a4bd0d4e Minor typo
git-svn-id: file:///svn/phpbb/trunk@6453 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-07 13:14:58 +00:00
Meik Sievertsen
f8528a659c tried to begin adjusting all string functions where applicable - still a *lot* to do.
i hope i catched all relevant sections and did not mess something up.


git-svn-id: file:///svn/phpbb/trunk@6452 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-07 12:36:31 +00:00
Jonathan Stanley
e87f740a9e Explicitly setting the (X)HTML content-language for the ACP so that Unicode font matching within browsers work correctly when Chinese/Korean/Japanese language packs are selected due to Han Unification
which map different graphemes to the same codepoint.

References:

http://www.w3.org/International/tutorials/tutorial-lang/
http://en.wikipedia.org/wiki/Han_unification


git-svn-id: file:///svn/phpbb/trunk@6451 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-07 00:56:58 +00:00
David M
3ad6069d01 *** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@6450 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-06 22:44:58 +00:00
David M
6c49652a19 #4518
git-svn-id: file:///svn/phpbb/trunk@6449 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-06 22:27:17 +00:00
David M
7777bd5f50 #3794
git-svn-id: file:///svn/phpbb/trunk@6448 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-06 21:37:17 +00:00
Meik Sievertsen
0f0d160ded - support re-caching of theme data if stylesheet.css changed and load_tplcompile enabled
- mcp fixes
- fixed some usability issues


git-svn-id: file:///svn/phpbb/trunk@6447 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-06 18:43:55 +00:00
Meik Sievertsen
c645088a34 *** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@6446 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-06 12:55:36 +00:00
Jonathan Stanley
d4524f1b10 oopsie?!?! :D
git-svn-id: file:///svn/phpbb/trunk@6445 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-05 23:38:13 +00:00
Jonathan Stanley
1577507574 Some initial FAQ (that's FACK, not Eff Aye Que) expansion for phpBB3, keeping in mind the secret template is a little different. ;)
git-svn-id: file:///svn/phpbb/trunk@6444 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-05 23:16:16 +00:00
Graham Eames
db202159e2 Add coluring to search-posts results
git-svn-id: file:///svn/phpbb/trunk@6443 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-05 19:58:37 +00:00
David M
9c83c919a2 #4616
git-svn-id: file:///svn/phpbb/trunk@6442 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-05 00:55:27 +00:00
Graham Eames
dcdd47cb75 Do not show styles select if overriding style
git-svn-id: file:///svn/phpbb/trunk@6441 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-04 20:51:51 +00:00
Graham Eames
50a0c827ce Check that we actually have a valid fp
git-svn-id: file:///svn/phpbb/trunk@6440 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-04 18:25:05 +00:00
Meik Sievertsen
26aba1a1f1 - finally removed sql_numrows
- sql_fetchfield now in dbal.php
- check query id correctly as well as other tiny fixes


git-svn-id: file:///svn/phpbb/trunk@6439 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-04 15:15:40 +00:00
Nils Adermann
f7f6e9bcde - query id can be zero [Bug #4584]
git-svn-id: file:///svn/phpbb/trunk@6438 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-03 20:38:03 +00:00
Meik Sievertsen
aca3b8c5cf ha, the first one...
git-svn-id: file:///svn/phpbb/trunk@6437 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-03 20:28:59 +00:00
Meik Sievertsen
5284f32178 - extend config checking to include check for writeable path
- removed not utilized user_allow_email column from schema
- removed inactive groups (they had no use at all, since inactive users are not able to login)
	The only benefit those brought are distinguish users - but this is no longer needed too due to the inactive code present. This also allows us to retain group memberships as well as default settings for users being set inactive due to profile changes.
- rewrote user_active_flip to support multiple users and a mode, as well as coping with the aforementioned changes
- implemented updated jabber class to support SRV server records and for better jabberd2 support.
- jabber errors now logged to the error log with a full transaction
- fixed user_delete calls to include usernames where possible and also update last post information correctly
- implemented additioal checks to user management to cope with common mistakes
- On installation, guess the required mysql schema as best as possible. Users now only need to decide if they want to use the mysqli extension or not (mysqli selected by default) and no longer need to know their mysql version.
- founders do not need to re-activate their account on profile changes
- remove older session if re-authentication was successful (re-authentication always assigns a new session id)
- set the cookie directly instead of using php's function
- added inactive_remind to see which users got deactivated because of reminders (or re-activation) sent out

hopefully not introduced too many bugs - those testing with CVS releases, please concentrate on user registration, activation, profile changes (email/password)...


git-svn-id: file:///svn/phpbb/trunk@6436 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-03 18:35:59 +00:00
Jonathan Stanley
d7f87be493 Reworded string to better clarify the error
git-svn-id: file:///svn/phpbb/trunk@6435 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-03 13:39:55 +00:00
David M
71c30b8157 #4226
git-svn-id: file:///svn/phpbb/trunk@6434 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-03 03:59:16 +00:00
David M
c4d8c23357 complete check for FB
git-svn-id: file:///svn/phpbb/trunk@6433 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-03 03:17:56 +00:00
David M
50dc65177f kill the cache
git-svn-id: file:///svn/phpbb/trunk@6432 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-02 22:35:50 +00:00
David M
2ce3ab3dc0 remove my debug code
git-svn-id: file:///svn/phpbb/trunk@6431 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-02 15:33:30 +00:00
David M
94121dc765 #4572
git-svn-id: file:///svn/phpbb/trunk@6430 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-02 15:32:41 +00:00
David M
ec9978f2eb #4564
git-svn-id: file:///svn/phpbb/trunk@6429 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-02 15:31:14 +00:00
Meik Sievertsen
cc4a0a2f7a consistent acp layout regarding backlinks and messages.
git-svn-id: file:///svn/phpbb/trunk@6428 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-02 15:11:40 +00:00
Graham Eames
fc76c94ab1 Make sure comments in generated language files include UTF reference
git-svn-id: file:///svn/phpbb/trunk@6427 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-01 20:49:39 +00:00
Graham Eames
17989aba24 Allow for tomorrow in relative dates
git-svn-id: file:///svn/phpbb/trunk@6426 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-01 17:18:37 +00:00
David M
aa71cfaa8b - Goodbye MySQL4, hello unified MySQL driver. MySQL 3.23 to MySQL 5.0 are now in one driver.
git-svn-id: file:///svn/phpbb/trunk@6425 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-01 16:20:05 +00:00
Graham Eames
fd0b2e7df3 Prevent reuse of previous password
git-svn-id: file:///svn/phpbb/trunk@6424 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-01 16:12:53 +00:00
Graham Eames
c42b75d1bc Prevent cookies from other applications interfering with our forms
git-svn-id: file:///svn/phpbb/trunk@6423 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-01 11:10:15 +00:00
David M
bc15445b58 - forgot to make the same change to the ODBC driver
- MySQL 3.x works now
- FirebirdSQL is now on the same level as MySQL and PostgreSQL, zero hacks exist inside the core code now


git-svn-id: file:///svn/phpbb/trunk@6422 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-10-01 08:48:32 +00:00
Graham Eames
bc770de9b9 Minor l10n change
git-svn-id: file:///svn/phpbb/trunk@6421 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-30 16:03:37 +00:00
Meik Sievertsen
4c2e2b83c7 just realizing that it is better to limit the uses of RANGE.
git-svn-id: file:///svn/phpbb/trunk@6420 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-30 15:06:03 +00:00
Meik Sievertsen
b08c54f35e - fixing a bug i am unsure about when it occurs (but it occurs). The symptoms are broken template cache files if after removing unnecessary php opening/closing tags result in statements being syntactially incorrect.
- added real syncing to forums acp (not only forum statistics rebuild)


git-svn-id: file:///svn/phpbb/trunk@6419 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-30 14:58:05 +00:00
Meik Sievertsen
e4fc191e0d of course $host instead of $domain
git-svn-id: file:///svn/phpbb/trunk@6418 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-29 12:06:06 +00:00
Jonathan Stanley
3766d9128d Teh grammar striketh! Oh... and something to please the Typographists. ;)
git-svn-id: file:///svn/phpbb/trunk@6417 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-28 17:51:30 +00:00
Jonathan Stanley
ab76b65cc4 A couple small fixes.
git-svn-id: file:///svn/phpbb/trunk@6416 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-28 17:43:13 +00:00
Meik Sievertsen
34f09c8dea err, no, from the php manual actually... the zend function has some security issues.
git-svn-id: file:///svn/phpbb/trunk@6415 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-28 15:11:57 +00:00
Meik Sievertsen
26befa0941 - added confirmation to removing bbcodes
- added optional MX and DNSBL checks
- added backtrace (triggering sql error) on error within sql_in_set as well as making sure it is handling an array
- let users having f_list access to a forum actually see the forum without a topic list and not displaying an error message - this allows for giving people access to subforums but not the parent forum without the need to add the (sub-)forum to the index.
- some additional bugfixes


git-svn-id: file:///svn/phpbb/trunk@6414 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-28 15:04:59 +00:00
Meik Sievertsen
67accdb072 updated coding guidelines. ;)
git-svn-id: file:///svn/phpbb/trunk@6413 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-28 12:42:36 +00:00
Jonathan Stanley
f48f1c743b A minor boo-boo. :P
git-svn-id: file:///svn/phpbb/trunk@6412 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-28 01:57:49 +00:00
Meik Sievertsen
734492958e These changes should let olympus scale a little bit better.
i haven't adjusted the schemas but added the details to create_schema_files - david is able to build them then in line with his changes. :)


git-svn-id: file:///svn/phpbb/trunk@6411 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-26 19:59:41 +00:00
Graham Eames
e339c36ec0 Update group faq and add section on zebras
git-svn-id: file:///svn/phpbb/trunk@6410 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-26 19:57:44 +00:00
Graham Eames
8a362bdc85 Initial cleanup of "Issues", "Private Messaging" & "Topics"
Further changes will follow


git-svn-id: file:///svn/phpbb/trunk@6409 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-25 21:02:41 +00:00
Graham Eames
9f865447f3 4+1=5
git-svn-id: file:///svn/phpbb/trunk@6408 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-25 18:59:34 +00:00
Meik Sievertsen
12f2fbc415 use the "old" approach
git-svn-id: file:///svn/phpbb/trunk@6407 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-25 14:32:05 +00:00
Dominik Dröscher
8e06ad3829 Welcome the new pagination.html - splitting up multiple pages since 1897.
git-svn-id: file:///svn/phpbb/trunk@6406 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-24 16:02:25 +00:00
Meik Sievertsen
e1beb68ae1 fix bug #4454
git-svn-id: file:///svn/phpbb/trunk@6405 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-24 15:07:08 +00:00
Dominik Dröscher
7e9a6dd8b5 Oops, will keep this out for now. Need to discuss where to put the leged first.
git-svn-id: file:///svn/phpbb/trunk@6404 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-24 14:47:42 +00:00
Meik Sievertsen
287fe750ea i am tired of the support requests for those having changed the permissions of the cache folder on an update (not intentionally most of the time though)
git-svn-id: file:///svn/phpbb/trunk@6403 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-24 14:43:33 +00:00
Dominik Dröscher
46c961b5f5 Giving breadcrumbs their own home. (#4450)
Note that this is currently kinda broken, please no bug reports on the bottom breadcrumb not showing!


git-svn-id: file:///svn/phpbb/trunk@6402 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-24 14:34:39 +00:00
Meik Sievertsen
25fc7e62cd this change may introduce yet another query (not if store_reverse is used internally most of the time), but i hardly noticable on small forums. This change scales very very better than the old method. With the old one viewforum became slower and slower the more topics were present. For me the difference for a forum with 100.000 topics were 0.4 seconds (local server) - for others the speed increase should be noticeably higher.
git-svn-id: file:///svn/phpbb/trunk@6401 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-24 14:03:57 +00:00
Graham Eames
cb31a4446d Forgot this one yesterday
git-svn-id: file:///svn/phpbb/trunk@6400 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-24 12:24:22 +00:00
Jonathan Stanley
6ac33db38d Righto... my first checkin for these language related thingies. Hopefully nothing
has blown up! ;)

The basic style guide is:

1) British English, Cambridge style... ie: -ise, not -ize, etc.
2) Sentence-case pervasively with exception of acronyms/abbreviations, which if not in their contracted form, shall be in title-case. If you don't like it, you can
 restyle it via CSS using text-transform: none|uppercase|lowercase|capitalize; ...
 additional hooks may be added to the strings to assist this.
3) For those that have missed the switch to UTF-8, it means that the language files need not use numeric entities anymore. &lt;, &gt; and &amp; stay though, as
 they must always be entitised.

There'll be more tweaks and changes, though this "big 'un" is out of the way and will get progressively chilly so that it can be frozen for RC1 after
 however many betas there may be. ;) Wooh! :P


git-svn-id: file:///svn/phpbb/trunk@6399 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-24 00:28:32 +00:00
Graham Eames
1d2e60b068 #3896
git-svn-id: file:///svn/phpbb/trunk@6398 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 19:30:01 +00:00
Graham Eames
11c278a037 #4422
git-svn-id: file:///svn/phpbb/trunk@6397 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 15:47:31 +00:00
David M
bab608a1b9 oops
git-svn-id: file:///svn/phpbb/trunk@6396 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 13:44:24 +00:00
Graham Eames
a5a9f16c0d And the schema changes for the inactive user changes
git-svn-id: file:///svn/phpbb/trunk@6395 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 12:39:48 +00:00
Graham Eames
cbece78f7b A reworking of how we handle inactive users
git-svn-id: file:///svn/phpbb/trunk@6394 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 12:27:51 +00:00
Meik Sievertsen
36fa521f92 #4428
git-svn-id: file:///svn/phpbb/trunk@6393 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 11:49:27 +00:00
Dominik Dröscher
1ab3494b44 Bug #3592
This changes the layout for links without redirect count a little but it stops breaking the layout in certain situations.


git-svn-id: file:///svn/phpbb/trunk@6392 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 11:40:21 +00:00
Meik Sievertsen
70dffaacbd fix custom bbcode html replacement to correctly replace references
It failed if there was a number directly after the token, resulting in $12345, where $1 was needed. Fixed by using ${x}

also made sure that newlines within the html replacement are not replaced with <br />.


git-svn-id: file:///svn/phpbb/trunk@6391 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 11:37:05 +00:00
Dominik Dröscher
d62e93ee30 Bug #3876
No need to have the forum list twice in the templates. Goodbye viewbody_subfourm, you served us well!


git-svn-id: file:///svn/phpbb/trunk@6390 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 11:17:03 +00:00
Meik Sievertsen
6d08ef7b3a made sql_rowseek consistent with the dbal methods as well as fixing sql_query_limit for mssql, especially if sql_query_limit($sql, 0, 0) is given...
git-svn-id: file:///svn/phpbb/trunk@6389 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 11:10:37 +00:00
Dominik Dröscher
7542fabaa7 Bug #4322
git-svn-id: file:///svn/phpbb/trunk@6388 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 10:48:20 +00:00
Meik Sievertsen
02c875ebb4 #3802
git-svn-id: file:///svn/phpbb/trunk@6387 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 10:08:05 +00:00
Meik Sievertsen
2069aa0f83 hopefully fixes bug #3135
git-svn-id: file:///svn/phpbb/trunk@6386 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 09:51:18 +00:00
David M
786b34e4d3 SET NAMES on the MySQL 4.1.2+ DBs
git-svn-id: file:///svn/phpbb/trunk@6385 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 02:54:17 +00:00
David M
0f8630e077 the tokenizer is buggy across several versions of PHP. The regex that is always used complies strictly with what the internal lexer uses, we are safe.
git-svn-id: file:///svn/phpbb/trunk@6384 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-23 02:46:43 +00:00
Meik Sievertsen
1d7e3e0fd9 some tiny fixes here and there
git-svn-id: file:///svn/phpbb/trunk@6383 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-22 22:14:05 +00:00
Meik Sievertsen
587ec3fa77 #4406
git-svn-id: file:///svn/phpbb/trunk@6382 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-20 13:20:18 +00:00
David M
b7dab9cdab - Oracle now works with large amounts of text
- MSSQL now works :P (sans UTF-8 support)
- The current schema files work well enough to install, etc. but must be tightened. Will get to it when I get some time...


git-svn-id: file:///svn/phpbb/trunk@6381 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-19 04:50:02 +00:00
Nils Adermann
ea065f3e67 - no more encoding mixture, say hello to UTF-8 (I'll add a validation solution for PHP 4.3.3/4 ASAP) [side effect: fixes Bug #3762]
- take local server time into consideration for birthday/age calculation
- faster active topic search
- allow changing active topic time frame [Bug #4150]
- reload stylesheet on language change [Bug #4222]


git-svn-id: file:///svn/phpbb/trunk@6380 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-17 22:02:28 +00:00
Graham Eames
e2ac2f9d7d Confirm zebra removal...... I mean friend/foe deletion :P
git-svn-id: file:///svn/phpbb/trunk@6379 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-17 15:22:01 +00:00
Meik Sievertsen
8b70eca57c *** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@6378 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-17 14:45:52 +00:00
Meik Sievertsen
e43b9d2f9b removed debug_extra notice
other fixes
state that mysql.php shouldn't be used for mysql 4.1+ (actually, it should deny using it)


git-svn-id: file:///svn/phpbb/trunk@6377 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-17 14:43:49 +00:00
David M
c6c3df2a73 commenting some code :D
git-svn-id: file:///svn/phpbb/trunk@6376 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-17 02:52:19 +00:00
Graham Eames
bbc4a0c3fe * Fix default language option if more than one pack is present
* Fix moderator roles to match their description
* Add new forum role for closer mapping of converted permissions


git-svn-id: file:///svn/phpbb/trunk@6375 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-16 19:36:48 +00:00
Graham Eames
26d4694071 Extra check on table prefix for mysql
git-svn-id: file:///svn/phpbb/trunk@6374 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-16 14:04:20 +00:00
David M
b1aa007693 oops
git-svn-id: file:///svn/phpbb/trunk@6373 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-16 13:27:21 +00:00
David M
a46a0c10c9 drat
git-svn-id: file:///svn/phpbb/trunk@6372 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-16 13:25:31 +00:00
David M
fe1367b31e bug fixes
schema changes
i really hope nothing went wrong


git-svn-id: file:///svn/phpbb/trunk@6371 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-16 06:07:06 +00:00
David M
9479bc428f yet another oops...
git-svn-id: file:///svn/phpbb/trunk@6370 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-15 22:38:42 +00:00
David M
ccaaa3a307 whitespace :P
git-svn-id: file:///svn/phpbb/trunk@6369 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-15 22:24:41 +00:00
David M
2a4c853f87 new utf8_* stuff
git-svn-id: file:///svn/phpbb/trunk@6368 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-15 22:15:10 +00:00
Meik Sievertsen
f9297794b6 implement bare-bone validation for config variables...
git-svn-id: file:///svn/phpbb/trunk@6367 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-15 14:08:48 +00:00
Meik Sievertsen
79137c312c - Fix some bugs
- fixed retrieving of permissions if the LIKE statement is used as well as proper supporting (needs testing on mssql)


git-svn-id: file:///svn/phpbb/trunk@6366 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-14 14:57:29 +00:00
Meik Sievertsen
665adc1722 seems like i forgot something. :)
git-svn-id: file:///svn/phpbb/trunk@6365 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-13 18:19:39 +00:00
Meik Sievertsen
b76222cb6e - fixed some bugs
- changed attachment handling a bit
- tried to remove target tags out of the code
- do not add session ids to urls for bots as well as not creating a new session on each page view for them

I bet i introduced some bugs too. ;)


git-svn-id: file:///svn/phpbb/trunk@6364 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-13 16:08:36 +00:00
Meik Sievertsen
35c5fe21cb removing some test data to not give the impression we provide an update between betas.
git-svn-id: file:///svn/phpbb/trunk@6363 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-11 18:03:15 +00:00
David M
d3f8ea83db oops
git-svn-id: file:///svn/phpbb/trunk@6362 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-10 15:04:56 +00:00
Graham Eames
227980c7d1 Add the lock file to allow dynamic menus
git-svn-id: file:///svn/phpbb/trunk@6361 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-08 20:06:00 +00:00
Graham Eames
6568ab756c Next phase of last post changes + a few minor bugs
Note: This template variable is available but will not be used by default


git-svn-id: file:///svn/phpbb/trunk@6360 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-08 18:00:38 +00:00
Dominik Dröscher
b150ed0324 Some more username colouring
git-svn-id: file:///svn/phpbb/trunk@6359 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-08 17:35:21 +00:00
Dominik Dröscher
6a2197f196 Coloured usernames should always appear bold
git-svn-id: file:///svn/phpbb/trunk@6358 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-07 20:16:13 +00:00
Dominik Dröscher
2a470b7e4c #4174 - closing some spans
git-svn-id: file:///svn/phpbb/trunk@6357 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-07 08:33:19 +00:00
Nils Adermann
8799d8d65c oops
git-svn-id: file:///svn/phpbb/trunk@6356 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-06 20:58:53 +00:00
Graham Eames
4018c48abb Consistancy with the actual link text
git-svn-id: file:///svn/phpbb/trunk@6355 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-06 19:23:23 +00:00
Meik Sievertsen
504eef65c5 check file type
git-svn-id: file:///svn/phpbb/trunk@6354 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-05 15:17:45 +00:00
Meik Sievertsen
2c2a2c10d9 oh, forgot one thing
git-svn-id: file:///svn/phpbb/trunk@6353 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-05 09:22:57 +00:00
Meik Sievertsen
8ab85ebdb0 - fix security issue in download.php
- fixing some phpdocumentor warnings/errors
- adjust pop-before-smtp "auth" (nowadays no one should rely on it)
- add backtrace for smtp email errors if DEBUG_EXTRA is enabled


git-svn-id: file:///svn/phpbb/trunk@6352 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-04 20:35:46 +00:00
Meik Sievertsen
8c567e8c68 - fixing profile bug
- adjusting acl_gets calls (they are or'd - make sure they get checked correctly based on the situation)
- automatically assign the u_download and u_search permission to the guest group


git-svn-id: file:///svn/phpbb/trunk@6351 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-04 13:47:56 +00:00
Graham Eames
5ea461108e - Fix warning removal, x - 0 = x ;-)
- Make sure that the cached colour information is updated when altering groups
   - Also consolidate some related code at the same time


git-svn-id: file:///svn/phpbb/trunk@6350 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-02 15:36:45 +00:00
Meik Sievertsen
64af84dc6b the file updater. This is in CVS but the file is not able to be used without the correct update packages - no need to try.
Please note that even if the file is now in CVS it does not mean we provide an update path from Beta2 to any other version.


git-svn-id: file:///svn/phpbb/trunk@6349 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-02 14:34:20 +00:00
Meik Sievertsen
609744041b our new update_to_latest.php file replacement. ;)
Please note that even if the file is now in CVS it does not mean we provide an update path from Beta2 to any other version.


git-svn-id: file:///svn/phpbb/trunk@6348 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-02 13:53:50 +00:00
Meik Sievertsen
f3b545bb59 add version check to acp. Now no longer directly displayed at the acp index but accessible through the System tab and viewable by any admin (no special permisison needed).
git-svn-id: file:///svn/phpbb/trunk@6347 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-02 13:39:21 +00:00
Meik Sievertsen
49a94efe1f some icons from tortoiseCVS. Someone more competent in creating icons may want to replace them. ;)
git-svn-id: file:///svn/phpbb/trunk@6346 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-02 13:34:37 +00:00
Meik Sievertsen
3ea2d53cb2 some changes/fixes
git-svn-id: file:///svn/phpbb/trunk@6345 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-02 13:33:06 +00:00
Dominik Dröscher
cf7a261408 necessary!
git-svn-id: file:///svn/phpbb/trunk@6344 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-02 12:56:49 +00:00
Dominik Dröscher
5e2cfc887f Fixing a few minor things ... Sorry Jon, got bored and fixed some of the spelling mistakes assigned to you. :)
git-svn-id: file:///svn/phpbb/trunk@6343 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-02 12:00:21 +00:00
Meik Sievertsen
5f30881c2c fix some bugs - hopefully not breaking anything...
git-svn-id: file:///svn/phpbb/trunk@6342 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-09-01 13:16:22 +00:00
Dominik Dröscher
888bbf6ff4 Forgot to check whether visual confirmation displayed properly with the new reauth layout. I didn't. Did I mention that I hate working with tables for layout? Thank the gods for the new style. ;-)
git-svn-id: file:///svn/phpbb/trunk@6341 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-31 22:11:30 +00:00
Dominik Dröscher
85902a9056 - removing the registration text / privacy policy and terms of use link for admin reauthentication - --------- - changing the layout of the reauth login a little due to the above changes
git-svn-id: file:///svn/phpbb/trunk@6340 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-31 21:49:29 +00:00
Dominik Dröscher
4d61431256 Fixed cell width
git-svn-id: file:///svn/phpbb/trunk@6339 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-30 20:12:54 +00:00
Dominik Dröscher
4354729066 Some interface work on the ACP:
- #3774 and more


git-svn-id: file:///svn/phpbb/trunk@6338 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-30 19:47:36 +00:00
Graham Eames
996d946148 Correctly set IP address on initial post and user profile
git-svn-id: file:///svn/phpbb/trunk@6337 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-30 19:44:32 +00:00
Graham Eames
d64e44b878 Error if no post in a forum
git-svn-id: file:///svn/phpbb/trunk@6336 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-30 19:33:55 +00:00
David M
239bd5e37c oops :P
git-svn-id: file:///svn/phpbb/trunk@6335 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-30 13:15:36 +00:00
David M
733774d747 - Bug #3986
git-svn-id: file:///svn/phpbb/trunk@6334 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-30 01:31:50 +00:00
David M
3f6318f2b1 - Bug #4028
git-svn-id: file:///svn/phpbb/trunk@6333 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-30 01:15:40 +00:00
David M
bb3034eb26 - Bug #4000
git-svn-id: file:///svn/phpbb/trunk@6332 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-30 00:58:36 +00:00
David M
bd4391d4ca - Bug #3978
git-svn-id: file:///svn/phpbb/trunk@6331 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-30 00:52:14 +00:00
Nils Adermann
457078f2cf - only highlight when there is anything to highlight
git-svn-id: file:///svn/phpbb/trunk@6330 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-29 20:25:28 +00:00
Meik Sievertsen
1564013fdd a script to update old bbcode bitfields to the new format. ;)
git-svn-id: file:///svn/phpbb/trunk@6329 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-29 17:23:44 +00:00
Meik Sievertsen
1307146a93 small correction to the coding guidelines
git-svn-id: file:///svn/phpbb/trunk@6328 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-29 15:52:05 +00:00
Meik Sievertsen
69983a2d4e fixing bug #4078
git-svn-id: file:///svn/phpbb/trunk@6327 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-29 15:05:56 +00:00
Meik Sievertsen
284cba438b hopefully fixing bug #3966
git-svn-id: file:///svn/phpbb/trunk@6326 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-29 14:57:17 +00:00
Nils Adermann
b4c095cb3e -forgot list items
git-svn-id: file:///svn/phpbb/trunk@6325 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-28 21:15:05 +00:00
Dominik Dröscher
64dc59ac82 What is that you say? Coding guidelines? I don't know no freaking coding guidelines!
git-svn-id: file:///svn/phpbb/trunk@6324 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-28 20:20:38 +00:00
Dominik Dröscher
4cf8487e8d Some language changes. Don't get too excited when I submit stuff.
git-svn-id: file:///svn/phpbb/trunk@6323 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-28 20:11:48 +00:00
Dominik Dröscher
e59432cbc5 Hehehehe ...
git-svn-id: file:///svn/phpbb/trunk@6322 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-28 18:45:18 +00:00
Nils Adermann
c0a880b665 - birthdays/age in user's timezone and not server's local time
- parse bbcode in posts with fewer characters than selected maximum on search results page
- retrieve search word context in posts which are longer than maximum characters (no raw BBCode anymore)
- formatted text is processed in the same order everywhere now: censor_text, replace newlines, bbcode, smileys, attachments, highlighting [including Bug #2048]
- highlighting pattern updated to exclude style and script (e.g custom BBCode) [Bug #3856]
- fixed a style problem in Opera [Bug #3770]
- performance increase for user::img()
- slight adjustments to search


git-svn-id: file:///svn/phpbb/trunk@6321 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-28 17:20:21 +00:00
Meik Sievertsen
1d37b69ddd - some bugfixes
- using E_USER_WARNING if an error occurred within the ACP (sadly not able to use it as a default for trigger_error - it seems to be hardcoded in PHP)


git-svn-id: file:///svn/phpbb/trunk@6320 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-28 15:50:33 +00:00
Dominik Dröscher
902285684d Some more minor style bugs fixed.
git-svn-id: file:///svn/phpbb/trunk@6319 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-27 19:22:06 +00:00
Dominik Dröscher
6d583dcf6e Testing, testing, ... is this thing on?
Some cleaning up on view profile - bug #3834


git-svn-id: file:///svn/phpbb/trunk@6318 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-27 18:32:22 +00:00
Meik Sievertsen
e7cbcfe874 some fixes.
David, could you check the pass_complex expressions? They are:
.* PASS_TYPE_ANY (any characters are allowed, no check)
[a-zA-Z] PASS_TYPE_CASE (password must contain alphanumerics)
[a-zA-Z0-9] PASS_TYPE_ALPHA (password must contain alphanumerics and numbers)
[a-zA-Z\W] PASS_TYPE_SYMBOL (password must contain alphanumers, numbers and symbols)

At the moment the pass complexity check is done within validate_password(), but the expressions are wrong. :)


git-svn-id: file:///svn/phpbb/trunk@6317 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-25 15:15:53 +00:00
Meik Sievertsen
d1ae8c52a4 colour is a string. :)
git-svn-id: file:///svn/phpbb/trunk@6316 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-23 15:46:10 +00:00
Graham Eames
e6e1be9827 Fix some minor bugs arising from yesterday.
Nils - I haven't looked into the other related pages yet


git-svn-id: file:///svn/phpbb/trunk@6315 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-23 14:59:52 +00:00
Meik Sievertsen
5fda5b4ab0 fix redirect if we are within the admin directory (not /ucp.php but /{admin_directory}/index.php)
git-svn-id: file:///svn/phpbb/trunk@6314 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-23 07:52:07 +00:00
Meik Sievertsen
cb23c1f044 Thanks to the GPL we are able to use the pear package text_diff - now splitted into the diff classes, the renderer and the engine
git-svn-id: file:///svn/phpbb/trunk@6313 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-22 21:29:45 +00:00
Meik Sievertsen
1d42d1b981 some updates. Also adjusted the utf tools and normalizer more to our coding guidelines.
git-svn-id: file:///svn/phpbb/trunk@6312 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-22 21:26:06 +00:00
Graham Eames
b0afc8e632 Phase 2 of the changes
This should now be complete


git-svn-id: file:///svn/phpbb/trunk@6311 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-22 11:01:56 +00:00
Meik Sievertsen
556bbfe856 specialchar sql query to ensure proper display if there are html characters within the sql query
git-svn-id: file:///svn/phpbb/trunk@6310 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-22 10:57:57 +00:00
Graham Eames
4553293053 Initial batch of colourization changes. This includes:
- schema changes for first post and last post
 - display in viewforum, search and ucp of first post
 - update of database on posting
Still outstanding
 - display of last post


git-svn-id: file:///svn/phpbb/trunk@6309 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-21 15:58:48 +00:00
Meik Sievertsen
1332ec033f - add some language variables i will need at another location. ;)
- also add X-Sendfile support to the download.php file.


git-svn-id: file:///svn/phpbb/trunk@6308 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-20 19:50:08 +00:00
Graham Eames
49d56f90e5 Poll ended at....
git-svn-id: file:///svn/phpbb/trunk@6307 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-20 17:47:47 +00:00
Graham Eames
56d517d1be Duplicated entry in the sort options
+ misc template issues


git-svn-id: file:///svn/phpbb/trunk@6306 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-20 15:48:00 +00:00
Graham Eames
80162a8145 Minor schema change related to avatars so that they can be > 127px in size
Add additional note about the install directory
Remove some empty tags from the template


git-svn-id: file:///svn/phpbb/trunk@6305 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-20 12:59:15 +00:00
Meik Sievertsen
9db68f5d4e put a comment to the captcha_gd header so everyone understands that no more policies are allowed to the extend that some will most likely be removed.
git-svn-id: file:///svn/phpbb/trunk@6304 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-20 11:04:27 +00:00
David M
7c59533950 more efficient + fixing an oops
git-svn-id: file:///svn/phpbb/trunk@6303 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-19 14:36:00 +00:00
David M
f39eeda225 The regex used here are more or less identical to those used internally by the PHP lexer (ok, ok, they are a *little* bit more optimized), we should not need to call the tokenizer at all now...
git-svn-id: file:///svn/phpbb/trunk@6302 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-19 04:42:13 +00:00
David M
11dba17606 *** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@6301 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-18 21:19:39 +00:00
David M
7e3c54ed60 *** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@6300 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-18 20:59:43 +00:00
David M
0fa54c182a *** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@6299 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-18 20:44:25 +00:00
David M
c2f253af23 *** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@6298 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-17 13:23:49 +00:00
David M
6294974d86 forgot to remove some debug code :P
git-svn-id: file:///svn/phpbb/trunk@6297 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-17 04:27:38 +00:00
David M
cfc23dd562 - getcwd replacement
- realpath stuff thanks to Chris


git-svn-id: file:///svn/phpbb/trunk@6296 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-17 04:26:07 +00:00
David M
10f1be96ff If this does not fix it, I am not quite so sure it *can* be fixed as this output exactly models that of the official MySQL tools...
git-svn-id: file:///svn/phpbb/trunk@6295 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-17 01:47:14 +00:00
David M
e6be1795ca *** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@6294 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-17 01:15:01 +00:00
David M
481f090a39 chr(0x20 | 0x10) = "0"
git-svn-id: file:///svn/phpbb/trunk@6293 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-15 02:13:05 +00:00
David M
75ca1c9764 If i could force you all to use PHP 5.1.0+, then i could just use the count param with preg_replace. Oh well...
git-svn-id: file:///svn/phpbb/trunk@6292 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-15 01:08:51 +00:00
Graham Eames
332bd12835 Add GD to the list of optional requirements since it allows more VC images to be used
git-svn-id: file:///svn/phpbb/trunk@6291 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-13 18:21:43 +00:00
Meik Sievertsen
125b1dde8a re-allow editing icons and smilies. :/
git-svn-id: file:///svn/phpbb/trunk@6290 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-13 14:08:23 +00:00
Nils Adermann
559ff6c678 we don't want all topics when searching for just a few\!
git-svn-id: file:///svn/phpbb/trunk@6289 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-08-13 12:23:32 +00:00
351 changed files with 22101 additions and 15217 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

View File

@@ -52,7 +52,7 @@ $phpbb_admin_path = './';
// Some oft used variables
$safe_mode = (@ini_get('safe_mode') || @strtolower(ini_get('safe_mode')) == 'on') ? true : false;
$file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false;
$file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false;
$module_id = request_var('i', '');
$mode = request_var('mode', '');
@@ -136,21 +136,27 @@ function adm_page_header($page_title)
'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/",
'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
'ICON_MOVE_UP' => '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
'ICON_MOVE_DOWN' => '<img src="' . $phpbb_admin_path . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
'ICON_EDIT' => '<img src="' . $phpbb_admin_path . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
'ICON_DELETE' => '<img src="' . $phpbb_admin_path . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
'ICON_SYNC' => '<img src="' . $phpbb_admin_path . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
'ICON_MOVE_UP' => '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
'ICON_MOVE_UP_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_up_disabled.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
'ICON_MOVE_DOWN' => '<img src="' . $phpbb_admin_path . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
'ICON_MOVE_DOWN_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_down_disabled.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
'ICON_EDIT' => '<img src="' . $phpbb_admin_path . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
'ICON_EDIT_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_edit_disabled.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
'ICON_DELETE' => '<img src="' . $phpbb_admin_path . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
'ICON_DELETE_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_delete_disabled.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
'ICON_SYNC' => '<img src="' . $phpbb_admin_path . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
'ICON_SYNC_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_sync_disabled.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
'S_USER_LANG' => $user->lang['USER_LANG'],
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
'S_CONTENT_ENCODING' => $user->lang['ENCODING'],
'S_CONTENT_ENCODING' => 'UTF-8',
'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'],
'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'])
);
if (!empty($config['send_encoding']))
if ($config['send_encoding'])
{
header('Content-type: text/html; charset: ' . $user->lang['ENCODING']);
header('Content-type: text/html; charset=UTF-8');
}
header('Cache-Control: private, no-cache="set-cookie"');
header('Expires: 0');
@@ -200,6 +206,7 @@ function adm_page_footer($copyright_html = true)
$template->assign_vars(array(
'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
'S_COPYRIGHT_HTML' => $copyright_html,
'VERSION' => $config['version'])
);
@@ -371,4 +378,102 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
return $tpl;
}
/**
* Going through a config array and validate values, writing errors to $error.
*/
function validate_config_vars($config_vars, &$cfg_array, &$error)
{
global $phpbb_root_path, $user;
foreach ($config_vars as $config_name => $config_definition)
{
if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
{
continue;
}
if (!isset($config_definition['validate']))
{
continue;
}
// Validate a bit. ;) String is already checked through request_var(), therefore we do not check this again
switch ($config_definition['validate'])
{
case 'bool':
$cfg_array[$config_name] = ($cfg_array[$config_name]) ? 1 : 0;
break;
case 'int':
$cfg_array[$config_name] = (int) $cfg_array[$config_name];
break;
// Relative path (appended $phpbb_root_path)
case 'rpath':
case 'rwpath':
if (!$cfg_array[$config_name])
{
break;
}
$destination = $cfg_array[$config_name];
// Adjust destination path (no trailing slash)
if ($destination{(sizeof($destination)-1)} == '/' || $destination{(sizeof($destination)-1)} == '\\')
{
$destination = substr($destination, 0, sizeof($destination)-2);
}
$destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination);
if ($destination && ($destination[0] == '/' || $destination[0] == "\\"))
{
$destination = '';
}
$cfg_array[$config_name] = trim($destination);
// Path being relative (still prefixed by phpbb_root_path), but with the ability to escape the root dir...
case 'path':
case 'wpath':
if (!$cfg_array[$config_name])
{
break;
}
$cfg_array[$config_name] = trim($cfg_array[$config_name]);
// Make sure no NUL byte is present...
if (strpos($cfg_array[$config_name], '\0') !== false || strpos($cfg_array[$config_name], '%00') !== false)
{
$cfg_array[$config_name] = '';
break;
}
if (!file_exists($phpbb_root_path . $cfg_array[$config_name]))
{
$error[] = sprintf($user->lang['DIRECTORY_DOES_NOT_EXIST'], $cfg_array[$config_name]);
}
if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !is_dir($phpbb_root_path . $cfg_array[$config_name]))
{
$error[] = sprintf($user->lang['DIRECTORY_NOT_DIR'], $cfg_array[$config_name]);
}
// Check if the path is writeable
if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath')
{
if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !is_writeable($phpbb_root_path . $cfg_array[$config_name]))
{
$error[] = sprintf($user->lang['DIRECTORY_NOT_WRITEABLE'], $cfg_array[$config_name]);
}
}
break;
}
}
return;
}
?>

View File

@@ -59,6 +59,7 @@
</fieldset>
<fieldset class="submit-buttons">
<legend>{L_SUBMIT}</legend>
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</fieldset>
@@ -80,10 +81,10 @@
<dt><label for="exclude">{L_IP_EXCLUDE}:</label><br /><span>{L_EXCLUDE_ENTERED_IP}</span></dt>
<dd><input type="radio" id="exclude" name="ipexclude" value="1" class="radio" /> {L_YES} &nbsp; <input type="radio" name="ipexclude" value="0" checked="checked" class="radio" /> {L_NO}</dd>
</dl>
</fieldset>
<fieldset class="quick">
<p class="quick">
<input class="button1" type="submit" id="securesubmit" name="securesubmit" value="{L_SUBMIT}" />
</p>
</fieldset>
<fieldset>
@@ -94,10 +95,10 @@
<dt><label for="remove_ip_hostname">{L_IP_HOSTNAME}:</label></dt>
<dd><select name="unip[]" id="remove_ip_hostname" multiple="multiple" size="10">{DEFINED_IPS}</select></dd>
</dl>
</fieldset>
<fieldset class="quick">
<p class="quick">
<input class="button1" type="submit" id="unsecuresubmit" name="unsecuresubmit" value="{L_SUBMIT}" />
</p>
</fieldset>
<!-- ELSE -->
@@ -207,16 +208,21 @@
<dd><input type="radio" id="allowed_forums" class="radio" name="forum_select" value="0"<!-- IF not S_FORUM_IDS --> checked="checked"<!-- ENDIF --> />&nbsp;{L_ALLOW_ALL_FORUMS}&nbsp;&nbsp;<input type="radio" class="radio" name="forum_select" value="1"<!-- IF S_FORUM_IDS --> checked="checked"<!-- ENDIF --> />&nbsp;{L_ALLOW_SELECTED_FORUMS}</dd>
<dd><select name="allowed_forums[]" multiple="multiple" size="8">{S_FORUM_ID_OPTIONS}</select></dd>
</dl>
</fieldset>
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
</fieldset>
</form>
<!-- ELSE -->
<form id="extgroups" method="post" action="{U_ACTION}">
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
<table cellspacing="1">
<col class="row1" /><col class="row1" /><col class="row2" />
<thead>
@@ -243,12 +249,11 @@
<!-- END groups -->
</tbody>
</table>
<form id="extgroups" method="post" action="{U_ACTION}">
<fieldset class="quick">
<p class="quick">
{L_CREATE_GROUP}: <input type="text" name="group_name" maxlength="30" />
<input class="button2" name="add" type="submit" value="{L_SUBMIT}" />
</fieldset>
</p>
</fieldset>
</form>
<!-- ENDIF -->
@@ -266,10 +271,10 @@
<dt><label for="extension_group">{L_EXTENSION_GROUP}</label></dt>
<dd>{GROUP_SELECT_OPTIONS}</dd>
</dl>
</fieldset>
<fieldset class="quick">
<p class="quick">
<input type="submit" id="add_extension_check" name="add_extension_check" class="button2" value="{L_SUBMIT}" />
</p>
</fieldset>
</form>
@@ -278,6 +283,9 @@
<form id="change_ext" method="post" action="{U_ACTION}">
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
<table cellspacing="1">
<col class="row1" /><col class="row1" /><col class="row2" />
<thead>
@@ -295,18 +303,18 @@
</tr>
<!-- ENDIF -->
<tr>
<input type="hidden" name="extension_change_list[]" value="{extensions.EXTENSION_ID}" />
<td><b>{extensions.EXTENSION}</b></td>
<td>{extensions.GROUP_OPTIONS}</td>
<td><input type="checkbox" class="radio" name="extension_id_list[]" value="{extensions.EXTENSION_ID}" /></td>
<td><input type="checkbox" class="radio" name="extension_id_list[]" value="{extensions.EXTENSION_ID}" /><input type="hidden" name="extension_change_list[]" value="{extensions.EXTENSION_ID}" /></td>
</tr>
<!-- END extensions -->
</tbody>
</table>
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
</fieldset>
</form>
@@ -315,10 +323,14 @@
<form id="orphan" method="post" action="{U_ACTION}">
<fieldset>
<legend>{L_TITLE}</legend>
<table cellspacing="1">
<thead>
<tr>
<th>{L_FILENAME}</th>
<th>{L_FILEDATE}</th>
<th>{L_FILESIZE}</th>
<th>{L_ATTACH_POST_ID}</th>
<th>{L_ATTACH_TO_POST}</th>
@@ -328,28 +340,33 @@
<tbody>
<!-- BEGIN orphan -->
<!-- IF orphan.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td><a href="{orphan.U_FILE}" rel="file">{orphan.FILE}</a></td>
<td><a href="{orphan.U_FILE}">{orphan.REAL_FILENAME}</a></td>
<td>{orphan.FILETIME}</td>
<td>{orphan.FILESIZE}</td>
<td><b>ID: </b><input type="text" name="post_id[{orphan.FILE}]" size="7" maxlength="10" value="{orphan.POST_IDS}" /></td>
<td><input type="checkbox" class="radio" name="add[{orphan.FILE}]" /></td>
<td><input type="checkbox" class="radio" name="delete[{orphan.FILE}]" /></td>
<td><b>ID: </b><input type="text" name="post_id[{orphan.ATTACH_ID}]" size="7" maxlength="10" value="{orphan.POST_ID}" /></td>
<td><input type="checkbox" class="radio" name="add[{orphan.ATTACH_ID}]" /></td>
<td><input type="checkbox" class="radio" name="delete[{orphan.ATTACH_ID}]" /></td>
</tr>
<!-- END orphan -->
<tr>
<td colspan="3">&nbsp;</td>
<td class="small"><a href="javascript:marklist('orphan', 'add', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('orphan', 'add', false);">{L_UNMARK_ALL}</a></td>
<td class="small"><a href="javascript:marklist('orphan', 'delete', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('orphan', 'delete', false);">{L_UNMARK_ALL}</a></td>
<tr class="row4">
<td colspan="4">&nbsp;</td>
<td class="small"><a href="#" onclick="marklist('orphan', 'add', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('orphan', 'add', false); return false;">{L_UNMARK_ALL}</a></td>
<td class="small"><a href="#" onclick="marklist('orphan', 'delete', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('orphan', 'delete', false); return false;">{L_UNMARK_ALL}</a></td>
</tr>
</tbody>
</table>
<fieldset class="submit-buttons">
<br />
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
</fieldset>
</form>
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -12,19 +12,19 @@
<!--
var ban_length = new Array();
ban_length[-1] = "";
ban_length[-1] = '';
<!-- BEGIN ban_length -->
ban_length['{ban_length.BAN_ID}'] = "{ban_length.A_LENGTH}";
<!-- END ban_length -->
var ban_reason = new Array();
ban_reason[-1] = "";
ban_reason[-1] = '';
<!-- BEGIN ban_reason -->
ban_reason['{ban_reason.BAN_ID}'] = "{ban_reason.A_REASON}";
<!-- END ban_reason -->
var ban_give_reason = new Array();
ban_give_reason[-1] = "";
ban_give_reason[-1] = '';
<!-- BEGIN ban_give_reason -->
ban_give_reason['{ban_give_reason.BAN_ID}'] = "{ban_give_reason.A_REASON}";
<!-- END ban_give_reason -->
@@ -65,11 +65,11 @@
<dt><label for="bangivereason">{L_BAN_GIVE_REASON}:</label></dt>
<dd><input name="bangivereason" type="text" id="bangivereason" class="medium" /></dd>
</dl>
</fieldset>
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input class="button1" type="submit" id="bansubmit" name="bansubmit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="banreset" name="banreset" value="{L_RESET}" />
</p>
</fieldset>
<br /><br />
@@ -98,11 +98,11 @@
<dt><label for="unbangivereason">{L_BAN_GIVE_REASON}:</label></dt>
<dd><input style="border: 0px;" type="text" name="unbangivereason" id="unbangivereason" class="full" disabled="disabled" /></dd>
</dl>
</fieldset>
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input class="button1" type="submit" id="unbansubmit" name="unbansubmit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="unbanreset" name="unbanreset" value="{L_RESET}" />
</p>
</fieldset>
<!-- ELSE -->
@@ -114,4 +114,4 @@
</form>
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -48,6 +48,7 @@
</fieldset>
<fieldset class="submit-buttons">
<legend>{L_SUBMIT}</legend>
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</fieldset>
@@ -85,6 +86,10 @@
<p>{L_ACP_BBCODES_EXPLAIN}</p>
<form id="acp_bbcodes" method="post" action="{U_ACTION}">
<fieldset class="tabulated">
<legend>{L_ACP_BBCODES}</legend>
<table cellspacing="1" id="down">
<thead>
<tr>
@@ -96,20 +101,19 @@
<!-- BEGIN bbcodes -->
<!-- IF bbcodes.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td style="text-align: center;">{bbcodes.BBCODE_TAG}</td>
<td style="text-align: center;"><a href="{bbcodes.U_EDIT}">{ICON_EDIT}</a> <a href="{bbcodes.U_DELETE}">{ICON_DELETE}</a></td>
<td style="text-align: right; width: 40px;"><a href="{bbcodes.U_EDIT}">{ICON_EDIT}</a> <a href="{bbcodes.U_DELETE}">{ICON_DELETE}</a></td>
</tr>
<!-- END bbcodes -->
</tbody>
</table>
<form id="acp_bbcodes" method="post" action="{U_ACTION}">
<fieldset class="quick">
<p class="quick">
<input class="button2" name="submit" type="submit" value="{L_ADD_BBCODE}" />
</p>
</fieldset>
</form>
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -6,6 +6,13 @@
<p>{L_TITLE_EXPLAIN}</p>
<!-- IF S_ERROR -->
<div class="errorbox">
<h3>{L_WARNING}</h3>
<p>{ERROR_MSG}</p>
</div>
<!-- ENDIF -->
<form id="acp_board" method="post" action="{U_ACTION}">
<!-- BEGIN options -->
@@ -33,10 +40,11 @@
</fieldset>
<fieldset class="submit-buttons">
<legend>{L_SUBMIT}</legend>
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</fieldset>
</form>
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -45,11 +45,11 @@
<dt><label for="bot_ip">{L_BOT_IP}:</label><br /><span>{L_BOT_IP_EXPLAIN}</span></dt>
<dd><input name="bot_ip" type="text" id="bot_ip" value="{BOT_IP}" /></dd>
</dl>
</fieldset>
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
</fieldset>
</form>
@@ -89,7 +89,7 @@
<input class="button2" name="add" type="submit" value="{L_BOT_ADD}" />
</fieldset>
<fieldset class="quick">
<fieldset class="quick" style="float: right;">
<select name="action">{S_BOT_OPTIONS}</select>
<input class="button2" name="submit" type="submit" value="{L_SUBMIT}" />
</fieldset>
@@ -98,4 +98,4 @@
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -18,105 +18,23 @@
<dt><label for="enable_post_confirm">{L_VISUAL_CONFIRM_POST}:</label><br /><span>{L_VISUAL_CONFIRM_POST_EXPLAIN}</span></dt>
<dd><input type="radio" class="radio" id="enable_post_confirm" name="enable_post_confirm" value="1"<!-- IF POST_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_ENABLED}&nbsp; &nbsp;<input type="radio" class="radio" name="enable_post_confirm" value="0"<!-- IF not POST_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_DISABLED}</dd>
</dl>
</fieldset>
<!-- IF GD -->
<fieldset>
<legend>{L_CAPTCHA_OVERLAP}</legend>
<!-- IF TTF -->
<dl>
<dt><label for="policy_overlap">{L_CAPTCHA_OVERLAP}:</label><br /><span>{U_POLICY_OVERLAP}</span></dt>
<dd><input id="policy_overlap" name="policy_overlap" value="1" class="radio" type="radio"<!-- IF OVERLAP_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp;&nbsp;<input name="policy_overlap" value="0" class="radio" type="radio"<!-- IF not OVERLAP_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_NO}</dd>
<dt><label for="captcha_gd">{L_CAPTCHA_GD}:</label><br /><span>{L_CAPTCHA_GD_EXPLAIN}</span></dt>
<dd><input id="captcha_gd" name="captcha_gd" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD --> checked="checked"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp;&nbsp;<input name="captcha_gd" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD --> checked="checked"<!-- ENDIF --> />&nbsp;{L_NO}</dd>
</dl>
<dl>
<dt><label for="policy_overlap_noise_pixel">{L_OVERLAP_NOISE_PIXEL}:</label></dt>
<select id="policy_overlap_noise_pixel" name="policy_overlap_noise_pixel"><option value="0"<!-- IF OVERLAP_NOISE_PIXEL eq '0' --> selected="selected"<!-- ENDIF -->>{L_NO_NOISE}</option><option value="1"<!-- IF OVERLAP_NOISE_PIXEL eq '1' --> selected="selected"<!-- ENDIF -->>{L_LIGHT}</option><option value="2"<!-- IF OVERLAP_NOISE_PIXEL eq '2' --> selected="selected"<!-- ENDIF -->>{L_MEDIUM}</option><option value="3"<!-- IF OVERLAP_NOISE_PIXEL eq '3' --> selected="selected"<!-- ENDIF -->>{L_HEAVY}</option></select></dd>
<dt><label for="captcha_gd_noise">{L_CAPTCHA_GD_NOISE}:</label><br /><span>{L_CAPTCHA_GD_NOISE_EXPLAIN}</span></dt>
<dd><input id="captcha_gd_noise" name="captcha_gd_noise" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_NOISE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp;&nbsp;<input name="captcha_gd_noise" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_NOISE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_NO}</dd>
</dl>
<dl>
<dt><label for="policy_overlap_noise_line">{L_OVERLAP_NOISE_LINE}:</label></dt>
<dd><input id="policy_overlap_noise_line" name="policy_overlap_noise_line" value="1" class="radio" type="radio"<!-- IF OVERLAP_NOISE_LINE_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp;&nbsp;<input name="policy_overlap_noise_line" value="0" class="radio" type="radio"<!-- IF not OVERLAP_NOISE_LINE_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_NO}</dd>
</dl>
</fieldset>
<!-- ENDIF -->
<fieldset>
<legend>{L_CAPTCHA_ENTROPY}</legend>
<dl>
<dt><label for="policy_entropy">{L_CAPTCHA_ENTROPY}:</label><br /><span>{U_POLICY_ENTROPY}</span></dt>
<dd><input id="policy_entropy" name="policy_entropy" value="1" class="radio" type="radio"<!-- IF ENTROPY_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp;&nbsp;<input name="policy_entropy" value="0" class="radio" type="radio"<!-- IF not ENTROPY_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_NO}</dd>
</dl>
<dl>
<dt><label for="policy_entropy_noise_pixel">{L_ENTROPY_NOISE_PIXEL}:</label></dt>
<select id="policy_entropy_noise_pixel" name="policy_entropy_noise_pixel"><option value="0"<!-- IF ENTROPY_NOISE_PIXEL eq '0' --> selected="selected"<!-- ENDIF -->>{L_NO_NOISE}</option><option value="1"<!-- IF ENTROPY_NOISE_PIXEL eq '1' --> selected="selected"<!-- ENDIF -->>{L_LIGHT}</option><option value="2"<!-- IF ENTROPY_NOISE_PIXEL eq '2' --> selected="selected"<!-- ENDIF -->>{L_MEDIUM}</option><option value="3"<!-- IF ENTROPY_NOISE_PIXEL eq '3' --> selected="selected"<!-- ENDIF -->>{L_HEAVY}</option></select></dd>
</dl>
<dl>
<dt><label for="policy_entropy_noise_line">{L_ENTROPY_NOISE_LINE}:</label></dt>
<dd><input id="policy_entropy_noise_line" name="policy_entropy_noise_line" value="1" class="radio" type="radio"<!-- IF ENTROPY_NOISE_LINE_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp;&nbsp;<input name="policy_entropy_noise_line" value="0" class="radio" type="radio"<!-- IF not ENTROPY_NOISE_LINE_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_NO}</dd>
</dl>
</fieldset>
<!-- IF TTF -->
<fieldset>
<legend>{L_CAPTCHA_SHAPE}</legend>
<dl>
<dt><label for="policy_shape">{L_CAPTCHA_SHAPE}:</label><br /><span>{U_POLICY_SHAPE}</span></dt>
<dd><input id="policy_shape" name="policy_shape" value="1" class="radio" type="radio"<!-- IF SHAPE_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp;&nbsp;<input name="policy_shape" value="0" class="radio" type="radio"<!-- IF not SHAPE_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_NO}</dd>
</dl>
<dl>
<dt><label for="policy_shape_noise_pixel">{L_SHAPE_NOISE_PIXEL}:</label></dt>
<select id="policy_shape_noise_pixel" name="policy_shape_noise_pixel"><option value="0"<!-- IF SHAPE_NOISE_PIXEL eq '0' --> selected="selected"<!-- ENDIF -->>{L_NO_NOISE}</option><option value="1"<!-- IF SHAPE_NOISE_PIXEL eq '1' --> selected="selected"<!-- ENDIF -->>{L_LIGHT}</option><option value="2"<!-- IF SHAPE_NOISE_PIXEL eq '2' --> selected="selected"<!-- ENDIF -->>{L_MEDIUM}</option><option value="3"<!-- IF SHAPE_NOISE_PIXEL eq '3' --> selected="selected"<!-- ENDIF -->>{L_HEAVY}</option></select></dd>
</dl>
<dl>
<dt><label for="policy_shape_noise_line">{L_SHAPE_NOISE_LINE}:</label></dt>
<dd><input id="policy_shape_noise_line" name="policy_shape_noise_line" value="1" class="radio" type="radio"<!-- IF SHAPE_NOISE_LINE_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp;&nbsp;<input name="policy_shape_noise_line" value="0" class="radio" type="radio"<!-- IF not SHAPE_NOISE_LINE_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_NO}</dd>
</dl>
</fieldset>
<!-- ENDIF -->
<fieldset>
<legend>{L_CAPTCHA_3DBITMAP}</legend>
<dl>
<dt><label for="policy_3dbitmap">{L_CAPTCHA_3DBITMAP}:</label><br /><span>{U_POLICY_3DBITMAP}</span></dt>
<dd><input id="policy_3dbitmap" name="policy_3dbitmap" value="1" class="radio" type="radio"<!-- IF THREEDBITMAP_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp;&nbsp;<input name="policy_3dbitmap" value="0" class="radio" type="radio"<!-- IF not THREEDBITMAP_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_NO}</dd>
</dl>
</fieldset>
<!-- IF TTF -->
<fieldset>
<legend>{L_CAPTCHA_CELLS}</legend>
<dl>
<dt><label for="policy_cells">{L_CAPTCHA_CELLS}:</label><br /><span>{U_POLICY_CELLS}</span></dt>
<dd><input id="policy_cells" name="policy_cells" value="1" class="radio" type="radio"<!-- IF CELLS_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp;&nbsp;<input name="policy_cells" value="0" class="radio" type="radio"<!-- IF not CELLS_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_NO}</dd>
</dl>
</fieldset>
<fieldset>
<legend>{L_CAPTCHA_STENCIL}</legend>
<dl>
<dt><label for="policy_stencil">{L_CAPTCHA_STENCIL}:</label><br /><span>{U_POLICY_STENCIL}</span></dt>
<dd><input id="policy_stencil" name="policy_stencil" value="1" class="radio" type="radio"<!-- IF STENCIL_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp;&nbsp;<input name="policy_stencil" value="0" class="radio" type="radio"<!-- IF not STENCIL_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_NO}</dd>
</dl>
</fieldset>
<fieldset>
<legend>{L_CAPTCHA_COMPOSITE}</legend>
<dl>
<dt><label for="policy_composite">{L_CAPTCHA_COMPOSITE}:</label><br /><span>{U_POLICY_COMPOSITE}</span></dt>
<dd><input id="policy_composite" name="policy_composite" value="1" class="radio" type="radio"<!-- IF COMPOSITE_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp;&nbsp;<input name="policy_composite" value="0" class="radio" type="radio"<!-- IF not COMPOSITE_ENABLE --> checked="checked"<!-- ENDIF --> />&nbsp;{L_NO}</dd>
</dl>
</fieldset>
<!-- ENDIF -->
<!-- ENDIF -->
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
</fieldset>
</form>
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -15,16 +15,16 @@
<dt><label for="user">{L_SELECT_FILE}:</label></dt>
<dd><select id="file" name="file" size="10"><!-- BEGIN files --><option value="{files.FILE}"<!-- IF files.S_LAST_ROW --> selected="selected"<!-- ENDIF -->>{files.NAME}</option><!-- END files --></select></dd>
</dl>
</fieldset>
<!-- IF EXISTS -->
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_START_RESTORE}" />&nbsp;
<input class="button2" type="submit" id="delete" name="delete" value="{L_DELETE_BACKUP}" />&nbsp;
<input class="button2" type="submit" id="download" name="download" value="{L_DOWNLOAD_BACKUP}" />
</fieldset>
</p>
<!-- ENDIF -->
</fieldset>
</form>
<!-- ELSE -->
@@ -74,15 +74,15 @@
<!-- END tables -->
</select><br /><br /><div align="right"><a href="#" onclick="selector(true)">{L_SELECT_ALL}</a><br /><a href="#" onclick="selector(false)">{L_DESELECT_ALL}</a></div></dd>
</dl>
</fieldset>
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
</fieldset>
</form>
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -14,10 +14,10 @@
<dt><label for="user">{L_USERNAME}:</label><br /><span>{L_ADD_DISALLOW_EXPLAIN}</span></dt>
<dd><input id="user" type="text" name="disallowed_user" class="medium" /></dd>
</dl>
</fieldset>
<fieldset class="quick">
<p class="quick">
<input class="button1" type="submit" name="disallow" value="{L_SUBMIT}" />
</p>
</fieldset>
<h1>{L_DELETE_DISALLOW_TITLE}</h1>
@@ -31,10 +31,10 @@
<dt><label for="disallowed">{L_USERNAME}:</label></dt>
<dd><select name="disallowed_id" id="disallowed">{S_DISALLOWED_NAMES}</select></dd>
</dl>
</fieldset>
<fieldset class="quick">
<p class="quick">
<input class="button1" type="submit" name="allow" value="{L_SUBMIT}" />
</p>
<!-- ELSE -->
<p>{L_NO_DISALLOWED}</p>
<!-- ENDIF -->
@@ -42,4 +42,4 @@
</form>
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -24,7 +24,7 @@
<dl>
<dt><label for="usernames">{L_SEND_TO_USERS}:</label><br /><span>{L_SEND_TO_USERS_EXPLAIN}</span></dt>
<dd><textarea name="usernames" id="usernames" rows="5" cols="40">{USERNAMES}</textarea></dd>
<dd>[ <a href="#" onclick="window.open('{U_FIND_USERNAME}', '_phpbbsearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</dd>
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</dd>
</dl>
<dl>
<dt><label for="subject">{L_SUBJECT}:</label></dt>
@@ -42,13 +42,13 @@
<dt><label for="send">{L_SEND_IMMEDIATLY}:</label></dt>
<dd><input id="send" type="checkbox" class="radio" name="send_immediatly" checked="checked" /></dd>
</dl>
</fieldset>
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_EMAIL}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
</fieldset>
</form>
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -7,6 +7,9 @@
<script type="text/javascript">
<!--
/**
* Handle displaying/hiding several options based on the forum type
*/
function display_options(value)
{
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
@@ -20,6 +23,17 @@
}
<!-- ENDIF -->
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
if (value == {FORUM_LINK})
{
dE('cat_to_link_actions', 1);
}
else
{
dE('cat_to_link_actions', -1);
}
<!-- ENDIF -->
if (value == {FORUM_POST})
{
dE('forum_post_options', 1);
@@ -43,6 +57,41 @@
}
}
/**
* Init the wanted display functionality if javascript is enabled.
* If javascript is not available, the user is still able to properly administrate.
*/
onload = function()
{
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
<!-- IF S_FORUM_POST -->
dE('type_actions', -1);
<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
<!-- IF S_FORUM_CAT -->
dE('cat_to_link_actions', -1);
<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF not S_FORUM_POST -->
dE('forum_post_options', -1);
<!-- ENDIF -->
<!-- IF not S_FORUM_CAT -->
dE('forum_cat_options', -1);
<!-- ENDIF -->
<!-- IF not S_FORUM_LINK -->
dE('forum_link_options', -1);
<!-- ENDIF -->
<!-- IF S_FORUM_LINK -->
dE('forum_rules_options', -1);
<!-- ENDIF -->
}
//-->
</script>
@@ -68,7 +117,7 @@
<dd><select id="forum_type" name="forum_type" onchange="display_options(this.options[this.selectedIndex].value);">{S_FORUM_TYPE_OPTIONS}</select></dd>
</dl>
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
<div id="type_actions"<!-- IF S_FORUM_POST --> style="display: none;"<!-- ENDIF -->>
<div id="type_actions">
<dl>
<dt><label for="type_action">{L_DECIDE_MOVE_DELETE_CONTENT}:</label></dt>
<dd><input type="radio" class="radio" id="type_action" name="type_action" value="delete" checked="checked" /> {L_DELETE_ALL_POSTS}</dd>
@@ -76,6 +125,18 @@
</dl>
</div>
<!-- ENDIF -->
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
<div id="cat_to_link_actions">
<dl>
<dt><label for="action_subforums">{L_DECIDE_MOVE_DELETE_SUBFORUMS}:</label></dt>
<!-- IF S_FORUMS_LIST -->
<dd><input type="radio" class="radio" name="action_subforums" value="move" checked="checked" /> {L_MOVE_SUBFORUMS_TO} <select name="subforums_to_id">{S_FORUMS_LIST}</select></dd>
<!-- ELSE -->
<dd><input type="radio" class="radio" id="action_subforums" name="action_subforums" value="delete" checked="checked" /> {L_DELETE_SUBFORUMS}</dd>
<!-- ENDIF -->
</dl>
</div>
<!-- ENDIF -->
<dl>
<dt><label for="parent">{L_FORUM_PARENT}:</label></dt>
<dd><select id="parent" name="forum_parent_id"><option value="0"<!-- IF not S_FORUM_PARENT_ID --> selected="selected"<!-- ENDIF -->>{L_NO_PARENT}</option>{S_PARENT_OPTIONS}</select></dd>
@@ -96,6 +157,14 @@
<dd><img src="{FORUM_IMAGE_SRC}" alt="{L_FORUM_IMAGE}" /></dd>
<!-- ENDIF -->
</dl>
<dl>
<dt><label for="forum_password">{L_FORUM_PASSWORD}:</label><br /><span>{L_FORUM_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" id="forum_password" name="forum_password" value="{FORUM_PASSWORD}" /></dd>
</dl>
<dl>
<dt><label for="forum_password_confirm">{L_FORUM_PASSWORD_CONFIRM}:</label><br /><span>{L_FORUM_PASSWORD_CONFIRM_EXPLAIN}</span></dt>
<dd><input type="password" id="forum_password_confirm" name="forum_password_confirm" value="{FORUM_PASSWORD_CONFIRM}" /></dd>
</dl>
<dl>
<dt><label for="forum_style">{L_FORUM_STYLE}:</label></dt>
<dd><select id="forum_style" name="forum_style"><option value="0">{L_DEFAULT_STYLE}</option>{S_STYLES_OPTIONS}</select></dd>
@@ -106,17 +175,17 @@
</dl>
</fieldset>
<div id="forum_cat_options"<!-- IF not S_FORUM_CAT --> style="display: none;"<!-- ENDIF -->>
<div id="forum_cat_options">
<fieldset>
<legend>{L_GENERAL_FORUM_SETTINGS}</legend>
<dl>
<dt><label for="display_active">{L_DISPLAY_ACTIVE_TOPICS}:</label><br /><span>{L_DISPLAY_ACTIVE_TOPICS_EXPLAIN}</span></dt>
<dd><input type="radio" class="radio" name="display_active" value="1"<!-- IF S_DISPLAY_ACTIVE_TOPICS --> id="display_active" checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" class="radio" name="display_active" value="0"<!-- IF not S_DISPLAY_ACTIVE_TOPICS --> id="display_active" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
</dl>
</fieldset>
</fieldset>
</div>
<div id="forum_post_options"<!-- IF not S_FORUM_POST --> style="display: none;"<!-- ENDIF -->>
<div id="forum_post_options">
<fieldset>
<legend>{L_GENERAL_FORUM_SETTINGS}</legend>
<dl>
@@ -149,14 +218,6 @@
<dt><label for="topics_per_page">{L_FORUM_TOPICS_PAGE}:</label><br /><span>{L_FORUM_TOPICS_PAGE_EXPLAIN}</span></dt>
<dd><input type="text" id="topics_per_page" name="topics_per_page" value="{TOPICS_PER_PAGE}" /></dd>
</dl>
<dl>
<dt><label for="forum_password">{L_FORUM_PASSWORD}:</label><br /><span>{L_FORUM_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" id="forum_password" name="forum_password" value="{FORUM_PASSWORD}" /></dd>
</dl>
<dl>
<dt><label for="forum_password_confirm">{L_FORUM_PASSWORD_CONFIRM}:</label><br /><span>{L_FORUM_PASSWORD_CONFIRM_EXPLAIN}</span></dt>
<dd><input type="password" id="forum_password_confirm" name="forum_password_confirm" value="{FORUM_PASSWORD_CONFIRM}" /></dd>
</dl>
</fieldset>
<fieldset>
@@ -192,7 +253,7 @@
</fieldset>
</div>
<div id="forum_link_options"<!-- IF not S_FORUM_LINK --> style="display: none;"<!-- ENDIF -->>
<div id="forum_link_options">
<fieldset>
<legend>{L_GENERAL_FORUM_SETTINGS}</legend>
<dl>
@@ -206,7 +267,7 @@
</fieldset>
</div>
<div id="forum_rules_options"<!-- IF S_FORUM_LINK --> style="display: none;"<!-- ENDIF -->>
<div id="forum_rules_options">
<fieldset>
<legend>{L_FORUM_RULES}</legend>
<dl>
@@ -228,6 +289,7 @@
</div>
<fieldset class="submit-buttons">
<legend>{L_SUBMIT}</legend>
<input class="button1" type="submit" id="submit" name="update" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</fieldset>
@@ -275,16 +337,48 @@
<!-- ENDIF -->
</dl>
<!-- ENDIF -->
</fieldset>
<fieldset class="quick">
<p class="quick">
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
</p>
</fieldset>
</form>
<!-- ELSEIF S_CONTINUE_SYNC -->
<script type="text/javascript">
<!--
var close_waitscreen = 0;
window.open('{UA_PROGRESS_BAR}', '_sync', 'height=240, resizable=yes, scrollbars=no, width=400');
//-->
</script>
<h1>{L_FORUM_ADMIN}</h1>
<p>{L_FORUM_ADMIN_EXPLAIN}</p>
<p>{L_PROGRESS_EXPLAIN}</p>
<!-- ELSE -->
<script type="text/javascript">
<!--
/**
* Popup search progress bar
*/
function popup_progress_bar()
{
var close_waitscreen = 0;
window.open('{UA_PROGRESS_BAR}', '_sync', 'height=240, resizable=yes, scrollbars=no, width=400');
}
//-->
</script>
<h1>{L_FORUM_ADMIN}</h1>
<p>{L_FORUM_ADMIN_EXPLAIN}</p>
@@ -297,12 +391,18 @@
<!-- ENDIF -->
<!-- IF S_RESYNCED -->
<script type="text/javascript">
<!--
var close_waitscreen = 1;
//-->
</script>
<div class="successbox">
<h3>{L_NOTIFY}</h3>
<p>{L_FORUM_RESYNCED}</p>
</div>
<!-- ENDIF -->
<p><strong>{NAVIGATION}<!-- IF S_NO_FORUMS --> [<a href="{U_EDIT}">{L_EDIT}</a> | <a href="{U_DELETE}">{L_DELETE}</a><!-- IF not S_LINK --> | <a href="{U_SYNC}">{L_RESYNC}</a><!-- ENDIF --->]<!-- ENDIF --></strong></p>
<!-- IF .forums -->
@@ -313,15 +413,31 @@
<tr>
<td style="width: 5%;">{forums.FOLDER_IMAGE}</td>
<td>
<strong><!-- IF forums.S_LINK -->{forums.FORUM_NAME}<!-- ELSE --><a href="{forums.U_FORUM}">{forums.FORUM_NAME}</a><!-- ENDIF --></strong>
<!-- IF forums.FORUM_IMAGE --><div style="float: left; margin-right: 5px;">{forums.FORUM_IMAGE}</div><!-- ENDIF -->
<strong><!-- IF forums.S_FORUM_LINK -->{forums.FORUM_NAME}<!-- ELSE --><a href="{forums.U_FORUM}">{forums.FORUM_NAME}</a><!-- ENDIF --></strong>
<!-- IF forums.FORUM_DESCRIPTION --><br /><span>{forums.FORUM_DESCRIPTION}</span><!-- ENDIF -->
<!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}: <b>{forums.FORUM_TOPICS}</b> / {L_POSTS}: <b>{forums.FORUM_POSTS}</b></span><!-- ENDIF -->
</td>
<td style="width: 15%; text-align: right; white-space: nowrap;">
<!-- IF not forums.S_FIRST_ROW --><a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a> <!-- ENDIF -->
<!-- IF not forums.S_LAST_ROW --><a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> <!-- ENDIF -->
<a href="{forums.U_EDIT}">{ICON_EDIT}</a>
<!-- IF not forums.S_LINK --><a href="{forums.U_SYNC}">{ICON_SYNC}</a> <!-- ENDIF -->
<td style="vertical-align: top; width: 100px; text-align: right; white-space: nowrap;">
<!-- IF forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
{ICON_MOVE_UP_DISABLED}
<a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF not forums.S_FIRST_ROW && not forums.S_LAST_ROW-->
<a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a>
<a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF forums.S_LAST_ROW && not forums.S_FIRST_ROW -->
<a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a>
{ICON_MOVE_DOWN_DISABLED}
<!-- ELSE -->
{ICON_MOVE_UP_DISABLED}
{ICON_MOVE_DOWN_DISABLED}
<!-- ENDIF -->
<a href="{forums.U_EDIT}">{ICON_EDIT}</a>
<!-- IF not forums.S_FORUM_LINK -->
<a href="{forums.U_SYNC}" onclick="popup_progress_bar();">{ICON_SYNC}</a>
<!-- ELSE -->
{ICON_SYNC_DISABLED}
<!-- ENDIF -->
<a href="{forums.U_DELETE}">{ICON_DELETE}</a>
</td>
</tr>
@@ -333,11 +449,11 @@
<form id="fselect" method="post" action="{U_SEL_ACTION}">
<fieldset class="quick">
{L_SELECT_FORUM}: <select name="parent_id" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{FORUM_BOX}</select>
{L_SELECT_FORUM}: <select name="parent_id" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{FORUM_BOX}</select>
<input class="button2" type="submit" value="{L_GO}" />
</fieldset>
</form>
<form id="forums" method="post" action="{U_ACTION}">
@@ -345,7 +461,7 @@
<fieldset class="quick">
<input type="hidden" name="action" value="add" />
<input type="text" name="forum_name" value="" />
<input type="text" name="forum_name" value="" />
<input class="button2" name="addforum" type="submit" value="{L_CREATE_FORUM}" />
</fieldset>
@@ -353,4 +469,4 @@
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -54,6 +54,12 @@
<fieldset>
<legend>{L_GROUP_SETTINGS_SAVE}</legend>
<!-- IF S_USER_FOUNDER -->
<dl>
<dt><label for="group_founder_manage">{L_GROUP_FOUNDER_MANAGE}:</label><br /><span>{L_GROUP_FOUNDER_MANAGE_EXPLAIN}</span></dt>
<dd><input name="group_founder_manage" type="checkbox" class="radio" id="group_founder_manage"{GROUP_FOUNDER_MANAGE} /></dd>
</dl>
<!-- ENDIF -->
<dl>
<dt><label for="group_legend">{L_GROUP_LEGEND}:</label></dt>
<dd><input name="group_legend" type="checkbox" class="radio" id="group_legend"{GROUP_LEGEND} /></dd>
@@ -143,6 +149,7 @@
</fieldset>
<fieldset class="submit-buttons">
<legend>{L_SUBMIT}</legend>
<input class="button1" type="submit" id="submit" name="update" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</fieldset>
@@ -217,14 +224,14 @@
<div class="pagination" style="float: left;">
<!-- IF PAGINATION -->
<a href="javascript:jumpto();" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
<!-- ELSE -->
{S_ON_PAGE}
<!-- ENDIF -->
</div>
<fieldset class="quick">
<span class="small"><a href="javascript:marklist('list', 'mark', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('list', 'mark', false);">{L_UNMARK_ALL}</a></span><br />
<span class="small"><a href="#" onclick="marklist('list', 'mark', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('list', 'mark', false); return false;">{L_UNMARK_ALL}</a></span><br />
<select name="action"><option class="sep" value="">{L_SELECT_OPTION}</option>{S_ACTION_OPTIONS}</select>
<input class="button2" type="submit" name="update" value="{L_SUBMIT}" />
@@ -247,12 +254,12 @@
<dl>
<dt><label for="usernames">{L_USERNAME}:</label><br /><span>{L_USERNAMES_EXPLAIN}</span></dt>
<dd><textarea id="usernames" name="usernames" cols="40" rows="5"></textarea></dd>
<dd>[ <a href="{U_FIND_USERNAME}" target="usersearch">{L_FIND_USERNAME}</a> ]</dd>
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</dd>
</dl>
</fieldset>
<fieldset class="quick">
<p class="quick">
<input class="button2" type="submit" name="addusers" value="{L_SUBMIT}" />
</p>
</fieldset>
</form>
@@ -289,6 +296,11 @@
<tbody>
<!-- BEGIN groups -->
<!-- IF groups.S_SPECIAL -->
<!-- IF groups.S_FIRST_ROW -->
<tr>
<td colspan="5" class="row3">{L_NO_GROUPS_CREATED}</td>
</tr>
<!-- ENDIF -->
</tbody>
</table>
@@ -331,4 +343,4 @@
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -12,6 +12,9 @@
<form id="acp_icons" method="post" action="{U_ACTION}">
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
<table cellspacing="1">
<thead>
<tr>
@@ -64,9 +67,10 @@
</tbody>
</table>
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
</fieldset>
</form>
@@ -86,7 +90,6 @@
<!-- IF not S_PAK_OPTIONS -->
<p>{L_NO_PAK_OPTIONS}</p>
</fieldset>
<!-- ELSE -->
<dl>
@@ -96,12 +99,12 @@
<dt><label for="current">{L_CURRENT}</label><br /><span>{L_CURRENT_EXPLAIN}</span></dt>
<dd><input type="radio" class="radio" id="current" name="current" value="keep" checked="checked" /> {L_KEEP_ALL}&nbsp; &nbsp;<input type="radio" class="radio" name="current" value="replace" /> {L_REPLACE_MATCHES}&nbsp; &nbsp;<input type="radio" class="radio" name="current" value="delete" /> {L_DELETE_ALL}&nbsp;</dd>
</dl>
</fieldset>
<fieldset class="quick">
<p class="quick">
<input class="button1" type="submit" id="import" name="import" value="{L_IMPORT_SUBMIT}" />
</fieldset>
</p>
<!-- ENDIF -->
</fieldset>
</form>
@@ -118,6 +121,10 @@
</div>
<!-- ENDIF -->
<form id="acp_icons" method="post" action="{U_ACTION}">
<fieldset class="tabular">
<legend>{L_TITLE}<legend>
<div style="text-align: right;"><a href="{U_IMPORT}">{L_IMPORT}</a> | <a href="{U_EXPORT}">{L_EXPORT}</a></div>
<table cellspacing="1">
@@ -139,14 +146,22 @@
</tr>
<!-- ENDIF -->
<!-- IF items.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td style="text-align: center;"><img src="{items.IMG_SRC}" width="{items.WIDTH}" height="{items.HEIGHT}" alt="{items.ALT_TEXT}" title="{items.ALT_TEXT}" /></td>
<td style="width: 85%; text-align: center;"><img src="{items.IMG_SRC}" width="{items.WIDTH}" height="{items.HEIGHT}" alt="{items.ALT_TEXT}" title="{items.ALT_TEXT}" /></td>
<!-- IF S_SMILIES -->
<td style="text-align: center;">{items.CODE}</td>
<td style="text-align: center;">{items.EMOTION}</td>
<!-- ENDIF -->
<td style="width: 15%; text-align: right; white-space: nowrap;">
<!-- IF not items.S_FIRST_ROW --><a href="{items.U_MOVE_UP}">{ICON_MOVE_UP}</a> <!-- ENDIF -->
<!-- IF not items.S_LAST_ROW --><a href="{items.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> <!-- ENDIF -->
<td style="width: 80px; text-align: right; white-space: nowrap;">
<!-- IF items.S_FIRST_ROW && not items.S_LAST_ROW -->
{ICON_MOVE_UP_DISABLED}
<a href="{items.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF not items.S_FIRST_ROW && not items.S_LAST_ROW-->
<a href="{items.U_MOVE_UP}">{ICON_MOVE_UP}</a>
<a href="{items.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF items.S_LAST_ROW && not items.S_FIRST_ROW -->
<a href="{items.U_MOVE_UP}">{ICON_MOVE_UP}</a>
{ICON_MOVE_DOWN_DISABLED}
<!-- ENDIF -->
<a href="{items.U_EDIT}">{ICON_EDIT}</a>
<a href="{items.U_DELETE}">{ICON_DELETE}</a>
</td>
@@ -155,14 +170,13 @@
</tbody>
</table>
<form id="acp_icons" method="post" action="{U_ACTION}">
<fieldset class="quick">
<p class="quick">
<input class="button2" name="add" type="submit" value="{L_ICON_ADD}" />&nbsp; &nbsp;<input class="button2" type="submit" name="edit" value="{L_ICON_EDIT}" />
</p>
</fieldset>
</form>
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -0,0 +1,75 @@
<!-- INCLUDE overall_header.html -->
<a name="maincontent"></a>
<h2>{L_INACTIVE_USERS}</h2>
<p>{L_INACTIVE_USERS_EXPLAIN}</p>
<form id="inactive" method="post" action="{U_ACTION}">
<div class="clearfix"></div>
<div class="pagination">
<!-- IF PAGINATION -->
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
<!-- ELSE -->
{S_ON_PAGE}
<!-- ENDIF -->
</div>
<table cellspacing="1">
<thead>
<tr>
<th>{L_USERNAME}</th>
<th>{L_JOINED}</th>
<th>{L_INACTIVE_DATE}</th>
<th>{L_INACTIVE_REASON}</th>
<th>{L_LAST_VISIT}</th>
<th>{L_MARK}</th>
</tr>
</thead>
<tbody>
<!-- BEGIN inactive -->
<!-- IF inactive.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td><a href="{inactive.U_USER_ADMIN}">{inactive.USERNAME}</a></td>
<td>{inactive.JOINED}</td>
<td>{inactive.INACTIVE_DATE}</td>
<td>{inactive.REASON}</td>
<td>{inactive.LAST_VISIT}</td>
<td>&nbsp;<input type="checkbox" class="radio" name="mark[]" value="{inactive.USER_ID}" />&nbsp;</td>
</tr>
<!-- BEGINELSE -->
<tr>
<td colspan="6" style="text-align: center;">{L_NO_INACTIVE_USERS}</td>
</tr>
<!-- END inactive -->
</tbody>
</table>
<!-- IF .inactive -->
<fieldset class="quick" style="float: left;">
{L_DISPLAY_LOG}: &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}
<input class="button2" type="submit" value="{L_GO}" name="sort" />
</fieldset>
<fieldset class="quick">
<p><a href="#" onclick="marklist('inactive', 'mark', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('inactive', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
<select name="action">{S_INACTIVE_OPTIONS}</select>
<input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
</fieldset>
<!-- ENDIF -->
<div class="pagination">
<!-- IF PAGINATION -->
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
<!-- ELSE -->
{S_ON_PAGE}
<!-- ENDIF -->
</div>
</form>
<!-- INCLUDE overall_footer.html -->

View File

@@ -45,13 +45,14 @@
<dt><label for="jab_package_size">{L_JAB_PACKAGE_SIZE}:</label><br /><span>{L_JAB_PACKAGE_SIZE_EXPLAIN}</span></dt>
<dd><input type="text" id="jab_package_size" name="jab_package_size" value="{JAB_PACKAGE_SIZE}" /></dd>
</dl>
</fieldset>
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
</fieldset>
</form>
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -16,10 +16,10 @@
<dt><label for="use_method">{L_DOWNLOAD_AS}:</label></dt>
<dd>{RADIO_BUTTONS}</dd>
</dl>
</fieldset>
<fieldset class="quick">
<p class="quick">
<input type="submit" class="button2" value="{L_DOWNLOAD}" name="download" />
</p>
</fieldset>
</form>
@@ -44,16 +44,16 @@
</dl>
<dl>
<dt><label>{L_LANG_ISO_CODE}:</label></dt>
<dd><b>{LANG_ISO}</b></dd>
<dd><strong>{LANG_ISO}</strong></dd>
</dl>
<dl>
<dt><label for="lang_author">{L_LANG_AUTHOR}:</label></dt>
<dd><input type="text" id="lang_author" name="lang_author" value="{LANG_AUTHOR}" /></dd>
</dl>
</fieldset>
<fieldset class="quick" style="margin-top: -15px;">
<p class="quick" style="margin-top: -15px;">
<input type="submit" name="update_details" class="button2" value="{L_SUBMIT}" />
</p>
</fieldset>
</form>
@@ -85,7 +85,7 @@
<tbody>
<!-- BEGIN missing -->
<tr class="row4">
<td><b>{missing.FILE}</b></td>
<td><strong>{missing.FILE}</strong></td>
<td style="text-align: right;"><input type="submit" name="missing_file[{missing.KEY}]" value="{L_SELECT}" class="button2" /></td>
</tr>
{missing.TPL}
@@ -131,8 +131,12 @@
</tr>
<!-- ENDIF -->
<tr>
<td class="row3"><b>{PRINT_MESSAGE}<!-- IF S_FROM_STORE --><br /><span style="color: red;">{L_FILE_FROM_STORAGE}</span><!-- ENDIF --></b></td>
<td class="row3" style="text-align: right;"><input type="submit" name="download_file" class="button2" value="{L_SUBMIT_AND_DOWNLOAD}" />&nbsp;&nbsp;<input type="submit" name="submit_file" class="button2" value="{L_SUBMIT}" /><!-- IF ALLOW_UPLOAD -->&nbsp;&nbsp;{L_UPLOAD_METHOD}:&nbsp;<!-- BEGIN buttons--><input type="radio" class="radio"<!-- IF buttons.S_FIRST_ROW --> id="method" checked="checked"<!-- ENDIF --> value="{buttons.VALUE}" name="method">&nbsp;{buttons.VALUE}&nbsp;<!-- END buttons --><input type="submit" name="upload_file" class="button2" value="{L_SUBMIT_AND_UPLOAD}" /><!-- ENDIF --></td>
<td rowspan="2" class="row3"><strong>{PRINT_MESSAGE}<!-- IF S_FROM_STORE --><br /><span style="color: red;">{L_FILE_FROM_STORAGE}</span><!-- ENDIF --></strong></td>
<td class="row3" style="text-align: right;"><input type="submit" name="download_file" class="button2" value="{L_SUBMIT_AND_DOWNLOAD}" />&nbsp;&nbsp;<input type="submit" name="submit_file" class="button2" value="{L_SUBMIT}" /></td>
</tr>
<tr>
<td class="row3" style="text-align: right;">
<!-- IF ALLOW_UPLOAD -->&nbsp;&nbsp;{L_UPLOAD_METHOD}:&nbsp;<!-- BEGIN buttons--><input type="radio" class="radio"<!-- IF buttons.S_FIRST_ROW --> id="method" checked="checked"<!-- ENDIF --> value="{buttons.VALUE}" name="method" />&nbsp;{buttons.VALUE}&nbsp;<!-- END buttons --><input type="submit" name="upload_file" class="button2" value="{L_SUBMIT_AND_UPLOAD}" /><!-- ENDIF --></td>
</tr>
</thead>
<tbody>
@@ -144,7 +148,10 @@
{TPL}
<!-- ENDIF -->
<tr>
<td class="row3" colspan="3" style="text-align: right;"><input type="submit" name="download_file" class="button2" value="{L_SUBMIT_AND_DOWNLOAD}" />&nbsp;&nbsp;<input type="submit" name="submit_file" class="button2" value="{L_SUBMIT}" /><!-- IF ALLOW_UPLOAD -->&nbsp;&nbsp;{L_UPLOAD_METHOD}:&nbsp;<!-- BEGIN buttons--><input type="radio" class="radio" value="{buttons.VALUE}" name="method">&nbsp;{buttons.VALUE}&nbsp;<!-- END buttons --><input type="submit" name="upload_file" class="button2" value="{L_SUBMIT_AND_UPLOAD}" /><!-- ENDIF --></td>
<td class="row3" colspan="3" style="text-align: right;"><!-- IF ALLOW_UPLOAD -->&nbsp;&nbsp;{L_UPLOAD_METHOD}:&nbsp;<!-- BEGIN buttons--><input type="radio" class="radio" value="{buttons.VALUE}" name="method" />&nbsp;{buttons.VALUE}&nbsp;<!-- END buttons --><input type="submit" name="upload_file" class="button2" value="{L_SUBMIT_AND_UPLOAD}" /><!-- ENDIF --></td>
</tr>
<tr>
<td class="row3" colspan="3" style="text-align: right;"><input type="submit" name="download_file" class="button2" value="{L_SUBMIT_AND_DOWNLOAD}" />&nbsp;&nbsp;<input type="submit" name="submit_file" class="button2" value="{L_SUBMIT}" /></td>
</tr>
</tbody>
</table>
@@ -173,12 +180,12 @@
<legend>{L_UPLOAD_SETTINGS}</legend>
<dl>
<dt><label>{L_UPLOAD_METHOD}:</label></dt>
<dd><b>{NAME}</b></dd>
<dd><strong>{NAME}</strong></dd>
</dl>
<!-- BEGIN data -->
<dl>
<dt><label for="store">{data.NAME}:</label><br /><span>{data.EXPLAIN}</span></dt>
<dd><input type="text" id="{data.DATA}" name="{data.DATA}" value="{data.DEFAULT}" checked="checked" /></dd>
<dt><label for="{data.DATA}">{data.NAME}:</label><br /><span>{data.EXPLAIN}</span></dt>
<dd><input type="text" id="{data.DATA}" name="{data.DATA}" value="{data.DEFAULT}" /></dd>
</dl>
<!-- END data -->
</fieldset>
@@ -209,27 +216,27 @@
</thead>
<tbody>
<tr>
<td class="row3" colspan="5"><b>{L_INSTALLED_LANGUAGE_PACKS}</b></td>
<td class="row3" colspan="5"><strong>{L_INSTALLED_LANGUAGE_PACKS}</strong></td>
</tr>
<!-- BEGIN lang -->
<!-- IF lang.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td><a href="{lang.U_DETAILS}">{lang.ENGLISH_NAME}</a> {lang.TAG}</td>
<td>{lang.LOCAL_NAME}</td>
<td style="text-align: center;"><b>{lang.ISO}</b></td>
<td style="text-align: center;"><strong>{lang.ISO}</strong></td>
<td style="text-align: center;">{lang.USED_BY}</td>
<td style="text-align: center;">&nbsp;<a href="{lang.U_DOWNLOAD}">{L_DOWNLOAD}</a>&nbsp;|&nbsp;<a href="{lang.U_DELETE}">{L_DELETE}</a></td>
</tr>
<!-- END lang -->
<!-- IF .notinst -->
<tr>
<td class="row3" colspan="5"><b>{L_UNINSTALLED_LANGUAGE_PACKS}</b></td>
<td class="row3" colspan="5"><strong>{L_UNINSTALLED_LANGUAGE_PACKS}</strong></td>
</tr>
<!-- ENDIF -->
<!-- BEGIN notinst -->
<!-- IF notinst.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td>{notinst.NAME}</td>
<td>{notinst.LOCAL_NAME}</td>
<td style="text-align: center;"><b>{notinst.ISO}</b></td>
<td style="text-align: center;"><strong>{notinst.ISO}</strong></td>
<td colspan="2" style="text-align: center;"><a href="{notinst.U_INSTALL}">{L_INSTALL}</a></td>
</tr>
<!-- END notinst -->
@@ -238,4 +245,4 @@
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -17,7 +17,7 @@
<div class="pagination">
<!-- IF PAGINATION -->
<a href="javascript:jumpto();" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
<!-- ELSE -->
{S_ON_PAGE}
<!-- ENDIF -->
@@ -70,7 +70,7 @@
<!-- IF S_CLEARLOGS -->
<fieldset class="quick">
<b class="small"><a href="javascript: marklist('list', 'mark', true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist('list', 'mark', false);">{L_UNMARK_ALL}</a></b><br />
<b class="small"><a href="#" onclick="marklist('list', 'mark', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('list', 'mark', false); return false;">{L_UNMARK_ALL}</a></b><br />
<input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />&nbsp;
<input class="button2" type="submit" name="delall" value="{L_DELETE_ALL}" />&nbsp;
</fieldset>
@@ -78,7 +78,7 @@
<div class="pagination">
<!-- IF PAGINATION -->
<a href="javascript:jumpto();" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
<!-- ELSE -->
{S_ON_PAGE}
<!-- ENDIF -->

View File

@@ -1,165 +1,171 @@
<!-- INCLUDE overall_header.html -->
<a name="maincontent"></a><h1>{L_WELCOME_PHPBB}</h1>
<a name="maincontent"></a>
<p>{L_ADMIN_INTRO}</p>
<!-- IF S_RESTORE_PERMISSIONS -->
<!-- IF S_DEBUG_EXTRA -->
<div class="errorbox">
<h3>{L_WARNING}</h3>
<p>{L_DEBUG_EXTRA_WARNING}</p>
</div>
<!-- ENDIF -->
<h1>{L_PERMISSIONS_TRANSFERED}</h1>
<!-- IF S_REMOVE_INSTALL -->
<div class="errorbox">
<h3>{L_WARNING}</h3>
<p>{L_REMOVE_INSTALL}</p>
</div>
<!-- ENDIF -->
<p>{L_PERMISSIONS_TRANSFERED_EXPLAIN}</p>
<table cellspacing="1">
<caption>{L_FORUM_STATS}</caption>
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
<thead>
<tr>
<th>{L_STATISTIC}</th>
<th>{L_VALUE}</th>
<th>{L_STATISTIC}</th>
<th>{L_VALUE}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{L_NUMBER_POSTS}: </td>
<td><b>{TOTAL_POSTS}</b></td>
<td>{L_POSTS_PER_DAY}: </td>
<td><b>{POSTS_PER_DAY}</b></td>
</tr>
<tr>
<td>{L_NUMBER_TOPICS}: </td>
<td><b>{TOTAL_TOPICS}</b></td>
<td>{L_TOPICS_PER_DAY}: </td>
<td><b>{TOPICS_PER_DAY}</b></td>
</tr>
<tr>
<td>{L_NUMBER_USERS}: </td>
<td><b>{TOTAL_USERS}</b></td>
<td>{L_USERS_PER_DAY}: </td>
<td><b>{USERS_PER_DAY}</b></td>
</tr>
<tr>
<td>{L_NUMBER_FILES}: </td>
<td><b>{TOTAL_FILES}</b></td>
<td>{L_FILES_PER_DAY}: </td>
<td><b>{FILES_PER_DAY}</b></td>
</tr>
<tr>
<td>{L_BOARD_STARTED}: </td>
<td><b>{START_DATE}</b></td>
<td>{L_AVATAR_DIR_SIZE}: </td>
<td><b>{AVATAR_DIR_SIZE}</b></td>
</tr>
<tr>
<td>{L_DATABASE_SIZE}: </td>
<td><b>{DBSIZE}</b></td>
<td>{L_UPLOAD_DIR_SIZE}: </td>
<td><b>{UPLOAD_DIR_SIZE}</b></td>
</tr>
<tr>
<td>{L_DATABASE_SERVER_INFO}: </td>
<td><b>{DATABASE_INFO}</b></td>
<td>{L_GZIP_COMPRESSION}: </td>
<td><b>{GZIP_COMPRESSION}</b></td>
</tr>
</tbody>
</table>
<!-- ELSE -->
<!-- IF S_ACTION_OPTIONS -->
<form id="stats" method="post" action="{U_ACTION}">
<fieldset class="quick">
<select name="action">{S_ACTION_OPTIONS}</select>
<h1>{L_WELCOME_PHPBB}</h1>
<input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
</fieldset>
</form>
<!-- ENDIF -->
<p>{L_ADMIN_INTRO}</p>
<!-- IF .log -->
<h2>{L_ADMIN_LOG}</h2>
<p>{L_ADMIN_LOG_INDEX_EXPLAIN}</p>
<!-- IF S_REMOVE_INSTALL -->
<div class="errorbox">
<h3>{L_WARNING}</h3>
<p>{L_REMOVE_INSTALL}</p>
</div>
<!-- ENDIF -->
<table cellspacing="1">
<caption>{L_FORUM_STATS}</caption>
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
<thead>
<tr>
<th>{L_USERNAME}</th>
<th>{L_IP}</th>
<th>{L_TIME}</th>
<th>{L_ACTION}</th>
<th>{L_STATISTIC}</th>
<th>{L_VALUE}</th>
<th>{L_STATISTIC}</th>
<th>{L_VALUE}</th>
</tr>
</thead>
<tbody>
<!-- BEGIN log -->
<!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td>{log.USERNAME}</td>
<td style="text-align: center;">{log.IP}</td>
<td style="text-align: center;">{log.DATE}</td>
<td>{log.ACTION}</td>
</tr>
<!-- END log -->
</tbody>
</table>
<br />
<div style="text-align: right;"><a href="{U_ADMIN_LOG}">&raquo; {L_VIEW_ADMIN_LOG}</a></div>
<!-- ENDIF -->
<!-- IF S_INACTIVE_USERS -->
<h2>{L_INACTIVE_USERS}</h2>
<p>{L_INACTIVE_USERS_EXPLAIN}</p>
<form id="inactive" method="post" action="{U_ACTION}">
<table cellspacing="1">
<thead>
<tr>
<th>{L_USERNAME}</th>
<th>{L_JOINED}</th>
<th>{L_LAST_VISIT}</th>
<th>{L_MARK}</th>
<td>{L_NUMBER_POSTS}: </td>
<td><b>{TOTAL_POSTS}</b></td>
<td>{L_POSTS_PER_DAY}: </td>
<td><b>{POSTS_PER_DAY}</b></td>
</tr>
<tr>
<td>{L_NUMBER_TOPICS}: </td>
<td><b>{TOTAL_TOPICS}</b></td>
<td>{L_TOPICS_PER_DAY}: </td>
<td><b>{TOPICS_PER_DAY}</b></td>
</tr>
<tr>
<td>{L_NUMBER_USERS}: </td>
<td><b>{TOTAL_USERS}</b></td>
<td>{L_USERS_PER_DAY}: </td>
<td><b>{USERS_PER_DAY}</b></td>
</tr>
<tr>
<td>{L_NUMBER_FILES}: </td>
<td><b>{TOTAL_FILES}</b></td>
<td>{L_FILES_PER_DAY}: </td>
<td><b>{FILES_PER_DAY}</b></td>
</tr>
</thead>
<tbody>
<!-- BEGIN inactive -->
<!-- IF inactive.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td><a href="{inactive.U_USER_ADMIN}">{inactive.USERNAME}</a></td>
<td>{inactive.DATE}</td>
<td>{inactive.LAST_VISIT}</td>
<td>&nbsp;<input type="checkbox" class="radio" name="mark[]" value="{inactive.USER_ID}" />&nbsp;</td>
</tr>
<!-- BEGINELSE -->
<tr>
<td colspan="3" style="text-align: center;">{L_NO_INACTIVE_USERS}</td>
</tr>
<!-- END inactive -->
<tr>
<td>{L_BOARD_STARTED}: </td>
<td><b>{START_DATE}</b></td>
<td>{L_AVATAR_DIR_SIZE}: </td>
<td><b>{AVATAR_DIR_SIZE}</b></td>
</tr>
<tr>
<td>{L_DATABASE_SIZE}: </td>
<td><b>{DBSIZE}</b></td>
<td>{L_UPLOAD_DIR_SIZE}: </td>
<td><b>{UPLOAD_DIR_SIZE}</b></td>
</tr>
<tr>
<td>{L_DATABASE_SERVER_INFO}: </td>
<td><b>{DATABASE_INFO}</b></td>
<td>{L_GZIP_COMPRESSION}: </td>
<td><b>{GZIP_COMPRESSION}</b></td>
</tr>
<!-- IF S_TOTAL_ORPHAN -->
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>{L_NUMBER_ORPHAN}: </td>
<td><b>{TOTAL_ORPHAN}</b></td>
</tr>
<!-- ENDIF -->
</tbody>
</table>
<!-- IF .inactive -->
<!-- IF S_ACTION_OPTIONS -->
<form id="stats" method="post" action="{U_ACTION}">
<fieldset class="quick">
<p><a href="javascript:marklist('inactive', 'mark', true);">{L_MARK_ALL}</a> &bull; <a href="javascript:marklist('inactive', 'mark', false);">{L_UNMARK_ALL}</a></p>
<select name="action">{S_INACTIVE_OPTIONS}</select>
<select name="action">{S_ACTION_OPTIONS}</select>
<input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
</fieldset>
</form>
<!-- ENDIF -->
</form>
<!-- IF .log -->
<h2>{L_ADMIN_LOG}</h2>
<p>{L_ADMIN_LOG_INDEX_EXPLAIN}</p>
<table cellspacing="1">
<thead>
<tr>
<th>{L_USERNAME}</th>
<th>{L_IP}</th>
<th>{L_TIME}</th>
<th>{L_ACTION}</th>
</tr>
</thead>
<tbody>
<!-- BEGIN log -->
<!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td>{log.USERNAME}</td>
<td style="text-align: center;">{log.IP}</td>
<td style="text-align: center;">{log.DATE}</td>
<td>{log.ACTION}</td>
</tr>
<!-- END log -->
</tbody>
</table>
<br />
<div style="text-align: right;"><a href="{U_ADMIN_LOG}">&raquo; {L_VIEW_ADMIN_LOG}</a></div>
<!-- ENDIF -->
<!-- IF S_INACTIVE_USERS -->
<h2>{L_INACTIVE_USERS}</h2>
<p>{L_INACTIVE_USERS_EXPLAIN_INDEX}</p>
<div style="text-align: right;"><a href="{U_INACTIVE_USERS}">&raquo; {L_VIEW_INACTIVE_USERS}</a></div>
<table cellspacing="1">
<thead>
<tr>
<th>{L_USERNAME}</th>
<th>{L_JOINED}</th>
<th>{L_INACTIVE_DATE}</th>
<th>{L_INACTIVE_REASON}</th>
<th>{L_LAST_VISIT}</th>
</tr>
</thead>
<tbody>
<!-- BEGIN inactive -->
<!-- IF inactive.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td><a href="{inactive.U_USER_ADMIN}">{inactive.USERNAME}</a></td>
<td>{inactive.JOINED}</td>
<td>{inactive.INACTIVE_DATE}</td>
<td>{inactive.REASON}</td>
<td>{inactive.LAST_VISIT}</td>
</tr>
<!-- BEGINELSE -->
<tr>
<td colspan="5" style="text-align: center;">{L_NO_INACTIVE_USERS}</td>
</tr>
<!-- END inactive -->
</tbody>
</table>
<!-- ENDIF -->
<!-- ENDIF -->

View File

@@ -21,16 +21,20 @@
function display_modes(value)
{
// Remove select fields
// Find the old select tag
var item = document.getElementById('module_mode');
var j = 0;
// empty existing items
for (var i = 0; i <= item.options.length; i++)
{
item.options[i] = null;
}
// Create the new select tag
var new_node = document.createElement('select');
new_node.setAttribute('id', 'module_mode');
// Substitute it for the old one
item.parentNode.replaceChild(new_node, item);
// Reset the variable
item = document.getElementById('module_mode');
var j = 0;
<!-- BEGIN m_names -->
if (value == '{m_names.NAME}')
@@ -103,14 +107,14 @@
<dd><select name="module_mode" id="module_mode">{S_MODULE_MODES}</select></dd>
</dl>
</div>
</fieldset>
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input type="hidden" name="action" value="{ACTION}" />
<input type="hidden" name="m" value="{MODULE_ID}" />
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
</fieldset>
</form>
@@ -143,11 +147,22 @@
<!-- BEGIN modules -->
<tr>
<td style="width: 5%;">{modules.MODULE_IMAGE}</td>
<td style="width: 50%;"><a href="{modules.U_MODULE}">{modules.MODULE_TITLE}</a><!-- IF not modules.MODULE_DISPLAYED --> <span class="small">[{L_HIDDEN_MODULE}]</span><!-- ENDIF --></td>
<td><a href="{modules.U_MODULE}">{modules.MODULE_TITLE}</a><!-- IF not modules.MODULE_DISPLAYED --> <span class="small">[{L_HIDDEN_MODULE}]</span><!-- ENDIF --></td>
<td style="width: 15%; white-space: nowrap; text-align: center; vertical-align: middle;">&nbsp;<!-- IF modules.MODULE_ENABLED --><a href="{modules.U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{modules.U_ENABLE}">{L_ENABLE}</a><!-- ENDIF -->&nbsp;</td>
<td style="width: 20%; white-space: nowrap; text-align: center; vertical-align: middle;">
<!-- IF not modules.S_FIRST_ROW --><a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a> <!-- ENDIF -->
<!-- IF not modules.S_LAST_ROW --><a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> <!-- ENDIF -->
<td style="width:90px; white-space: nowrap; text-align: right; vertical-align: middle;">
<!-- IF modules.S_FIRST_ROW && not modules.S_LAST_ROW -->
{ICON_MOVE_UP_DISABLED}
<a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF not modules.S_FIRST_ROW && not modules.S_LAST_ROW-->
<a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a>
<a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF modules.S_LAST_ROW && not modules.S_FIRST_ROW -->
<a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a>
{ICON_MOVE_DOWN_DISABLED}
<!-- ELSE -->
{ICON_MOVE_UP_DISABLED}
{ICON_MOVE_DOWN_DISABLED}
<!-- ENDIF -->
<a href="{modules.U_EDIT}">{ICON_EDIT}</a>
<a href="{modules.U_DELETE}">{ICON_DELETE}</a>
</td>
@@ -194,4 +209,4 @@
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -74,10 +74,10 @@
<dt><label for="role_description">{L_ROLE_DESCRIPTION}:</label><br /><span>{L_ROLE_DESCRIPTION_EXPLAIN}</span></dt>
<dd><textarea id="role_description" name="role_description" rows="3" cols="45">{ROLE_DESCRIPTION}</textarea></dd>
</dl>
</fieldset>
<fieldset class="quick">
<p class="quick">
<input type="submit" class="button1" name="submit" value="{L_SUBMIT}" />
</p>
</fieldset>
<!-- IF S_DISPLAY_ROLE_MASK -->
@@ -96,7 +96,7 @@
<h1>{L_ACL_TYPE}</h1>
<fieldset class="quick">
<a href="javascript: mark_options('a_options', 'y');">{L_ALL_YES}</a> &bull; <a href="javascript: mark_options('a_options', 'n');">{L_ALL_NEVER}</a> &bull; <a href="javascript: mark_options('a_options', 'u');">{L_ALL_NO}</a>
<a href="#" onclick="mark_options('a_options', 'y'); return false;">{L_ALL_YES}</a> &bull; <a href="#" onclick="mark_options('a_options', 'n'); return false;">{L_ALL_NEVER}</a> &bull; <a href="#" onclick="mark_options('a_options', 'u'); return false;">{L_ALL_NO}</a>
</fieldset>
<fieldset class="permissions">
@@ -121,7 +121,7 @@
<!-- ELSE -->
<td class="preset preset_custom">
<!-- ENDIF -->
<a href="javascript:swap_options('options{auth.S_ROW_COUNT}');"><span></span></a></td>
<a href="#" onclick="swap_options('options{auth.S_ROW_COUNT}'); return false;"><span></span></a></td>
<!-- END auth -->
</tr>
<tr class="row3">
@@ -131,9 +131,9 @@
<thead>
<tr>
<th scope="col" style="text-align: left; padding-left: 0;"><strong>{L_ACL_SETTING} [{auth.CAT_NAME}]</strong></th>
<th scope="col"><a href="javascript: mark_options('options{auth.S_ROW_COUNT}', 'y');">{L_ACL_YES}</a></th>
<th scope="col"><a href="javascript: mark_options('options{auth.S_ROW_COUNT}', 'u');">{L_ACL_NO}</a></th>
<th scope="col"><a href="javascript: mark_options('options{auth.S_ROW_COUNT}', 'n');">{L_ACL_NEVER}</a></th>
<th scope="col"><a href="#" onclick="mark_options('options{auth.S_ROW_COUNT}', 'y'); return false;">{L_ACL_YES}</a></th>
<th scope="col"><a href="#" onclick="mark_options('options{auth.S_ROW_COUNT}', 'u'); return false;">{L_ACL_NO}</a></th>
<th scope="col"><a href="#" onclick="mark_options('options{auth.S_ROW_COUNT}', 'n'); return false;">{L_ACL_NEVER}</a></th>
</tr>
</thead>
<tbody>
@@ -173,10 +173,10 @@
<form id="acp_roles" method="post" action="{U_ACTION}">
<table cellspacing="1">
<col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
<col class="col2" /><col class="col2" /><col class="col1" /><col class="col2" /><col class="col2" />
<thead>
<tr>
<th style="width: 50%">{L_ROLE_NAME}</th>
<th>{L_ROLE_NAME}</th>
<th colspan="2">{L_OPTIONS}</th>
</tr>
</thead>
@@ -186,10 +186,21 @@
<td style="vertical-align: top;"><b>{roles.ROLE_NAME}</b>
<!-- IF roles.ROLE_DESCRIPTION --><br /><span>{roles.ROLE_DESCRIPTION}</span><!-- ENDIF -->
</td>
<td style="vertical-align: top; white-space: nowrap;"><!-- IF roles.U_DISPLAY_ITEMS --><a href="{roles.U_DISPLAY_ITEMS}">{L_VIEW_ASSIGNED_ITEMS}</a><!-- ELSE -->{L_VIEW_ASSIGNED_ITEMS}<!-- ENDIF --></td>
<td style="vertical-align: top; white-space: nowrap;">
<!-- IF not roles.S_FIRST_ROW --><a href="{roles.U_MOVE_UP}">{ICON_MOVE_UP}</a> <!-- ENDIF -->
<!-- IF not roles.S_LAST_ROW --><a href="{roles.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> <!-- ENDIF -->
<td style="width: 30%; text-align: center; vertical-align: top; white-space: nowrap;"><!-- IF roles.U_DISPLAY_ITEMS --><a href="{roles.U_DISPLAY_ITEMS}">{L_VIEW_ASSIGNED_ITEMS}</a><!-- ELSE -->{L_VIEW_ASSIGNED_ITEMS}<!-- ENDIF --></td>
<td style="width: 80px; text-align: right; vertical-align: top; white-space: nowrap;">
<!-- IF roles.S_FIRST_ROW && not roles.S_LAST_ROW -->
{ICON_MOVE_UP_DISABLED}
<a href="{roles.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF not roles.S_FIRST_ROW && not roles.S_LAST_ROW-->
<a href="{roles.U_MOVE_UP}">{ICON_MOVE_UP}</a>
<a href="{roles.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF roles.S_LAST_ROW && not roles.S_FIRST_ROW -->
<a href="{roles.U_MOVE_UP}">{ICON_MOVE_UP}</a>
{ICON_MOVE_DOWN_DISABLED}
<!-- ELSE -->
{ICON_MOVE_UP_DISABLED}
{ICON_MOVE_DOWN_DISABLED}
<!-- ENDIF -->
<a href="{roles.U_EDIT}" title="{L_EDIT_ROLE}">{ICON_EDIT}</a>
<a href="{roles.U_REMOVE}" title="{L_REMOVE_ROLE}">{ICON_DELETE}</a>
</td>
@@ -218,4 +229,4 @@
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -61,23 +61,6 @@
</form>
<form id="select_single_forum" method="post" action="{U_ACTION}">
<fieldset>
<legend>{L_LOOK_UP_FORUM}</legend>
<dl>
<dt><label for="forum">{L_LOOK_UP_FORUM}:</label></dt>
<dd><select id="forum" name="forum_id[]">{S_FORUM_OPTIONS}</select></dd>
</dl>
</fieldset>
<fieldset class="quick">
{S_HIDDEN_FIELDS}
<input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
</fieldset>
</form>
<!-- ENDIF -->
<!-- ELSEIF S_SELECT_USER and S_CAN_SELECT_USER -->
@@ -89,7 +72,7 @@
<dl>
<dt><label for="username">{L_FIND_USERNAME}:</label></dt>
<dd><input class="medium" type="text" id="username" name="username[]" /></dd>
<dd>[ <a href="#" onclick="window.open('{U_FIND_USERNAME}', '_phpbbsearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</dd>
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</dd>
<dd class="full" style="text-align: left;"><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> &nbsp;{L_SELECT_ANONYMOUS}</dd>
</dl>
</fieldset>
@@ -134,7 +117,7 @@
<legend>{L_MANAGE_USERS}</legend>
<dl>
<dd class="full"><select style="width: 100%;" name="user_id[]" multiple="multiple" size="5">{S_DEFINED_USER_OPTIONS}</select></dd>
<dd class="full" style="text-align: right;"><input type="checkbox" class="radio" name="all_users" value="1" />&nbsp; {L_ALL_USERS}</dd>
<!-- IF S_ALLOW_ALL_SELECT --><dd class="full" style="text-align: right;"><input type="checkbox" class="radio" name="all_users" value="1" />&nbsp; {L_ALL_USERS}</dd><!-- ENDIF -->
</dl>
</fieldset>
@@ -152,7 +135,7 @@
<p>{L_USERNAMES_EXPLAIN}</p>
<dl>
<dd class="full"><textarea id="username" name="usernames" rows="5" cols="5" style="width: 100%; height: 60px;"></textarea></dd>
<dd class="full" style="text-align: left;"><div style="float: right;">[ <a href="#" onclick="window.open('{U_FIND_USERNAME}', '_phpbbsearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</div><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> &nbsp;{L_SELECT_ANONYMOUS}</dd>
<dd class="full" style="text-align: left;"><div style="float: right;">[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</div><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> &nbsp;{L_SELECT_ANONYMOUS}</dd>
</dl>
</fieldset>
@@ -179,7 +162,7 @@
<legend>{L_MANAGE_GROUPS}</legend>
<dl>
<dd class="full"><select style="width: 100%;" name="group_id[]" multiple="multiple" size="5">{S_DEFINED_GROUP_OPTIONS}</select></dd>
<dd class="full" style="text-align: right;"><input type="checkbox" class="radio" name="all_groups" value="1" />&nbsp; {L_ALL_GROUPS}</dd>
<!-- IF S_ALLOW_ALL_SELECT --><dd class="full" style="text-align: right;"><input type="checkbox" class="radio" name="all_groups" value="1" />&nbsp; {L_ALL_GROUPS}</dd><!-- ENDIF -->
</dl>
</fieldset>
@@ -239,7 +222,7 @@
<dl>
<dt><label for="username">{L_FIND_USERNAME}:</label></dt>
<dd><input type="text" id="username" name="username[]" /></dd>
<dd>[ <a href="#" onclick="window.open('{U_FIND_USERNAME}', '_phpbbsearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</dd>
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</dd>
<dd class="full" style="text-align: left;"><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> &nbsp;{L_SELECT_ANONYMOUS}</dd>
</dl>
</fieldset>
@@ -356,7 +339,7 @@
<fieldset class="quick" style="float: left; text-align: left;">
{L_PERMISSION_APPLIED_TO_ALL}<br />
<a href="javascript:marklist('set_permissions', 'inherit', true);">{L_MARK_ALL}</a> &bull; <a href="javascript:marklist('set_permissions', 'inherit', false);">{L_UNMARK_ALL}</a>
<a href="#" onclick="marklist('set_permissions', 'inherit', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('set_permissions', 'inherit', false); return false;">{L_UNMARK_ALL}</a>
</fieldset>
<fieldset class="quick" style="float: right;">

View File

@@ -27,10 +27,17 @@
<dt><label>{L_FIELD_TYPE}:</label><br /><span>{L_FIELD_TYPE_EXPLAIN}</span></dt>
<dd><b>{FIELD_TYPE}</b></dd>
</dl>
<!-- IF S_EDIT_MODE -->
<dl>
<dt><label>{L_FIELD_IDENT}:</label><br /><span>{L_FIELD_IDENT_EXPLAIN}</span></dt>
<dd><input type="hidden" name="field_ident" value="{FIELD_IDENT}" /><strong>{FIELD_IDENT}</strong></dd>
</dl>
<!-- ELSE -->
<dl>
<dt><label for="field_ident">{L_FIELD_IDENT}:</label><br /><span>{L_FIELD_IDENT_EXPLAIN}</span></dt>
<dd><input class="medium" type="text" id="field_ident" name="field_ident" value="{FIELD_IDENT}" /></dd>
</dl>
<!-- ENDIF -->
<dl>
<dt><label for="field_no_view">{L_DISPLAY_PROFILE_FIELD}:</label><br /><span>{L_DISPLAY_PROFILE_FIELD_EXPLAIN}</span></dt>
<dd><input type="radio" class="radio" id="field_no_view" name="field_no_view" value="0"<!-- IF not S_FIELD_NO_VIEW --> checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="field_no_view" value="1"<!-- IF S_FIELD_NO_VIEW --> checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
@@ -154,14 +161,20 @@
<!-- ELSE -->
<h1>{L_ACP_CUSTOM_PROFILE_FIELDS}</h1>
<!-- IF S_NEED_EDIT -->
<div class="errorbox">
<h3>{L_WARNING}</h3>
<p>{L_CUSTOM_FIELDS_NOT_TRANSLATED}</p>
</div>
<!-- ENDIF -->
<table cellspacing="1">
<thead>
<tr>
<th>{L_FIELD_IDENT}</th>
<th>{L_FIELD_TYPE}</th>
<th>&nbsp;</th>
<th>{L_OPTIONS}</th>
<th colspan="2">{L_OPTIONS}</th>
</tr>
</thead>
<tbody>
@@ -170,12 +183,24 @@
<td>{fields.FIELD_IDENT}</td>
<td>{fields.FIELD_TYPE}</td>
<td><a href="{fields.U_ACTIVATE_DEACTIVATE}">{fields.L_ACTIVATE_DEACTIVATE}</a><!-- IF fields.S_NEED_EDIT --> | <a href="{fields.U_EDIT}"><span style="color:red;">{L_EDIT}</span><!-- ENDIF --></td>
<td style="text-align: center;"><a href="{fields.U_ACTIVATE_DEACTIVATE}">{fields.L_ACTIVATE_DEACTIVATE}</a><!-- IF fields.S_NEED_EDIT --> | <a href="{fields.U_TRANSLATE}" style="color: red;">{L_TRANSLATE}</a><!-- ENDIF --></td>
<td style="width: 15%; text-align: right; white-space: nowrap;">
<!-- IF not fields.S_FIRST_ROW --><a href="{fields.U_MOVE_UP}">{ICON_MOVE_UP}</a> <!-- ENDIF -->
<!-- IF not fields.S_LAST_ROW --><a href="{fields.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> <!-- ENDIF -->
<!-- IF not fields.S_NEED_EDIT --><a href="{fields.U_EDIT}">{ICON_EDIT}</a> <!-- ENDIF -->
<td style="width: 80px; text-align: right; white-space: nowrap;">
<!-- IF fields.S_FIRST_ROW && not fields.S_LAST_ROW -->
{ICON_MOVE_UP_DISABLED}
<a href="{fields.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF not fields.S_FIRST_ROW && not fields.S_LAST_ROW-->
<a href="{fields.U_MOVE_UP}">{ICON_MOVE_UP}</a>
<a href="{fields.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF fields.S_LAST_ROW && not fields.S_FIRST_ROW -->
<a href="{fields.U_MOVE_UP}">{ICON_MOVE_UP}</a>
{ICON_MOVE_DOWN_DISABLED}
<!-- ENDIF -->
<!-- IF not fields.S_NEED_EDIT -->
<a href="{fields.U_EDIT}">{ICON_EDIT}</a>
<!-- ELSE -->
{ICON_EDIT_DISABLED}
<!-- ENDIF -->
<a href="{fields.U_DELETE}">{ICON_DELETE}</a>
</td>
@@ -196,4 +221,4 @@
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -25,7 +25,7 @@
</tr>
<!-- BEGINELSE -->
<tr>
<td class="row3" style="text-align: center;">{L_NO_PRUNE}</td>
<td colspan="3" class="row3" style="text-align: center;">{L_NO_PRUNE}</td>
</tr>
<!-- END pruned -->
</tbody>
@@ -44,10 +44,10 @@
<dl>
<dd class="full"><select name="f[]" multiple="multiple" size="5">{S_FORUM_OPTIONS}</select></dd>
</dl>
</fieldset>
<fieldset class="quick">
<p class="quick">
<input class="button1" type="submit" value="{L_LOOK_UP_FORUM}" />
</p>
</fieldset>
</form>
@@ -88,16 +88,16 @@
<dt><label for="sticky">{L_PRUNE_STICKY}:</label></dt>
<dd><input type="radio" class="radio" name="prune_sticky" value="1" /> {L_YES} &nbsp; <input type="radio" class="radio" id="sticky" name="prune_sticky" value="0" checked="checked" /> {L_NO}</dd>
</dl>
</fieldset>
<fieldset class="quick">
<p class="quick">
{S_HIDDEN_FIELDS}
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
</p>
</fieldset>
</form>
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -43,15 +43,15 @@
<dt><label for="deactivate">{L_DEACTIVATE_DELETE}:</label><br /><span>{L_DEACTIVATE_DELETE_EXPLAIN}</span></dt>
<dd><input type="radio" class="radio" name="action" value="delete" /> {L_DELETE_USERS}&nbsp;&nbsp;<input type="radio" class="radio" id="deactivate" name="action" value="deactivate" checked="checked" /> {L_DEACTIVATE}</dd>
</dl>
</fieldset>
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input type="hidden" name="prune" value="1" />
<input class="button1" type="submit" id="update" name="update" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
</fieldset>
</form>
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -43,13 +43,13 @@
<dd><input name="min_posts" type="text" id="min_posts" maxlength="10" value="{MIN_POSTS}" /></dd>
</dl>
</div>
</fieldset>
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input type="hidden" name="action" value="save" />
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
</fieldset>
</form>
@@ -60,6 +60,10 @@
<p>{L_ACP_RANKS_EXPLAIN}</p>
<form id="acp_ranks" method="post" action="{U_ACTION}">
<fieldset class="tabulated">
<legend>{L_ACP_MANAGE_RANKS}</legend>
<table cellspacing="1">
<thead>
<tr>
@@ -81,14 +85,13 @@
</tbody>
</table>
<form id="acp_ranks" method="post" action="{U_ACTION}">
<fieldset class="quick">
<p class="quick">
<input class="button2" name="add" type="submit" value="{L_ADD_RANK}" />
</p>
</fieldset>
</form>
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -17,24 +17,42 @@
</div>
<!-- ENDIF -->
<!-- IF not S_TRANSLATED -->
<h3>{L_AVAILABLE_TITLES}</h3>
<p>{S_AVAILABLE_TITLES}</p>
<!-- ENDIF -->
<form id="acp_reasons" method="post" action="{U_ACTION}">
<fieldset>
<legend>{L_TITLE}</legend>
<p><!-- IF S_TRANSLATED -->{L_IS_TRANSLATED}<!-- ELSE -->{L_IS_NOT_TRANSLATED}<!-- ENDIF --></p>
<p><!-- IF S_TRANSLATED -->{L_IS_TRANSLATED_EXPLAIN}<!-- ELSE -->{L_IS_NOT_TRANSLATED_EXPLAIN}<!-- ENDIF --></p>
<dl>
<dt><label for="reason_title">{L_REASON_TITLE}:</label></dt>
<dd><input name="reason_title" type="text" id="reason_title" value="{REASON_TITLE}" /></dd>
</dl>
<!-- IF S_TRANSLATED -->
<dl>
<dt>{L_REASON_TITLE_TRANSLATED}</dt>
<dd>{TRANSLATED_TITLE}</dd>
</dl>
<!-- ENDIF -->
<dl>
<dt><label for="reason_description">{L_REASON_DESCRIPTION}:</label></dt>
<dd><textarea name="reason_description" id="reason_description" rows="8">{REASON_DESCRIPTION}</textarea></dd>
</dl>
</fieldset>
<!-- IF S_TRANSLATED -->
<dl>
<dt>{L_REASON_DESC_TRANSLATED}</dt>
<dd>{TRANSLATED_DESCRIPTION}</dd>
</dl>
<!-- ENDIF -->
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
</fieldset>
</form>
@@ -45,6 +63,10 @@
<p>{L_ACP_REASONS_EXPLAIN}</p>
<form id="reasons" method="post" action="{U_ACTION}">
<fieldset class="tabuled">
<legend>{L_ACP_REASONS}</legend>
<!-- IF .reasons -->
<table cellspacing="1">
<col class="row1" /><col class="row1" /><col class="row2" />
@@ -64,11 +86,23 @@
<br /><span>{reasons.REASON_DESCRIPTION}</span>
</td>
<td style="width: 100px;">{reasons.REASON_COUNT}</td>
<td style="width: 15%; text-align: right; white-space: nowrap;">
<!-- IF not reasons.S_FIRST_ROW --><a href="{reasons.U_MOVE_UP}">{ICON_MOVE_UP}</a> <!-- ENDIF -->
<!-- IF not reasons.S_LAST_ROW --><a href="{reasons.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> <!-- ENDIF -->
<td style="width: 80px; text-align: right; white-space: nowrap;">
<!-- IF reasons.S_FIRST_ROW && not reasons.S_LAST_ROW -->
{ICON_MOVE_UP_DISABLED}
<a href="{reasons.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF not reasons.S_FIRST_ROW && not reasons.S_LAST_ROW-->
<a href="{reasons.U_MOVE_UP}">{ICON_MOVE_UP}</a>
<a href="{reasons.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
<!-- ELSEIF reasons.S_LAST_ROW && not reasons.S_FIRST_ROW -->
<a href="{reasons.U_MOVE_UP}">{ICON_MOVE_UP}</a>
{ICON_MOVE_DOWN_DISABLED}
<!-- ENDIF -->
<a href="{reasons.U_EDIT}">{ICON_EDIT}</a>
<!-- IF reasons.U_DELETE --><a href="{reasons.U_DELETE}">{ICON_DELETE}</a><!-- ENDIF -->
<!-- IF reasons.U_DELETE -->
<a href="{reasons.U_DELETE}">{ICON_DELETE}</a>
<!-- ELSE -->
{ICON_DELETE_DISABLED}
<!-- ENDIF -->
</td>
</tr>
<!-- END reasons -->
@@ -77,17 +111,16 @@
<!-- ENDIF -->
<form id="reasons" method="post" action="{U_ACTION}">
<fieldset class="quick">
<p class="quick">
<input type="hidden" name="action" value="add" />
<input type="text" name="reason_title" />
<input class="button2" name="addreason" type="submit" value="{L_ADD_NEW_REASON}" />
</p>
</fieldset>
</form>
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -13,7 +13,7 @@
<legend>{L_GENERAL_SEARCH_SETTINGS}</legend>
<dl>
<dt><label for="load_search">{L_YES_SEARCH}:</label><br /><span>{L_YES_SEARCH_EXPLAIN}</span></dt>
<dd><input type="radio" class="radio" id="load_search" name="config[load_search]" value="1"<!-- IF S_YES_SEARCH --> checked="checked"<!-- ENDIF --> class="radio" />&nbsp;{L_YES}&nbsp;&nbsp;<input type="radio" class="radio" name="config[load_search]" value="0"<!-- IF not S_YES_SEARCH --> checked="checked"<!-- ENDIF --> class="radio" />&nbsp;{L_NO}</dd>
<dd><input type="radio" class="radio" id="load_search" name="config[load_search]" value="1"<!-- IF S_YES_SEARCH --> checked="checked"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp;&nbsp;<input type="radio" class="radio" name="config[load_search]" value="0"<!-- IF not S_YES_SEARCH --> checked="checked"<!-- ENDIF --> />&nbsp;{L_NO}</dd>
</dl>
<dl>
<dt><label for="search_interval">{L_SEARCH_INTERVAL}:</label><br /><span>{L_SEARCH_INTERVAL_EXPLAIN}</span></dt>
@@ -55,8 +55,9 @@
<!-- END backend -->
<fieldset class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="Submit" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="Reset" />
<legend>{L_SUBMIT}</legend>
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</fieldset>
</form>
@@ -82,7 +83,7 @@
<p>{L_ACP_SEARCH_INDEX_EXPLAIN}</p>
<!-- IF S_CONTINUE_INDEXING -->
<a href="{U_CONTINUE_INDEXING}" onclick="javascript:popup_progress_bar('{S_CONTINUE_INDEXING}');">{L_CONTINUE}</a>
<a href="{U_CONTINUE_INDEXING}" onclick="popup_progress_bar('{S_CONTINUE_INDEXING}');">{L_CONTINUE}</a>
<p>{L_CONTINUE_EXPLAIN}</p>
<!-- ELSE -->
@@ -91,8 +92,13 @@
<!-- IF backend.S_STATS -->
<form id="acp_search_index_{backend.NAME}" method="post" action="{U_ACTION}">
{backend.S_HIDDEN_FIELDS}
<fieldset class="tabular">
<legend>{L_INDEX_STATS}: {backend.L_NAME} <!-- IF backend.S_ACTIVE -->({L_ACTIVE}) <!-- ENDIF --></legend>
<table cellspacing="1">
<caption>&raquo; {L_INDEX_STATS}: {backend.L_NAME} <!-- IF backend.S_ACTIVE -->({L_ACTIVE}) <!-- ENDIF --></caption>
<caption>{backend.L_NAME} <!-- IF backend.S_ACTIVE -->({L_ACTIVE}) <!-- ENDIF --></caption>
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
<thead>
<tr>
@@ -116,15 +122,13 @@
<!-- ENDIF -->
<form id="acp_search_index_{backend.NAME}" method="post" action="{U_ACTION}">
{backend.S_HIDDEN_FIELDS}
<fieldset class="quick">
<p class="quick">
<!-- IF backend.S_INDEXED -->
<input class="button2" type="submit" name="action[delete]" value="{L_DELETE_INDEX}" onclick="javascript:popup_progress_bar('delete')" />
<input class="button2" type="submit" name="action[delete]" value="{L_DELETE_INDEX}" onclick="popup_progress_bar('delete');" />
<!-- ELSE -->
<input class="button2" type="submit" name="action[create]" value="{L_CREATE_INDEX}" onclick="javascript:popup_progress_bar('create')" />
<input class="button2" type="submit" name="action[create]" value="{L_CREATE_INDEX}" onclick="popup_progress_bar('create');" />
<!-- ENDIF -->
</p>
</fieldset>
</form>
@@ -134,4 +138,4 @@
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -22,10 +22,10 @@
<dt><label for="new_id">{L_REPLACE}:</label><br /><span>{L_REPLACE_EXPLAIN}</span></dt>
<dd><select name="new_id">{S_REPLACE_OPTIONS}</select></dd>
</dl>
</fieldset>
<fieldset class="quick">
<p class="quick">
<input class="button1" type="submit" name="update" value="{L_DELETE}" />
</p>
</fieldset>
</form>
@@ -37,90 +37,83 @@
<h1>{L_TITLE}</h1>
<p>{L_EXPLAIN}</p>
<script language="javascript" type="text/javascript" defer="defer">
<!-- IF SUCCESS -->
<div class="successbox">
<p>{L_IMAGESET_UPDATED}</p>
</div>
<!-- ENDIF -->
<!-- IF ERROR -->
<div class="errorbox">
<p>{L_NO_IMAGE}</p>
</div>
<!-- ENDIF -->
<script type="text/javascript" defer="defer">
<!--
function update_image(newimage)
{
document.newimg.src = (newimage) ? "../styles/{NAME}/imageset/" + newimage : "images/no_image.png";
document.getElementById('newimg').src = (newimage) ? "../styles/{NAME}/imageset/" + newimage : "images/no_image.png";
}
//-->
</script>
<form method="post" action="{U_ACTION}">
<table width="95%" cellspacing="1" cellpadding="1" border="0" align="center">
<tr>
<td align="right">{L_SELECT_IMAGE}: <select name="imgname" onchange="this.form.submit(); ">
<fieldset class="quick" style="text-align: left;">
<legend>{L_SELECT_IMAGE}</legend>
{L_SELECT_IMAGE}: <select name="imgname" onchange="this.form.submit();">
<!-- BEGIN category -->
<option class="sep" value="">{category.NAME}</option>
<!-- BEGIN images --><option value="{category.images.VALUE}"<!-- IF category.images.SELECTED--> selected="selected"<!-- ENDIF -->>{category.images.TEXT}</option>
<!-- END images -->
<!-- END category -->
</select>&nbsp; <input class="btnlite" type="submit" value="{L_SELECT}" tabindex="100" />
</td>
</tr>
<tr>
<td>
<table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<th colspan="2">{L_EDIT_IMAGESET}</th>
</tr>
<!-- IF SUCCESS -->
<tr>
<td class="row1" colspan="2" align="center"><span style="color: green">{L_IMAGESET_UPDATED}</span><br /></td>
</tr>
<!-- ENDIF -->
<!-- IF ERROR -->
<tr>
<td class="row1" colspan="2" align="center"><span style="color: red">{L_NO_IMAGE}</span><br /></td>
</tr>
<!-- ENDIF -->
<tr>
<td class="row1" colspan="2" align="center">
<table width="100%" cellspacing="2" cellpadding="2" border="0">
<tr>
<td width="50%" align="center"><img src="<!-- IF IMAGE_REQUEST -->{IMAGE_REQUEST}<!-- ELSE -->images/no_image.png<!-- ENDIF -->"/></td>
<td width="50%" align="center"><img src="images/no_image.png" name="newimg" /></td>
</tr>
<tr>
<td class="gensmall" align="center">{L_CURRENT_IMAGE}</td>
<td class="gensmall" align="center">{L_SELECTED_IMAGE}</td>
</tr>
</table>
</td>
</tr>
<tr>
<th width="40%">{L_IMAGE_PARAMETER}</th>
<th>{L_IMAGE_VALUE}</th>
</tr>
<tr>
<td class="row1" width="40%"><b>{L_IMAGE}: </b></td>
<td class="row2"><select name="imgpath" onchange="update_image(this.options[selectedIndex].value);"><option value=""<!-- IF not IMAGE_SELECT--> selected="selected"<!-- ENDIF -->>{L_NO_IMAGE}</option>
<!-- BEGIN imagesetlist -->
<option class="sep" value=""><!-- IF imagesetlist.TYPE -->{L_LOCALISED_IMAGES}<!-- ELSE -->{L_GLOBAL_IMAGES}<!-- ENDIF --></option>
<!-- BEGIN images -->
<option value="{imagesetlist.images.VALUE}"<!-- IF imagesetlist.images.SELECTED--> selected="selected"<!-- ENDIF -->>{imagesetlist.images.TEXT}</option>
<!-- END images -->
<!-- END imagesetlist -->
</select>
</td>
</tr>
<tr>
<td class="row1" width="40%"><b>{L_INCLUDE_DIMENSIONS}: </b><br /><span class="gensmall">{L_DIMENSIONS_EXPLAIN}</span></td>
<td class="row2"><input type="radio" class="radio" name="imgsize" value="1"<!-- IF IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_YES}&nbsp;&nbsp;<input type="radio" class="radio" name="imgsize" value="0"<!-- IF not IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_NO}</td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="update" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnmain" type="reset" value="{L_RESET}" /></td>
</tr>
</table>
</td>
</tr>
</table>
</select>&nbsp; <input class="button1" type="submit" value="{L_SELECT}" tabindex="100" />
</fieldset>
<fieldset>
<legend>{L_EDIT_IMAGESET}</legend>
<dl>
<dt><label>{L_CURRENT_IMAGE}:</label></dt>
<dd><img src="<!-- IF IMAGE_REQUEST -->{IMAGE_REQUEST}<!-- ELSE -->images/no_image.png<!-- ENDIF -->" alt="" /></dd>
</dl>
<dl>
<dt><label>{L_SELECTED_IMAGE}:</label></dt>
<dd><img src="images/no_image.png" id="newimg" alt="" /></dd>
</dl>
</fieldset>
<fieldset>
<legend>{L_IMAGE}</legend>
<dl>
<dt><label for="imgpath">{L_IMAGE}:</label></dt>
<dd><select id="imgpath" name="imgpath" onchange="update_image(this.options[selectedIndex].value);"><option value=""<!-- IF not IMAGE_SELECT--> selected="selected"<!-- ENDIF -->>{L_NO_IMAGE}</option>
<!-- BEGIN imagesetlist -->
<option class="sep" value=""><!-- IF imagesetlist.TYPE -->{L_LOCALISED_IMAGES}<!-- ELSE -->{L_GLOBAL_IMAGES}<!-- ENDIF --></option>
<!-- BEGIN images -->
<option value="{imagesetlist.images.VALUE}"<!-- IF imagesetlist.images.SELECTED--> selected="selected"<!-- ENDIF -->>{imagesetlist.images.TEXT}</option>
<!-- END images -->
<!-- END imagesetlist -->
</select>
</dd>
</dl>
<dl>
<dt><label for="imgsize">{L_INCLUDE_DIMENSIONS}:</label><br /><span>{L_DIMENSIONS_EXPLAIN}</span></dt>
<dd><input type="radio" class="radio" name="imgsize" id="imgsize" value="1"<!-- IF IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_YES}&nbsp;&nbsp;<input type="radio" class="radio" name="imgsize" value="0"<!-- IF not IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
</dl>
</fieldset>
<fieldset class="submit-buttons">
<legend>{L_SUBMIT}</legend>
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="button2" type="reset" value="{L_RESET}" />
</fieldset>
</form>
<!-- ELSEIF S_EDIT_TEMPLATE or S_EDIT_THEME -->
<script language="javascript" type="text/javascript" defer="defer">
<script type="text/javascript" defer="defer">
<!--
function append_text_rows(form_name, value)
{
@@ -163,14 +156,14 @@
<legend>{L_SELECT_TEMPLATE}</legend>
<dl>
<dt><label for="template_file">{L_TEMPLATE_FILE}:</label></dt>
<dd><select id="template_file" name="template_file" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_TEMPLATES}</select> <input class="btnlite" type="submit" value="{L_SELECT}" /></dd>
<dd><select id="template_file" name="template_file" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_TEMPLATES}</select> <input class="button2" type="submit" value="{L_SELECT}" /></dd>
</dl>
</fieldset>
</form>
<!-- IF TEMPLATE_FILE -->
<script language="javascript" type="text/javascript" defer="defer">
<script type="text/javascript" defer="defer">
<!--
function change_editor_height(height)
@@ -217,12 +210,13 @@
</dl>
<dl>
<dt><label for="text_rows">{L_TEMPLATE_EDITOR_HEIGHT}:</label></dt>
<dd><input id="text_rows" type="text" maxlength="3" value="{TEXT_ROWS}" /> <input class="btnlite" type="button" name="update" onclick="change_editor_height(this.form.text_rows.value);" value="{L_UPDATE}" /></dd>
<dd><input id="text_rows" type="text" maxlength="3" value="{TEXT_ROWS}" /> <input class="button2" type="button" name="update" onclick="change_editor_height(this.form.text_rows.value);" value="{L_UPDATE}" /></dd>
</dl>
<textarea id="template_data" name="template_data" style="font-family:'Courier New', monospace;font-size:9pt;line-height:125%;width:100%;" cols="80" rows="{TEXT_ROWS}">{TEMPLATE_DATA}</textarea>
</fieldset>
<fieldset class="submit-buttons">
<legend>{L_SUBMIT}</legend>
{S_HIDDEN_FIELDS}
<input class="button1" id="save" type="submit" name="save" value="{L_SUBMIT}" />
</fieldset>
@@ -232,15 +226,9 @@
<!-- ELSEIF S_EDIT_THEME -->
<script language="javascript" type="text/javascript">
<script type="text/javascript">
<!--
function swatch(field)
{
window.open('{UA_SWATCH}' + field, '_swatch', 'height=150, resizable=yes, scrollbars=no, width=636');
return false;
}
function change_editor_height(height)
{
editor = document.getElementById('css_data');
@@ -260,20 +248,20 @@
<p>{L_EDIT_THEME_EXPLAIN}</p>
<p>{L_SELECTED_THEME}: <b>{SELECTED_THEME}</b></p>
<p>{L_SELECTED_THEME}: <strong>{SELECTED_THEME}</strong></p>
<!-- IF S_SHOWCSS -->
<h3>{L_SHOW_CSS_NOTE}</h3>
<p>{L_SHOW_CSS_EXPLAIN}</p>
<!-- ENDIF -->
<form id="acp_styles" method="post" action="{U_ACTION}">
<fieldset>
<legend>{L_SELECT_CLASS}</legend>
<dl>
<dt><label for="css_class">{L_SELECT_CLASS}:</label></dt>
<dd><select id="css_class" name="css_class" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_CLASSES}</select> <input class="btnlite" type="submit" id="select_class" name="select_class" value="{L_SELECT}" /></dd>
<dd><select id="css_class" name="css_class" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_CLASSES}</select></dd>
<dd><input class="button1" type="submit" id="select_class" name="select_class" value="{L_SELECT}" /></dd>
</dl>
<!-- IF S_CLASS -->
<dl>
@@ -295,7 +283,7 @@
<legend>{L_THEME_EDITOR}</legend>
<dl>
<dt><label for="text_rows">{L_THEME_EDITOR_HEIGHT}:</label></dt>
<dd><input id="text_rows" type="text" maxlength="3" value="{TEXT_ROWS}" /> <input class="btnlite" type="button" name="update" onclick="change_editor_height(this.form.text_rows.value);" value="{L_UPDATE}" /></dd>
<dd><input id="text_rows" type="text" maxlength="3" value="{TEXT_ROWS}" /> <input class="button1" type="button" name="update" onclick="change_editor_height(this.form.text_rows.value);" value="{L_UPDATE}" /></dd>
</dl>
<textarea id="css_data" name="css_data" style="font-family:'Courier New', monospace;font-size:9pt;line-height:125%;width:100%;" cols="80" rows="{TEXT_ROWS}">{CSS_DATA}</textarea>
</fieldset>
@@ -309,7 +297,7 @@
<dd><input id="background_color" name="background_color" type="text" value="{BACKGROUND_COLOR}" size="6" />&nbsp;&nbsp;<span>[ <a href="#" onclick="swatch('background_color'); return false">{L_COLOUR_SWATCH}</a> ]</span></dd>
</dl>
<dl>
<dt><label for="backround_image">{L_BACKGROUND_IMAGE}:</label></td>
<dt><label for="backround_image">{L_BACKGROUND_IMAGE}:</label></dt>
<dd><select id="background_image" name="background_image">{S_BACKGROUND_IMAGE}</select></dd>
</dl>
<dl>
@@ -330,7 +318,7 @@
</dl>
<dl>
<dt><label for="font_size">{L_FONT_SIZE}:</label></dt>
<dd><input id="font_size" name="font_size" type="text" value="{FONT_SIZE}" size="3" maxlength="3" /> <select id="font_size_unit" name="font_size_unit">{S_FONT_SIZE_UNITS}</select></dd>
<dd><input id="font_size" name="font_size" type="text" value="{FONT_SIZE}" size="5" maxlength="5" /> <select id="font_size_unit" name="font_size_unit">{S_FONT_SIZE_UNITS}</select></dd>
</dl>
<dl>
<dt><label for="font_weight">{L_BOLD}:</label></dt>
@@ -353,6 +341,7 @@
<!-- ENDIF -->
<fieldset class="submit-buttons">
<legend>{L_SUBMIT}</legend>
{S_HIDDEN_FIELDS}
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<!-- IF S_SHOWCSS -->
@@ -377,13 +366,13 @@
<fieldset>
<legend>{L_CUSTOM_CLASS}</legend>
<dl>
<dt><label for="custom_class">{L_CSS_CLASS_NAME}:</label></dt></dt>
<dt><label for="custom_class">{L_CSS_CLASS_NAME}:</label></dt>
<dd><input id="custom_class" name="custom_class" type="text" value="" maxlength="40" size="40" /></dd>
</dl>
</fieldset>
<fieldset class="quick">
<p class="quick">
<input class="button1" type="submit" id="add_custom" name="add_custom" value="{L_SUBMIT}" />
</p>
</fieldset>
</form>
@@ -392,7 +381,7 @@
<!-- ELSEIF S_CACHE -->
<script language="Javascript" type="text/javascript">
<script type="text/javascript">
<!--
function viewsource(url)
@@ -411,6 +400,8 @@
<p>{L_TEMPLATE_CACHE_EXPLAIN}</p>
<form name="acp_styles" method="post" action="{U_ACTION}">
<fieldset class="tabulated">
<legend>{L_TEMPLATE_CACHE}</legend>
<table cellspacing="1">
<thead>
@@ -439,10 +430,11 @@
</tbody>
</table>
<fieldset class="quick">
<span class="small"><a href="javascript:marklist('acp_styles', 'delete', true);">Mark all</a> :: <a href="javascript:marklist('acp_styles', 'delete', false);">Unmark all</a></span><br />
<p class="quick">
<span class="small"><a href="#" onclick="marklist('acp_styles', 'delete', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('acp_styles', 'delete', false); return false;">{L_UNMARK_ALL}</a></span><br />
<input class="button1" type="submit" id="submit" name="submit" value="{L_DELETE_MARKED}" />
</p>
</fieldset>
</form>
@@ -492,10 +484,10 @@
<dt><label for="format">{L_ARCHIVE_FORMAT}:</label></dt>
<dd>{FORMAT_BUTTONS}</dd>
</dl>
</fieldset>
<fieldset class="quick">
<p class="quick">
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
</p>
</fieldset>
</form>
@@ -537,7 +529,7 @@
<!-- ENDIF -->
{installed.S_ACTIONS}
<!-- IF S_STYLE -->
| <a href="{installed.U_PREVIEW}" onclick="this.target='_preview';">{L_PREVIEW}</a>
| <a href="{installed.U_PREVIEW}">{L_PREVIEW}</a>
<!-- ENDIF -->
</td>
<!-- END installed -->
@@ -562,6 +554,7 @@
<form id="acp_styles" method="post" action="{U_ACTION}">
<fieldset class="quick">
<legend>{L_CREATE}</legend>
{L_CREATE}: <input type="text" name="name" value="" /> {L_FROM} <select name="basis">{S_BASIS_OPTIONS}</select> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" />
</fieldset>
@@ -633,7 +626,8 @@
<!-- ENDIF -->
</fieldset>
<fieldset class="quick">
<fieldset class="submit-buttons">
<legend>{L_SUBMIT}</legend>
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
</fieldset>
@@ -641,4 +635,4 @@
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -0,0 +1,40 @@
<!-- INCLUDE overall_header.html -->
<a name="maincontent"></a>
<!-- IF S_VERSION_CHECK -->
<h1>{L_VERSION_CHECK}</h1>
<p>{L_VERSION_CHECK_EXPLAIN}</p>
<!-- IF S_UP_TO_DATE -->
<div class="successbox">
<p>{L_VERSION_UP_TO_DATE_ACP}</p>
</div>
<!-- ELSE -->
<div class="errorbox">
<p>{L_VERSION_NOT_UP_TO_DATE_ACP}</p>
</div>
<!-- ENDIF -->
<fieldset>
<legend></legend>
<dl>
<dt><label>{L_CURRENT_VERSION}</label></dt>
<dd><b>{CURRENT_VERSION}</b></dd>
</dl>
<dl>
<dt><label>{L_LATEST_VERSION}</label></dt>
<dd><b>{LATEST_VERSION}</b></dd>
</dl>
</fieldset>
<!-- IF not S_UP_TO_DATE -->
{UPDATE_INSTRUCTIONS}
<br /><br />
<!-- ENDIF -->
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -15,13 +15,13 @@
<dl>
<dt><label for="username">{L_FIND_USERNAME}:</label></dt>
<dd><input class="medium" type="text" id="username" name="username" /></dd>
<dd>[ <a href="#" onclick="window.open('{U_FIND_USERNAME}', '_phpbbsearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</dd>
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</dd>
<dd class="full" style="text-align: left;"><input type="checkbox" class="radio" id="anonymous" name="u" value="{ANONYMOUS_USER_ID}" /> &nbsp;{L_SELECT_ANONYMOUS}</dd>
</dl>
</fieldset>
<fieldset class="quick">
<p class="quick">
<input type="submit" name="submituser" value="{L_SUBMIT}" class="button1" />
</p>
</fieldset>
</form>
@@ -68,7 +68,7 @@
<form id="mode_select" method="post" action="{U_MODE_SELECT}">
<fieldset class="quick">
{L_SELECT_FORM}: <select name="mode" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_FORM_OPTIONS}</select>
{L_SELECT_FORM}: <select name="mode" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_FORM_OPTIONS}</select> <input class="button2" type="submit" value="{L_GO}" />
</fieldset>
</form>
@@ -86,6 +86,12 @@
<dd><input type="text" id="user" name="user" value="{USER}" /></dd>
<!-- IF U_SWITCH_PERMISSIONS --><dd>[ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]</dd><!-- ENDIF -->
</dl>
<!-- IF S_USER_INACTIVE -->
<dl>
<dt><label>{L_USER_IS_INACTIVE}:</label></dt>
<dd><strong>{USER_INACTIVE_REASON}</strong></dd>
</dl>
<!-- ENDIF -->
<dl>
<dt><label>{L_REGISTERED}:</label></dt>
<dd><strong>{USER_REGISTERED}</strong></dd>
@@ -94,7 +100,7 @@
<dl>
<dt><label>{L_REGISTERED_IP}:</label></dt>
<dd><a href="{U_SHOW_IP}">{REGISTERED_IP}</a></dd>
<dd>[ <a href="#" onclick="window.open('{U_WHOIS}', '_whois', 'height=500, resizable=yes, scrollbars=yes, width=700'); return false;">{L_WHOIS}</a> ]</strong></dd>
<dd>[ <a href="#" onclick="window.open('{U_WHOIS}', '_whois', 'height=500, resizable=yes, scrollbars=yes, width=700'); return false;">{L_WHOIS}</a> ]</dd>
</dl>
<!-- ENDIF -->
<dl>
@@ -168,7 +174,7 @@
<!-- IF PAGINATION -->
<div class="pagination">
<!-- IF PAGINATION -->
<a href="javascript:jumpto();" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
<!-- ELSE -->
{S_ON_PAGE}
<!-- ENDIF -->
@@ -542,26 +548,31 @@
var text_name = 'signature';
// Define the bbCode tags
bbcode = new Array();
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
imageTag = false;
bbcode = new Array();
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
imageTag = false;
// Helpline messages
b_help = "{LA_BBCODE_B_HELP}";
i_help = "{LA_BBCODE_I_HELP}";
u_help = "{LA_BBCODE_U_HELP}";
q_help = "{LA_BBCODE_Q_HELP}";
c_help = "{LA_BBCODE_C_HELP}";
l_help = "{LA_BBCODE_L_HELP}";
o_help = "{LA_BBCODE_O_HELP}";
p_help = "{LA_BBCODE_P_HELP}";
w_help = "{LA_BBCODE_W_HELP}";
a_help = "{LA_BBCODE_A_HELP}";
s_help = "{LA_BBCODE_S_HELP}";
f_help = "{LA_BBCODE_F_HELP}";
e_help = "{LA_BBCODE_E_HELP}";
d_help = "{LA_BBCODE_D_HELP}";
<!-- BEGIN custom_tags -->cb_{custom_tags.BBCODE_ID}_help = "{custom_tags.BBCODE_HELPLINE}";<!-- END custom_tags -->
// Helpline messages
var help_line = {
b: '{LA_BBCODE_B_HELP}',
i: '{LA_BBCODE_I_HELP}',
u: '{LA_BBCODE_U_HELP}',
q: '{LA_BBCODE_Q_HELP}',
c: '{LA_BBCODE_C_HELP}',
l: '{LA_BBCODE_L_HELP}',
o: '{LA_BBCODE_O_HELP}',
p: '{LA_BBCODE_P_HELP}',
w: '{LA_BBCODE_W_HELP}',
s: '{LA_BBCODE_S_HELP}',
f: '{LA_BBCODE_F_HELP}',
e: '{LA_BBCODE_E_HELP}',
d: '{LA_BBCODE_D_HELP}',
t: '{LA_BBCODE_T_HELP}',
tip: '{L_STYLES_TIP}'
<!-- BEGIN custom_tags -->
,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}'
<!-- END custom_tags -->
}
//-->
</script>
@@ -580,25 +591,31 @@
<legend>{L_SIGNATURE}</legend>
<p>{L_SIGNATURE_EXPLAIN}</p>
<div id="format-buttons">
<input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" />
<input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" />
<input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" />
<input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" />
<input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" />
<input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" />
<input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" />
<!-- IF S_BBCODE_IMG --><input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" /><!-- ENDIF -->
<input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseover="helpline('d')" />
<!-- IF S_BBCODE_FLASH --><input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" /><!-- ENDIF -->
<input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" />
<input type="button" class="button2" accesskey="t" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" />
<!-- IF S_BBCODE_IMG -->
<input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<!-- IF S_LINKS_ALLOWED -->
<input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<!-- IF S_BBCODE_FLASH -->
<input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
{L_FONT_SIZE}: <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')">
{L_FONT_SIZE}: <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')" onmouseout="helpline('tip')">
<option value="7">{L_FONT_TINY}</option>
<option value="9">{L_FONT_SMALL}</option>
<option value="12" selected="selected">{L_FONT_NORMAL}</option>
<option value="18">{L_FONT_LARGE}</option>
<option value="24">{L_FONT_HUGE}</option>
</select>
<a href="javascript:bbstyle(-1)" onmouseover="helpline('a')">{L_CLOSE_TAGS}</a>
<!-- IF .custom_tags -->
<br /><br />
<!-- BEGIN custom_tags -->
@@ -608,19 +625,18 @@
</div>
<p><input type="text" name="helpbox" value="{L_STYLES_TIP}" class="full" style="border: 0; background: none;" /></p>
<dl>
<dt style="width: 95px;"><script type="text/javascript"><!--
colorPalette('v', 17, 13);
//--></script>
</dt>
<dd style="text-align: left; margin-left: 95px;"><textarea name="signature" rows="10" cols="60" style="width: 80%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></dd>
<dd style="text-align: left; margin-left: 95px;">
<!-- IF S_BBCODE_ALLOWED --><input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} />&nbsp; {L_DISABLE_BBCODE} &nbsp;<!-- ENDIF -->
<!-- IF S_SMILIES_ALLOWED --><input type="checkbox" class="radio" name="disable_smilies"{S_SMILIES_CHECKED} />&nbsp; {L_DISABLE_SMILIES} &nbsp;<!-- ENDIF -->
<input type="checkbox" class="radio" name="disable_magic_url"{S_MAGIC_URL_CHECKED} />&nbsp; {L_DISABLE_MAGIC_URL} &nbsp;
<br /><br /><strong>{L_OPTIONS}: </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {SMILIES_STATUS}
</dd>
</dl>
<div style="text-align: left;"><textarea name="signature" rows="10" cols="60" style="width: 80%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></div>
<div><!-- IF S_BBCODE_ALLOWED -->
<input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} />&nbsp; {L_DISABLE_BBCODE} &nbsp;
<!-- ENDIF -->
<!-- IF S_SMILIES_ALLOWED -->
<input type="checkbox" class="radio" name="disable_smilies"{S_SMILIES_CHECKED} />&nbsp; {L_DISABLE_SMILIES} &nbsp;
<!-- ENDIF -->
<!-- IF S_LINKS_ALLOWED -->
<input type="checkbox" class="radio" name="disable_magic_url"{S_MAGIC_URL_CHECKED} />&nbsp; {L_DISABLE_MAGIC_URL} &nbsp;
<!-- ENDIF -->
<br /><br /><strong>{L_OPTIONS}: </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}
</div>
</fieldset>
<fieldset class="quick">
@@ -669,7 +685,7 @@
<div class="pagination" style="float: right;">
<!-- IF PAGINATION -->
<a href="javascript:jumpto();" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
<!-- ELSE -->
{S_ON_PAGE}
<!-- ENDIF -->
@@ -724,4 +740,4 @@
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -23,11 +23,11 @@
<dd><input id="replacement" type="text" name="replacement" value="{REPLACEMENT}" /></dd>
</dl>
{S_HIDDEN_FIELDS}
</fieldset>
<fieldset class="submit-buttons">
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="save" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
</fieldset>
</form>
@@ -40,12 +40,12 @@
<form id="acp_words" method="post" action="{U_ACTION}">
<fieldset class="quick">
<fieldset class="tabulated">
<legend>{L_ACP_WORDS}</legend>
<p class="quick">
{S_HIDDEN_FIELDS}
<input class="button2" name="add" type="submit" value="{L_ADD_WORD}" />
</fieldset>
</form>
</p>
<table cellspacing="1">
<thead>
@@ -67,6 +67,9 @@
</tbody>
</table>
</fieldset>
</form>
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -18,11 +18,12 @@ html {
font-size: 100%;
height: 100%;
margin-bottom: 1px;
background-color: #E4EDF0;
}
body {
/* Text-Sizing with ems: http://www.clagnut.com/blog/348/ */
font-family: Verdana, Helvetica, Arial, sans-serif;
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
color: #536482;
background: #E4EDF0 url("../images/bg_header.gif") 0 0 repeat-x;
font-size: 62.5%; /* This sets the default font size to be equivalent to 10px */
@@ -34,13 +35,13 @@ img {
}
h1 {
font: bold 1.8em 'Trebuchet MS', Verdana, sans-serif;
font: bold 1.8em "Lucida Grande", 'Trebuchet MS', Verdana, sans-serif;
text-decoration: none;
color: #333333;
}
h2, caption {
font: bold 1.2em Arial, Helvetica, sans-serif;
font: bold 1.2em "Lucida Grande", Arial, Helvetica, sans-serif;
text-decoration: none;
line-height: 120%;
text-align: left;
@@ -53,6 +54,12 @@ p {
font-size: 1.1em;
}
ul {
list-style: disc;
margin-left: 2em;
margin-bottom: 1em;
}
hr {
border: 0 none;
border-top: 1px solid #999999;
@@ -92,7 +99,7 @@ a:hover {
}
#page-header h1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
font-size: 1.5em;
font-weight: normal;
padding-top: 15px;
@@ -236,6 +243,7 @@ span.corners-top span, span.corners-bottom span {
#menu ul {
list-style: none;
margin: 0;
}
/* Default list state */
@@ -257,7 +265,7 @@ span.corners-top span, span.corners-bottom span {
border-top: 1px solid #FFFFFF;
}
#menu li a:hover span, #menu li#activemenu span {
#menu li a:hover span, #menu li#activemenu span, #menu li a:hover {
text-decoration: none;
background-color: #FFA34F;
color: #FFFFFF;
@@ -273,7 +281,7 @@ span.corners-top span, span.corners-bottom span {
display: block;
padding: 5px;
font-size: 0.9em;
font-family: Verdana;
font-family: "Lucida Grande", Verdana;
color: #FFA34F;
font-weight: bold;
background: #006699 url("../images/cellpic3.gif") 0 0 repeat-x;
@@ -303,7 +311,7 @@ table {
}
th, td {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
font-size: 1.1em;
text-align: left;
}
@@ -376,7 +384,7 @@ fieldset p {
legend {
padding: 1px 0;
font-family: arial,Verdana,Sans-serif;
font-family: "Lucida Grande", Arial, Verdana,Sans-serif;
font-size: 1.1em;
font-weight: bold;
color: #006699;
@@ -394,7 +402,7 @@ legend {
}
input {
font-family: Verdana, Helvetica, Arial, sans-serif;
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
font-size: 100%;
font-weight: normal;
background-color: #FAFAFA;
@@ -409,7 +417,7 @@ input {
}
select {
font-family: Verdana, Helvetica, Arial, sans-serif;
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
font-size: 100%;
font-weight: normal;
font-style: normal;
@@ -435,7 +443,7 @@ option {
}
textarea {
font-family: Verdana, Helvetica, Arial, sans-serif;
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
font-size: 100%;
width: 60%;
padding: 2px;
@@ -462,7 +470,7 @@ label img {
vertical-align: middle;
}
fieldset.quick {
fieldset.quick, p.quick {
margin: 0 0 5px 0;
padding: 5px 0 0 0;
border: none;
@@ -471,6 +479,14 @@ fieldset.quick {
font-size: 1.1em;
}
fieldset.quick legend {
display: none;
}
fieldset.tabulated {
background-color: #DADFE4;
}
fieldset.nobg {
margin: 15px 0 0 0;
padding: 0;
@@ -509,7 +525,7 @@ select#full_folder_action {
Other general def. list properties defined in prosilver_main.css
---------------------------------------- */
dl {
font-family: Verdana, Helvetica, Arial, sans-serif;
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
}
dt {
@@ -595,7 +611,7 @@ input:focus, textarea:focus {
}
/* Submit button fieldset
/* Submit button fieldset or paragraph
---------------------------------------- */
fieldset.submit-buttons {
text-align: center;
@@ -605,10 +621,21 @@ fieldset.submit-buttons {
margin-top: -1px;
}
fieldset.submit-buttons input {
p.submit-buttons {
text-align: center;
margin: 0;
padding: 4px;
margin-top: 10px;
}
fieldset.submit-buttons input, p.submit-buttons input {
padding: 3px 2px;
}
fieldset.submit-buttons legend {
display: none;
}
/* Input field styles
---------------------------------------- */
@@ -711,7 +738,7 @@ a.button1, input.button1, input.button3,
a.button2, input.button2 {
width: auto !important;
padding: 1px 3px 0 3px;
font-family: Verdana, Helvetica, Arial, sans-serif;
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
color: #000;
background-color: #EFEFEF;
cursor: pointer;
@@ -919,7 +946,8 @@ table.pmask td.name {
}
.errorbox {
background-color: #ECECEC;
background-color: #ECD7DA;
color: #990000;
}
.successbox h3, .errorbox h3 {
@@ -1010,7 +1038,7 @@ table.pmask td.name {
---------------------------------------- */
.sourcenum {
color: gray;
font-family: 'Courier New', monospace;
font-family: Monaco, 'Courier New', monospace;
font-size: 125%;
font-weight: bold;
line-height: 120%;
@@ -1019,7 +1047,7 @@ table.pmask td.name {
}
.source {
font-family: 'Courier New', monospace;
font-family: Monaco, 'Courier New', monospace;
font-size: 125%;
line-height: 120%;
padding: 0px;

View File

@@ -1,7 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="{S_USER_LANG}" />
<meta http-equiv="imagetoolbar" content="no" />
<title>{L_COLOUR_SWATCH}</title>
@@ -57,7 +59,7 @@
{
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
document.write('<td style="background-color: #' + color + ';" onmouseover="this.className=\'over\'" onmouseout="this.className=\'out\'">');
document.write('<a href="javascript:cell(\'' + color + '\');"><img src="{T_IMAGES_PATH}spacer.gif" width="15" height="12" alt="#' + color + '" title="#' + color + '" \/><\/a>');
document.write('<a href="#" onclick="cell(\'' + color + '\'); return false;"><img src="{T_IMAGES_PATH}spacer.gif" width="15" height="12" alt="#' + color + '" title="#' + color + '" \/><\/a>');
document.writeln('<\/td>');
}
}

View File

@@ -23,7 +23,7 @@ var is_mac = (clientPC.indexOf('mac') != -1);
*/
function helpline(help)
{
document.forms[form_name].helpbox.value = eval(help + '_help');
document.forms[form_name].helpbox.value = help_line[help];
}
/**
@@ -33,7 +33,7 @@ function getarraysize(thearray)
{
for (i = 0; i < thearray.length; i++)
{
if (thearray[i] == 'undefined' || thearray[i] == '' || thearray[i] == null)
if (typeof thearray[i] == 'undefined' || thearray[i] == '' || thearray[i] == null)
{
return i;
}
@@ -64,29 +64,18 @@ function arraypop(thearray)
return retval;
}
/**
* Insert emoticon
* bbstyle
*/
function smiley(text)
{
text = ' ' + text + ' ';
if (document.forms[form_name].elements[text_name].createTextRange && document.forms[form_name].elements[text_name].caretPos)
function bbstyle(bbnumber)
{
if (bbnumber != -1)
{
var caretPos = document.forms[form_name].elements[text_name].caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
document.forms[form_name].elements[text_name].focus();
}
else
{
var selStart = document.forms[form_name].elements[text_name].selectionStart;
var selEnd = document.forms[form_name].elements[text_name].selectionEnd;
mozWrap(document.forms[form_name].elements[text_name], text, '')
document.forms[form_name].elements[text_name].focus();
document.forms[form_name].elements[text_name].selectionStart = selStart + text.length;
document.forms[form_name].elements[text_name].selectionEnd = selEnd + text.length;
bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]);
} else {
insert_text('[*]');
document.forms[form_name].elements[text_name].focus();
}
}
@@ -96,7 +85,9 @@ function smiley(text)
function bbfontstyle(bbopen, bbclose)
{
theSelection = false;
document.forms[form_name].elements[text_name].focus();
var textarea = document.forms[form_name].elements[text_name];
textarea.focus();
if ((clientVer >= 4) && is_ie && is_win)
{
@@ -120,59 +111,81 @@ function bbfontstyle(bbopen, bbclose)
return;
}
// Close image tag before adding
if (imageTag)
{
insert_text(bbtags[15]);
// Remove the close image tag from the list
lastValue = arraypop(bbcode) - 1;
// Return button back to normal state
document.forms[form_name].addbbcode14.value = 'Img';
imageTag = false;
}
//The new position for the cursor after adding the bbcode
var new_pos = getCaretPosition(textarea).start + bbopen.length;
// Open tag
insert_text(bbopen + bbclose);
document.forms[form_name].elements[text_name].focus();
// Center the cursor when we don't have a selection
// Gecko and proper browsers
if (!isNaN(textarea.selectionStart))
{
textarea.selectionStart = new_pos;
textarea.selectionEnd = new_pos;
}
// IE
else if (document.selection)
{
var range = textarea.createTextRange();
range.move("character", new_pos);
range.select();
storeCaret(document.forms[form_name].elements[text_name]);
}
storeCaret(document.forms[form_name].elements[text_name]);
document.forms[form_name].elements[text_name].focus();
return;
}
/**
* Insert text at position
*/
function insert_text(text)
function insert_text(text, spaces, popup)
{
if (document.forms[form_name].elements[text_name].createTextRange && document.forms[form_name].elements[text_name].caretPos)
var textarea;
if (!popup)
{
var caretPos = document.forms[form_name].elements[text_name].caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
textarea = document.forms[form_name].elements[text_name];
} else
{
textarea = opener.document.forms[form_name].elements[text_name];
}
else if (document.forms[form_name].elements[text_name].selectionStart)
if (spaces)
{
var selStart = document.forms[form_name].elements[text_name].selectionStart;
var selEnd = document.forms[form_name].elements[text_name].selectionEnd;
text = ' ' + text + ' ';
}
if (!isNaN(textarea.selectionStart))
{
var sel_start = textarea.selectionStart;
var sel_end = textarea.selectionEnd;
mozWrap(document.forms[form_name].elements[text_name], text, '')
document.forms[form_name].elements[text_name].selectionStart = selStart + text.length;
document.forms[form_name].elements[text_name].selectionEnd = selEnd + text.length;
mozWrap(textarea, text, '')
textarea.selectionStart = sel_start + text.length;
textarea.selectionEnd = sel_end + text.length;
}
else if (textarea.createTextRange && textarea.caretPos)
{
var caret_pos = textarea.caretPos;
caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;
}
else
{
document.forms[form_name].elements[text_name].value = document.forms[form_name].elements[text_name].value + text;
textarea.value = textarea.value + text;
}
document.forms[form_name].elements[text_name].focus();
}
/**
* Add inline attachment at position
*/
function attach_inline()
function attach_inline(index, filename)
{
insert_text('[attachment=' + document.forms[form_name].elements['attachments'].value + ']' + document.forms[form_name].elements['attachments'].options[document.forms[form_name].elements['attachments'].selectedIndex].text + '[/attachment]');
insert_text('[attachment=' + index + ']' + filename + '[/attachment]');
document.forms[form_name].elements[text_name].focus();
}
@@ -187,11 +200,11 @@ function addquote(post_id, username)
if (document.all)
{
eval('divarea = document.all.' + message_name + ';');
divarea = document.all[message_name];
}
else
{
eval("divarea = document.getElementById('" + message_name + "');");
divarea = document.getElementById(message_name);
}
// Get text selection - not only the post content :(
@@ -208,9 +221,17 @@ function addquote(post_id, username)
theSelection = document.selection.createRange().text;
}
if (theSelection == '')
if (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null)
{
if (document.all)
if (divarea.innerHTML)
{
theSelection = divarea.innerHTML.replace(/<br>/ig, '\n');
theSelection = theSelection.replace(/<br\/>/ig, '\n');
theSelection = theSelection.replace(/&lt\;/ig, '<');
theSelection = theSelection.replace(/&gt\;/ig, '>');
theSelection = theSelection.replace(/&amp\;/ig, '&');
}
else if (document.all)
{
theSelection = divarea.innerText;
}
@@ -232,185 +253,6 @@ function addquote(post_id, username)
return;
}
/**
* bbstyle
*/
function bbstyle(bbnumber)
{
donotinsert = false;
theSelection = false;
bblast = 0;
document.forms[form_name].elements[text_name].focus();
// Close all open tags & default button names
if (bbnumber == -1)
{
while (bbcode[0])
{
butnumber = arraypop(bbcode) - 1;
document.forms[form_name].elements[text_name].value += bbtags[butnumber + 1];
buttext = eval('document.forms[form_name].addbbcode' + butnumber + '.value');
if (buttext != '[*]')
{
eval('document.forms[form_name].addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
}
}
document.forms[form_name].addbbcode10.value = 'List';
bbtags[10] = '[list]';
document.forms[form_name].addbbcode12.value = 'List=';
bbtags[12] = '[list=]';
// All tags are closed including image tags :D
imageTag = false;
document.forms[form_name].elements[text_name].focus();
return;
}
// [*] doesn't have an end tag
noEndTag = (bbtags[bbnumber] == '[*]')
if ((clientVer >= 4) && is_ie && is_win)
{
// Get text selection
theSelection = document.selection.createRange().text;
if (theSelection)
{
// Add tags around selection
document.selection.createRange().text = bbtags[bbnumber] + theSelection + ((!noEndTag) ? bbtags[bbnumber+1] : '');
document.forms[form_name].elements[text_name].focus();
theSelection = '';
return;
}
}
else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0))
{
mozWrap(document.forms[form_name].elements[text_name], bbtags[bbnumber], ((!noEndTag) ? bbtags[bbnumber+1] : ''));
document.forms[form_name].elements[text_name].focus();
theSelection = '';
return;
}
// Find last occurance of an open tag the same as the one just clicked
for (i = 0; i < bbcode.length; i++)
{
if (bbcode[i] == bbnumber+1)
{
bblast = i;
donotinsert = true;
}
}
if (bbnumber == 10 && bbtags[10] != '[*]')
{
if (donotinsert)
{
document.forms[form_name].addbbcode12.value = 'List=';
tmp_help = o_help;
o_help = e_help;
e_help = tmp_help;
bbtags[12] = '[list=]';
}
else
{
document.forms[form_name].addbbcode12.value = '[*]';
tmp_help = o_help;
o_help = e_help;
e_help = tmp_help;
bbtags[12] = '[*]';
}
}
if (bbnumber == 12 && bbtags[12] != '[*]')
{
if (donotinsert)
{
document.forms[form_name].addbbcode10.value = 'List';
tmp_help = l_help;
l_help = e_help;
e_help = tmp_help;
bbtags[10] = '[list]';
}
else
{
document.forms[form_name].addbbcode10.value = '[*]';
tmp_help = l_help;
l_help = e_help;
e_help = tmp_help;
bbtags[10] = '[*]';
}
}
// Close all open tags up to the one just clicked & default button names
if (donotinsert)
{
while (bbcode[bblast])
{
butnumber = arraypop(bbcode) - 1;
if (bbtags[butnumber] != '[*]')
{
insert_text(bbtags[butnumber + 1]);
}
else
{
insert_text(bbtags[butnumber]);
}
buttext = eval('document.forms[form_name].addbbcode' + butnumber + '.value');
if (bbtags[butnumber] != '[*]')
{
eval('document.forms[form_name].addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
}
imageTag = false;
}
document.forms[form_name].elements[text_name].focus();
return;
}
else
{
// Open tags
// Close image tag before adding another
if (imageTag && (bbnumber != 14))
{
insert_text(bbtags[15]);
// Remove the close image tag from the list
lastValue = arraypop(bbcode) - 1;
// Return button back to normal state
document.forms[form_name].addbbcode14.value = 'Img';
imageTag = false;
}
// Open tag
insert_text(bbtags[bbnumber]);
// Check to stop additional tags after an unclosed image tag
if (bbnumber == 14 && imageTag == false)
{
imageTag = 1;
}
if (bbtags[bbnumber] != '[*]')
{
arraypush(bbcode, bbnumber + 1);
eval('document.forms[form_name].addbbcode'+bbnumber+'.value += "*"');
}
document.forms[form_name].elements[text_name].focus();
return;
}
storeCaret(document.forms[form_name].elements[text_name]);
}
/**
* From http://www.massless.org/mozedit/
*/
@@ -440,7 +282,7 @@ function mozWrap(txtarea, open, close)
}
/**
* Insert at Claret position. Code from
* Insert at Caret position. Code from
* http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
*/
function storeCaret(textEl)
@@ -465,7 +307,7 @@ function colorPalette(dir, width, height)
numberList[3] = 'BF';
numberList[4] = 'FF';
document.write('<table cellspacing="1" cellpadding="0" border="0" class="type2">');
document.writeln('<table cellspacing="1" cellpadding="0" border="0">');
for (r = 0; r < 5; r++)
{
@@ -484,8 +326,8 @@ function colorPalette(dir, width, height)
for (b = 0; b < 5; b++)
{
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
document.write('<td style="line-height: ' + height + 'px; background-color:#' + color + '; width: ' + width + 'px; height: ' + height + 'px;">');
document.write('<a href="javascript:bbfontstyle(\'[color=#' + color + ']\', \'[/color]\');" onmouseover="helpline(\'s\');"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
document.write('<td bgcolor="#' + color + '">');
document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;" onmouseover="helpline(\'s\');" onmouseout="helpline(\'tip\');"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
document.writeln('</td>');
}
@@ -502,3 +344,54 @@ function colorPalette(dir, width, height)
}
document.writeln('</table>');
}
/**
* Caret Position object
*/
function caretPosition()
{
var start = null;
var end = null;
}
/**
* Get the caret position in an textarea
*/
function getCaretPosition(txtarea)
{
var caretPos = new caretPosition();
// simple Gecko/Opera way
if(txtarea.selectionStart || txtarea.selectionStart == 0)
{
caretPos.start = txtarea.selectionStart;
caretPos.end = txtarea.selectionEnd;
}
// dirty and slow IE way
else if(document.selection)
{
// get current selection
var range = document.selection.createRange();
// a new selection of the whole textarea
var range_all = document.body.createTextRange();
range_all.moveToElementText(txtarea);
// calculate selection start point by moving beginning of range_all to beginning of range
var sel_start;
for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++)
{
range_all.moveStart('character', 1);
}
txtarea.sel_start = sel_start;
// we ignore the end value for IE, this is already dirty enough and we don't need it
caretPos.start = txtarea.sel_start;
caretPos.end = txtarea.sel_start;
}
return caretPos;
}

View File

@@ -1,9 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="{S_USER_LANG}" />
<meta http-equiv="imagetoolbar" content="no" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>

View File

@@ -2,8 +2,8 @@
<form id="install_install" method="post" action="{U_ACTION}">
<h2>{TITLE}</h2>
<p>{BODY}</p>
<!-- IF TITLE --><h2>{TITLE}</h2><!-- ENDIF -->
<!-- IF BODY --><p>{BODY}</p><!-- ENDIF -->
<!-- IF .checks -->
<fieldset>
@@ -54,12 +54,11 @@
<!-- ENDIF -->
<!-- IF S_SHOW_DOWNLOAD -->
<fieldset>
<legend>{L_DL_CONFIG}</legend>
<p>{L_DL_CONFIG_EXPLAIN}</p>
</fieldset>
<h2>{L_DL_CONFIG}</h2>
<p>{L_DL_CONFIG_EXPLAIN}</p>
<fieldset class="submit-buttons">
<legend>{L_DL_CONFIG}</legend>
{S_HIDDEN}
<input class="button1" type="submit" id="dlconfig" name="dlconfig" value="{L_DL_DOWNLOAD}" />&nbsp;<input class="button1" type="submit" id="dldone" name="dldone" value="{L_DL_DONE}" />
</fieldset>
@@ -67,6 +66,7 @@
<!-- IF L_SUBMIT -->
<fieldset class="submit-buttons">
<legend>{L_SUBMIT}</legend>
{S_HIDDEN}
<!-- IF L_SUBMIT --><input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /><!-- ENDIF -->
</fieldset>
@@ -74,4 +74,4 @@
</form>
<!-- INCLUDE install_footer.html -->
<!-- INCLUDE install_footer.html -->

View File

@@ -0,0 +1,287 @@
<!-- INCLUDE install_header.html -->
<script type="text/javascript">
<!--
function popup(url, width, height)
{
window.open(url.replace(/&amp;/g, '&'), '_popup', 'height=' + height + ',resizable=yes,scrollbars=yes,width=' + width);
return false;
}
//-->
</script>
<!-- IF S_ERROR -->
<h1>{L_NOTICE}</h1>
<p style="color: red;">{ERROR_MSG}</p>
<!-- ENDIF -->
<!-- IF S_INTRO -->
<form id="install_update" method="post" action="{U_ACTION}">
<h1>{L_UPDATE_INSTALLATION}</h1>
<p>{L_UPDATE_INSTALLATION_EXPLAIN}</p>
<fieldset class="submit-buttons">
<input class="button1" type="submit" name="submit" value="{L_NEXT}" />
</fieldset>
</form>
<!-- ELSEIF S_UPLOAD_SUCCESS -->
<form id="install_update" method="post" action="{U_ACTION}">
<h1>{L_UPDATE_SUCCESS}</h1>
<p>{L_UPDATE_SUCCESS_EXPLAIN}</p>
<fieldset class="submit-buttons">
<input class="button1" type="submit" name="submit" value="{L_CHECK_FILES_AGAIN}" />
</fieldset>
</form>
<!-- ENDIF -->
<!-- IF S_VERSION_CHECK -->
<h1>{L_VERSION_CHECK}</h1>
<p>{L_VERSION_CHECK_EXPLAIN}</p>
<!-- IF S_UP_TO_DATE -->
<div class="successbox">
<p>{L_VERSION_UP_TO_DATE}</p>
</div>
<!-- ELSE -->
<div class="errorbox">
<p>{L_VERSION_NOT_UP_TO_DATE}</p>
</div>
<!-- ENDIF -->
<fieldset>
<legend></legend>
<dl>
<dt><label>{L_CURRENT_VERSION}</label></dt>
<dd><b>{CURRENT_VERSION}</b></dd>
</dl>
<dl>
<dt><label>{L_LATEST_VERSION}</label></dt>
<dd><b>{LATEST_VERSION}</b></dd>
</dl>
</fieldset>
<!-- IF not S_UP_TO_DATE -->
<form id="install_update" method="post" action="{U_ACTION}">
<fieldset class="submit-buttons">
<p>{L_CHECK_FILES_EXPLAIN}</p>
<input class="button1" type="submit" name="submit" value="{L_CHECK_FILES}" />
</fieldset>
</form>
<!-- ELSE -->
<form id="install_update" method="post" action="{U_ACTION}">
<fieldset class="submit-buttons">
<p>{L_CHECK_FILES_UP_TO_DATE}</p>
<input class="button1" type="submit" name="submit" value="{L_CHECK_FILES}" />
</fieldset>
</form>
<!-- ENDIF -->
<!-- ELSEIF S_FILE_CHECK -->
<h1>{L_COLLECTED_INFORMATION}</h1>
<p>{L_COLLECTED_INFORMATION_EXPLAIN}</p>
<!-- IF S_NO_UPDATE_FILES -->
<div class="errorbox">
<h3>{L_NO_UPDATE_FILES}</h3>
<p>{L_NO_UPDATE_FILES_EXPLAIN}</p><br />
<strong>{NO_UPDATE_FILES}</strong>
</div>
<!-- ENDIF -->
<form id="install_update" method="post" action="{U_UPDATE_ACTION}">
<!-- IF .files -->
<!-- BEGIN files -->
<!-- IF files.S_STATUS -->
<!-- IF not files.S_FIRST_ROW -->
</fieldset>
<!-- ENDIF -->
<h2>{files.TITLE}</h2>
<p>{files.EXPLAIN}</p>
<fieldset>
<legend><img src="{T_IMAGE_PATH}file_{files.STATUS}.gif" alt="{files.L_STATUS}" /></legend>
<!-- ELSE -->
<dl>
<!-- IF files.STATUS eq 'up_to_date' -->
<dd class="full" style="text-align: left;"><strong>{files.FILENAME}</strong></dd>
<!-- ELSE -->
<dt>
<strong>{files.FILENAME}</strong>
<!-- IF files.S_CUSTOM -->
<br /><span><em>{L_FILE_USED}: </em>{files.CUSTOM_ORIGINAL}</span>
<!-- ENDIF -->
<!-- IF files.NUM_CONFLICTS -->
<br /><span>{L_NUM_CONFLICTS}: {files.NUM_CONFLICTS}</span>
<!-- ENDIF -->
</dt>
<dd>[ <a href="{files.U_SHOW_DIFF}" onclick="popup('{files.U_SHOW_DIFF}', 700, 500); return false;">{files.L_SHOW_DIFF}</a> ]</dd>
<!-- IF files.S_CUSTOM -->
<dd><input type="checkbox" name="no_update[]" value="{files.FILENAME}" class="radio" />&nbsp; {L_DO_NOT_UPDATE}</dd>
<!-- ENDIF -->
<!-- IF files.STATUS eq 'conflict' -->
<dd><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="1" checked="checked" />&nbsp; {L_MERGE_NEW_FILE_OPTION}<br /><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="2" />&nbsp; {L_MERGE_MOD_FILE_OPTION}</dd>
<!-- ENDIF -->
<!-- ENDIF -->
</dl>
<!-- ENDIF -->
<!-- END files -->
</fieldset>
<!-- ENDIF -->
<br />
<fieldset class="quick">
<input class="button1" type="submit" name="check_again" value="{L_CHECK_FILES_AGAIN}" />
</fieldset>
<br />
<!-- IF S_ALL_UP_TO_DATE -->
</form>
<!-- IF S_VERSION_UP_TO_DATE -->
<p>{L_NO_DATABASE_UPDATE_NEEDED}</p>
<!-- ELSE -->
<form id="install_dbupdate" method="post" action="{U_DB_UPDATE_ACTION}">
<fieldset class="submit-buttons">
<p>{L_ALL_FILES_UP_TO_DATE}</p>
<input class="button1" type="submit" name="db_update" value="{L_UPDATE_DATABASE}" />
</fieldset>
<!-- ENDIF -->
<!-- ELSE -->
<h1>{L_UPDATE_METHOD}</h1>
<p>{L_UPDATE_METHOD_EXPLAIN}</p>
<fieldset class="submit-buttons">
<input class="button1" type="submit" name="ftp_upload" value="{L_FTP_UPDATE_METHOD}" />&nbsp; &nbsp;<input class="button1" type="submit" name="download" value="{L_DOWNLOAD_UPDATE_METHOD}" />
</fieldset>
<!-- ENDIF -->
</form>
<!-- ELSEIF S_DOWNLOAD_FILES -->
<h1>{L_SELECT_DOWNLOAD_FORMAT}</h1>
<p>{L_DOWNLOAD_UPDATE_METHOD_EXPLAIN}</p>
<form id="install_update" method="post" action="{U_ACTION}">
<fieldset>
<legend>{L_DOWNLOAD_AS}</legend>
<dl>
<dt><label for="use_method">{L_DOWNLOAD_AS}:</label></dt>
<dd>{RADIO_BUTTONS}</dd>
</dl>
</fieldset>
<fieldset class="submit-buttons">
{S_HIDDEN_FIELDS}
<input type="submit" class="button2" value="{L_CHECK_FILES_AGAIN}" name="check_again" />&nbsp; &nbsp;<input type="submit" class="button1" value="{L_DOWNLOAD}" name="download" />
</fieldset>
</form>
<br /><br />
<p>{L_MAPPING_FILE_STRUCTURE}</p>
<table cellspacing="1">
<col class="row1" /><col class="row2" /><col class="row1" />
<thead>
<tr>
<th style="width: 49%">{L_ARCHIVE_FILE}</th>
<th style="width: 2%">&nbsp;</th>
<th style="width: 49%">{L_DESTINATION}</th>
</tr>
</thead>
<tbody>
<!-- BEGIN location -->
<tr>
<td>{location.SOURCE}</td>
<td><strong>&raquo;</strong></td>
<td>{location.DESTINATION}</td>
</tr>
<!-- END location -->
</tbody>
</table>
<!-- ELSEIF S_FTP_UPLOAD -->
<h1>{L_SELECT_FTP_SETTINGS}</h1>
<form id="install_update" method="post" action="{U_ACTION}">
<!-- IF S_CONNECTION_SUCCESS -->
<div class="successbox">
<p>{L_CONNECTION_SUCCESS}</p>
</div>
<!-- ELSEIF S_CONNECTION_FAILED -->
<div class="errorbox">
<p>{L_CONNECTION_FAILED}<br />{ERROR_MSG}</p>
</div>
<!-- ENDIF -->
<fieldset>
<legend>{L_FTP_SETTINGS}</legend>
<dl>
<dt><label>{L_UPLOAD_METHOD}:</label></dt>
<dd><b>{UPLOAD_METHOD}</b></dd>
</dl>
<!-- BEGIN data -->
<dl>
<dt><label for="{data.DATA}">{data.NAME}:</label><br /><span>{data.EXPLAIN}</span></dt>
<dd><input type="text" id="{data.DATA}" name="{data.DATA}" value="{data.DEFAULT}" /></dd>
</dl>
<!-- END data -->
</fieldset>
<fieldset class="submit-buttons">
{S_HIDDEN_FIELDS}
<input class="button2" type="submit" name="check_again" value="{L_BACK}" />
<input class="button1" type="submit" name="test_connection" value="{L_TEST_CONNECTION}" />
<input class="button1" type="submit" name="submit" value="{L_UPDATE_FILES}" />
</fieldset>
</form>
<!-- ELSEIF S_DB_UPDATE -->
<h1>{L_PERFORM_DATABASE_UPDATE}</h1>
<p>
{L_PERFORM_DATABASE_UPDATE_EXPLAIN}<br />
<br />
<a href="{U_DB_UPDATE}"><strong>&raquo; {L_RUN_DATABASE_SCRIPT} &laquo;</strong></a>
</p>
<!-- ENDIF -->
<!-- INCLUDE install_footer.html -->

View File

@@ -0,0 +1,181 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="{S_USER_LANG}" />
<meta http-equiv="imagetoolbar" content="no" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
<style type="text/css">
<!--
#main {
font-size: 1.25em;
line-height: 0.7em;
margin: 0;
padding: 0;
width: 99%;
}
<!-- IF not S_DIFF_NEW_FILE -->
/**
* Unified Diff
*/
.file {
border: 1px solid #eee;
line-height: .7em;
}
.diff {
margin: 0;
}
.added {
background-color: #dfd;
}
.removed {
background-color: #fdd;
}
.info {
color: #888;
}
.context {
background-color: #eee;
}
/**
* Inline Diff
*/
.ins {
background-color: #dfd;
text-decoration: underline;
}
.del {
background-color: #fdd;
text-decoration: line-through;
}
/**
* Column Diff
*/
table.hrdiff {
width: 99%;
margin: 0 0 8px 5px;
}
table.hrdiff th {
text-align: left;
width: 50%;
color: #333;
font-family: Verdana,Helvetica,sans-serif;
font-size: 11px;
border-bottom: 1px solid #999;
background: transparent;
}
table.hrdiff thead th {
font-weight: bold;
font-size: 110%;
padding: 2px;
}
table.hrdiff tbody th {
padding: 2em 1px 1px 1px;
font-size: 80%;
}
table.hrdiff .unmodified {
background: #fff;
}
table.hrdiff .added {
background: #9f9;
}
table.hrdiff .added_empty {
background: #cfc;
}
table.hrdiff .modified {
background: #fd9;
}
table.hrdiff .removed {
background: #f99;
}
table.hrdiff .removed_empty {
background: #fcc;
}
table.hrdiff caption {
caption-side: top;
text-align: left;
margin: 0 0 8px 5px;
font-size: 90%;
font-weight: bold;
padding: 5px;
}
table.hrdiff caption span {
height: 10px;
width: 10px;
line-height: 10px;
letter-spacing: 10px;
border: 1px solid #000;
margin-left: 0.5em;
vertical-align: baseline;
}
<!-- ENDIF -->
//-->
</style>
</head>
<body>
<div id="wrap">
<div id="page-header">
<!-- IF S_DIFF_NEW_FILE -->
<h1>{L_VIEWING_FILE_CONTENTS}</h1>
<!-- ELSE -->
<h1>{L_VIEWING_FILE_DIFF}</h1>
<!-- ENDIF -->
<!-- IF not S_DIFF_NEW_FILE -->
<br />
<form method="post">
<label for="diff_mode">{L_SELECT_DIFF_MODE}:</label>
<select name="diff_mode" id="diff_mode">{S_DIFF_MODE_OPTIONS}</select>
<input class="button1" type="submit" id="submit" name="submit" value="{L_CHANGE}" />
</form>
<!-- ENDIF -->
</div>
<div id="page-body">
<div class="panel">
<span class="corners-top"><span></span></span>
<div id="content">
<div id="main">
<!-- IF S_DIFF_CONFLICT_FILE -->
<div style="float: right;"><strong>{L_NUM_CONFLICTS}: {NUM_CONFLICTS}</strong></div>
<!-- ENDIF -->
{DIFF_CONTENT}
</div>
</div>
<span class="corners-bottom"><span></span></span>
</div>
</div>
<!-- INCLUDE simple_footer.html -->

View File

@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
<div class="successbox">
<div <!-- IF S_USER_NOTICE -->class="successbox"<!-- ELSE -->class="errorbox"<!-- ENDIF -->>
<h3>{MESSAGE_TITLE}</h3>
<p>{MESSAGE_TEXT}</p>
</div>

View File

@@ -19,7 +19,7 @@
<div id="page-footer">
<!-- IF S_COPYRIGHT_HTML -->
Powered by phpBB {VERSION} &copy; 2006 <a href="http://www.phpbb.com/">phpBB Group</a>
{L_TRANSLATION_INFO}
<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF DEBUG_OUTPUT -->

View File

@@ -1,9 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="{S_USER_LANG}" />
<meta http-equiv="imagetoolbar" content="no" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
@@ -82,20 +83,31 @@ function marklist(id, name, state)
*/
function trace(link)
{
window.open(link, '_trace', 'height=515, resizable=yes, scrollbars=yes, width=680');
window.open(link.replace(/&amp;/g, '&'), '_trace', 'height=515, resizable=yes, scrollbars=yes, width=680');
return false;
}
<!-- IF S_INCLUDE_SWATCH -->
/**
* Color swatch
*/
function swatch()
{
window.open('{UA_SWATCH}', '_swatch', 'height=150, resizable=yes, scrollbars=no, width=636');
return false;
}
<!-- ENDIF -->
/**
* Find a member
*/
function find_username()
{
<!-- IF UA_FIND_USERNAME -->
window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740');
<!-- ENDIF -->
return false;
}
/**
* Color swatch
*/
function swatch(field)
{
<!-- IF UA_SWATCH -->
window.open('{UA_SWATCH}' + field, '_swatch', 'height=150, resizable=yes, scrollbars=no, width=636');
<!-- ENDIF -->
return false;
}
//-->
</script>

View File

@@ -160,7 +160,7 @@
<!-- IF not p_mask.S_VIEW --><input type="checkbox" class="radio" name="inherit[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" value="1" /><!-- ELSE -->&nbsp;<!-- ENDIF -->
</span>
</td>
<td>{p_mask.f_mask.PADDING}<!-- IF p_mask.f_mask.FOLDER_IMAGE --> {p_mask.f_mask.FOLDER_IMAGE} <!-- ENDIF --><a href="javascript:swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '0');">{p_mask.f_mask.NAME}</a></span></td>
<td><span>{p_mask.f_mask.PADDING}<!-- IF p_mask.f_mask.FOLDER_IMAGE --> {p_mask.f_mask.FOLDER_IMAGE} <!-- ENDIF --><a href="#" onclick="swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '0'); return false;">{p_mask.f_mask.NAME}</a></span></td>
<td style="text-align: right;">
<!-- IF p_mask.S_VIEW -->
&nbsp;
@@ -186,7 +186,7 @@
<!-- ELSE -->
<td class="preset preset_custom">
<!-- ENDIF -->
<a href="javascript:swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '{p_mask.f_mask.category.S_ROW_COUNT}');"><span></span></a></td>
<a href="#" onclick="swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '{p_mask.f_mask.category.S_ROW_COUNT}'); return false;">&nbsp;</a></td>
<!-- END category -->
</tr>
<tr class="row3">
@@ -199,9 +199,9 @@
</div>
<div style="float: right; text-align: right; width: 35%;">
<p class="small">
[<a href="javascript: mark_options('a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'y'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}');">{L_ALL_YES}</a>]<br />
[<a href="javascript: mark_options('a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'n'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}');">{L_ALL_NEVER}</a>]<br />
[<a href="javascript: mark_options('a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'u'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}');">{L_ALL_NO}</a>]
[<a href="#" onclick="mark_options('a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'y'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); return false;">{L_ALL_YES}</a>]<br />
[<a href="#" onclick="mark_options('a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'n'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); return false;">{L_ALL_NEVER}</a>]<br />
[<a href="#" onclick="mark_options('a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'u'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); return false;">{L_ALL_NO}</a>]
</p>
</div>
<!-- ELSE -->
@@ -220,16 +220,16 @@
<th scope="col">{L_ACL_YES}</th>
<th scope="col">{L_ACL_NEVER}</th>
<!-- ELSE -->
<th scope="col"><a href="javascript: mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'y'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}');">{L_ACL_YES}</a></th>
<th scope="col"><a href="javascript: mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'u'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}');">{L_ACL_NO}</a></th>
<th scope="col"><a href="javascript: mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'n'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}');">{L_ACL_NEVER}</a></th>
<th scope="col"><a href="#" onclick="mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'y'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); return false;">{L_ACL_YES}</a></th>
<th scope="col"><a href="#" onclick="mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'u'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); return false;">{L_ACL_NO}</a></th>
<th scope="col"><a href="#" onclick="mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'n'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); return false;">{L_ACL_NEVER}</a></th>
<!-- ENDIF -->
</tr>
</thead>
<tbody>
<!-- BEGIN mask -->
<!-- IF p_mask.f_mask.category.mask.S_ROW_COUNT is even --><tr class="row4"><!-- ELSE --><tr class="row3"><!-- ENDIF -->
<th><!-- IF p_mask.f_mask.category.mask.U_TRACE --><a href="#" onclick="javascript:trace('{p_mask.f_mask.category.mask.U_TRACE}')" title="{L_TRACE_SETTING}"><img src="images/icon_trace.gif" alt="{L_TRACE_SETTING}" /></a> <!-- ENDIF -->{p_mask.f_mask.category.mask.PERMISSION}</th>
<th><!-- IF p_mask.f_mask.category.mask.U_TRACE --><a href="#" onclick="trace('{p_mask.f_mask.category.mask.U_TRACE}'); return false;" title="{L_TRACE_SETTING}"><img src="images/icon_trace.gif" alt="{L_TRACE_SETTING}" /></a> <!-- ENDIF -->{p_mask.f_mask.category.mask.PERMISSION}</th>
<!-- IF p_mask.S_VIEW -->
<td<!-- IF p_mask.f_mask.category.mask.S_YES --> class="yes"<!-- ELSE --> class="no"<!-- ENDIF -->>&nbsp;</td>
<td<!-- IF p_mask.f_mask.category.mask.S_NEVER --> class="never"<!-- ELSE --> class="no"<!-- ENDIF -->>&nbsp;</td>

View File

@@ -1,4 +1,4 @@
<div style="text-align: right;"><a href="#" onclick="javascript: self.close();">{L_CLOSE_WINDOW}</a></div>
<div style="text-align: right;"><a href="#" onclick="self.close(); return false;">{L_CLOSE_WINDOW}</a></div>
<br /><br />
</div>
@@ -17,7 +17,7 @@
<!-- IF S_COPYRIGHT_HTML -->
<br />Powered by phpBB {VERSION} &copy; 2006 <a href="http://www.phpbb.com/">phpBB Group</a>
{TRANSLATION_INFO}
<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF DEBUG_OUTPUT -->

View File

@@ -1,9 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="{S_USER_LANG}" />
<meta http-equiv="imagetoolbar" content="no" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
@@ -72,16 +73,27 @@ function marklist(id, name, state)
}
}
<!-- IF S_INCLUDE_SWATCH -->
/**
* Color swatch
*/
function swatch()
{
window.open('{UA_SWATCH}', '_swatch', 'height=150, resizable=yes, scrollbars=no, width=636');
return false;
}
<!-- ENDIF -->
/**
* Find a member
*/
function find_username()
{
<!-- IF UA_FIND_USERNAME -->
window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740');
<!-- ENDIF -->
return false;
}
/**
* Color swatch
*/
function swatch(field)
{
<!-- IF UA_SWATCH -->
window.open('{UA_SWATCH}' + field, '_swatch', 'height=150, resizable=yes, scrollbars=no, width=636');
<!-- ENDIF -->
return false;
}
//-->
</script>

View File

@@ -31,8 +31,14 @@ $template->set_filenames(array(
$template->assign_vars(array(
'OPENER' => addslashes(request_var('form', '')),
'NAME' => request_var('name', ''),
'T_IMAGES_PATH' => "{$phpbb_root_path}images/",)
);
'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
'S_USER_LANG' => $user->lang['USER_LANG'],
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
'S_CONTENT_ENCODING' => 'UTF-8',
'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'],
'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'],
));
$template->display('body');

View File

@@ -99,7 +99,15 @@ else
if (defined('IN_CRON'))
{
chdir($phpbb_root_path);
$phpbb_root_path = getcwd() . '/';
if (@function_exists('getcwd'))
{
$phpbb_root_path = getcwd() . '/';
}
else
{
// This is a best guess
$phpbb_root_path = pathinfo($_SERVER['SCRIPT_FILENAME'], PATHINFO_DIRNAME) . '/';
}
}
if (!file_exists($phpbb_root_path . 'config.' . $phpEx))
@@ -170,6 +178,7 @@ require($phpbb_root_path . 'includes/auth.' . $phpEx);
require($phpbb_root_path . 'includes/functions.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
// Set PHP error handler to ours
set_error_handler('msg_handler');
@@ -189,13 +198,5 @@ unset($dbpasswd);
// Grab global variables, re-cache if necessary
$config = $cache->obtain_config();
$dss_seeded = false;
// Disable board if the install/ directory is still present
if (file_exists($phpbb_root_path . 'install') && !defined('ADMIN_START'))
{
$message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
trigger_error($message);
}
?>

View File

@@ -23,6 +23,15 @@ $auth->acl($user->data);
$cron_type = request_var('cron_type', '');
$use_shutdown_function = (@function_exists('register_shutdown_function')) ? true : false;
// Output transparent gif
header('Cache-Control: no-cache');
header('Content-type: image/gif');
header('Content-length: 43');
echo base64_decode('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
flush();
/**
* Run cron-like action
* Real cron-based layer will be introduced in 3.2
@@ -217,14 +226,6 @@ else
garbage_collection();
}
// Output transparent gif
header('Cache-Control: no-cache');
header('Content-type: image/gif');
header('Content-length: 43');
echo base64_decode('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
flush();
exit;
?>

View File

@@ -371,7 +371,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
switch ($sql_type)
{
case 'insert':
switch (SQL_LAYER)
switch ($db->sql_layer)
{
case 'mysql':
case 'mysql4':

View File

@@ -0,0 +1,174 @@
<?php
/**
* Only adjust bitfields, do not rewrite text...
* All new parsings have the img, flash and quote modes set to true
*
* You should make a backup from your users, posts and privmsgs table in case something goes wrong
* Forum descriptions and rules need to be re-submitted manually.
*/
die("Please read the first lines of this script for instructions on how to enable it");
set_time_limit(0);
define('IN_PHPBB', true);
$phpbb_root_path = './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$echos = 0;
// Adjust user signatures
$message_parser = new parse_message();
$message_parser->mode = 'sig';
$message_parser->bbcode_init();
$sql = 'SELECT user_id, user_sig, user_sig_bbcode_uid, user_sig_bbcode_bitfield
FROM ' . USERS_TABLE;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
// Convert bbcodes back to their normal form
if ($row['user_sig_bbcode_uid'] && $row['user_sig'])
{
decode_message($row['user_sig'], $row['user_sig_bbcode_uid']);
$message_parser->message = $row['user_sig'];
$message_parser->prepare_bbcodes();
$message_parser->parse_bbcode();
$bitfield = $message_parser->bbcode_bitfield;
$sql = 'UPDATE ' . USERS_TABLE . " SET user_sig_bbcode_bitfield = '" . $db->sql_escape($bitfield) . "'
WHERE user_id = " . $row['user_id'];
$db->sql_query($sql);
if ($echos > 200)
{
echo '<br />' . "\n";
$echos = 0;
}
echo '.';
$echos++;
flush();
}
else
{
$sql = 'UPDATE ' . USERS_TABLE . " SET user_sig_bbcode_bitfield = ''
WHERE user_id = " . $row['user_id'];
$db->sql_query($sql);
}
}
$db->sql_freeresult($result);
// Now adjust posts
$message_parser = new parse_message();
$message_parser->mode = 'post';
$message_parser->bbcode_init();
// Update posts
$sql = 'SELECT post_id, post_text, bbcode_uid, enable_bbcode, enable_smilies, enable_sig
FROM ' . POSTS_TABLE;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
// Convert bbcodes back to their normal form
if ($row['enable_bbcode'])
{
decode_message($row['post_text'], $row['bbcode_uid']);
$message_parser->message = $row['post_text'];
$message_parser->prepare_bbcodes();
$message_parser->parse_bbcode();
$bitfield = $message_parser->bbcode_bitfield;
$sql = 'UPDATE ' . POSTS_TABLE . " SET bbcode_bitfield = '" . $db->sql_escape($bitfield) . "'
WHERE post_id = " . $row['post_id'];
$db->sql_query($sql);
if ($echos > 200)
{
echo '<br />' . "\n";
$echos = 0;
}
echo '.';
$echos++;
flush();
}
else
{
$sql = 'UPDATE ' . POSTS_TABLE . " SET bbcode_bitfield = ''
WHERE post_id = " . $row['post_id'];
$db->sql_query($sql);
}
}
$db->sql_freeresult($result);
// Now to the private messages
$message_parser = new parse_message();
$message_parser->mode = 'post';
$message_parser->bbcode_init();
// Update pms
$sql = 'SELECT msg_id, message_text, bbcode_uid, enable_bbcode
FROM ' . PRIVMSGS_TABLE;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
// Convert bbcodes back to their normal form
if ($row['enable_bbcode'])
{
decode_message($row['message_text'], $row['bbcode_uid']);
$message_parser->message = $row['message_text'];
$message_parser->prepare_bbcodes();
$message_parser->parse_bbcode();
$bitfield = $message_parser->bbcode_bitfield;
$sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET bbcode_bitfield = '" . $db->sql_escape($bitfield) . "'
WHERE msg_id = " . $row['msg_id'];
$db->sql_query($sql);
if ($echos > 200)
{
echo '<br />' . "\n";
$echos = 0;
}
echo '.';
$echos++;
flush();
}
else
{
$sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET bbcode_bitfield = ''
WHERE msg_id = " . $row['msg_id'];
$db->sql_query($sql);
}
}
$db->sql_freeresult($result);
// Done
$db->sql_close();
?>

View File

@@ -0,0 +1,52 @@
<?php
/**
* Adjust username_clean column.
*
* You should make a backup from your users table in case something goes wrong
*/
die("Please read the first lines of this script for instructions on how to enable it");
set_time_limit(0);
define('IN_PHPBB', true);
$phpbb_root_path = './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$echos = 0;
$sql = 'SELECT user_id, username
FROM ' . USERS_TABLE;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$sql = 'UPDATE ' . USERS_TABLE . "
SET username_clean = '" . $db->sql_escape(utf8_clean_string($row['username'])) . "'
WHERE user_id = " . $row['user_id'];
$db->sql_query($sql);
if ($echos > 200)
{
echo '<br />' . "\n";
$echos = 0;
}
echo '.';
$echos++;
flush();
}
$db->sql_freeresult($result);
echo 'FINISHED';
// Done
$db->sql_close();
?>

View File

@@ -313,7 +313,7 @@ function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $m
else
{
// Rollback
if(SQL_LAYER == "mysql")
if($db->sql_layer == "mysql")
{
$sql = "DELETE FROM " . POSTS_TABLE . "
WHERE post_id = $new_post_id";

View File

@@ -25,7 +25,7 @@ if (!is_writeable($schema_path))
$schema_data = get_schema_struct();
$dbms_type_map = array(
'mysql' => array(
'mysql_41' => array(
'INT:' => 'int(%d)',
'BINT' => 'bigint(20)',
'UINT' => 'mediumint(8) UNSIGNED',
@@ -37,13 +37,45 @@ $dbms_type_map = array(
'VCHAR:' => 'varchar(%d)',
'CHAR:' => 'char(%d)',
'XSTEXT' => 'text',
'XSTEXT_UNI'=> 'varchar(100)',
'STEXT' => 'text',
'STEXT_UNI' => 'varchar(255)',
'TEXT' => 'text',
'TEXT_UNI' => 'text',
'MTEXT' => 'mediumtext',
'MTEXT_UNI' => 'mediumtext',
'TIMESTAMP' => 'int(11) UNSIGNED',
'DECIMAL' => 'decimal(5,2)',
'VCHAR_BIN' => 'varchar(252) /*!40101 CHARACTER SET utf8 */ BINARY',
'VCHAR_CI' => 'varchar(252)',
'VCHAR_UNI' => 'varchar(255)',
'VCHAR_UNI:'=> 'varchar(%d)',
'VCHAR_CI' => 'varchar(255)',
'VARBINARY' => 'varbinary(255)',
),
'mysql_40' => array(
'INT:' => 'int(%d)',
'BINT' => 'bigint(20)',
'UINT' => 'mediumint(8) UNSIGNED',
'UINT:' => 'int(%d) UNSIGNED',
'TINT:' => 'tinyint(%d)',
'USINT' => 'smallint(4) UNSIGNED',
'BOOL' => 'tinyint(1) UNSIGNED',
'VCHAR' => 'varchar(255)',
'VCHAR:' => 'varchar(%d)',
'CHAR:' => 'char(%d)',
'XSTEXT' => 'text',
'XSTEXT_UNI'=> 'text',
'STEXT' => 'text',
'STEXT_UNI' => 'text',
'TEXT' => 'text',
'TEXT_UNI' => 'text',
'MTEXT' => 'mediumtext',
'MTEXT_UNI' => 'mediumtext',
'TIMESTAMP' => 'int(11) UNSIGNED',
'DECIMAL' => 'decimal(5,2)',
'VCHAR_UNI' => 'text',
'VCHAR_UNI:'=> array('varchar(%d)', 'limit' => array('mult', 3, 255, 'text')),
'VCHAR_CI' => 'text',
'VARBINARY' => 'varbinary(255)',
),
@@ -55,18 +87,23 @@ $dbms_type_map = array(
'TINT:' => 'INTEGER',
'USINT' => 'INTEGER',
'BOOL' => 'INTEGER',
'VCHAR' => 'VARCHAR(255)',
'VCHAR:' => 'VARCHAR(%d)',
'CHAR:' => 'CHAR(%d)',
'XSTEXT' => 'BLOB SUB_TYPE TEXT',
'STEXT' => 'BLOB SUB_TYPE TEXT',
'TEXT' => 'BLOB SUB_TYPE TEXT',
'MTEXT' => 'BLOB SUB_TYPE TEXT',
'VCHAR' => 'VARCHAR(255) CHARACTER SET NONE',
'VCHAR:' => 'VARCHAR(%d) CHARACTER SET NONE',
'CHAR:' => 'CHAR(%d) CHARACTER SET NONE',
'XSTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
'STEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
'TEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
'MTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
'XSTEXT_UNI'=> 'VARCHAR(100) CHARACTER SET UTF8',
'STEXT_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
'TEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
'MTEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
'TIMESTAMP' => 'INTEGER',
'DECIMAL' => 'DOUBLE PRECISION',
'VCHAR_BIN' => 'VARCHAR(84) CHARACTER SET UNICODE_FSS',
'VCHAR_CI' => 'VARCHAR(252)',
'VARBINARY' => 'CHAR(255)',
'VCHAR_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
'VCHAR_UNI:'=> 'VARCHAR(%d) CHARACTER SET UTF8',
'VCHAR_CI' => 'VARCHAR(255) CHARACTER SET UTF8',
'VARBINARY' => 'CHAR(255) CHARACTER SET NONE',
),
'mssql' => array(
@@ -84,11 +121,16 @@ $dbms_type_map = array(
'STEXT' => '[varchar] (3000)',
'TEXT' => '[varchar] (8000)',
'MTEXT' => '[text]',
'XSTEXT_UNI'=> '[varchar] (100)',
'STEXT_UNI' => '[varchar] (255)',
'TEXT_UNI' => '[varchar] (4000)',
'MTEXT_UNI' => '[text]',
'TIMESTAMP' => '[int]',
'DECIMAL' => '[float]',
'VCHAR_BIN' => '[nvarchar] (252)',
'VCHAR_CI' => '[varchar] (252)',
'VARBINARY' => '[varbinary] (255)',
'VCHAR_UNI' => '[varchar] (255)',
'VCHAR_UNI:'=> '[varchar] (%d)',
'VCHAR_CI' => '[varchar] (255)',
'VARBINARY' => '[varchar] (255)',
),
'oracle' => array(
@@ -106,10 +148,15 @@ $dbms_type_map = array(
'STEXT' => 'varchar2(3000)',
'TEXT' => 'clob',
'MTEXT' => 'clob',
'XSTEXT_UNI'=> 'varchar2(300)',
'STEXT_UNI' => 'varchar2(765)',
'TEXT_UNI' => 'clob',
'MTEXT_UNI' => 'clob',
'TIMESTAMP' => 'number(11)',
'DECIMAL' => 'number(5, 2)',
'VCHAR_BIN' => 'nvarchar2(252)',
'VCHAR_CI' => 'varchar2(252)',
'VCHAR_UNI' => 'varchar2(765)',
'VCHAR_UNI:'=> array('varchar2(%d)', 'limit' => array('mult', 3, 765, 'clob')),
'VCHAR_CI' => 'varchar2(255)',
'VARBINARY' => 'raw(255)',
),
@@ -128,10 +175,15 @@ $dbms_type_map = array(
'STEXT' => 'text(65535)',
'TEXT' => 'text(65535)',
'MTEXT' => 'mediumtext(16777215)',
'XSTEXT_UNI'=> 'text(65535)',
'STEXT_UNI' => 'text(65535)',
'TEXT_UNI' => 'text(65535)',
'MTEXT_UNI' => 'mediumtext(16777215)',
'TIMESTAMP' => 'INTEGER UNSIGNED', //'int(11) UNSIGNED',
'DECIMAL' => 'decimal(5,2)',
'VCHAR_BIN' => 'nvarchar(252)',
'VCHAR_CI' => 'varchar(252)',
'VCHAR_UNI' => 'varchar(255)',
'VCHAR_UNI:'=> 'varchar(%d)',
'VCHAR_CI' => 'varchar(255)',
'VARBINARY' => 'blob',
),
@@ -150,9 +202,14 @@ $dbms_type_map = array(
'STEXT' => 'varchar(3000)',
'TEXT' => 'varchar(8000)',
'MTEXT' => 'TEXT',
'XSTEXT_UNI'=> 'varchar(100)',
'STEXT_UNI' => 'varchar(255)',
'TEXT_UNI' => 'varchar(4000)',
'MTEXT_UNI' => 'TEXT',
'TIMESTAMP' => 'INT4', // unsigned
'DECIMAL' => 'decimal(5,2)',
'VCHAR_BIN' => 'varchar(252)',
'VCHAR_UNI' => 'varchar(255)',
'VCHAR_UNI:'=> 'varchar(%d)',
'VCHAR_CI' => 'varchar_ci',
'VARBINARY' => 'bytea',
),
@@ -160,7 +217,7 @@ $dbms_type_map = array(
// A list of types being unsigned for better reference in some db's
$unsigned_types = array('UINT', 'UINT:', 'USINT', 'BOOL', 'TIMESTAMP');
$supported_dbms = array('firebird', 'mssql', 'mysql', 'oracle', 'postgres', 'sqlite');
$supported_dbms = array('firebird', 'mssql', 'mysql_40', 'mysql_41', 'oracle', 'postgres', 'sqlite');
foreach ($supported_dbms as $dbms)
{
@@ -171,7 +228,8 @@ foreach ($supported_dbms as $dbms)
// Write Header
switch ($dbms)
{
case 'mysql':
case 'mysql_40':
case 'mysql_41':
$line = "#\n# MySQL Schema for phpBB 3.x - (c) phpBB Group, 2005\n#\n# \$I" . "d: $\n#\n\n";
break;
@@ -209,7 +267,8 @@ foreach ($supported_dbms as $dbms)
// Write comment about table
switch ($dbms)
{
case 'mysql':
case 'mysql_40':
case 'mysql_41':
case 'firebird':
case 'sqlite':
fwrite($fp, "# Table: '{$table_name}'\n");
@@ -228,7 +287,8 @@ foreach ($supported_dbms as $dbms)
switch ($dbms)
{
case 'mysql':
case 'mysql_40':
case 'mysql_41':
case 'firebird':
case 'oracle':
case 'sqlite':
@@ -241,6 +301,9 @@ foreach ($supported_dbms as $dbms)
break;
}
// Table specific so we don't get overlap
$modded_array = array();
// Write columns one by one...
foreach ($table_data['COLUMNS'] as $column_name => $column_data)
{
@@ -248,14 +311,53 @@ foreach ($supported_dbms as $dbms)
if (strpos($column_data[0], ':') !== false)
{
list($orig_column_type, $column_length) = explode(':', $column_data[0]);
if (!is_array($dbms_type_map[$dbms][$orig_column_type . ':']))
{
$column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'], $column_length);
}
else
{
if (isset($dbms_type_map[$dbms][$orig_column_type . ':']['rule']))
{
switch ($dbms_type_map[$dbms][$orig_column_type . ':']['rule'][0])
{
case 'div':
$column_length /= $dbms_type_map[$dbms][$orig_column_type . ':']['rule'][1];
$column_length = ceil($column_length);
$column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'][0], $column_length);
break;
}
}
$column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'], $column_length);
if (isset($dbms_type_map[$dbms][$orig_column_type . ':']['limit']))
{
switch ($dbms_type_map[$dbms][$orig_column_type . ':']['limit'][0])
{
case 'mult':
$column_length *= $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][1];
if ($column_length > $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][2])
{
$column_type = $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][3];
$modded_array[$column_name] = $column_type;
}
else
{
$column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'][0], $column_length);
}
break;
}
}
}
$orig_column_type .= ':';
}
else
{
$orig_column_type = $column_data[0];
$column_type = $dbms_type_map[$dbms][$column_data[0]];
if ($column_type == 'text')
{
$modded_array[$column_name] = $column_type;
}
}
// Adjust default value if db-dependant specified
@@ -266,11 +368,12 @@ foreach ($supported_dbms as $dbms)
switch ($dbms)
{
case 'mysql':
case 'mysql_40':
case 'mysql_41':
$line .= "\t{$column_name} {$column_type} ";
// For hexadecimal values do not use single quotes
if (!is_null($column_data[1]))
if (!is_null($column_data[1]) && substr($column_type, -4) !== 'text')
{
$line .= (strpos($column_data[1], '0x') === 0) ? "DEFAULT {$column_data[1]} " : "DEFAULT '{$column_data[1]}' ";
}
@@ -308,7 +411,15 @@ foreach ($supported_dbms as $dbms)
$line .= 'DEFAULT ' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ' ';
}
$line .= "NOT NULL,\n";
$line .= 'NOT NULL';
// This is a UNICODE column and thus should be given it's fair share
if (preg_match('/^X?STEXT_UNI|VCHAR_(CI|UNI:?)/', $column_data[0]))
{
$line .= ' COLLATE UNICODE';
}
$line .= ",\n";
if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
{
@@ -412,7 +523,8 @@ foreach ($supported_dbms as $dbms)
switch ($dbms)
{
case 'mysql':
case 'mysql_40':
case 'mysql_41':
case 'postgres':
$line .= "\tPRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . "),\n";
break;
@@ -493,9 +605,22 @@ foreach ($supported_dbms as $dbms)
switch ($dbms)
{
case 'mysql':
case 'mysql_40':
case 'mysql_41':
$line .= ($key_data[0] == 'INDEX') ? "\tKEY" : '';
$line .= ($key_data[0] == 'UNIQUE') ? "\tUNIQUE" : '';
foreach ($key_data[1] as $key => $col_name)
{
if (isset($modded_array[$col_name]))
{
switch ($modded_array[$col_name])
{
case 'text':
$key_data[1][$key] = $col_name . '(255)';
break;
}
}
}
$line .= ' ' . $key_name . ' (' . implode(', ', $key_data[1]) . "),\n";
break;
@@ -544,12 +669,18 @@ foreach ($supported_dbms as $dbms)
switch ($dbms)
{
case 'mysql':
case 'mysql_40':
// Remove last line delimiter...
$line = substr($line, 0, -2);
$line .= "\n);\n\n";
break;
case 'mysql_41':
// Remove last line delimiter...
$line = substr($line, 0, -2);
$line .= "\n) CHARACTER SET `utf8` COLLATE `utf8_bin`;\n\n";
break;
// Create Generator
case 'firebird':
if ($generator !== false)
@@ -632,7 +763,7 @@ foreach ($supported_dbms as $dbms)
* VCHAR:x => varchar(x)
* TIMESTAMP => int(11) UNSIGNED
* DECIMAL => decimal number (5,2)
* VCHAR_BIN => varchar(252) BINARY
* VCHAR_UNI => varchar(255) BINARY
* VCHAR_CI => varchar_ci for postgresql, others VCHAR
*/
function get_schema_struct()
@@ -646,10 +777,11 @@ function get_schema_struct()
'topic_id' => array('UINT', 0),
'in_message' => array('BOOL', 0),
'poster_id' => array('UINT', 0),
'is_orphan' => array('BOOL', 1),
'physical_filename' => array('VCHAR', ''),
'real_filename' => array('VCHAR', ''),
'download_count' => array('UINT', 0),
'attach_comment' => array('TEXT', ''),
'attach_comment' => array('TEXT_UNI', ''),
'extension' => array('VCHAR:100', ''),
'mimetype' => array('VCHAR:100', ''),
'filesize' => array('UINT:20', 0),
@@ -662,7 +794,7 @@ function get_schema_struct()
'post_msg_id' => array('INDEX', 'post_msg_id'),
'topic_id' => array('INDEX', 'topic_id'),
'poster_id' => array('INDEX', 'poster_id'),
'filesize' => array('INDEX', 'filesize'),
'is_orphan' => array('INDEX', 'is_orphan'),
),
);
@@ -697,8 +829,8 @@ function get_schema_struct()
$schema_data['phpbb_acl_roles'] = array(
'COLUMNS' => array(
'role_id' => array('UINT', NULL, 'auto_increment'),
'role_name' => array('VCHAR', ''),
'role_description' => array('TEXT', ''),
'role_name' => array('VCHAR_UNI', ''),
'role_description' => array('TEXT_UNI', ''),
'role_type' => array('VCHAR:10', ''),
'role_order' => array('USINT', 0),
),
@@ -737,7 +869,7 @@ function get_schema_struct()
'ban_id' => array('UINT', NULL, 'auto_increment'),
'ban_userid' => array('UINT', 0),
'ban_ip' => array('VCHAR:40', ''),
'ban_email' => array('VCHAR:100', ''),
'ban_email' => array('VCHAR_UNI:100', ''),
'ban_start' => array('TIMESTAMP', 0),
'ban_end' => array('TIMESTAMP', 0),
'ban_exclude' => array('BOOL', 0),
@@ -757,14 +889,14 @@ function get_schema_struct()
'COLUMNS' => array(
'bbcode_id' => array('TINT:3', 0),
'bbcode_tag' => array('VCHAR:16', ''),
'bbcode_helpline' => array('VCHAR', ''),
'bbcode_helpline' => array('VCHAR_UNI', ''),
'display_on_posting' => array('BOOL', 0),
'bbcode_match' => array('TEXT', ''),
'bbcode_tpl' => array('MTEXT', ''),
'first_pass_match' => array('MTEXT', ''),
'first_pass_replace' => array('MTEXT', ''),
'second_pass_match' => array('MTEXT', ''),
'second_pass_replace' => array('MTEXT', ''),
'bbcode_match' => array('TEXT_UNI', ''),
'bbcode_tpl' => array('MTEXT_UNI', ''),
'first_pass_match' => array('MTEXT_UNI', ''),
'first_pass_replace' => array('MTEXT_UNI', ''),
'second_pass_match' => array('MTEXT_UNI', ''),
'second_pass_replace' => array('MTEXT_UNI', ''),
),
'PRIMARY_KEY' => 'bbcode_id',
'KEYS' => array(
@@ -788,7 +920,7 @@ function get_schema_struct()
'COLUMNS' => array(
'bot_id' => array('UINT', NULL, 'auto_increment'),
'bot_active' => array('BOOL', 1),
'bot_name' => array('STEXT', ''),
'bot_name' => array('STEXT_UNI', ''),
'user_id' => array('UINT', 0),
'bot_agent' => array('VCHAR', ''),
'bot_ip' => array('VCHAR', ''),
@@ -801,8 +933,8 @@ function get_schema_struct()
$schema_data['phpbb_config'] = array(
'COLUMNS' => array(
'config_name' => array('VCHAR:252', ''),
'config_value' => array('VCHAR', ''),
'config_name' => array('VCHAR', ''),
'config_value' => array('VCHAR_UNI', ''),
'is_dynamic' => array('BOOL', 0),
),
'PRIMARY_KEY' => 'config_name',
@@ -827,7 +959,7 @@ function get_schema_struct()
$schema_data['phpbb_disallow'] = array(
'COLUMNS' => array(
'disallow_id' => array('UINT', NULL, 'auto_increment'),
'disallow_username' => array('VCHAR:252', ''),
'disallow_username' => array('VCHAR_UNI:255', ''),
),
'PRIMARY_KEY' => 'disallow_id',
);
@@ -839,8 +971,8 @@ function get_schema_struct()
'topic_id' => array('UINT', 0),
'forum_id' => array('UINT', 0),
'save_time' => array('TIMESTAMP', 0),
'draft_subject' => array('XSTEXT', ''),
'draft_message' => array('MTEXT', ''),
'draft_subject' => array('XSTEXT_UNI', ''),
'draft_message' => array('MTEXT_UNI', ''),
),
'PRIMARY_KEY' => 'draft_id',
'KEYS' => array(
@@ -860,7 +992,7 @@ function get_schema_struct()
$schema_data['phpbb_extension_groups'] = array(
'COLUMNS' => array(
'group_id' => array('UINT', NULL, 'auto_increment'),
'group_name' => array('VCHAR', ''),
'group_name' => array('VCHAR_UNI', ''),
'cat_id' => array('TINT:2', 0),
'allow_group' => array('BOOL', 0),
'download_mode' => array('BOOL', 1),
@@ -879,19 +1011,19 @@ function get_schema_struct()
'left_id' => array('UINT', 0),
'right_id' => array('UINT', 0),
'forum_parents' => array('MTEXT', ''),
'forum_name' => array('STEXT', ''),
'forum_desc' => array('TEXT', ''),
'forum_desc_bitfield' => array('VCHAR:252', ''),
'forum_desc_options' => array('UINT:11', 0),
'forum_name' => array('STEXT_UNI', ''),
'forum_desc' => array('TEXT_UNI', ''),
'forum_desc_bitfield' => array('VCHAR:255', ''),
'forum_desc_options' => array('UINT:11', 7),
'forum_desc_uid' => array('VCHAR:5', ''),
'forum_link' => array('VCHAR', ''),
'forum_password' => array('VCHAR:40', ''),
'forum_link' => array('VCHAR_UNI', ''),
'forum_password' => array('VCHAR_UNI:40', ''),
'forum_style' => array('TINT:4', 0),
'forum_image' => array('VCHAR', ''),
'forum_rules' => array('TEXT', ''),
'forum_rules_link' => array('VCHAR', ''),
'forum_rules_bitfield' => array('VCHAR:252', ''),
'forum_rules_options' => array('UINT:11', 0),
'forum_rules' => array('TEXT_UNI', ''),
'forum_rules_link' => array('VCHAR_UNI', ''),
'forum_rules_bitfield' => array('VCHAR:255', ''),
'forum_rules_options' => array('UINT:11', 7),
'forum_rules_uid' => array('VCHAR:5', ''),
'forum_topics_per_page' => array('TINT:4', 0),
'forum_type' => array('TINT:4', 0),
@@ -901,8 +1033,10 @@ function get_schema_struct()
'forum_topics_real' => array('UINT', 0),
'forum_last_post_id' => array('UINT', 0),
'forum_last_poster_id' => array('UINT', 0),
'forum_last_post_subject' => array('XSTEXT_UNI', ''),
'forum_last_post_time' => array('TIMESTAMP', 0),
'forum_last_poster_name'=> array('VCHAR', ''),
'forum_last_poster_name'=> array('VCHAR_UNI', ''),
'forum_last_poster_colour'=> array('VCHAR:6', ''),
'forum_flags' => array('TINT:4', 32),
'display_on_index' => array('BOOL', 1),
'enable_indexing' => array('BOOL', 1),
@@ -955,10 +1089,11 @@ function get_schema_struct()
'COLUMNS' => array(
'group_id' => array('UINT', NULL, 'auto_increment'),
'group_type' => array('TINT:4', 1),
'group_founder_manage' => array('BOOL', 0),
'group_name' => array('VCHAR_CI', ''),
'group_desc' => array('TEXT', ''),
'group_desc_bitfield' => array('VCHAR:252', ''),
'group_desc_options' => array('UINT:11', 0),
'group_desc' => array('TEXT_UNI', ''),
'group_desc_bitfield' => array('VCHAR:255', ''),
'group_desc_options' => array('UINT:11', 7),
'group_desc_uid' => array('VCHAR:5', ''),
'group_display' => array('BOOL', 0),
'group_avatar' => array('VCHAR', ''),
@@ -998,9 +1133,9 @@ function get_schema_struct()
'lang_id' => array('TINT:4', NULL, 'auto_increment'),
'lang_iso' => array('VCHAR:30', ''),
'lang_dir' => array('VCHAR:30', ''),
'lang_english_name' => array('VCHAR:100', ''),
'lang_local_name' => array('VCHAR:255', ''),
'lang_author' => array('VCHAR:255', ''),
'lang_english_name' => array('VCHAR_UNI:100', ''),
'lang_local_name' => array('VCHAR_UNI:255', ''),
'lang_author' => array('VCHAR_UNI:255', ''),
),
'PRIMARY_KEY' => 'lang_id',
'KEYS' => array(
@@ -1018,8 +1153,8 @@ function get_schema_struct()
'reportee_id' => array('UINT', 0),
'log_ip' => array('VCHAR:40', ''),
'log_time' => array('TIMESTAMP', 0),
'log_operation' => array('TEXT', ''),
'log_data' => array('MTEXT', ''),
'log_operation' => array('TEXT_UNI', ''),
'log_data' => array('MTEXT_UNI', ''),
),
'PRIMARY_KEY' => 'log_id',
'KEYS' => array(
@@ -1035,9 +1170,9 @@ function get_schema_struct()
'COLUMNS' => array(
'forum_id' => array('UINT', 0),
'user_id' => array('UINT', 0),
'username' => array('VCHAR:252', ''),
'username' => array('VCHAR_UNI:255', ''),
'group_id' => array('UINT', 0),
'group_name' => array('VCHAR', ''),
'group_name' => array('VCHAR_UNI', ''),
'display_on_index' => array('BOOL', 1),
),
'KEYS' => array(
@@ -1072,7 +1207,7 @@ function get_schema_struct()
'COLUMNS' => array(
'poll_option_id' => array('TINT:4', 0),
'topic_id' => array('UINT', 0),
'poll_option_text' => array('TEXT', ''),
'poll_option_text' => array('TEXT_UNI', ''),
'poll_option_total' => array('UINT', 0),
),
'KEYS' => array(
@@ -1110,17 +1245,16 @@ function get_schema_struct()
'enable_smilies' => array('BOOL', 1),
'enable_magic_url' => array('BOOL', 1),
'enable_sig' => array('BOOL', 1),
'post_username' => array('VCHAR:252', ''),
'post_subject' => array('XSTEXT', ''),
'post_text' => array('MTEXT', ''),
'post_username' => array('VCHAR_UNI:255', ''),
'post_subject' => array('XSTEXT_UNI', ''),
'post_text' => array('MTEXT_UNI', ''),
'post_checksum' => array('VCHAR:32', ''),
'post_encoding' => array('VCHAR:20', 'iso-8859-1'),
'post_attachment' => array('BOOL', 0),
'bbcode_bitfield' => array('VCHAR:252', ''),
'bbcode_bitfield' => array('VCHAR:255', ''),
'bbcode_uid' => array('VCHAR:5', ''),
'post_postcount' => array('BOOL', 1),
'post_edit_time' => array('TIMESTAMP', 0),
'post_edit_reason' => array('STEXT', ''),
'post_edit_reason' => array('STEXT_UNI', ''),
'post_edit_user' => array('UINT', 0),
'post_edit_count' => array('USINT', 0),
'post_edit_locked' => array('BOOL', 0),
@@ -1132,8 +1266,7 @@ function get_schema_struct()
'poster_ip' => array('INDEX', 'poster_ip'),
'poster_id' => array('INDEX', 'poster_id'),
'post_approved' => array('INDEX', 'post_approved'),
'post_postcount' => array('INDEX', 'post_postcount'),
'post_time' => array('INDEX', 'post_time'),
'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
),
);
@@ -1149,18 +1282,17 @@ function get_schema_struct()
'enable_smilies' => array('BOOL', 1),
'enable_magic_url' => array('BOOL', 1),
'enable_sig' => array('BOOL', 1),
'message_subject' => array('XSTEXT', ''),
'message_text' => array('MTEXT', ''),
'message_edit_reason' => array('STEXT', ''),
'message_subject' => array('XSTEXT_UNI', ''),
'message_text' => array('MTEXT_UNI', ''),
'message_edit_reason' => array('STEXT_UNI', ''),
'message_edit_user' => array('UINT', 0),
'message_encoding' => array('VCHAR:20', 'iso-8859-1'),
'message_attachment' => array('BOOL', 0),
'bbcode_bitfield' => array('VCHAR:252', ''),
'bbcode_bitfield' => array('VCHAR:255', ''),
'bbcode_uid' => array('VCHAR:5', ''),
'message_edit_time' => array('TIMESTAMP', 0),
'message_edit_count' => array('USINT', 0),
'to_address' => array('TEXT', ''),
'bcc_address' => array('TEXT', ''),
'to_address' => array('TEXT_UNI', ''),
'bcc_address' => array('TEXT_UNI', ''),
),
'PRIMARY_KEY' => 'msg_id',
'KEYS' => array(
@@ -1175,7 +1307,7 @@ function get_schema_struct()
'COLUMNS' => array(
'folder_id' => array('UINT', NULL, 'auto_increment'),
'user_id' => array('UINT', 0),
'folder_name' => array('VCHAR', ''),
'folder_name' => array('VCHAR_UNI', ''),
'pm_count' => array('UINT', 0),
),
'PRIMARY_KEY' => 'folder_id',
@@ -1190,7 +1322,7 @@ function get_schema_struct()
'user_id' => array('UINT', 0),
'rule_check' => array('UINT', 0),
'rule_connection' => array('UINT', 0),
'rule_string' => array('VCHAR', ''),
'rule_string' => array('VCHAR_UNI', ''),
'rule_user_id' => array('UINT', 0),
'rule_group_id' => array('UINT', 0),
'rule_action' => array('UINT', 0),
@@ -1225,15 +1357,15 @@ function get_schema_struct()
$schema_data['phpbb_profile_fields'] = array(
'COLUMNS' => array(
'field_id' => array('UINT', NULL, 'auto_increment'),
'field_name' => array('VCHAR', ''),
'field_name' => array('VCHAR_UNI', ''),
'field_type' => array('TINT:4', 0),
'field_ident' => array('VCHAR:20', ''),
'field_length' => array('VCHAR:20', ''),
'field_minlen' => array('VCHAR', ''),
'field_maxlen' => array('VCHAR', ''),
'field_novalue' => array('VCHAR', ''),
'field_default_value' => array('VCHAR', ''),
'field_validation' => array('VCHAR:20', ''),
'field_novalue' => array('VCHAR_UNI', ''),
'field_default_value' => array('VCHAR_UNI', ''),
'field_validation' => array('VCHAR_UNI:20', ''),
'field_required' => array('BOOL', 0),
'field_show_on_reg' => array('BOOL', 0),
'field_hide' => array('BOOL', 0),
@@ -1261,7 +1393,7 @@ function get_schema_struct()
'lang_id' => array('UINT', 0),
'option_id' => array('UINT', 0),
'field_type' => array('TINT:4', 0),
'lang_value' => array('VCHAR', ''),
'lang_value' => array('VCHAR_UNI', ''),
),
'PRIMARY_KEY' => array('field_id', 'lang_id', 'option_id'),
);
@@ -1270,9 +1402,9 @@ function get_schema_struct()
'COLUMNS' => array(
'field_id' => array('UINT', 0),
'lang_id' => array('UINT', 0),
'lang_name' => array('VCHAR', ''),
'lang_explain' => array('TEXT', ''),
'lang_default_value' => array('VCHAR', ''),
'lang_name' => array('VCHAR_UNI', ''),
'lang_explain' => array('TEXT_UNI', ''),
'lang_default_value' => array('VCHAR_UNI', ''),
),
'PRIMARY_KEY' => array('field_id', 'lang_id'),
);
@@ -1280,7 +1412,7 @@ function get_schema_struct()
$schema_data['phpbb_ranks'] = array(
'COLUMNS' => array(
'rank_id' => array('UINT', NULL, 'auto_increment'),
'rank_title' => array('VCHAR', ''),
'rank_title' => array('VCHAR_UNI', ''),
'rank_min' => array('UINT', 0),
'rank_special' => array('BOOL', 0),
'rank_image' => array('VCHAR', ''),
@@ -1297,7 +1429,7 @@ function get_schema_struct()
'user_notify' => array('BOOL', 0),
'report_closed' => array('BOOL', 0),
'report_time' => array('TIMESTAMP', 0),
'report_text' => array('MTEXT', ''),
'report_text' => array('MTEXT_UNI', ''),
),
'PRIMARY_KEY' => 'report_id',
);
@@ -1305,8 +1437,8 @@ function get_schema_struct()
$schema_data['phpbb_reports_reasons'] = array(
'COLUMNS' => array(
'reason_id' => array('USINT', NULL, 'auto_increment'),
'reason_title' => array('VCHAR', ''),
'reason_description' => array('MTEXT', ''),
'reason_title' => array('VCHAR_UNI', ''),
'reason_description' => array('MTEXT_UNI', ''),
'reason_order' => array('USINT', 0),
),
'PRIMARY_KEY' => 'reason_id',
@@ -1316,7 +1448,7 @@ function get_schema_struct()
'COLUMNS' => array(
'search_key' => array('VCHAR:32', ''),
'search_time' => array('TIMESTAMP', 0),
'search_keywords' => array('MTEXT', ''),
'search_keywords' => array('MTEXT_UNI', ''),
'search_authors' => array('MTEXT', ''),
),
'PRIMARY_KEY' => 'search_key',
@@ -1325,7 +1457,7 @@ function get_schema_struct()
$schema_data['phpbb_search_wordlist'] = array(
'COLUMNS' => array(
'word_id' => array('UINT', NULL, 'auto_increment'),
'word_text' => array('VCHAR_BIN', ''),
'word_text' => array('VCHAR_UNI', ''),
'word_common' => array('BOOL', 0),
),
'PRIMARY_KEY' => 'word_id',
@@ -1355,7 +1487,7 @@ function get_schema_struct()
'session_time' => array('TIMESTAMP', 0),
'session_ip' => array('VCHAR:40', ''),
'session_browser' => array('VCHAR:150', ''),
'session_page' => array('VCHAR', ''),
'session_page' => array('VCHAR_UNI', ''),
'session_viewonline' => array('BOOL', 1),
'session_autologin' => array('BOOL', 0),
'session_admin' => array('BOOL', 0),
@@ -1393,11 +1525,11 @@ function get_schema_struct()
$schema_data['phpbb_smilies'] = array(
'COLUMNS' => array(
'smiley_id' => array('UINT', NULL, 'auto_increment'),
'code' => array('VCHAR:50', ''),
'emotion' => array('VCHAR:50', ''),
'code' => array('VCHAR_UNI:50', ''),
'emotion' => array('VCHAR_UNI:50', ''),
'smiley_url' => array('VCHAR:50', ''),
'smiley_width' => array('TINT:4', 0),
'smiley_height' => array('TINT:4', 0),
'smiley_width' => array('USINT', 0),
'smiley_height' => array('USINT', 0),
'smiley_order' => array('UINT', 0),
'display_on_posting'=> array('BOOL', 1),
),
@@ -1410,8 +1542,8 @@ function get_schema_struct()
$schema_data['phpbb_styles'] = array(
'COLUMNS' => array(
'style_id' => array('TINT:4', NULL, 'auto_increment'),
'style_name' => array('VCHAR:252', ''),
'style_copyright' => array('VCHAR', ''),
'style_name' => array('VCHAR_UNI:255', ''),
'style_copyright' => array('VCHAR_UNI', ''),
'style_active' => array('BOOL', 1),
'template_id' => array('TINT:4', 0),
'theme_id' => array('TINT:4', 0),
@@ -1429,10 +1561,10 @@ function get_schema_struct()
$schema_data['phpbb_styles_template'] = array(
'COLUMNS' => array(
'template_id' => array('TINT:4', NULL, 'auto_increment'),
'template_name' => array('VCHAR:252', ''),
'template_copyright' => array('VCHAR', ''),
'template_name' => array('VCHAR_UNI:255', ''),
'template_copyright' => array('VCHAR_UNI', ''),
'template_path' => array('VCHAR:100', ''),
'bbcode_bitfield' => array('VCHAR:252', 'kNg='),
'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
'template_storedb' => array('BOOL', 0),
),
'PRIMARY_KEY' => 'template_id',
@@ -1447,7 +1579,7 @@ function get_schema_struct()
'template_filename' => array('VCHAR:100', ''),
'template_included' => array('TEXT', ''),
'template_mtime' => array('TIMESTAMP', 0),
'template_data' => array('MTEXT', ''),
'template_data' => array('MTEXT_UNI', ''),
),
'KEYS' => array(
'tid' => array('INDEX', 'template_id'),
@@ -1458,12 +1590,12 @@ function get_schema_struct()
$schema_data['phpbb_styles_theme'] = array(
'COLUMNS' => array(
'theme_id' => array('TINT:4', NULL, 'auto_increment'),
'theme_name' => array('VCHAR:252', ''),
'theme_copyright' => array('VCHAR', ''),
'theme_name' => array('VCHAR_UNI:255', ''),
'theme_copyright' => array('VCHAR_UNI', ''),
'theme_path' => array('VCHAR:100', ''),
'theme_storedb' => array('BOOL', 0),
'theme_mtime' => array('TIMESTAMP', 0),
'theme_data' => array('MTEXT', ''),
'theme_data' => array('MTEXT_UNI', ''),
),
'PRIMARY_KEY' => 'theme_id',
'KEYS' => array(
@@ -1474,8 +1606,8 @@ function get_schema_struct()
$schema_data['phpbb_styles_imageset'] = array(
'COLUMNS' => array(
'imageset_id' => array('TINT:4', NULL, 'auto_increment'),
'imageset_name' => array('VCHAR:252', ''),
'imageset_copyright' => array('VCHAR', ''),
'imageset_name' => array('VCHAR_UNI:255', ''),
'imageset_copyright' => array('VCHAR_UNI', ''),
'imageset_path' => array('VCHAR:100', ''),
'site_logo' => array('VCHAR:200', ''),
@@ -1601,7 +1733,7 @@ function get_schema_struct()
'topic_attachment' => array('BOOL', 0),
'topic_approved' => array('BOOL', 1),
'topic_reported' => array('BOOL', 0),
'topic_title' => array('XSTEXT', ''),
'topic_title' => array('XSTEXT_UNI', ''),
'topic_poster' => array('UINT', 0),
'topic_time' => array('TIMESTAMP', 0),
'topic_time_limit' => array('TIMESTAMP', 0),
@@ -1611,16 +1743,19 @@ function get_schema_struct()
'topic_status' => array('TINT:3', 0),
'topic_type' => array('TINT:3', 0),
'topic_first_post_id' => array('UINT', 0),
'topic_first_poster_name' => array('VCHAR', ''),
'topic_first_poster_name' => array('VCHAR_UNI', ''),
'topic_first_poster_colour' => array('VCHAR:6', ''),
'topic_last_post_id' => array('UINT', 0),
'topic_last_poster_id' => array('UINT', 0),
'topic_last_poster_name' => array('VCHAR', ''),
'topic_last_poster_name' => array('VCHAR_UNI', ''),
'topic_last_poster_colour' => array('VCHAR:6', ''),
'topic_last_post_subject' => array('XSTEXT_UNI', ''),
'topic_last_post_time' => array('TIMESTAMP', 0),
'topic_last_view_time' => array('TIMESTAMP', 0),
'topic_moved_id' => array('UINT', 0),
'topic_bumped' => array('BOOL', 0),
'topic_bumper' => array('UINT', 0),
'poll_title' => array('XSTEXT', ''),
'poll_title' => array('XSTEXT_UNI', ''),
'poll_start' => array('TIMESTAMP', 0),
'poll_length' => array('TIMESTAMP', 0),
'poll_max_options' => array('TINT:4', 1),
@@ -1632,6 +1767,7 @@ function get_schema_struct()
'forum_id' => array('INDEX', 'forum_id'),
'forum_id_type' => array('INDEX', array('forum_id', 'topic_type')),
'last_post_time' => array('INDEX', 'topic_last_post_time'),
'topic_approved' => array('INDEX', 'topic_approved'),
'fid_time_moved' => array('INDEX', array('forum_id', 'topic_last_post_time', 'topic_moved_id')),
),
);
@@ -1695,25 +1831,29 @@ function get_schema_struct()
'user_ip' => array('VCHAR:40', ''),
'user_regdate' => array('TIMESTAMP', 0),
'username' => array('VCHAR_CI', ''),
'user_password' => array('VCHAR:40', ''),
'username_clean' => array('VCHAR_CI', ''),
'user_password' => array('VCHAR_UNI:40', ''),
'user_passchg' => array('TIMESTAMP', 0),
'user_email' => array('VCHAR:100', ''),
'user_pass_convert' => array('BOOL', 0),
'user_email' => array('VCHAR_UNI:100', ''),
'user_email_hash' => array('BINT', 0),
'user_birthday' => array('VCHAR:10', ''),
'user_lastvisit' => array('TIMESTAMP', 0),
'user_lastmark' => array('TIMESTAMP', 0),
'user_lastpost_time' => array('TIMESTAMP', 0),
'user_lastpage' => array('VCHAR:200', ''),
'user_lastpage' => array('VCHAR_UNI:200', ''),
'user_last_confirm_key' => array('VCHAR:10', ''),
'user_last_search' => array('TIMESTAMP', 0),
'user_warnings' => array('TINT:4', 0),
'user_last_warning' => array('TIMESTAMP', 0),
'user_login_attempts' => array('TINT:4', 0),
'user_inactive_reason' => array('TINT:2', 0),
'user_inactive_time' => array('TIMESTAMP', 0),
'user_posts' => array('UINT', 0),
'user_lang' => array('VCHAR:30', ''),
'user_timezone' => array('DECIMAL', 0),
'user_dst' => array('BOOL', 0),
'user_dateformat' => array('VCHAR:30', 'd M Y H:i'),
'user_dateformat' => array('VCHAR_UNI:30', 'd M Y H:i'),
'user_style' => array('TINT:4', 0),
'user_rank' => array('UINT', 0),
'user_colour' => array('VCHAR:6', ''),
@@ -1733,36 +1873,35 @@ function get_schema_struct()
'user_notify_pm' => array('BOOL', 1),
'user_notify_type' => array('TINT:4', 0),
'user_allow_pm' => array('BOOL', 1),
'user_allow_email' => array('BOOL', 1),
'user_allow_viewonline' => array('BOOL', 1),
'user_allow_viewemail' => array('BOOL', 1),
'user_allow_massemail' => array('BOOL', 1),
'user_options' => array('UINT:11', 893),
'user_avatar' => array('VCHAR', ''),
'user_avatar_type' => array('TINT:2', 0),
'user_avatar_width' => array('TINT:4', 0),
'user_avatar_height' => array('TINT:4', 0),
'user_sig' => array('MTEXT', ''),
'user_avatar_width' => array('USINT', 0),
'user_avatar_height' => array('USINT', 0),
'user_sig' => array('MTEXT_UNI', ''),
'user_sig_bbcode_uid' => array('VCHAR:5', ''),
'user_sig_bbcode_bitfield' => array('VCHAR:252', ''),
'user_from' => array('VCHAR:100', ''),
'user_sig_bbcode_bitfield' => array('VCHAR:255', ''),
'user_from' => array('VCHAR_UNI:100', ''),
'user_icq' => array('VCHAR:15', ''),
'user_aim' => array('VCHAR', ''),
'user_yim' => array('VCHAR', ''),
'user_msnm' => array('VCHAR', ''),
'user_jabber' => array('VCHAR', ''),
'user_website' => array('VCHAR:200', ''),
'user_occ' => array('VCHAR', ''),
'user_interests' => array('TEXT', ''),
'user_aim' => array('VCHAR_UNI', ''),
'user_yim' => array('VCHAR_UNI', ''),
'user_msnm' => array('VCHAR_UNI', ''),
'user_jabber' => array('VCHAR_UNI', ''),
'user_website' => array('VCHAR_UNI:200', ''),
'user_occ' => array('TEXT_UNI', ''),
'user_interests' => array('TEXT_UNI', ''),
'user_actkey' => array('VCHAR:32', ''),
'user_newpasswd' => array('VCHAR:32', ''),
'user_newpasswd' => array('VCHAR_UNI:32', ''),
),
'PRIMARY_KEY' => 'user_id',
'KEYS' => array(
'user_birthday' => array('INDEX', 'user_birthday'),
'user_email_hash' => array('INDEX', 'user_email_hash'),
'user_type' => array('INDEX', 'user_type'),
'username' => array('INDEX', 'username'),
'username_clean' => array('INDEX', 'username_clean'),
),
);
@@ -1780,8 +1919,8 @@ function get_schema_struct()
$schema_data['phpbb_words'] = array(
'COLUMNS' => array(
'word_id' => array('UINT', NULL, 'auto_increment'),
'word' => array('VCHAR', ''),
'replacement' => array('VCHAR', ''),
'word' => array('VCHAR_UNI', ''),
'replacement' => array('VCHAR_UNI', ''),
),
'PRIMARY_KEY' => 'word_id',
);
@@ -1858,7 +1997,7 @@ EOF;
/*
Domain definition
*/
CREATE DOMAIN varchar_ci AS varchar(252) NOT NULL DEFAULT ''::character varying;
CREATE DOMAIN varchar_ci AS varchar(255) NOT NULL DEFAULT ''::character varying;
/*
Operation Functions
@@ -1930,27 +2069,6 @@ CREATE OPERATOR =(
MERGES,
SORT1= <);
EOF;
break;
case 'firebird':
return <<<EOF
# Emulation of STRLEN, might need to be checked out for FB 2.0
DECLARE EXTERNAL FUNCTION STRLEN CSTRING(32767)
RETURNS INTEGER BY VALUE
ENTRY_POINT 'IB_UDF_strlen' MODULE_NAME 'ib_udf';;
# Emulation of LOWER, might need to be checked out for FB 2.0
DECLARE EXTERNAL FUNCTION LOWER CSTRING(80)
RETURNS CSTRING(80) FREE_IT
ENTRY_POINT 'IB_UDF_lower' MODULE_NAME 'ib_udf';;
# Only used for insertion of binary strings as defaults
DECLARE EXTERNAL FUNCTION ASCII_CHAR INTEGER
RETURNS CSTRING(1) FREE_IT
ENTRY_POINT 'IB_UDF_ascii_char' MODULE_NAME 'ib_udf';;
EOF;
break;
}

View File

@@ -12,7 +12,7 @@
// -------------------------------------------------------------
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpbb_root_path = './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
@@ -22,13 +22,13 @@ header('Expires: 0');
ignore_user_abort(true);
// number of topics to create
$num_topics = 5000000;
$num_topics = 10000;
// number of topics to be generated per call
$batch_size = 100000;
$batch_size = 2000;
// max number of posts per topic
$posts_per_topic = 500000;
$posts_per_topic = 500;
// general vars
@@ -40,7 +40,7 @@ switch ($mode)
case 'generate':
$user_ids = $forum_ids = $topic_rows = array();
$sql = 'SELECT user_id FROM ' . USERS_TABLE;
$sql = 'SELECT user_id FROM ' . USERS_TABLE . ' WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') OR user_id = ' . ANONYMOUS;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
@@ -60,7 +60,7 @@ switch ($mode)
{
$db->sql_query('TRUNCATE TABLE ' . POSTS_TABLE);
$db->sql_query('TRUNCATE TABLE ' . TOPICS_TABLE);
$db->sql_query('TRUNCATE TABLE ' . TOPICS_TABLE . '_prefetch');
// $db->sql_query('TRUNCATE TABLE ' . TOPICS_TABLE . '_prefetch');
}
$db->sql_query('LOCK TABLES ' . POSTS_TABLE . ' WRITE, ' . TOPICS_TABLE . ' WRITE');
@@ -86,7 +86,7 @@ switch ($mode)
$rows = array();
$post_time = mt_rand(0, time());
$num_posts = mt_rand(1, $posts_per_topic);
$num_posts = $posts_per_topic; //mt_rand(1, $posts_per_topic);
for ($i = 0; $i < $num_posts; ++$i)
{
$poster_id = $user_ids[array_rand($user_ids)];
@@ -108,18 +108,20 @@ switch ($mode)
if ($topic_id >= $num_topics)
{
echo '<meta http-equiv="refresh" content="0; url=fill.' . $phpEx . '?mode=sync&amp;' . time() . '">And now for something completely different...';
echo '<meta http-equiv="refresh" content="10; url=fill.' . $phpEx . '?mode=sync&amp;' . time() . '">And now for something completely different...';
$db->sql_query('ANALYZE TABLES ' . TOPICS_TABLE . ', ' . POSTS_TABLE);
flush();
}
else
{
echo '<meta http-equiv="refresh" content="0; url=fill.' . $phpEx . '?start=' . $topic_id . '&amp;' . time() . '">To the next page... (' . $topic_id . '/' . $num_topics . ')';
echo '<meta http-equiv="refresh" content="10; url=fill.' . $phpEx . '?start=' . $topic_id . '&amp;' . time() . '">To the next page... (' . $topic_id . '/' . $num_topics . ')';
flush();
}
break;
case 'sync':
error_reporting(E_ALL);
/* error_reporting(E_ALL);
$sync_all = TRUE;
if ($sync_all)
@@ -158,8 +160,11 @@ switch ($mode)
{
trigger_error('Done');
}
*/
}
$db->sql_close();
function rndm_username()
{
static $usernames;

View File

@@ -0,0 +1,147 @@
<?php
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
if (php_sapi_name() != 'cli')
{
die("This program must be run from the command line.\n");
}
set_time_limit(0);
define('IN_PHPBB', true);
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
echo "Checking for required files\n";
download('http://unicode.org/Public/UNIDATA/CaseFolding.txt');
echo "\n";
/**
* Load the CaseFolding table
*/
echo "Loading CaseFolding\n";
$unidata = file_get_contents('CaseFolding.txt');
function utf8_chr($cp)
{
if ($cp > 0xFFFF)
{
return chr(0xF0 | ($cp >> 18)) . chr(0x80 | (($cp >> 12) & 0x3F)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
}
else if ($cp > 0x7FF)
{
return chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
}
else if ($cp > 0x7F)
{
return chr(0xC0 | ($cp >> 6)) . chr(0x80 | ($cp & 0x3F));
}
else
{
return chr($cp);
}
}
preg_match_all('/^([0-9A-F]+); ([CFS]); ([0-9A-F]+(?: [0-9A-F]+)*);/im', $unidata, $array, PREG_SET_ORDER);
$uniarray = array();
foreach ($array as $value)
{
$uniarray[$value[2]][utf8_chr(hexdec((string)$value[1]))] = implode(array_map('utf8_chr', array_map('hexdec', explode(' ', $value[3]))));
}
foreach ($uniarray as $idx => $contents)
{
echo "Writing to case_fold_$idx.$phpEx\n";
$fp = fopen($phpbb_root_path . 'includes/utf/data/case_fold_' . strtolower($idx) . '.' . $phpEx, 'wb');
fwrite($fp, '<?php return ' . my_var_export($contents) . ';');
fclose($fp);
}
/**
* Return a parsable string representation of a variable
*
* This is function is limited to array/strings/integers
*
* @param mixed $var Variable
* @return string PHP code representing the variable
*/
function my_var_export($var)
{
if (is_array($var))
{
$lines = array();
foreach ($var as $k => $v)
{
$lines[] = my_var_export($k) . '=>' . my_var_export($v);
}
return 'array(' . implode(',', $lines) . ')';
}
elseif (is_string($var))
{
return "'" . str_replace(array('\\', "'"), array('\\\\', "\\'"), $var) . "'";
}
else
{
return $var;
}
}
/**
* Download a file to the develop/ dir
*
* @param string $url URL of the file to download
* @return void
*/
function download($url)
{
global $phpbb_root_path;
if (file_exists($phpbb_root_path . 'develop/' . basename($url)))
{
return;
}
echo 'Downloading from ', $url, ' ';
if (!$fpr = fopen($url, 'rb'))
{
die("Can't download from $url\nPlease download it yourself and put it in the develop/ dir, kthxbai");
}
if (!$fpw = fopen($phpbb_root_path . 'develop/' . basename($url), 'wb'))
{
die("Can't open develop/" . basename($url) . " for output... please check your permissions or something");
}
$i = 0;
$chunk = 32768;
$done = '';
while (!feof($fpr))
{
$i += fwrite($fpw, fread($fpr, $chunk));
echo str_repeat("\x08", strlen($done));
$done = ($i >> 10) . ' KiB';
echo $done;
}
fclose($fpr);
fclose($fpw);
echo "\n";
}
?>

View File

@@ -48,7 +48,7 @@ $sql = "CREATE TABLE {$table_prefix}attachments
AND a.post_id = p.post_id";
$db->sql_query($sql);
switch (SQL_LAYER)
switch ($db->sql_layer)
{
case 'mysql':
case 'mysql4':

View File

@@ -54,7 +54,7 @@ $sql = "CREATE TABLE {$table_prefix}posts
WHERE pt.post_id = p.post_id";
$db->sql_query($sql);
switch (SQL_LAYER)
switch ($db->sql_layer)
{
case 'mysql':
case 'mysql4':
@@ -150,7 +150,7 @@ while ($row = $db->sql_fetchrow($result))
}
$db->sql_freeresult($result);
switch (SQL_LAYER)
switch ($db->sql_layer)
{
case 'oracle':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id

View File

@@ -23,18 +23,21 @@ phpBB Developers : Ashe (Ludovic Arnaud) - [10/2002 - 11/2003, 06/2006 - ]
BartVB (Bart van Bragt) - [11/2000 - 03/2006]
Original subSilver by subBlue Design, Tom Beddard, <EFBFBD> 2001 phpBB Group
Original subSilver by subBlue Design, Tom Beddard, (c) 2001 phpBB Group
phpBB3 contains code from the following applications:
LGPL licenced:
Smarty <EFBFBD> 2001, 2002 by ispi of Lincoln, Inc, http://smarty.php.net/
Text_Diff-0.2.1 http://pear.php.net/package/Text_Diff
Smarty (c) 2001, 2002 by ispi of Lincoln, Inc, http://smarty.php.net/
GPL licenced:
phpMyAdmin <EFBFBD> 2001,2003 phpMyAdmin Devel team, http://www.phpmyadmin.net/
Jabber class <EFBFBD> 2003 Carlo Zottmann, http://phpjabber.g-blog.net
phpMyAdmin (c) 2001,2003 phpMyAdmin Devel team, http://www.phpmyadmin.net/
Jabber Class (c) 2004 Nathan Fritz, http://cjphp.netflint.net
Chora (c) 2000-2006, The Horde Project. http://horde.org/chora/
Horde Project (c) 2000-2006, The Horde Project. http://horde.org/
PHP License, version 3.0:
Pear <EFBFBD> 2001-2004 PHP Group, http://pear.php.net
Pear (c) 2001-2004 PHP Group, http://pear.php.net
Text_Diff-0.2.1 http://pear.php.net/package/Text_Diff

View File

@@ -12,7 +12,6 @@
<meta name="author" content="phpBB Group" />
<meta name="copyright" content="phpBB Group" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<link rel="shortcut icon" href="" />
<style type="text/css">
<!--
@@ -151,6 +150,10 @@ p a {
.menu li a {
font-size: 100%;
}
.comment {
color: green;
}
//-->
</style>
@@ -179,7 +182,7 @@ body {
<a name="top"></a><div id="main">
<p>These are the phpBB Coding Guidelines for Olympus, all attempts should be made to follow it as closely as possible. This document is (c) 2006 phpBB Group, copying or redistribution is not allowed without permission.</p>
<p>These are the phpBB Coding Guidelines for Olympus, all attempts should be made to follow it as closely as possible.<br />This document is (c) 2006 phpBB Group, copying or redistribution is not allowed without permission.</p>
<h1>Coding Guidelines</h1>
@@ -214,12 +217,12 @@ body {
<div class="paragraph">
<h3>Tabs vs Spaces:</h3>
<p>In order to make this as simple as possible, we will be using tabs, not spaces. Feel free to set how many spaces your editor uses when it <b>displays</b> tabs, but make sure that when you <b>save</b> the file, it's saving tabs and not spaces. This way, we can each have the code be displayed the way we like it, without breaking the layout of the actual files.</p>
<p>Additionally please check your editor for the indent size. If tabs are set to 4 spaces for example, the indent size needs to be 4 too:</p>
<p>In order to make this as simple as possible, we will be using tabs, not spaces. We enforce 4 (four) spaces for one tab - therefore you need to set your tab width within your editor to 4 spaces. Make sure that when you <b>save</b> the file, it's saving tabs and not spaces. This way, we can each have the code be displayed the way we like it, without breaking the layout of the actual files.</p>
<p>Tabs in front of lines are no problem, but having them within the text can be a problem if you do not set it to the amount of spaces every one of us uses. Here is a short example of how it should look like:</p>
<blockquote><pre>
$mode{TAB}{TAB}= request_var('mode', '');
$search_id{TAB}= request_var('search_id', '');
{TAB}$mode{TAB}{TAB}= request_var('mode', '');
{TAB}$search_id{TAB}= request_var('search_id', '');
</pre></blockquote>
<p>If entered with tabs (replace the {TAB}) both equal signs need to be on the same column.</p>
@@ -280,9 +283,7 @@ $search_id{TAB}= request_var('search_id', '');
<blockquote><pre>
/**
*
* {HEADER}
*
*/
/**
@@ -304,31 +305,26 @@ class ...
<br /><br />
<div class="paragraph">
<p>Functions used by more than one page should be placed in functions.php, functions specific to one page should be placed on that page (at the bottom) or within the relevant sections functions file.</p>
<p>Functions used by more than one page should be placed in functions.php, functions specific to one page should be placed on that page (at the bottom) or within the relevant sections functions file. Some files in <code>/includes</code> are holding functions responsible for special sections, for example uploading files, displaying &quot;things&quot;, user related functions and so forth.</p>
<p>The following packages are defined, and related new features/functions should be placed within the mentioned files/locations, as well as specifying the correct package name. The package names are bold within this list:</p>
<ul class="menu">
<li><b>phpBB3</b><br />Core files and all files not assigned to a seperate package</li>
<li><b>acm</b><br /><code>/includes/acm</code><br />Cache System, seperated because of equal class names
<ul>
<li><b>acm_main</b><br /><code>/includes/acm/acm_main.php</code><br />Base caching class. All functions obtaining cached data should be placed into this file</li>
<li><b>acm_db</b><br /><code>/includes/acm/acm_db.php</code><br />Database based caching</li>
<li><b>acm_file</b><br /><code>/includes/acm/acm_file.php</code><br />File based caching</li>
</ul>
</li>
<li><b>acm</b><br /><code>/includes/acm</code>, <code>/includes/cache.php</code><br />Cache System</li>
<li><b>acp</b><br /><code>/adm</code>, <code>/includes/acp</code>, <code>/includes/functions_admin.php</code><br />Administration Control Panel</li>
<li><b>dbal</b><br /><code>/includes/db</code><br />Database Abstraction Layer.<br />Base class is <code>dbal</code>
<ul>
<li><b>dbal_firebird</b><br /><code>/includes/db/firebird.php</code><br />Firebird/Interbase Database Abstraction Layer<br />Minimum Requirement is Firebird 1.5+/Interbase 7.1+</li>
<li><b>dbal_mssql</b><br /><code>/includes/db/msssql.php</code><br />MSSQL Database Abstraction Layer<br />Minimum Requirement is MSSQL 2000+</li>
<li><b>dbal_mssql_odbc</b><br /><code>/includes/db/mssql_odbc.php</code><br />MSSQL ODBC Database Abstraction Layer for MSSQL<br />Minimum Requirement is Version 2000+</li>
<li><b>dbal_mysql</b><br /><code>/includes/db/mysql.php</code><br />MySQL Database Abstraction Layer<br />Minimum Requirement is 3.23+/4.0+/4.1+</li>
<li><b>dbal_mysql4</b><br /><code>/includes/db/mysql4.php</code><br />MySQL4 Database Abstraction Layer<br />Minimum Requirement is 4.0+/4.1+/5.0+</li>
<li><b>dbal_mysqli</b><br /><code>/includes/db/mysqli.php</code><br />MySQLi Database Abstraction Layer<br />Minimum Requirement is MySQLi extension with MySQL 4.1+/5.0+</li>
<li><b>dbal_oracle</b><br /><code>/includes/db/oracle.php</code><br />Oracle Database Abstraction Layer</li>
<li><b>dbal_postgres</b><br /><code>/includes/db/postgres.php</code><br />PostgreSQL Database Abstraction Layer<br />Minimum Requirement is Version 7.3+</li>
<li><b>dbal_sqlite</b><br /><code>/includes/db/sqlite.php</code><br />Sqlite Database Abstraction Layer</li>
<li><code>/includes/db/dbal.php</code><br />Base DBAL class, defining the overall framework as well as common detominators</li>
<li><code>/includes/db/firebird.php</code><br />Firebird/Interbase Database Abstraction Layer</li>
<li><code>/includes/db/msssql.php</code><br />MSSQL Database Abstraction Layer</li>
<li><code>/includes/db/mssql_odbc.php</code><br />MSSQL ODBC Database Abstraction Layer for MSSQL</li>
<li><code>/includes/db/mysql.php</code><br />MySQL Database Abstraction Layer for MySQL 3.x/4.0.x</li>
<li><code>/includes/db/mysql4.php</code><br />MySQL4 Database Abstraction Layer for MySQL 4.1.x/5.x</li>
<li><code>/includes/db/mysqli.php</code><br />MySQLi Database Abstraction Layer</li>
<li><code>/includes/db/oracle.php</code><br />Oracle Database Abstraction Layer</li>
<li><code>/includes/db/postgres.php</code><br />PostgreSQL Database Abstraction Layer</li>
<li><code>/includes/db/sqlite.php</code><br />Sqlite Database Abstraction Layer</li>
</ul>
</li>
<li><b>docs</b><br /><code>/docs</code><br />phpBB Documentation</li>
@@ -336,6 +332,7 @@ class ...
<li><b>install</b><br /><code>/install</code><br />Installation System</li>
<li><b>language</b><br /><code>/language</code><br />All language files</li>
<li><b>login</b><br /><code>/includes/auth</code><br />Login Authentication Plugins</li>
<li><b>VC</b><br /><code>/includes/captcha</code><br />CAPTCHA</li>
<li><b>mcp</b><br /><code>mcp.php</code>, <code>/includes/mcp</code>, <code>report.php</code><br />Moderator Control Panel</li>
<li><b>ucp</b><br /><code>ucp.php</code>, <code>/includes/ucp</code><br />User Control Panel</li>
<li><b>search</b><br /><code>/includes/search</code>, <code>search.php</code><br />Search System</li>
@@ -350,7 +347,7 @@ class ...
<a name="code"></a><h1>2. Code Layout/Guidelines</h1>
<p>Please note that these Guidelines also applies to javascript code.</p>
<p>Please note that these Guidelines applies to all php, html, javascript and css files.</p>
<a name="namingvars"></a><b>2.i. Variable/Function Naming</b>
<br /><br />
@@ -369,6 +366,7 @@ class ...
<h3>Loop Indices:</h3>
<p>The <em>only</em> situation where a one-character variable name is allowed is when it's the index for some looping construct. In this case, the index of the outer loop should always be $i. If there's a loop inside that loop, its index should be $j, followed by $k, and so on. If the loop is being indexed by some already-existing variable with a meaningful name, this guideline does not apply, example:</p>
<blockquote><pre>
for ($i = 0; $i &lt; $outer_size; $i++)
{
@@ -404,6 +402,7 @@ for ($i = 0; $i &lt; $outer_size; $i++)
<p>This is another case of being too lazy to type 2 extra characters causing problems with code clarity. Even if the body of some construct is only one line long, do <em>not</em> drop the braces. Just don't, examples:</p>
<p class="bad">// These are all wrong. </p>
<blockquote><pre>
if (condition) do_stuff();
@@ -471,6 +470,7 @@ function do_stuff()
<p>This is another simple, easy step that helps keep code readable without much effort. Whenever you write an assignment, expression, etc.. Always leave <em>one</em> space between the tokens. Basically, write code as if it was English. Put spaces between variable names and operators. Don't put spaces just after an opening bracket or before a closing bracket. Don't put spaces just before a comma or a semicolon. This is best shown with a few examples, examples:</p>
<p>// Each pair shows the wrong way followed by the right way. </p>
<blockquote><pre>
$i=0;
$i = 0;
@@ -481,8 +481,8 @@ if ($i &lt; 7) ...
if ( ($i &lt; 7)&amp;&amp;($j &gt; 8) ) ...
if ($i &lt; 7 &amp;&amp; $j &gt; 8) ...
do_stuff( $i, "foo", $b );
do_stuff($i, "foo", $b);
do_stuff( $i, 'foo', $b );
do_stuff($i, 'foo', $b);
for($i=0; $i&lt;$size; $i++) ...
for ($i = 0; $i &lt; $size; $i++) ...
@@ -552,8 +552,18 @@ $foo = $assoc_array[blah];
$foo = $assoc_array['blah'];
</pre></blockquote>
<p class="bad">// wrong</p>
<blockquote><pre>
$foo = $assoc_array["$var"];
</pre></blockquote>
<p class="good">// right </p>
<blockquote><pre>
$foo = $assoc_array[$var];
</pre></blockquote>
<h3>Comments:</h3>
<p>Each complex function should be preceded by a comment that tells a programmer everything they need to know to use that function. The meaning of every parameter, the expected input, and the output are required as a minimal comment. The function's behaviour in error conditions (and what those error conditions are) should also be present.<br /><br />Especially important to document are any assumptions the code makes, or preconditions for its proper operation. Any one of the developers should be able to look at any part of the application and figure out what's going on in a reasonable amount of time. Avoid using <code>/* */</code> comment blocks for one-line comments, <code>//</code> should be used for one/two-liners.</p>
<p>Each complex function should be preceded by a comment that tells a programmer everything they need to know to use that function. The meaning of every parameter, the expected input, and the output are required as a minimal comment. The function's behaviour in error conditions (and what those error conditions are) should also be present - but mostly included within the comment about the output.<br /><br />Especially important to document are any assumptions the code makes, or preconditions for its proper operation. Any one of the developers should be able to look at any part of the application and figure out what's going on in a reasonable amount of time.<br /><br />Avoid using <code>/* */</code> comment blocks for one-line comments, <code>//</code> should be used for one/two-liners.</p>
<h3>Magic numbers:</h3>
<p>Don't use them. Use named constants for any literal value other than obvious special cases. Basically, it's ok to check if an array has 0 elements by using the literal 0. It's not ok to assign some special meaning to a number and then use it everywhere as a literal. This hurts readability AND maintainability. The constants <code>true</code> and <code>false</code> should be used in place of the literals 1 and 0 -- even though they have the same values (but not type!), it's more obvious what the actual logic is when you use the named constants. Typecast variables where it is needed, do not rely on the correct variable type (PHP is currently very loose on typecasting which can lead to security problems if a developer does not have a very close eye to it).</p>
@@ -590,7 +600,7 @@ $min = ($i &lt; $j) ? $i : $j;
</pre></blockquote>
<h3>Don't use uninitialized variables.</h3>
<p>For phpBB3, we intend to use a higher level of run-time error reporting. This will mean that the use of an uninitialized variable will be reported as a warning. These warnings can be avoided by using the built-in isset() function to check whether a variable has been set, examples:</p>
<p>For phpBB3, we intend to use a higher level of run-time error reporting. This will mean that the use of an uninitialized variable will be reported as a warning. These warnings can be avoided by using the built-in isset() function to check whether a variable has been set - but preferably the variable is always existing. For checking if an array has a key set this can come in handy though, examples:</p>
<p class="bad">// Wrong </p>
<blockquote><pre>
@@ -607,6 +617,8 @@ if (isset($forum)) ...
if (isset($forum) &amp;&amp; $forum == 5)
</pre></blockquote>
<p>The <code>empty()</code> function is useful if you want to check if a variable is not set or being empty (an empty string, 0 as an integer or string, NULL, false, an empty array or a variable declared, but without a value in a class). Therefore empty should be used in favor of <code>isset($array) &amp;&amp; sizeof($array) > 0</code> - this can be written in a shorter way as <code>!empty($array)</code>.</p>
<h3>Switch statements:</h3>
<p>Switch/case code blocks can get a bit long sometimes. To have some level of notice and being in-line with the opening/closing brace requirement (where they are on the same line for better readability), this also applies to switch/case code blocks and the breaks. An example:</p>
@@ -704,7 +716,7 @@ switch ($mode)
<div class="paragraph">
<h3>Common SQL Guidelines: </h3>
<p>All SQL should be cross-DB compatible, if DB specific SQL is used alternatives must be provided which work on all supported DB's (MySQL3/4/5, MSSQL (7.0 and 2000), PostgreSQL (7.0+), Firebird, SQLite, Oracle8, ODBC (generalised if possible, otherwise DB2)).</p>
<p>All SQL should be cross-DB compatible, if DB specific SQL is used alternatives must be provided which work on all supported DB's (MySQL3/4/5, MSSQL (7.0 and 2000), PostgreSQL (7.0+), Firebird, SQLite, Oracle8, ODBC (generalised if possible)).</p>
<p>All SQL commands should utilise the DataBase Abstraction Layer (DBAL)</p>
<h3>SQL code layout:</h3>
@@ -731,7 +743,7 @@ $sql = 'SELECT *
</pre></blockquote>
<h3>SQL Quotes: </h3>
<p>Double quotes where applicable ... examples: </p>
<p>Double quotes where applicable (The variables in these examples are typecasted to integers before) ... examples: </p>
<p class="bad">// These are wrong.</p>
<blockquote><pre>
@@ -752,6 +764,8 @@ $sql = 'SELECT *
<h3>Common DBAL methods: </h3>
<h3>sql_escape():</h3>
<p>Always use <code>$db-&gt;sql_escape()</code> if you need to check for a string within an SQL statement (even if you are sure the variable can not contain single quotes - never trust your input), for example:</p>
<blockquote><pre>
@@ -760,7 +774,17 @@ $sql = 'SELECT *
WHERE username = '" . $db-&gt;sql_escape($username) . "'";
</pre></blockquote>
<p>If you need to UPDATE or INSERT data, make use of the <code>$db-&gt;sql_build_array()</code> function. This function already escapes strings and checkes other types, so there is no need to do this here. The data to be inserted should go into an array - <code>$sql_ary</code> - or directly within the statement if one one or two variables needs to be inserted/updated. An example of an insert statement would be:</p>
<h3>sql_query_limit():</h3>
<p>We do not add limit statements to the sql query, but instead use <code>$db-&gt;sql_query_limit()</code>. You basically pass the query, the total number of lines to retrieve and the offset.</p>
<p><strong>Note: </strong> Since Oracle handles limits differently and because of how we implemented this handling you need to take special care if you use <code>sql_query_limit</code> with an sql query retrieving data from more than one table.</p>
<p>Make sure when using something like "SELECT x.*, y.jars" that there is not a column named jars in x; make sure that there is no overlap between an implicit column and the explicit columns.</p>
<h3>sql_build_array():</h3>
<p>If you need to UPDATE or INSERT data, make use of the <code>$db-&gt;sql_build_array()</code> function. This function already escapes strings and checks other types, so there is no need to do this here. The data to be inserted should go into an array - <code>$sql_ary</code> - or directly within the statement if one one or two variables needs to be inserted/updated. An example of an insert statement would be:</p>
<blockquote><pre>
$sql_ary = array(
@@ -782,13 +806,128 @@ $sql_ary = array(
);
$sql = 'UPDATE ' . SOME_TABLE . '
SET ' . $db-&gt;sql_build_array('UPDATE', $sql_ary) . "
WHERE user_id = $user_id";
SET ' . $db-&gt;sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . (int) $user_id;
$db-&gt;sql_query($sql);
</pre></blockquote>
<p>The <code>$db-&gt;sql_build_array()</code> function supports the following modes: <code>INSERT</code> (example above), <code>INSERT_SELECT</code> (building query for <code>INSERT INTO table (...) SELECT value, column ...</code> statements), <code>MULTI_INSERT</code> (for returning extended inserts), <code>UPDATE</code> (example above) and <code>SELECT</code> (for building WHERE statement [AND logic]).</p>
<h3>sql_in_set():</h3>
<p>The <code>$db-&gt;sql_in_set()</code> function should be used for building <code>IN ()</code> and <code>NOT IN ()</code> constructs. Since (specifically) MySQL tend to be faster if for one value to be compared the <code>=</code> and <code>&lt;&gt;</code> operator is used, we let the DBAL decide what to do. A typical example of doing a positive match against a number of values would be:</p>
<blockquote><pre>
$sql = 'SELECT *
FROM ' . FORUMS_TABLE . '
WHERE ' . $db-&gt;sql_in_set('forum_id', $forum_ids);
$db-&gt;sql_query($sql);
</pre></blockquote>
<p>Based on the number of values in $forum_ids, the query can look differently.</p>
<p class="good">// SQL Statement if $forum_ids = array(1, 2, 3);</p>
<blockquote><pre>
SELECT FROM phpbb_forums WHERE forum_id IN (1, 2, 3)
</pre></blockquote>
<p class="good">// SQL Statement if $forum_ids = array(1) or $forum_ids = 1</p>
<blockquote><pre>
SELECT FROM phpbb_forums WHERE forum_id = 1
</pre></blockquote>
<p>Of course the same is possible for doing a negative match against a number of values:</p>
<blockquote><pre>
$sql = 'SELECT *
FROM ' . FORUMS_TABLE . '
WHERE ' . $db-&gt;sql_in_set('forum_id', $forum_ids, <strong>true</strong>);
$db-&gt;sql_query($sql);
</pre></blockquote>
<p>Based on the number of values in $forum_ids, the query can look differently here too.</p>
<p class="good">// SQL Statement if $forum_ids = array(1, 2, 3);</p>
<blockquote><pre>
SELECT FROM phpbb_forums WHERE forum_id <strong>NOT</strong> IN (1, 2, 3)
</pre></blockquote>
<p class="good">// SQL Statement if $forum_ids = array(1) or $forum_ids = 1</p>
<blockquote><pre>
SELECT FROM phpbb_forums WHERE forum_id <strong>&lt;&gt;</strong> 1
</pre></blockquote>
<p>If the given array is empty, an error will be produced.</p>
<h3>sql_build_query():</h3>
<p>The <code>$db-&gt;sql_build_query()</code> function is responsible for building sql statements for select and select distinct queries if you need to JOIN on more than one table or retrieving data from more than one table while doing a JOIN. This needs to be used to make sure the resulting statement is working on all supported db's. Instead of explaining every possible combination, i will give a short example:</p>
<blockquote><pre>
$sql_array = array(
'SELECT' => 'f.*, ft.mark_time',
'FROM' => array(
FORUMS_WATCH_TABLE => 'fw',
FORUMS_TABLE => 'f'
),
'LEFT_JOIN' => array(
array(
'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id'
)
);
'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . '
AND f.forum_id = fw.forum_id',
'ORDER_BY' => 'left_id'
);
$sql = $db-&gt;sql_build_query('SELECT', $sql_array);
</pre></blockquote>
<p>The possible first parameter for sql_build_query() is SELECT or SELECT_DISTINCT. As you can see, the logic is pretty self-explaining. For the LEFT_JOIN key, just add another array if you want to join on to tables for example. The added benefit of using this construct is that you are able to easily build the query statement based on conditions - for example the above LEFT_JOIN is only necessary if server side topic tracking is enabled; a slight adjustement would be:</p>
<blockquote><pre>
$sql_array = array(
'SELECT' => 'f.*',
'FROM' => array(
FORUMS_WATCH_TABLE => 'fw',
FORUMS_TABLE => 'f'
),
'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . '
AND f.forum_id = fw.forum_id',
'ORDER_BY' => 'left_id'
);
if ($config['load_db_lastread'])
{
$sql_array['LEFT_JOIN'] = array(
array(
'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id'
)
);
$sql_array['SELECT'] .= ', ft.mark_time ';
}
else
{
// Here we read the cookie data
}
$sql = $db-&gt;sql_build_query('SELECT', $sql_array);
</pre></blockquote>
</div>
<a href="#top">Top</a>
<br /><br />
@@ -818,7 +957,7 @@ for ($i = 0, $size = sizeof($post_data); $i &lt; $size; $i++)
</pre></blockquote>
<h3>Use of in_array(): </h3>
<p>Try to avoid using in_array() on huge arrays, and try to not place them into loops if the array to check consist of more than 20 entries. in_array() can be very time consuming and uses a lot of cpu processing time. For little checks it is not noticable, but if checked against a huge array within a loop those checks alone can be a bunch of seconds.</p>
<p>Try to avoid using in_array() on huge arrays, and try to not place them into loops if the array to check consist of more than 20 entries. in_array() can be very time consuming and uses a lot of cpu processing time. For little checks it is not noticable, but if checked against a huge array within a loop those checks alone can be a bunch of seconds. If you need this functionality, try using isset() on the arrays keys instead, actually shifting the values into keys and vice versa. A call to <code>isset($array[$var])</code> is a lot faster than <code>in_array($var, array_keys($array))</code> for example.</p>
</div>
<a href="#top">Top</a>
@@ -830,9 +969,11 @@ for ($i = 0, $size = sizeof($post_data); $i &lt; $size; $i++)
<div class="paragraph">
<h3>General things:</h3>
<p>Never trust user input.</p>
<p>The auth class should be used for all authorisation checking</p>
<p>No attempt should be made to remove any copyright information (either contained within the source or displayed interactively when the source is run/compiled), neither should the copyright information be altered in any way (it may be added to)</p>
<p>Never trust user input (this also applies to server variables as well as cookies).</p>
<p>Try to sanitize values returned from a function.</p>
<p>Try to sanitize given function variables within your function.</p>
<p>The auth class should be used for all authorisation checking.</p>
<p>No attempt should be made to remove any copyright information (either contained within the source or displayed interactively when the source is run/compiled), neither should the copyright information be altered in any way (it may be added to).</p>
<h3>Variables: </h3>
<p>Make use of the <code>request_var()</code> function for anything except for submit or single checking params. </p>
@@ -868,7 +1009,7 @@ $action_ary = request_var('action', array('' => 0));
<h3>Login checks/redirection: </h3>
<p>To show a forum login box use <code>login_forum_box($forum_data)</code>, else use the <code>login_box()</code> function.</p>
<p>The <code>login_box()</code> function could have a redirect as the first parameter. As a thumb of rule, specify an empty string if you want to redirect to the users current location, else do not add the <code>$SID</code> to the redirect string (for example within the ucp/login we redirect to the board index because else the user would be redirected to the login screen).</p>
<p>The <code>login_box()</code> function can have a redirect as the first parameter. As a thumb of rule, specify an empty string if you want to redirect to the users current location, else do not add the <code>$SID</code> to the redirect string (for example within the ucp/login we redirect to the board index because else the user would be redirected to the login screen).</p>
<h3>Sensitive Operations: </h3>
<p>For sensitive operations always let the user confirm the action. For the confirmation screens, make use of the <code>confirm_box()</code> function.</p>
@@ -882,22 +1023,36 @@ $auth->acl($user->data);
$user->setup();
</pre></blockquote>
<p>The <code>$user->setup()</code> call can be used to pass on additional language definitions and a custom style (used in viewforum).</p>
<p>The <code>$user->setup()</code> call can be used to pass on additional language definition and a custom style (used in viewforum).</p>
<h3>Errors and messages: </h3>
<p>All messages/errors should be output by calling <code>trigger_error()</code> using the appropriate message type and language string. Example:</p>
<p>All messages/errors should be outputed by calling <code>trigger_error()</code> using the appropriate message type and language string. Example:</p>
<blockquote><pre>
trigger_error('NO_FORUM');
</pre></blockquote>
<blockquote><pre>
trigger_error($user-&gt;lang['NO_FORUM']);
</pre></blockquote>
<blockquote><pre>
trigger_error('NO_APPROPIATE_MODE', E_USER_ERROR);
</pre></blockquote>
<h3>Url formatting</h3>
<p>All urls pointing to internal files need to be prepended by the <code>$phpbb_root_path</code> variable. Within the administration control panel all urls pointing to internal files need to be prepended by the <code>$phpbb_admin_path</code> variable. This makes sure the path is always correct and users being able to just rename the admin folder and the acp still working as intended.</p>
<p>All urls pointing to internal files need to be prepended by the <code>$phpbb_root_path</code> variable. Within the administration control panel all urls pointing to internal files need to be prepended by the <code>$phpbb_admin_path</code> variable. This makes sure the path is always correct and users being able to just rename the admin folder and the acp still working as intended (though some links will fail and the code need to be slightly adjusted).</p>
<p>The <code>append_sid()</code> function from 2.0.x is available too, though does not handle url alterations automatically. Please have a look at the code documentation if you want to get more details on how to use append_sid(). A sample call to append_sid() can look like this:</p>
<blockquote><pre>
append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;g=' . $row['group_id'])
</pre></blockquote>
<h3>General function usage: </h3>
<p>Some of these functions are only chosen over others because of a personal preference and are having no other benefit than to be consistant over the code.</p>
<p>Some of these functions are only chosen over others because of personal preference and having no other benefit than to be consistant over the code.</p>
<ul>
<li>
@@ -909,6 +1064,12 @@ trigger_error('NO_FORUM');
<li>
<p>Use <code>else if</code> instead of <code>elseif</code></p>
</li>
<li>
<p>Use <code>false</code> (lowercase) instead of <code>FALSE</code></p>
</li>
<li>
<p>Use <code>true</code> (lowercase) instead of <code>TRUE</code></p>
</li>
</ul>
</div>
@@ -921,7 +1082,7 @@ trigger_error('NO_FORUM');
<div class="paragraph">
<h3>General things</h3>
<p>Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms).</p>
<p>Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the intendation and coding guidelines also apply to templates where possible.</p>
<p>The outer table class <code>forumline</code> has gone and is replaced with <code>tablebg</code>.</p>
<p>When writing <code>&lt;table&gt;</code> the order <code>&lt;table class="" cellspacing="" cellpadding="" border="" align=""&gt;</code> creates consistency and allows everyone to easily see which table produces which "look". The same applies to most other tags for which additional parameters can be set, consistency is the major aim here.</p>
@@ -945,33 +1106,33 @@ trigger_error('NO_FORUM');
<p>Use a standard cellpadding of 2 and cellspacing of 0 on outer tables. Inner tables can vary from 0 to 3 or even 4 depending on the need.</p>
<p>Use div container for styling and table for data representation</p>
<p><strong>Use div container/css for styling and table for data representation.</strong></p>
<p>The seperate catXXXX and thXXX classes are gone. When defining a header cell just use <code>&lt;th&gt;</code> rather than <code>&lt;th class="thHead"&gt;</code> etc. Similarly for cat, don't use <code>&lt;td class="catLeft"&gt;</code> use <code>&lt;td class="cat"&gt;</code> etc.</p>
<p>Try to retain consistency of basic layout and class useage, i.e. _EXPLAIN text should generally be placed below the title it explains, e.g. <code>{L_POST_USERNAME}&lt;br /&gt;&lt;span class="gensmall"&gt;{L_POST_USERNAME_EXPLAIN}&lt;/span&gt;</code> is the typical way of handling this ... there may be exceptions and this isn't a hard and fast rule</p>
<p>Try to retain consistency of basic layout and class useage, i.e. _EXPLAIN text should generally be placed below the title it explains, e.g. <code>{L_POST_USERNAME}&lt;br /&gt;&lt;span class="gensmall"&gt;{L_POST_USERNAME_EXPLAIN}&lt;/span&gt;</code> is the typical way of handling this ... there may be exceptions and this isn't a hard and fast rule.</p>
<p>Try to keep template conditional and other statements tabbed in line with the block to which they refer.</p>
<p class="bad">this is incorrect</p>
<p class="good">this is correct</p>
<blockquote><pre>
&lt;!-- BEGIN test --&gt;
<span class="comment">&lt;!-- BEGIN test --&gt;</span>
&lt;tr&gt;
&lt;td&gt;&#123;test.TEXT&#125;&lt;/td&gt;
&lt;/tr&gt;
&lt;!-- END test --&gt;
<span class="comment">&lt;!-- END test --&gt;</span>
</pre></blockquote>
<p class="good">this is correct:</p>
<p class="good">this is also correct:</p>
<blockquote><pre>
&lt;!-- BEGIN test --&gt;
<span class="comment">&lt;!-- BEGIN test --&gt;</span>
&lt;tr&gt;
&lt;td&gt;&#123;test.TEXT&#125;&lt;/td&gt;
&lt;/tr&gt;
&lt;!-- END test --&gt;
<span class="comment">&lt;!-- END test --&gt;</span>
</pre></blockquote>
<p>it gives immediate feedback on exactly what is looping.</p>
<p>it gives immediate feedback on exactly what is looping - decide which way to use based on the readability.</p>
</div>
<a href="#top">Top</a>
@@ -986,50 +1147,26 @@ trigger_error('NO_FORUM');
<p>Firstly templates now take the suffix &quot;.html&quot; rather than &quot;.tpl&quot;. This was done simply to make the lifes of some people easier wrt syntax highlighting, etc.</p>
<h3>Variables</h3>
<p>All template variables should be named appropriately (using underscores for spaces), language entries should be prefixed with L_, system data with S_, urls with U_, all other variables should be presented 'as is'.</p>
<p>All template variables should be named appropriately (using underscores for spaces), language entries should be prefixed with L_, system data with S_, urls with U_, javascript urls with UA_, language to be put in javascript statements with LA_, all other variables should be presented 'as is'.</p>
<p>Note that unlike 2.0.x most language strings are not assigned from the source. When a language variable is found {L_YYYYYY} phpBB first looks if an assigned variable exists with that name. If it does, it uses that. If not it looks if an exsting string defined in the language file exists. This should reduce the need to assign loads of new lang vars in Mods.</p>
<p>L_* template variables are automatically tried to be mapped to the corresponding language entry if the code does not set (and therefore overwrite) this variable specifically. For example <code>{L_USERNAME}</code> maps to <code>$user-&gt;lang['USERNAME']</code>. The LA_* template variables are handled within the same way, but properly escaped to be put in javascript code. This should reduce the need to assign loads of new lang vars in Mods.
</p>
<h3>Blocks</h3>
<h3>Blocks/Loops</h3>
<p>The basic block level loop remains and takes the form:</p>
<blockquote><pre>
&lt;!-- BEGIN loopname --&gt;
markup, {loopname&#46;X_YYYYY}, etc&#46;
&lt;!-- END loopname --&gt;
<span class="comment">&lt;!-- BEGIN loopname --&gt;</span>
markup, {loopname&#46;X_YYYYY}, etc&#46;
<span class="comment">&lt;!-- END loopname --&gt;</span>
</pre></blockquote>
<p>However this has now been extended with the following additions. Firstly you can set the start and end points of the loop. For example:</p>
<blockquote><pre>
&lt;!-- BEGIN loopname(2) --&gt;
markup
&lt;!-- END loopname --&gt;
</pre></blockquote>
<p>Will start the loop on the third entry (note that indexes start at zero). Extensions of this are:
<br /><br />
<code>loopname(2,4)</code>: Starts loop on third values, ends on fourth<br />
<code>loopname(-4)</code>: Starts loop fourth from last value<br />
<code>loopname(2, -4)</code>: Starts loop on third value, ends four from end<br />
<br />Note that the indexing method may change since it's not really consistent at this time :)</p>
<p>A further extension to begin is BEGINELSE:</p>
<blockquote><pre>
&lt;!-- BEGIN loop --&gt;
markup
&lt;!-- BEGINELSE --&gt;
markup
&lt;!-- END loop --&gt;
</pre></blockquote>
<p>This will cause the markup between <code>BEGINELSE</code> and <code>END</code> to be output if the loop contains no values. This is useful for forums with no topics (for example) ... in some ways it replaces &quot;bits of&quot; the existing &quot;switch_&quot; type control (the rest being replaced by conditionals, see below).</p>
<p>A bit later loops will be explained further. To not irretate you we will explain conditionals as well as other statements first.</p>
<h3>Including files</h3>
<p>Something that existed in 2.0.x which no longer exists in 3.0.x is the ability to assign a template to a variable. This was used (for example) to output the jumpbox. Instead (perhaps better, perhaps not but certainly more flexible) we now have INCLUDE. This takes the simple form:</p>
<blockquote><pre>
&lt;!-- INCLUDE filename --&gt;
<span class="comment">&lt;!-- INCLUDE filename --&gt;</span>
</pre></blockquote>
<p>You will note in the 3.0 templates the major sources start with <code>&lt;!-- INCLUDE overall_header.html --&gt;</code> or <code>&lt;!-- INCLUDE simple_header.html --&gt;</code>, etc. In 2.0.x control of &quot;which&quot; header to use was defined entirely within the code. In 3.0.x the template designer can output what they like. Note that you can introduce new templates (i.e. other than those in the default set) using this system and include them as you wish ... perhaps useful for a common &quot;menu&quot; bar or some such. No need to modify loads of files as with 2.0.x.</p>
@@ -1038,15 +1175,15 @@ markup
<p>A contentious decision has seen the ability to include PHP within the template introduced. This is achieved by enclosing the PHP within relevant tags:</p>
<blockquote><pre>
&lt;!-- PHP --&gt;
echo &quot;hello!&quot;;
&lt;!-- ENDPHP --&gt;
<span class="comment">&lt;!-- PHP --&gt;</span>
echo &quot;hello!&quot;;
<span class="comment">&lt;!-- ENDPHP --&gt;</span>
</pre></blockquote>
<p>You may also include PHP from an external file using:</p>
<blockquote><pre>
&lt;!-- INCLUDEPHP somefile&#46;php --&gt;
<span class="comment">&lt;!-- INCLUDEPHP somefile&#46;php --&gt;</span>
</pre></blockquote>
<p>it will be included and executed inline.<br /><br />A note, it is very much encouraged that template designers do not include PHP. The ability to include raw PHP was introduced primarily to allow end users to include banner code, etc. without modifying multiple files (as with 2.0.x). It was not intended for general use ... hence <!-- w --><a href="http://www.phpbb.com">www.phpbb.com</a><!-- w --> will <strong>not</strong> make available template sets which include PHP. And by default templates will have PHP disabled (the admin will need to specifically activate PHP for a template).</p>
@@ -1055,18 +1192,20 @@ echo &quot;hello!&quot;;
<p>The most significant addition to 3.0.x are conditions or control structures, &quot;if something then do this else do that&quot;. The system deployed is very similar to Smarty. This may confuse some people at first but it offers great potential and great flexibility with a little imagination. In their most simple form these constructs take the form:</p>
<blockquote><pre>
&lt;!-- IF expr --&gt;<br />markup<br />&lt;!-- ENDIF --&gt;
<span class="comment">&lt;!-- IF expr --&gt;</span>
markup
<span class="comment">&lt;!-- ENDIF --&gt;</span>
</pre></blockquote>
<p>expr can take many forms, for example:</p>
<blockquote><pre>
&lt;!-- IF loop&#46;S_ROW_COUNT is even --&gt;
markup
&lt;!-- ENDIF --&gt;
<span class="comment">&lt;!-- IF loop&#46;S_ROW_COUNT is even --&gt;</span>
markup
<span class="comment">&lt;!-- ENDIF --&gt;</span>
</pre></blockquote>
<p>This will output the markup if the S_ROW_COUNT variable in the current iteration of loop is an even value (i.e. the expr is TRUE). You can use various comparison methods (standard as well as equivalent textual versions noted in square brackets) including:</p>
<p>This will output the markup if the S_ROW_COUNT variable in the current iteration of loop is an even value (i.e. the expr is TRUE). You can use various comparison methods (standard as well as equivalent textual versions noted in square brackets) including (<code>not, or, and, eq, neq, is</code> should be used if possible for better readability):</p>
<blockquote><pre>
== [eq]
@@ -1086,6 +1225,7 @@ markup
-
*
/
,
&lt;&lt; (bitwise shift left)
&gt;&gt; (bitwise shift right)
| (bitwise or)
@@ -1106,29 +1246,29 @@ div
<p>Beyond the simple use of IF you can also do a sequence of comparisons using the following:</p>
<blockquote><pre>
&lt;!-- IF expr1 --&gt;
markup
&lt;!-- ELSEIF expr2 --&gt;
markup
&#46;
&#46;
&#46;
&lt;!-- ELSEIF exprN --&gt;
markup
&lt;!-- ELSE --&gt;
markup
&lt;!-- ENDIF --&gt;
<span class="comment">&lt;!-- IF expr1 --&gt;</span>
markup
<span class="comment">&lt;!-- ELSEIF expr2 --&gt;</span>
markup
&#46;
&#46;
&#46;
<span class="comment">&lt;!-- ELSEIF exprN --&gt;</span>
markup
<span class="comment">&lt;!-- ELSE --&gt;</span>
markup
<span class="comment">&lt;!-- ENDIF --&gt;</span>
</pre></blockquote>
<p>Each statement will be tested in turn and the relevant output generated when a match (if a match) is found. It is not necessary to always use ELSEIF, ELSE can be used alone to match &quot;everything else&quot;.<br /><br />So what can you do with all this? Well take for example the colouration of rows in viewforum. In 2.0.x row colours were predefined within the source as either row color1, row color2 or row class1, row class2. In 3.0.x this is moved to the template, it may look a little daunting at first but remember control flows from top to bottom and it's not too difficult:</p>
<blockquote><pre>
&lt;table&gt;
&lt;!-- IF loop&#46;S_ROW_COUNT is even --&gt;
&lt;tr class=&quot;row1&quot;&gt;
&lt;!-- ELSE --&gt;
&lt;tr class=&quot;row2&quot;&gt;
&lt;!-- ENDIF --&gt;
<span class="comment">&lt;!-- IF loop&#46;S_ROW_COUNT is even --&gt;</span>
&lt;tr class=&quot;row1&quot;&gt;
<span class="comment">&lt;!-- ELSE --&gt;</span>
&lt;tr class=&quot;row2&quot;&gt;
<span class="comment">&lt;!-- ENDIF --&gt;</span>
&lt;td&gt;HELLO!&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
@@ -1138,15 +1278,15 @@ markup
<blockquote><pre>
&lt;table&gt;
&lt;!-- IF loop&#46;S_ROW_COUNT &gt; 10 --&gt;
&lt;tr bgcolor=&quot;#FF0000&quot;&gt;
&lt;!-- ELSEIF loop&#46;S_ROW_COUNT &gt; 5 --&gt;
&lt;tr bgcolor=&quot;#00FF00&quot;&gt;
&lt;!-- ELSEIF loop&#46;S_ROW_COUNT &gt; 2 --&gt;
&lt;tr bgcolor=&quot;#0000FF&quot;&gt;
&lt;!-- ELSE --&gt;
&lt;tr bgcolor=&quot;#FF00FF&quot;&gt;
&lt;!-- ENDIF --&gt;
<span class="comment">&lt;!-- IF loop&#46;S_ROW_COUNT &gt; 10 --&gt;</span>
&lt;tr bgcolor=&quot;#FF0000&quot;&gt;
<span class="comment">&lt;!-- ELSEIF loop&#46;S_ROW_COUNT &gt; 5 --&gt;</span>
&lt;tr bgcolor=&quot;#00FF00&quot;&gt;
<span class="comment">&lt;!-- ELSEIF loop&#46;S_ROW_COUNT &gt; 2 --&gt;</span>
&lt;tr bgcolor=&quot;#0000FF&quot;&gt;
<span class="comment">&lt;!-- ELSE --&gt;</span>
&lt;tr bgcolor=&quot;#FF00FF&quot;&gt;
<span class="comment">&lt;!-- ENDIF --&gt;</span>
&lt;td&gt;hello!&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
@@ -1155,13 +1295,229 @@ markup
<p>This will output the row cell in purple for the first two rows, blue for rows 2 to 5, green for rows 5 to 10 and red for remainder. So, you could produce a &quot;nice&quot; gradient effect, for example.<br /><br />What else can you do? Well, you could use IF to do common checks on for example the login state of a user:</p>
<blockquote><pre>
&lt;!-- IF S_USER_LOGGED_IN --&gt;
markup
&lt;!-- ENDIF --&gt;
<span class="comment">&lt;!-- IF S_USER_LOGGED_IN --&gt;</span>
markup
<span class="comment">&lt;!-- ENDIF --&gt;</span>
</pre></blockquote>
<p>This replaces the existing (fudged) method in 2.0.x using a zero length array and BEGIN/END.</p>
<h3>Extended syntax for Blocks/Loops</h3>
<p>Back to our loops - they had been extended with the following additions. Firstly you can set the start and end points of the loop. For example:</p>
<blockquote><pre>
<span class="comment">&lt;!-- BEGIN loopname(2) --&gt;</span>
markup
<span class="comment">&lt;!-- END loopname --&gt;</span>
</pre></blockquote>
<p>Will start the loop on the third entry (note that indexes start at zero). Extensions of this are:
<br /><br />
<code>loopname(2)</code>: Will start the loop on the 3rd entry<br />
<code>loopname(-2)</code>: Will start the loop two entries from the end<br />
<code>loopname(3,4)</code>: Will start the loop on the fourth entry and end it on the fifth<br />
<code>loopname(3,-4)</code>: Will start the loop on the fourth entry and end it four from last<br />
</p>
<p>A further extension to begin is BEGINELSE:</p>
<blockquote><pre>
<span class="comment">&lt;!-- BEGIN loop --&gt;</span>
markup
<span class="comment">&lt;!-- BEGINELSE --&gt;</span>
markup
<span class="comment">&lt;!-- END loop --&gt;</span>
</pre></blockquote>
<p>This will cause the markup between <code>BEGINELSE</code> and <code>END</code> to be output if the loop contains no values. This is useful for forums with no topics (for example) ... in some ways it replaces &quot;bits of&quot; the existing &quot;switch_&quot; type control (the rest being replaced by conditionals).</p>
<p>Another way of checking if a loop contains values is by prefixing the loops name with a dot:</p>
<blockquote><pre>
<span class="comment">&lt;!-- IF .loop --&gt;</span>
<span class="comment">&lt;!-- BEGIN loop --&gt;</span>
markup
<span class="comment">&lt;!-- END loop --&gt;</span>
<span class="comment">&lt;!-- ELSE --&gt;</span>
markup
<span class="comment">&lt;!-- ENDIF --&gt;</span>
</pre></blockquote>
<p>You are even able to check the number of items within a loop by comparing it with values within the IF condition:</p>
<blockquote><pre>
<span class="comment">&lt;!-- IF .loop > 2 --&gt;</span>
<span class="comment">&lt;!-- BEGIN loop --&gt;</span>
markup
<span class="comment">&lt;!-- END loop --&gt;</span>
<span class="comment">&lt;!-- ELSE --&gt;</span>
markup
<span class="comment">&lt;!-- ENDIF --&gt;</span>
</pre></blockquote>
<p>Nesting loops cause the conditionals needing prefixed with all loops from the outer one to the inner most. An illustration of this:</p>
<blockquote><pre>
<span class="comment">&lt;!-- BEGIN firstloop --&gt;</span>
{firstloop.MY_VARIABLE_FROM_FIRSTLOOP}
<span class="comment">&lt;!-- BEGIN secondloop --&gt;</span>
{firstloop.secondloop.MY_VARIABLE_FROM_SECONDLOOP}
<span class="comment">&lt;!-- END secondloop --&gt;</span>
<span class="comment">&lt;!-- END firstloop --&gt;</span>
</pre></blockquote>
<p>Sometimes it is necessary to break out of nested loops to be able to call another loop within the current iteration. This sounds a little bit confusing and it is not used very often. The following (rather complex) example shows this quite good - it also shows how you test for the first and last row in a loop (i will explain the example in detail further down):</p>
<blockquote><pre>
<span class="comment">&lt;!-- BEGIN l_block1 --&gt;</span>
<span class="comment">&lt;!-- IF l_block1.S_SELECTED --&gt;</span>
&lt;strong&gt;{l_block1.L_TITLE}&lt;/strong&gt;
<span class="comment">&lt;!-- IF S_PRIVMSGS --&gt;</span>
<span class="comment">&lt;!-- the ! at the beginning of the loop name forces the loop to be not a nested one of l_block1 --&gt;</span>
<span class="comment">&lt;!-- BEGIN !folder --&gt;</span>
<span class="comment">&lt;!-- IF folder.S_FIRST_ROW --&gt;</span>
&lt;ul class=&quot;nav&quot;&gt;
<span class="comment">&lt;!-- ENDIF --&gt;</span>
&lt;li&gt;&lt;a href=&quot;{folder.U_FOLDER}&quot;&gt;{folder.FOLDER_NAME}&lt;/a&gt;&lt;/li&gt;
<span class="comment">&lt;!-- IF folder.S_LAST_ROW --&gt;</span>
&lt;/ul&gt;
<span class="comment">&lt;!-- ENDIF --&gt;</span>
<span class="comment">&lt;!-- END !folder --&gt;</span>
<span class="comment">&lt;!-- ENDIF --&gt;</span>
&lt;ul class=&quot;nav&quot;&gt;
<span class="comment">&lt;!-- BEGIN l_block2 --&gt;</span>
&lt;li&gt;
<span class="comment">&lt;!-- IF l_block1.l_block2.S_SELECTED --&gt;</span>
&lt;strong&gt;{l_block1.l_block2.L_TITLE}&lt;/strong&gt;
<span class="comment">&lt;!-- ELSE --&gt;</span>
&lt;a href=&quot;{l_block1.l_block2.U_TITLE}&quot;&gt;{l_block1.l_block2.L_TITLE}&lt;/a&gt;
<span class="comment">&lt;!-- ENDIF --&gt;</span>
&lt;/li&gt;
<span class="comment">&lt;!-- END l_block2 --&gt;</span>
&lt;/ul&gt;
<span class="comment">&lt;!-- ELSE --&gt;</span>
&lt;a class=&quot;nav&quot; href=&quot;{l_block1.U_TITLE}&quot;&gt;{l_block1.L_TITLE}&lt;/a&gt;
<span class="comment">&lt;!-- ENDIF --&gt;</span>
<span class="comment">&lt;!-- END l_block1 --&gt;</span>
</pre></blockquote>
<p>Let us first concentrate on this part of the example:</p>
<blockquote><pre>
<span class="comment">&lt;!-- BEGIN l_block1 --&gt;</span>
<span class="comment">&lt;!-- IF l_block1.S_SELECTED --&gt;</span>
markup
<span class="comment">&lt;!-- ELSE --&gt;</span>
&lt;a class=&quot;nav&quot; href=&quot;{l_block1.U_TITLE}&quot;&gt;{l_block1.L_TITLE}&lt;/a&gt;
<span class="comment">&lt;!-- ENDIF --&gt;</span>
<span class="comment">&lt;!-- END l_block1 --&gt;</span>
</pre></blockquote>
<p>Here we open the loop l_block1 and doing some things if the value S_SELECTED within the current loop iteration is true, else we write the blocks link and title. Here, you see <code>{l_block1.L_TITLE}</code> referenced - you remember that L_* variables get automatically assigned the corresponding language entry? This is true, but not within loops. The L_TITLE variable within the loop l_block1 is assigned within the code itself.</p>
<p>Let's have a closer look to the markup:</p>
<blockquote><pre>
<span class="comment">&lt;!-- BEGIN l_block1 --&gt;</span>
.
.
<span class="comment">&lt;!-- IF S_PRIVMSGS --&gt;</span>
<span class="comment">&lt;!-- BEGIN !folder --&gt;</span>
<span class="comment">&lt;!-- IF folder.S_FIRST_ROW --&gt;</span>
&lt;ul class=&quot;nav&quot;&gt;
<span class="comment">&lt;!-- ENDIF --&gt;</span>
&lt;li&gt;&lt;a href=&quot;{folder.U_FOLDER}&quot;&gt;{folder.FOLDER_NAME}&lt;/a&gt;&lt;/li&gt;
<span class="comment">&lt;!-- IF folder.S_LAST_ROW --&gt;</span>
&lt;/ul&gt;
<span class="comment">&lt;!-- ENDIF --&gt;</span>
<span class="comment">&lt;!-- END !folder --&gt;</span>
<span class="comment">&lt;!-- ENDIF --&gt;</span>
.
.
<span class="comment">&lt;!-- END l_block1 --&gt;</span>
</pre></blockquote>
<p>The <code>&lt;!-- IF S_PRIVMSGS --&gt;</code> statement clearly checks a global variable and not one within the loop, since the loop is not given here. So, if S_PRIVMSGS is true we execute the shown markup. Now, you see the <code>&lt;!-- BEGIN !folder --&gt;</code> statement. The exclamation mark is responsible for instructing the template engine to iterate through the main loop folder. So, we are now within the loop folder - with <code>&lt;!-- BEGIN folder --&gt;</code> we would have been within the loop <code>l_block1.folder</code> automatically as is the case with l_block2:</p>
<blockquote><pre>
<span class="comment">&lt;!-- BEGIN l_block1 --&gt;</span>
.
.
&lt;ul class=&quot;nav&quot;&gt;
<span class="comment">&lt;!-- BEGIN l_block2 --&gt;</span>
&lt;li&gt;
<span class="comment">&lt;!-- IF l_block1.l_block2.S_SELECTED --&gt;</span>
&lt;strong&gt;{l_block1.l_block2.L_TITLE}&lt;/strong&gt;
<span class="comment">&lt;!-- ELSE --&gt;</span>
&lt;a href=&quot;{l_block1.l_block2.U_TITLE}&quot;&gt;{l_block1.l_block2.L_TITLE}&lt;/a&gt;
<span class="comment">&lt;!-- ENDIF --&gt;</span>
&lt;/li&gt;
<span class="comment">&lt;!-- END l_block2 --&gt;</span>
&lt;/ul&gt;
.
.
<span class="comment">&lt;!-- END l_block1 --&gt;</span>
</pre></blockquote>
<p>You see the difference? The loop l_block2 is a member of the loop l_block1 but the loop folder is a main loop.</p>
<p>Now back to our folder loop:</p>
<blockquote><pre>
<span class="comment">&lt;!-- IF folder.S_FIRST_ROW --&gt;</span>
&lt;ul class=&quot;nav&quot;&gt;
<span class="comment">&lt;!-- ENDIF --&gt;</span>
&lt;li&gt;&lt;a href=&quot;{folder.U_FOLDER}&quot;&gt;{folder.FOLDER_NAME}&lt;/a&gt;&lt;/li&gt;
<span class="comment">&lt;!-- IF folder.S_LAST_ROW --&gt;</span>
&lt;/ul&gt;
<span class="comment">&lt;!-- ENDIF --&gt;</span>
</pre></blockquote>
<p>You may have wondered what the comparison to S_FIRST_ROW and S_LAST_ROW is about. If you haven't guessed already - it is checking for the first iteration of the loop with <code>S_FIRST_ROW</code> and the last iteration with <code>S_LAST_ROW</code>. This can come in handy quite often if you want to open or close design elements, like the above list. Let us imagine a folder loop build with three iterations, it would go this way:</p>
<blockquote><pre>
&lt;ul class=&quot;nav&quot;&gt; <span class="comment">&lt;!-- written on first iteration --&gt;</span>
&lt;li&gt;first element&lt;/li&gt; <span class="comment">&lt;!-- written on first iteration --&gt;</span>
&lt;li&gt;second element&lt;/li&gt; <span class="comment">&lt;!-- written on second iteration --&gt;</span>
&lt;li&gt;third element&lt;/li&gt; <span class="comment">&lt;!-- written on third iteration --&gt;</span>
&lt;/ul&gt; <span class="comment">&lt;!-- written on third iteration --&gt;</span>
</pre></blockquote>
<p>As you can see, all three elements are written down as well as the markup for the first iteration and the last one. Sometimes you want to omit writing the general markup - for example:</p>
<blockquote><pre>
<span class="comment">&lt;!-- IF folder.S_FIRST_ROW --&gt;</span>
&lt;ul class=&quot;nav&quot;&gt;
<span class="comment">&lt;!-- ELSEIF folder.S_LAST_ROW --&gt;</span>
&lt;/ul&gt;
<span class="comment">&lt;!-- ELSE --&gt;</span>
&lt;li&gt;&lt;a href=&quot;{folder.U_FOLDER}&quot;&gt;{folder.FOLDER_NAME}&lt;/a&gt;&lt;/li&gt;
<span class="comment">&lt;!-- ENDIF --&gt;</span>
</pre></blockquote>
<p>would result in the following markup:</p>
<blockquote><pre>
&lt;ul class=&quot;nav&quot;&gt; <span class="comment">&lt;!-- written on first iteration --&gt;</span>
&lt;li&gt;second element&lt;/li&gt; <span class="comment">&lt;!-- written on second iteration --&gt;</span>
&lt;/ul&gt; <span class="comment">&lt;!-- written on third iteration --&gt;</span>
</pre></blockquote>
<p>Just always remember that processing is taking place from up to down.</p>
</div>
<a href="#top">Top</a>
<br /><br />
@@ -1171,6 +1527,23 @@ markup
<a name="changes"></a><h1>5. Guidelines Changelog</h1>
<div class="paragraph">
<h2>Revision 1.9-1.10</h2>
<ul class="menu">
<li>Added sql_query_limit to <a href="#sql">2.iii. SQL/SQL Layout</a>.</li>
</ul>
<h2>Revision 1.8</h2>
<ul class="menu">
<li>Some adjustements to wordings</li>
<li>Updated paragraph <a href="#locations">1.iii. File Locations</a> to reflect recent changes</li>
<li>Extended paragraph <a href="#codelayout">2.ii. Code Layout</a>.</li>
<li>Added sql_in_set and sql_build_query explanation to <a href="#sql">2.iii. SQL/SQL Layout</a>.</li>
<li>Updated paragraph <a href="#styling">3. Styling</a>.</li>
<li>Updated paragraph <a href="#templating">4. Templating</a> to explain loop checking, loop breaking and other changes we recently made.</li>
</ul>
<h2>Revision 1.5</h2>
<ul class="menu">

View File

@@ -34,7 +34,7 @@ if (!$config['allow_attachments'] && !$config['allow_pm_attach'])
trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED');
}
$sql = 'SELECT attach_id, in_message, post_msg_id, extension
$sql = 'SELECT attach_id, in_message, post_msg_id, extension, is_orphan, poster_id
FROM ' . ATTACHMENTS_TABLE . "
WHERE attach_id = $download_id";
$result = $db->sql_query_limit($sql, 1);
@@ -52,57 +52,73 @@ if ((!$attachment['in_message'] && !$config['allow_attachments']) || ($attachmen
}
$row = array();
if (!$attachment['in_message'])
if ($attachment['is_orphan'])
{
//
$sql = 'SELECT p.forum_id, f.forum_password, f.parent_id
FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
WHERE p.post_id = ' . $attachment['post_msg_id'] . '
AND p.forum_id = f.forum_id';
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
// We allow admins having attachment permissions to see orphan attachments...
$own_attachment = ($auth->acl_get('a_attach') || $attachment['poster_id'] == $user->data['user_id']) ? true : false;
// Global announcement?
if (!$row)
if (!$own_attachment || ($attachment['in_message'] && !$auth->acl_get('u_pm_download')) || (!$attachment['in_message'] && !$auth->acl_get('u_download')))
{
$forum_id = request_var('f', 0);
$sql = 'SELECT forum_id, forum_password, parent_id
FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . $forum_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
trigger_error('ERROR_NO_ATTACHMENT');
}
if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']))
$extensions = $cache->obtain_attach_extensions();
}
else
{
if (!$attachment['in_message'])
{
if ($row['forum_password'])
//
$sql = 'SELECT p.forum_id, f.forum_password, f.parent_id
FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
WHERE p.post_id = ' . $attachment['post_msg_id'] . '
AND p.forum_id = f.forum_id';
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
// Global announcement?
if (!$row)
{
// Do something else ... ?
login_forum_box($row);
$forum_id = request_var('f', 0);
$sql = 'SELECT forum_id, forum_password, parent_id
FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . $forum_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
}
if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']))
{
if ($row['forum_password'])
{
// Do something else ... ?
login_forum_box($row);
}
}
else
{
trigger_error('SORRY_AUTH_VIEW_ATTACH');
}
}
else
{
trigger_error('SORRY_AUTH_VIEW_ATTACH');
$row['forum_id'] = 0;
if (!$auth->acl_get('u_pm_download'))
{
trigger_error('SORRY_AUTH_VIEW_ATTACH');
}
}
}
else
{
$row['forum_id'] = 0;
if (!$auth->acl_get('u_pm_download'))
{
trigger_error('SORRY_AUTH_VIEW_ATTACH');
}
}
// disallowed ?
$extensions = array();
if (!extension_allowed($row['forum_id'], $attachment['extension'], $extensions))
{
trigger_error(sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']));
// disallowed ?
$extensions = array();
if (!extension_allowed($row['forum_id'], $attachment['extension'], $extensions))
{
trigger_error(sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']));
}
}
if (!download_allowed())
@@ -113,7 +129,7 @@ if (!download_allowed())
$download_mode = (int) $extensions[$attachment['extension']]['download_mode'];
// Fetching filename here to prevent sniffing of filename
$sql = 'SELECT attach_id, in_message, post_msg_id, extension, physical_filename, real_filename, mimetype
$sql = 'SELECT attach_id, is_orphan, in_message, post_msg_id, extension, physical_filename, real_filename, mimetype
FROM ' . ATTACHMENTS_TABLE . "
WHERE attach_id = $download_id";
$result = $db->sql_query_limit($sql, 1);
@@ -125,7 +141,6 @@ if (!$attachment)
trigger_error('ERROR_NO_ATTACHMENT');
}
$attachment['physical_filename'] = basename($attachment['physical_filename']);
$display_cat = $extensions[$attachment['extension']]['display_cat'];
@@ -133,7 +148,7 @@ if ($thumbnail)
{
$attachment['physical_filename'] = 'thumb_' . $attachment['physical_filename'];
}
else if ($display_cat == ATTACHMENT_CATEGORY_NONE)
else if (($display_cat == ATTACHMENT_CATEGORY_NONE || $display_cat == ATTACHMENT_CATEGORY_IMAGE) && !$attachment['is_orphan'])
{
// Update download count
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
@@ -176,7 +191,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)
// 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 == ATTACHMENT_CATEGORY_NONE && strpos($attachment['mimetype'], 'image') === false)
if (strpos($attachment['mimetype'], 'image') !== 0)
{
$attachment['mimetype'] = (strpos(strtolower($user->browser), 'msie') !== false || strpos(strtolower($user->browser), 'opera') !== false) ? 'application/octetstream' : 'application/octet-stream';
}
@@ -189,15 +204,11 @@ function send_file_to_browser($attachment, $upload_dir, $category)
// Now send the File Contents to the Browser
$size = @filesize($filename);
// Might not be ideal to store the contents, but file_get_contents is binary-safe as well as the recommended method
// To correctly display further errors we need to make sure we are using the correct headers for both (unsetting content-length may not work)
$contents = @file_get_contents($filename);
// Check if headers already sent or not able to get the file contents.
if (headers_sent() || $contents === false)
if (headers_sent() || !@file_exists($filename) || !@is_readable($filename))
{
unset($contents);
// PHP track_errors setting On?
if (!empty($php_errormsg))
{
@@ -210,21 +221,65 @@ function send_file_to_browser($attachment, $upload_dir, $category)
// Now the tricky part... let's dance
header('Pragma: public');
// Send out the Headers
header('Content-type: ' . $attachment['mimetype'] . '; name="' . $attachment['real_filename'] . '"');
header('Content-Disposition: inline; filename="' . $attachment['real_filename'] . '"');
/**
* Commented out X-Sendfile support. To not expose the physical filename within the header if xsendfile is absent we need to look into methods of checking it's status.
*
* Try X-Sendfile since it is much more server friendly - only works if the path is *not* outside of the root path...
* lighttpd has core support for it. An apache2 module is available at http://celebnamer.celebworld.ws/stuff/mod_xsendfile/
*
* Not really ideal, but should work fine...
* <code>
* if (strpos($upload_dir, '/') !== 0 && strpos($upload_dir, '../') === false)
* {
* header('X-Sendfile: ' . $filename);
* }
* </code>
*/
// Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
header('Content-Type: ' . $attachment['mimetype']);
header('Content-Disposition: ' . ((strpos($attachment['mimetype'], 'image') === 0) ? 'inline' : 'attachment') . '; ' . header_filename($attachment['real_filename']));
if ($size)
{
header("Content-length: $size");
header("Content-Length: $size");
}
// Try to deliver in chunks
@set_time_limit(0);
$fp = @fopen($filename, 'rb');
if ($fp !== false)
{
while (!feof($fp))
{
echo fread($fp, 8192);
}
fclose($fp);
}
echo $contents;
unset($contents);
flush();
exit;
}
/*
* Get a browser friendly UTF-8 encoded filename
*/
function header_filename($file)
{
// There be dragons here...
// IE follows no RFC, follow the RFC for extended filename for the rest
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)
{
return "filename=" . rawurlencode($file);
}
else
{
return "filename*=UTF-8''" . rawurlencode($file);
}
}
/**
* Check if downloading item is allowed
*/

View File

@@ -0,0 +1,10 @@
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>

View File

@@ -80,6 +80,16 @@ class acm
@flock($fp, LOCK_UN);
fclose($fp);
}
else
{
// Now, this occurred how often? ... phew, just tell the user then...
if (!@is_writeable($this->cache_dir))
{
trigger_error($this->cache_dir . ' is NOT writeable.', E_USER_ERROR);
}
trigger_error('Not able to open ' . $this->cache_dir . 'data_global.' . $phpEx, E_USER_ERROR);
}
$this->is_modified = false;
}
@@ -132,7 +142,7 @@ class acm
*/
function get($var_name)
{
if ($var_name{0} == '_')
if ($var_name[0] == '_')
{
global $phpEx;
@@ -155,7 +165,7 @@ class acm
*/
function put($var_name, $var, $ttl = 31536000)
{
if ($var_name{0} == '_')
if ($var_name[0] == '_')
{
global $phpEx;
@@ -175,6 +185,32 @@ class acm
}
}
/**
* Purge cache data
*/
function purge()
{
// Purge all phpbb cache files
$dir = opendir($this->cache_dir);
while (($entry = readdir($dir)) !== false)
{
if (strpos($entry, 'sql_') !== 0 && strpos($entry, 'data_') !== 0 && strpos($entry, 'ctpl_') !== 0 && strpos($entry, 'tpl_') !== 0)
{
continue;
}
@unlink($this->cache_dir . $entry);
}
@closedir($dir);
unset($this->vars);
unset($this->var_expires);
unset($this->sql_rowset);
unset($this->sql_row_pointer);
$this->is_modified = false;
}
/**
* Destroy cache data
*/
@@ -213,7 +249,7 @@ class acm
return;
}
if ($var_name{0} == '_')
if ($var_name[0] == '_')
{
@unlink($this->cache_dir . 'data' . $var_name . ".$phpEx");
}
@@ -233,7 +269,7 @@ class acm
*/
function _exists($var_name)
{
if ($var_name{0} == '_')
if ($var_name[0] == '_')
{
global $phpEx;
return file_exists($this->cache_dir . 'data' . $var_name . ".$phpEx");
@@ -345,7 +381,7 @@ class acm
}
$db->sql_freeresult($query_result);
fwrite($fp, "<?php\n\n/*\n$query\n*/\n\n\$expired = (time() > " . (time() + $ttl) . ") ? true : false;\nif (\$expired) { return; }\n\n\$this->sql_rowset[\$query_id] = array(" . implode(',', $lines) . ') ?>');
fwrite($fp, "<?php\n\n/*\n" . str_replace('*/', '*\/', $query) . "\n*/\n\n\$expired = (time() > " . (time() + $ttl) . ") ? true : false;\nif (\$expired) { return; }\n\n\$this->sql_rowset[\$query_id] = array(" . implode(',', $lines) . ') ?>');
@flock($fp, LOCK_UN);
fclose($fp);
@@ -374,14 +410,6 @@ class acm
return false;
}
/**
* Fetch the number of rows from cache (database)
*/
function sql_numrows($query_id)
{
return sizeof($this->sql_rowset[$query_id]);
}
/**
* Fetch a field from the current row of a cached database result (database)
*/
@@ -398,7 +426,7 @@ class acm
/**
* Seek a specific row in an a cached database result (database)
*/
function sql_rowseek($query_id, $rownum)
function sql_rowseek($rownum, $query_id)
{
if ($rownum >= sizeof($this->sql_rowset[$query_id]))
{

View File

@@ -46,7 +46,8 @@ class acp_attachments
break;
default:
trigger_error('NO_MODE');
trigger_error('NO_MODE', E_USER_ERROR);
break;
}
$this->tpl_name = 'acp_attachments';
@@ -86,31 +87,42 @@ class acp_attachments
'img_max_width' => false, 'img_max_height' => false, 'img_link_width' => false, 'img_link_height' => false,
'legend1' => 'ACP_ATTACHMENT_SETTINGS',
'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false),
'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false),
'upload_path' => array('lang' => 'UPLOAD_DIR', 'type' => 'text:25:100', 'explain' => true),
'display_order' => array('lang' => 'DISPLAY_ORDER', 'type' => 'custom', 'method' => 'display_order', 'explain' => true),
'attachment_quota' => array('lang' => 'ATTACH_QUOTA', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
'max_filesize' => array('lang' => 'ATTACH_MAX_FILESIZE', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
'max_filesize_pm' => array('lang' => 'ATTACH_MAX_PM_FILESIZE','type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
'max_attachments' => array('lang' => 'MAX_ATTACHMENTS', 'type' => 'text:3:3', 'explain' => false),
'max_attachments_pm' => array('lang' => 'MAX_ATTACHMENTS_PM', 'type' => 'text:3:3', 'explain' => false),
'secure_downloads' => array('lang' => 'SECURE_DOWNLOADS', 'type' => 'radio:yes_no', 'explain' => true),
'secure_allow_deny' => array('lang' => 'SECURE_ALLOW_DENY', 'type' => 'custom', 'method' => 'select_allow_deny', 'explain' => true),
'secure_allow_empty_referer' => array('lang' => 'SECURE_EMPTY_REFERRER', 'type' => 'radio:yes_no', 'explain' => true),
'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'upload_path' => array('lang' => 'UPLOAD_DIR', 'validate' => 'wpath', 'type' => 'text:25:100', 'explain' => true),
'display_order' => array('lang' => 'DISPLAY_ORDER', 'validate' => 'bool', 'type' => 'custom', 'method' => 'display_order', 'explain' => true),
'attachment_quota' => array('lang' => 'ATTACH_QUOTA', 'validate' => 'int', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
'max_filesize' => array('lang' => 'ATTACH_MAX_FILESIZE', 'validate' => 'int', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
'max_filesize_pm' => array('lang' => 'ATTACH_MAX_PM_FILESIZE','validate' => 'int', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
'max_attachments' => array('lang' => 'MAX_ATTACHMENTS', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => false),
'max_attachments_pm' => array('lang' => 'MAX_ATTACHMENTS_PM', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => false),
'secure_downloads' => array('lang' => 'SECURE_DOWNLOADS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'secure_allow_deny' => array('lang' => 'SECURE_ALLOW_DENY', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_allow_deny', 'explain' => true),
'secure_allow_empty_referer' => array('lang' => 'SECURE_EMPTY_REFERRER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => $l_legend_cat_images,
'img_display_inlined' => array('lang' => 'DISPLAY_INLINED', 'type' => 'radio:yes_no', 'explain' => true),
'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'type' => 'radio:yes_no', 'explain' => true),
'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
'img_imagick' => array('lang' => 'IMAGICK_PATH', 'type' => 'text:20:200', 'explain' => true, 'append' => '&nbsp;&nbsp;<span>[ <a href="' . $this->u_action . '&amp;action=imgmagick">' . $user->lang['SEARCH_IMAGICK'] . '</a> ]</span>'),
'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'type' => 'dimension:3:4', 'explain' => true),
'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'type' => 'dimension:3:4', 'explain' => true),
'img_display_inlined' => array('lang' => 'DISPLAY_INLINED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' px'),
'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
'img_imagick' => array('lang' => 'IMAGICK_PATH', 'validate' => 'string', 'type' => 'text:20:200', 'explain' => true, 'append' => '&nbsp;&nbsp;<span>[ <a href="' . $this->u_action . '&amp;action=imgmagick">' . $user->lang['SEARCH_IMAGICK'] . '</a> ]</span>'),
'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true),
'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true),
)
);
$this->new_config = $config;
$cfg_array = (isset($_REQUEST['config'])) ? request_var('config', array('' => '')) : $this->new_config;
$error = array();
// We validate the complete config if whished
validate_config_vars($display_vars['vars'], $cfg_array, $error);
// Do not write values if there is an error
if (sizeof($error))
{
$submit = false;
}
// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
foreach ($display_vars['vars'] as $config_name => $null)
@@ -197,7 +209,9 @@ class acp_attachments
$template->assign_vars(array(
'S_SECURE_DOWNLOADS' => $this->new_config['secure_downloads'],
'S_DEFINED_IPS' => ($defined_ips != '') ? true : false,
'S_WARNING' => (sizeof($error)) ? true : false,
'WARNING_MSG' => implode('<br />', $error),
'DEFINED_IPS' => $defined_ips,
'L_SECURE_TITLE' => $user->lang['DEFINE_' . $allow_deny . '_IPS'],
@@ -403,12 +417,12 @@ class acp_attachments
if ($action != 'add' && $action != 'edit')
{
trigger_error('WRONG_MODE');
trigger_error('NO_MODE', E_USER_ERROR);
}
if (!$group_id && $action == 'edit')
{
trigger_error('NO_EXT_GROUP_SPECIFIED');
trigger_error($user->lang['NO_EXT_GROUP_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if ($group_id)
@@ -437,7 +451,7 @@ class acp_attachments
{
$sql = 'SELECT group_id
FROM ' . EXTENSION_GROUPS_TABLE . "
WHERE LOWER(group_name) = '" . $db->sql_escape(strtolower($new_group_name)) . "'";
WHERE LOWER(group_name) = '" . $db->sql_escape(utf8_strtolower($new_group_name)) . "'";
$result = $db->sql_query($sql);
if ($db->sql_fetchrow($result))
@@ -521,15 +535,16 @@ class acp_attachments
}
$cat_lang = array(
ATTACHMENT_CATEGORY_NONE => $user->lang['NO_FILE_CAT'],
ATTACHMENT_CATEGORY_IMAGE => $user->lang['CAT_IMAGES'],
ATTACHMENT_CATEGORY_WM => $user->lang['CAT_WM_FILES'],
ATTACHMENT_CATEGORY_RM => $user->lang['CAT_RM_FILES']
ATTACHMENT_CATEGORY_NONE => $user->lang['NO_FILE_CAT'],
ATTACHMENT_CATEGORY_IMAGE => $user->lang['CAT_IMAGES'],
ATTACHMENT_CATEGORY_WM => $user->lang['CAT_WM_FILES'],
ATTACHMENT_CATEGORY_RM => $user->lang['CAT_RM_FILES'],
ATTACHMENT_CATEGORY_FLASH => $user->lang['CAT_FLASH_FILES'],
ATTACHMENT_CATEGORY_QUICKTIME => $user->lang['CAT_QUICKTIME_FILES'],
);
$group_id = request_var('g', 0);
$action = (isset($_POST['add'])) ? 'add' : $action;
// $action = (($action == 'add' || $action == 'edit') && $submit && !sizeof($error)) ? 'show' : $action;
switch ($action)
{
@@ -578,7 +593,7 @@ class acp_attachments
if (!$group_id)
{
trigger_error($user->lang['NO_EXTENSION_GROUP'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_EXT_GROUP_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -770,7 +785,7 @@ class acp_attachments
if (!$group_id)
{
trigger_error($user->lang['NO_EXTENSION_GROUP'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_EXT_GROUP_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . '
@@ -823,24 +838,45 @@ class acp_attachments
$add_files = (isset($_POST['add'])) ? array_keys(request_var('add', array('' => 0))) : array();
$post_ids = request_var('post_id', array('' => 0));
foreach ($delete_files as $delete)
if (sizeof($delete_files))
{
phpbb_unlink($delete);
phpbb_unlink($delete, 'thumbnail');
$sql = 'SELECT *
FROM ' . ATTACHMENTS_TABLE . '
WHERE ' . $db->sql_in_set('attach_id', $delete_files) . '
AND is_orphan = 1';
$result = $db->sql_query($sql);
$delete_files = array();
while ($row = $db->sql_fetchrow($result))
{
phpbb_unlink($row['physical_filename']);
if ($row['thumbnail'])
{
phpbb_unlink($row['physical_filename'], 'thumbnail');
}
$delete_files[$row['attach_id']] = $row['real_filename'];
}
$db->sql_freeresult($result);
}
if (sizeof($delete_files))
{
$sql = 'DELETE FROM ' . ATTACHMENTS_TABLE . '
WHERE ' . $db->sql_in_set('attach_id', array_keys($delete_files));
$db->sql_query($sql);
add_log('admin', 'LOG_ATTACH_ORPHAN_DEL', implode(', ', $delete_files));
$notify[] = sprintf($user->lang['LOG_ATTACH_ORPHAN_DEL'], implode(', ', $delete_files));
}
$upload_list = array();
foreach ($add_files as $file)
foreach ($add_files as $attach_id)
{
if (!in_array($file, $delete_files) && $post_ids[$file])
if (!in_array($attach_id, array_keys($delete_files)) && !empty($post_ids[$attach_id]))
{
$upload_list[$post_ids[$file]] = $file;
$upload_list[$attach_id] = $post_ids[$attach_id];
}
}
unset($add_files);
@@ -849,13 +885,10 @@ class acp_attachments
{
$template->assign_var('S_UPLOADING_FILES', true);
include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
$message_parser = new parse_message();
$sql = 'SELECT forum_id, forum_name
FROM ' . FORUMS_TABLE;
$result = $db->sql_query($sql);
$forum_names = array();
while ($row = $db->sql_fetchrow($result))
{
@@ -863,30 +896,67 @@ class acp_attachments
}
$db->sql_freeresult($result);
$sql = 'SELECT forum_id, topic_id, post_id
$sql = 'SELECT forum_id, topic_id, post_id, poster_id
FROM ' . POSTS_TABLE . '
WHERE ' . $db->sql_in_set('post_id', array_keys($upload_list));
WHERE ' . $db->sql_in_set('post_id', $upload_list);
$result = $db->sql_query($sql);
$post_info = array();
while ($row = $db->sql_fetchrow($result))
{
$post_info[$row['post_id']] = $row;
}
$db->sql_freeresult($result);
// Select those attachments we want to change...
$sql = 'SELECT *
FROM ' . ATTACHMENTS_TABLE . '
WHERE ' . $db->sql_in_set('attach_id', array_keys($upload_list)) . '
AND is_orphan = 1';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$return = true;
if ($auth->acl_get('f_attach', $row['forum_id']))
{
$return = $this->upload_file($row['post_id'], $row['topic_id'], $row['forum_id'], $config['upload_path'], $upload_list[$row['post_id']]);
}
$post_row = $post_info[$upload_list[$row['attach_id']]];
$template->assign_block_vars('upload', array(
'FILE_INFO' => sprintf($user->lang['UPLOADING_FILE_TO'], $upload_list[$row['post_id']], $row['post_id']),
'S_DENIED' => (!$auth->acl_get('f_attach', $row['forum_id'])) ? true : false,
'L_DENIED' => (!$auth->acl_get('f_attach', $row['forum_id'])) ? sprintf($user->lang['UPLOAD_DENIED_FORUM'], $forum_names[$row['forum_id']]) : '',
'ERROR_MSG' => ($return === true) ? false : $return)
'FILE_INFO' => sprintf($user->lang['UPLOADING_FILE_TO'], $row['real_filename'], $post_row['post_id']),
'S_DENIED' => (!$auth->acl_get('f_attach', $post_row['forum_id'])) ? true : false,
'L_DENIED' => (!$auth->acl_get('f_attach', $post_row['forum_id'])) ? sprintf($user->lang['UPLOAD_DENIED_FORUM'], $forum_names[$row['forum_id']]) : '')
);
if (!$auth->acl_get('f_attach', $post_row['forum_id']))
{
continue;
}
// Adjust attachment entry
$sql_ary = array(
'in_message' => 0,
'is_orphan' => 0,
'poster_id' => $post_row['poster_id'],
'post_msg_id' => $post_row['post_id'],
'topic_id' => $post_row['topic_id'],
);
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE attach_id = ' . $row['attach_id'];
$db->sql_query($sql);
$sql = 'UPDATE ' . POSTS_TABLE . '
SET post_attachment = 1
WHERE post_id = ' . $post_row['post_id'];
$db->sql_query($sql);
$sql = 'UPDATE ' . TOPICS_TABLE . '
SET topic_attachment = 1
WHERE topic_id = ' . $post_row['topic_id'];
$db->sql_query($sql);
add_log('admin', 'LOG_ATTACH_FILEUPLOAD', $post_row['post_id'], $row['real_filename']);
}
$db->sql_freeresult($result);
unset($message_parser);
}
}
@@ -894,43 +964,31 @@ class acp_attachments
'S_ORPHAN' => true)
);
$attach_filelist = array();
$dir = @opendir($phpbb_root_path . $config['upload_path']);
while (($file = @readdir($dir)) !== false)
{
if (is_file($phpbb_root_path . $config['upload_path'] . '/' . $file) && filesize($phpbb_root_path . $config['upload_path'] . '/' . $file) && $file{0} != '.' && $file != 'index.htm' && !preg_match('#^thumb\_#', $file))
{
$attach_filelist[$file] = $file;
}
}
@closedir($dir);
$sql = 'SELECT physical_filename
FROM ' . ATTACHMENTS_TABLE;
// Just get the files with is_orphan set and older than 3 hours
$sql = 'SELECT *
FROM ' . ATTACHMENTS_TABLE . '
WHERE is_orphan = 1
AND filetime < ' . (time() - 3*60*60) . '
ORDER BY filetime DESC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
unset($attach_filelist[$row['physical_filename']]);
$size_lang = ($row['filesize'] >= 1048576) ? $user->lang['MB'] : (($row['filesize'] >= 1024) ? $user->lang['KB'] : $user->lang['BYTES']);
$row['filesize'] = ($row['filesize'] >= 1048576) ? round((round($row['filesize'] / 1048576 * 100) / 100), 2) : (($row['filesize'] >= 1024) ? round((round($row['filesize'] / 1024 * 100) / 100), 2) : $row['filesize']);
$template->assign_block_vars('orphan', array(
'FILESIZE' => $row['filesize'] . ' ' . $size_lang,
'FILETIME' => $user->format_date($row['filetime']),
'REAL_FILENAME' => basename($row['real_filename']),
'PHYSICAL_FILENAME' => basename($row['physical_filename']),
'ATTACH_ID' => $row['attach_id'],
'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? $post_ids[$row['attach_id']] : '',
'U_FILE' => append_sid($phpbb_root_path . 'download.' . $phpEx, 'id=' . $row['attach_id']))
);
}
$db->sql_freeresult($result);
$i = 0;
foreach ($attach_filelist as $file)
{
$filesize = @filesize($phpbb_root_path . $config['upload_path'] . '/' . $file);
$size_lang = ($filesize >= 1048576) ? $user->lang['MB'] : ( ($filesize >= 1024) ? $user->lang['KB'] : $user->lang['BYTES'] );
$filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize);
$template->assign_block_vars('orphan', array(
'FILESIZE' => $filesize . ' ' . $size_lang,
'U_FILE' => $phpbb_root_path . $config['upload_path'] . '/' . $file,
'FILE' => $file,
'POST_IDS' => (!empty($post_ids[$file])) ? $post_ids[$file] : '')
);
}
break;
}
@@ -959,10 +1017,12 @@ class acp_attachments
global $db, $user;
$types = array(
ATTACHMENT_CATEGORY_NONE => $user->lang['NO_FILE_CAT'],
ATTACHMENT_CATEGORY_IMAGE => $user->lang['CAT_IMAGES'],
ATTACHMENT_CATEGORY_WM => $user->lang['CAT_WM_FILES'],
ATTACHMENT_CATEGORY_RM => $user->lang['CAT_RM_FILES']
ATTACHMENT_CATEGORY_NONE => $user->lang['NO_FILE_CAT'],
ATTACHMENT_CATEGORY_IMAGE => $user->lang['CAT_IMAGES'],
ATTACHMENT_CATEGORY_WM => $user->lang['CAT_WM_FILES'],
ATTACHMENT_CATEGORY_RM => $user->lang['CAT_RM_FILES'],
ATTACHMENT_CATEGORY_FLASH => $user->lang['CAT_FLASH_FILES'],
ATTACHMENT_CATEGORY_QUICKTIME => $user->lang['CAT_QUICKTIME_FILES'],
);
if ($group_id)
@@ -1079,70 +1139,6 @@ class acp_attachments
return $group_select;
}
/**
* Upload already uploaded file... huh? are you kidding?
*/
function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename)
{
global $message_parser, $db, $user, $phpbb_root_path;
$message_parser->attachment_data = array();
$message_parser->filename_data['filecomment'] = '';
$message_parser->filename_data['filename'] = $phpbb_root_path . $upload_dir . '/' . basename($filename);
$filedata = upload_attachment('local', $forum_id, true, $phpbb_root_path . $upload_dir . '/' . basename($filename));
if ($filedata['post_attach'] && !sizeof($filedata['error']))
{
$message_parser->attachment_data = array(
'post_msg_id' => $post_id,
'poster_id' => $user->data['user_id'],
'topic_id' => $topic_id,
'in_message' => 0,
'physical_filename' => $filedata['physical_filename'],
'real_filename' => $filedata['real_filename'],
'attach_comment' => $message_parser->filename_data['filecomment'],
'extension' => $filedata['extension'],
'mimetype' => $filedata['mimetype'],
'filesize' => $filedata['filesize'],
'filetime' => $filedata['filetime'],
'thumbnail' => $filedata['thumbnail']
);
$message_parser->filename_data['filecomment'] = '';
$filedata['post_attach'] = false;
// Submit Attachment
$attach_sql = $message_parser->attachment_data;
$db->sql_transaction('begin');
$sql = 'INSERT INTO ' . ATTACHMENTS_TABLE . ' ' . $db->sql_build_array('INSERT', $attach_sql);
$db->sql_query($sql);
$sql = 'UPDATE ' . POSTS_TABLE . "
SET post_attachment = 1
WHERE post_id = $post_id";
$db->sql_query($sql);
$sql = 'UPDATE ' . TOPICS_TABLE . "
SET topic_attachment = 1
WHERE topic_id = $topic_id";
$db->sql_query($sql);
$db->sql_transaction('commit');
add_log('admin', 'LOG_ATTACH_FILEUPLOAD', $post_id, $filename);
return true;
}
else if (sizeof($filedata['error']))
{
return sprintf($user->lang['ADMIN_UPLOAD_ERROR'], implode('<br />', $filedata['error']));
}
}
/**
* Search Imagick
*/
@@ -1369,7 +1365,7 @@ class acp_attachments
add_log('admin', $log_entry, $ip_list_log);
}
trigger_error($user->lang['SECURE_DOWNLOAD_UPDATE_SUCCESS']);
trigger_error($user->lang['SECURE_DOWNLOAD_UPDATE_SUCCESS'] . adm_back_link($this->u_action));
}
else if (isset($_POST['unsecuresubmit']))
{
@@ -1398,7 +1394,7 @@ class acp_attachments
add_log('admin', 'LOG_DOWNLOAD_REMOVE_IP', $l_unip_list);
}
trigger_error($user->lang['SECURE_DOWNLOAD_UPDATE_SUCCESS']);
trigger_error($user->lang['SECURE_DOWNLOAD_UPDATE_SUCCESS'] . adm_back_link($this->u_action));
}
}

View File

@@ -126,7 +126,7 @@ class acp_ban
AND u.user_id = b.ban_userid
AND b.ban_userid <> 0
AND u.user_id <> ' . ANONYMOUS . '
ORDER BY u.username ASC';
ORDER BY u.username_clean ASC';
break;
case 'ip':
@@ -189,7 +189,7 @@ class acp_ban
$template->assign_block_vars('ban_reason', array(
'BAN_ID' => $ban_id,
'REASON' => $reason,
'A_REASON' => addslashes(html_entity_decode($reason)))
'A_REASON' => addslashes(htmlspecialchars_decode($reason)))
);
}
}
@@ -201,7 +201,7 @@ class acp_ban
$template->assign_block_vars('ban_give_reason', array(
'BAN_ID' => $ban_id,
'REASON' => $reason,
'A_REASON' => addslashes(html_entity_decode($reason)))
'A_REASON' => addslashes(htmlspecialchars_decode($reason)))
);
}
}

View File

@@ -47,13 +47,13 @@ class acp_bbcodes
if (!$row)
{
trigger_error('BBCODE_NOT_EXIST');
trigger_error($user->lang['BBCODE_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$bbcode_match = $row['bbcode_match'];
$bbcode_tpl = htmlspecialchars($row['bbcode_tpl']);
$display_on_posting = $row['display_on_posting'];
$bbcode_helpline = html_entity_decode($row['bbcode_helpline']);
$bbcode_helpline = $row['bbcode_helpline'];
break;
case 'modify':
@@ -66,7 +66,7 @@ class acp_bbcodes
if (!$row)
{
trigger_error('BBCODE_NOT_EXIST');
trigger_error($user->lang['BBCODE_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// No break here
@@ -75,8 +75,8 @@ class acp_bbcodes
$display_on_posting = request_var('display_on_posting', 0);
$bbcode_match = request_var('bbcode_match', '');
$bbcode_tpl = html_entity_decode(request_var('bbcode_tpl', ''));
$bbcode_helpline = htmlspecialchars(request_var('bbcode_helpline', ''));
$bbcode_tpl = htmlspecialchars_decode(request_var('bbcode_tpl', ''));
$bbcode_helpline = request_var('bbcode_helpline', '', true);
break;
}
@@ -127,12 +127,18 @@ class acp_bbcodes
$info = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($info['test'] === '1' || in_array(strtolower($data['bbcode_tag']), $hard_coded))
// Grab the end, interrogate the last closing tag
if ($info['test'] === '1' || in_array(strtolower($data['bbcode_tag']), $hard_coded) || (preg_match('#\[/([^[]*)]$#', $bbcode_match, $regs) && in_array(strtolower($regs[1]), $hard_coded)))
{
trigger_error('BBCODE_INVALID_TAG_NAME');
trigger_error($user->lang['BBCODE_INVALID_TAG_NAME'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
if (!preg_match('#\[' . $data['bbcode_tag'] .'].*?\[/' . $data['bbcode_tag'] . ']#s', $bbcode_match))
{
trigger_error($user->lang['BBCODE_OPEN_ENDED_TAG'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql_ary = array(
'bbcode_tag' => $data['bbcode_tag'],
'bbcode_match' => $bbcode_match,
@@ -170,12 +176,13 @@ class acp_bbcodes
if ($bbcode_id > 1511)
{
trigger_error('TOO_MANY_BBCODES');
trigger_error($user->lang['TOO_MANY_BBCODES'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql_ary['bbcode_id'] = (int) $bbcode_id;
$db->sql_query('INSERT INTO ' . BBCODES_TABLE . $db->sql_build_array('INSERT', $sql_ary));
$cache->destroy('sql', BBCODES_TABLE);
$lang = 'BBCODE_ADDED';
$log_action = 'LOG_BBCODE_ADD';
@@ -186,6 +193,7 @@ class acp_bbcodes
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE bbcode_id = ' . $bbcode_id;
$db->sql_query($sql);
$cache->destroy('sql', BBCODES_TABLE);
$lang = 'BBCODE_EDITED';
$log_action = 'LOG_BBCODE_EDIT';
@@ -208,8 +216,21 @@ class acp_bbcodes
if ($row)
{
$db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id");
add_log('admin', 'LOG_BBCODE_DELETE', $row['bbcode_tag']);
if (confirm_box(true))
{
$db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id");
$cache->destroy('sql', BBCODES_TABLE);
add_log('admin', 'LOG_BBCODE_DELETE', $row['bbcode_tag']);
}
else
{
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
'bbcode' => $bbcode_id,
'i' => $id,
'mode' => $mode,
'action' => $action))
);
}
}
break;
@@ -221,7 +242,7 @@ class acp_bbcodes
$sql = 'SELECT *
FROM ' . BBCODES_TABLE . '
ORDER BY bbcode_id';
ORDER BY bbcode_tag';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -290,7 +311,7 @@ class acp_bbcodes
if (preg_match_all('/(?<!\\\\)\$([0-9]+)/', $replace, $repad))
{
$repad = $pad + sizeof(array_unique($repad[0]));
$replace = preg_replace('/(?<!\\\\)\$([0-9]+)/e', "'\$' . (\$1 + \$pad)", $replace);
$replace = preg_replace('/(?<!\\\\)\$([0-9]+)/e', "'\${' . (\$1 + \$pad) . '}'", $replace);
$pad = $repad;
}
@@ -320,7 +341,7 @@ class acp_bbcodes
$fp_replace = str_replace($token, $replace, $fp_replace);
$sp_match = str_replace(preg_quote($token, '!'), '(.*?)', $sp_match);
$sp_replace = str_replace($token, '$' . ($n + 1), $sp_replace);
$sp_replace = str_replace($token, '${' . ($n + 1) . '}', $sp_replace);
}
$fp_match = '!' . $fp_match . '!' . $modifiers;

View File

@@ -27,6 +27,7 @@ class acp_board
$action = request_var('action', '');
$submit = (isset($_POST['submit'])) ? true : false;
// Validation types are: string, int, bool, rpath (relative), rwpath (realtive, writeable), path (relative path, but able to escape the root), wpath (writeable)
switch ($mode)
{
case 'settings':
@@ -34,19 +35,19 @@ class acp_board
'title' => 'ACP_BOARD_SETTINGS',
'vars' => array(
'legend1' => 'ACP_BOARD_SETTINGS',
'sitename' => array('lang' => 'SITE_NAME', 'type' => 'text:40:255', 'explain' => false),
'site_desc' => array('lang' => 'SITE_DESC', 'type' => 'text:40:255', 'explain' => false),
'board_disable' => array('lang' => 'DISABLE_BOARD', 'type' => 'custom', 'method' => 'board_disable', 'explain' => true),
'sitename' => array('lang' => 'SITE_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
'site_desc' => array('lang' => 'SITE_DESC', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
'board_disable' => array('lang' => 'DISABLE_BOARD', 'validate' => 'bool', 'type' => 'custom', 'method' => 'board_disable', 'explain' => true),
'board_disable_msg' => false,
'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'type' => 'custom', 'method' => 'dateformat_select', 'explain' => true),
'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}', 1), 'explain' => false),
'board_dst' => array('lang' => 'SYSTEM_DST', 'type' => 'radio:yes_no', 'explain' => false),
'default_style' => array('lang' => 'DEFAULT_STYLE', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', 1), 'explain' => false),
'override_user_style' => array('lang' => 'OVERRIDE_STYLE', 'type' => 'radio:yes_no', 'explain' => true),
'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'validate' => 'string', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'validate' => 'string', 'type' => 'custom', 'method' => 'dateformat_select', 'explain' => true),
'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'validate' => 'string', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}', 1), 'explain' => false),
'board_dst' => array('lang' => 'SYSTEM_DST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'default_style' => array('lang' => 'DEFAULT_STYLE', 'validate' => 'int', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', 1), 'explain' => false),
'override_user_style' => array('lang' => 'OVERRIDE_STYLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'WARNINGS',
'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'type' => 'text:3:4', 'explain' => true),
'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
)
);
break;
@@ -56,29 +57,25 @@ class acp_board
'title' => 'ACP_BOARD_FEATURES',
'vars' => array(
'legend1' => 'ACP_BOARD_FEATURES',
'allow_privmsg' => array('lang' => 'BOARD_PM', 'type' => 'radio:yes_no', 'explain' => true),
'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'type' => 'radio:yes_no', 'explain' => false),
'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'type' => 'radio:yes_no', 'explain' => false),
'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'type' => 'radio:yes_no', 'explain' => false),
'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false),
'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false),
'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'type' => 'radio:yes_no', 'explain' => false),
'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig' => array('lang' => 'ALLOW_SIG', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_bbcode' => array('lang' => 'ALLOW_SIG_BBCODE', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_img' => array('lang' => 'ALLOW_SIG_IMG', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_flash' => array('lang' => 'ALLOW_SIG_FLASH', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_smilies' => array('lang' => 'ALLOW_SIG_SMILIES', 'type' => 'radio:yes_no', 'explain' => false),
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'type' => 'radio:yes_no', 'explain' => true),
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'type' => 'radio:yes_no', 'explain' => true),
'allow_privmsg' => array('lang' => 'BOARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig' => array('lang' => 'ALLOW_SIG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'ACP_LOAD_SETTINGS',
'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'type' => 'radio:yes_no', 'explain' => false),
'load_moderators' => array('lang' => 'YES_MODERATORS', 'type' => 'radio:yes_no', 'explain' => false),
'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'type' => 'radio:yes_no', 'explain' => false),
'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
)
);
break;
@@ -90,14 +87,14 @@ class acp_board
'legend1' => 'ACP_AVATAR_SETTINGS',
'avatar_min_height' => false, 'avatar_min_width' => false, 'avatar_max_height' => false, 'avatar_max_width' => false,
'allow_avatar_local' => array('lang' => 'ALLOW_LOCAL', 'type' => 'radio:yes_no', 'explain' => false),
'allow_avatar_remote' => array('lang' => 'ALLOW_REMOTE', 'type' => 'radio:yes_no', 'explain' => true),
'allow_avatar_upload' => array('lang' => 'ALLOW_UPLOAD', 'type' => 'radio:yes_no', 'explain' => false),
'avatar_filesize' => array('lang' => 'MAX_FILESIZE', 'type' => 'text:4:10', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
'avatar_min' => array('lang' => 'MIN_AVATAR_SIZE', 'type' => 'dimension:3:4', 'explain' => true),
'avatar_max' => array('lang' => 'MAX_AVATAR_SIZE', 'type' => 'dimension:3:4', 'explain' => true),
'avatar_path' => array('lang' => 'AVATAR_STORAGE_PATH', 'type' => 'text:20:255', 'explain' => true),
'avatar_gallery_path' => array('lang' => 'AVATAR_GALLERY_PATH', 'type' => 'text:20:255', 'explain' => true)
'allow_avatar_local' => array('lang' => 'ALLOW_LOCAL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_avatar_remote' => array('lang' => 'ALLOW_REMOTE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_avatar_upload' => array('lang' => 'ALLOW_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'avatar_filesize' => array('lang' => 'MAX_FILESIZE', 'validate' => 'int', 'type' => 'text:4:10', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
'avatar_min' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'avatar_max' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'avatar_path' => array('lang' => 'AVATAR_STORAGE_PATH', 'validate' => 'rwpath', 'type' => 'text:20:255', 'explain' => true),
'avatar_gallery_path' => array('lang' => 'AVATAR_GALLERY_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true)
)
);
break;
@@ -108,23 +105,23 @@ class acp_board
'lang' => 'ucp',
'vars' => array(
'legend1' => 'GENERAL_SETTINGS',
'allow_privmsg' => array('lang' => 'BOARD_PM', 'type' => 'radio:yes_no', 'explain' => true),
'pm_max_boxes' => array('lang' => 'BOXES_MAX', 'type' => 'text:4:4', 'explain' => true),
'pm_max_msgs' => array('lang' => 'BOXES_LIMIT', 'type' => 'text:4:4', 'explain' => true),
'full_folder_action' => array('lang' => 'FULL_FOLDER_ACTION', 'type' => 'select', 'method' => 'full_folder_select', 'explain' => true),
'pm_edit_time' => array('lang' => 'PM_EDIT_TIME', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'allow_privmsg' => array('lang' => 'BOARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'pm_max_boxes' => array('lang' => 'BOXES_MAX', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
'pm_max_msgs' => array('lang' => 'BOXES_LIMIT', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
'full_folder_action' => array('lang' => 'FULL_FOLDER_ACTION', 'validate' => 'int', 'type' => 'select', 'method' => 'full_folder_select', 'explain' => true),
'pm_edit_time' => array('lang' => 'PM_EDIT_TIME', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'legend2' => 'GENERAL_OPTIONS',
'allow_mass_pm' => array('lang' => 'ALLOW_MASS_PM', 'type' => 'radio:yes_no', 'explain' => false),
'auth_bbcode_pm' => array('lang' => 'ALLOW_BBCODE_PM', 'type' => 'radio:yes_no', 'explain' => false),
'auth_smilies_pm' => array('lang' => 'ALLOW_SMILIES_PM', 'type' => 'radio:yes_no', 'explain' => false),
'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_pm' => array('lang' => 'ALLOW_SIG_PM', 'type' => 'radio:yes_no', 'explain' => false),
'print_pm' => array('lang' => 'ALLOW_PRINT_PM', 'type' => 'radio:yes_no', 'explain' => false),
'forward_pm' => array('lang' => 'ALLOW_FORWARD_PM', 'type' => 'radio:yes_no', 'explain' => false),
'auth_img_pm' => array('lang' => 'ALLOW_IMG_PM', 'type' => 'radio:yes_no', 'explain' => false),
'auth_flash_pm' => array('lang' => 'ALLOW_FLASH_PM', 'type' => 'radio:yes_no', 'explain' => false),
'enable_pm_icons' => array('lang' => 'ENABLE_PM_ICONS', 'type' => 'radio:yes_no', 'explain' => false)
'allow_mass_pm' => array('lang' => 'ALLOW_MASS_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'auth_bbcode_pm' => array('lang' => 'ALLOW_BBCODE_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'auth_smilies_pm' => array('lang' => 'ALLOW_SMILIES_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_pm' => array('lang' => 'ALLOW_SIG_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'print_pm' => array('lang' => 'ALLOW_PRINT_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'forward_pm' => array('lang' => 'ALLOW_FORWARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'auth_img_pm' => array('lang' => 'ALLOW_IMG_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'auth_flash_pm' => array('lang' => 'ALLOW_FLASH_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'enable_pm_icons' => array('lang' => 'ENABLE_PM_ICONS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false)
)
);
break;
@@ -134,31 +131,32 @@ class acp_board
'title' => 'ACP_POST_SETTINGS',
'vars' => array(
'legend1' => 'GENERAL_OPTIONS',
'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'type' => 'radio:yes_no', 'explain' => false),
'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'type' => 'radio:yes_no', 'explain' => false),
'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'type' => 'radio:yes_no', 'explain' => false),
'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'type' => 'radio:yes_no', 'explain' => false),
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'type' => 'radio:yes_no', 'explain' => true),
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'type' => 'radio:yes_no', 'explain' => true),
'enable_post_confirm' => array('lang' => 'VISUAL_CONFIRM_POST', 'type' => 'radio:yes_no', 'explain' => true),
'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_post_links' => array('lang' => 'ALLOW_POST_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'enable_post_confirm' => array('lang' => 'VISUAL_CONFIRM_POST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'POSTING',
'bump_type' => false,
'edit_time' => array('lang' => 'EDIT_TIME', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'type' => 'radio:yes_no', 'explain' => true),
'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'type' => 'text:3:4', 'explain' => true),
'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true),
'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'type' => 'text:3:4', 'explain' => false),
'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'type' => 'text:3:4', 'explain' => false),
'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'type' => 'text:3:4', 'explain' => false),
'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'type' => 'text:4:4', 'explain' => false),
'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'type' => 'text:4:6', 'explain' => true),
'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'type' => 'text:4:4', 'explain' => true),
'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'type' => 'text:5:4', 'explain' => true),
'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'type' => 'text:5:4', 'explain' => true),
'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'type' => 'text:4:4', 'explain' => true),
'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'type' => 'text:5:4', 'explain' => true),
'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'type' => 'text:5:4', 'explain' => true),
'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'validate' => 'int', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true),
'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => false),
'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => false),
'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => false),
'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => false),
'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'validate' => 'int', 'type' => 'text:4:6', 'explain' => true),
'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true),
'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
)
);
break;
@@ -168,19 +166,20 @@ class acp_board
'title' => 'ACP_SIGNATURE_SETTINGS',
'vars' => array(
'legend1' => 'GENERAL_OPTIONS',
'allow_sig' => array('lang' => 'ALLOW_SIG', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_bbcode' => array('lang' => 'ALLOW_SIG_BBCODE', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_img' => array('lang' => 'ALLOW_SIG_IMG', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_flash' => array('lang' => 'ALLOW_SIG_FLASH', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_smilies' => array('lang' => 'ALLOW_SIG_SMILIES', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig' => array('lang' => 'ALLOW_SIG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_bbcode' => array('lang' => 'ALLOW_SIG_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_img' => array('lang' => 'ALLOW_SIG_IMG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_flash' => array('lang' => 'ALLOW_SIG_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_smilies' => array('lang' => 'ALLOW_SIG_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_links' => array('lang' => 'ALLOW_SIG_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'GENERAL_SETTINGS',
'max_sig_chars' => array('lang' => 'MAX_SIG_LENGTH', 'type' => 'text:5:4', 'explain' => true),
'max_sig_urls' => array('lang' => 'MAX_SIG_URLS', 'type' => 'text:5:4', 'explain' => true),
'max_sig_font_size' => array('lang' => 'MAX_SIG_FONT_SIZE', 'type' => 'text:5:4', 'explain' => true),
'max_sig_smilies' => array('lang' => 'MAX_SIG_SMILIES', 'type' => 'text:5:4', 'explain' => true),
'max_sig_img_width' => array('lang' => 'MAX_SIG_IMG_WIDTH', 'type' => 'text:5:4', 'explain' => true),
'max_sig_img_height' => array('lang' => 'MAX_SIG_IMG_HEIGHT', 'type' => 'text:5:4', 'explain' => true),
'max_sig_chars' => array('lang' => 'MAX_SIG_LENGTH', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true),
'max_sig_urls' => array('lang' => 'MAX_SIG_URLS', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true),
'max_sig_font_size' => array('lang' => 'MAX_SIG_FONT_SIZE', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'max_sig_smilies' => array('lang' => 'MAX_SIG_SMILIES', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true),
'max_sig_img_width' => array('lang' => 'MAX_SIG_IMG_WIDTH', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'max_sig_img_height' => array('lang' => 'MAX_SIG_IMG_HEIGHT', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
)
);
break;
@@ -193,24 +192,24 @@ class acp_board
'max_name_chars' => false,
'max_pass_chars' => false,
'require_activation' => array('lang' => 'ACC_ACTIVATION', 'type' => 'custom', 'method' => 'select_acc_activation', 'explain' => true),
'min_name_chars' => array('lang' => 'USERNAME_LENGTH', 'type' => 'custom', 'method' => 'username_length', 'explain' => true),
'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'type' => 'custom', 'method' => 'password_length', 'explain' => true),
'allow_name_chars' => array('lang' => 'USERNAME_CHARS', 'type' => 'select', 'method' => 'select_username_chars', 'explain' => true),
'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'type' => 'text:3:3', 'explain' => true),
'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_acc_activation', 'explain' => true),
'min_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int', 'type' => 'custom', 'method' => 'username_length', 'explain' => true),
'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int', 'type' => 'custom', 'method' => 'password_length', 'explain' => true),
'allow_name_chars' => array('lang' => 'USERNAME_CHARS', 'validate' => 'string', 'type' => 'select', 'method' => 'select_username_chars', 'explain' => true),
'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
'legend2' => 'GENERAL_OPTIONS',
'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'type' => 'radio:yes_no', 'explain' => false),
'allow_emailreuse' => array('lang' => 'ALLOW_EMAIL_REUSE', 'type' => 'radio:yes_no', 'explain' => true),
'enable_confirm' => array('lang' => 'VISUAL_CONFIRM_REG', 'type' => 'radio:yes_no', 'explain' => true),
'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'type' => 'text:3:3', 'explain' => true),
'max_reg_attempts' => array('lang' => 'REG_LIMIT', 'type' => 'text:4:4', 'explain' => true),
'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_emailreuse' => array('lang' => 'ALLOW_EMAIL_REUSE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'enable_confirm' => array('lang' => 'VISUAL_CONFIRM_REG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'max_reg_attempts' => array('lang' => 'REG_LIMIT', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
'legend3' => 'COPPA',
'coppa_enable' => array('lang' => 'ENABLE_COPPA', 'type' => 'radio:yes_no', 'explain' => true),
'coppa_mail' => array('lang' => 'COPPA_MAIL', 'type' => 'textarea:5:40', 'explain' => true),
'coppa_fax' => array('lang' => 'COPPA_FAX', 'type' => 'text:25:100', 'explain' => false),
'coppa_enable' => array('lang' => 'ENABLE_COPPA', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'coppa_mail' => array('lang' => 'COPPA_MAIL', 'validate' => 'string', 'type' => 'textarea:5:40', 'explain' => true),
'coppa_fax' => array('lang' => 'COPPA_FAX', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => false),
)
);
break;
@@ -220,10 +219,10 @@ class acp_board
'title' => 'ACP_COOKIE_SETTINGS',
'vars' => array(
'legend1' => 'ACP_COOKIE_SETTINGS',
'cookie_domain' => array('lang' => 'COOKIE_DOMAIN', 'type' => 'text::255', 'explain' => false),
'cookie_name' => array('lang' => 'COOKIE_NAME', 'type' => 'text::16', 'explain' => false),
'cookie_path' => array('lang' => 'COOKIE_PATH', 'type' => 'text::255', 'explain' => false),
'cookie_secure' => array('lang' => 'COOKIE_SECURE', 'type' => 'radio:disabled_enabled', 'explain' => true)
'cookie_domain' => array('lang' => 'COOKIE_DOMAIN', 'validate' => 'string', 'type' => 'text::255', 'explain' => false),
'cookie_name' => array('lang' => 'COOKIE_NAME', 'validate' => 'string', 'type' => 'text::16', 'explain' => false),
'cookie_path' => array('lang' => 'COOKIE_PATH', 'validate' => 'string', 'type' => 'text::255', 'explain' => false),
'cookie_secure' => array('lang' => 'COOKIE_SECURE', 'validate' => 'bool', 'type' => 'radio:disabled_enabled', 'explain' => true)
)
);
break;
@@ -233,28 +232,28 @@ class acp_board
'title' => 'ACP_LOAD_SETTINGS',
'vars' => array(
'legend1' => 'GENERAL_SETTINGS',
'limit_load' => array('lang' => 'LIMIT_LOAD', 'type' => 'text:4:4', 'explain' => true),
'session_length' => array('lang' => 'SESSION_LENGTH', 'type' => 'text:5:5', 'explain' => true),
'active_sessions' => array('lang' => 'LIMIT_SESSIONS', 'type' => 'text:4:4', 'explain' => true),
'load_online_time' => array('lang' => 'ONLINE_LENGTH', 'type' => 'text:4:3', 'explain' => true),
'limit_load' => array('lang' => 'LIMIT_LOAD', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
'session_length' => array('lang' => 'SESSION_LENGTH', 'validate' => 'int', 'type' => 'text:5:5', 'explain' => true),
'active_sessions' => array('lang' => 'LIMIT_SESSIONS', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
'load_online_time' => array('lang' => 'ONLINE_LENGTH', 'validate' => 'int', 'type' => 'text:4:3', 'explain' => true),
'legend2' => 'GENERAL_OPTIONS',
'load_db_track' => array('lang' => 'YES_POST_MARKING', 'type' => 'radio:yes_no', 'explain' => true),
'load_db_lastread' => array('lang' => 'YES_READ_MARKING', 'type' => 'radio:yes_no', 'explain' => true),
'load_anon_lastread' => array('lang' => 'YES_ANON_READ_MARKING', 'type' => 'radio:yes_no', 'explain' => true),
'load_online' => array('lang' => 'YES_ONLINE', 'type' => 'radio:yes_no', 'explain' => true),
'load_online_guests' => array('lang' => 'YES_ONLINE_GUESTS', 'type' => 'radio:yes_no', 'explain' => true),
'load_onlinetrack' => array('lang' => 'YES_ONLINE_TRACK', 'type' => 'radio:yes_no', 'explain' => true),
'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'type' => 'radio:yes_no', 'explain' => false),
'load_moderators' => array('lang' => 'YES_MODERATORS', 'type' => 'radio:yes_no', 'explain' => false),
'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'type' => 'radio:yes_no', 'explain' => false),
'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'type' => 'radio:yes_no', 'explain' => true),
'load_tplcompile' => array('lang' => 'RECOMPILE_TEMPLATES', 'type' => 'radio:yes_no', 'explain' => true),
'load_db_track' => array('lang' => 'YES_POST_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_db_lastread' => array('lang' => 'YES_READ_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_anon_lastread' => array('lang' => 'YES_ANON_READ_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_online' => array('lang' => 'YES_ONLINE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_online_guests' => array('lang' => 'YES_ONLINE_GUESTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_onlinetrack' => array('lang' => 'YES_ONLINE_TRACK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_tplcompile' => array('lang' => 'RECOMPILE_TEMPLATES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend3' => 'CUSTOM_PROFILE_FIELDS',
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
)
);
break;
@@ -264,7 +263,7 @@ class acp_board
'title' => 'ACP_AUTH_SETTINGS',
'vars' => array(
'legend1' => 'ACP_AUTH_SETTINGS',
'auth_method' => array('lang' => 'AUTH_METHOD', 'type' => 'select', 'method' => 'select_auth_method', 'explain' => false)
'auth_method' => array('lang' => 'AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'select_auth_method', 'explain' => false)
)
);
break;
@@ -274,20 +273,20 @@ class acp_board
'title' => 'ACP_SERVER_SETTINGS',
'vars' => array(
'legend1' => 'ACP_SERVER_SETTINGS',
'send_encoding' => array('lang' => 'SEND_ENCODING', 'type' => 'radio:yes_no', 'explain' => true),
'gzip_compress' => array('lang' => 'ENABLE_GZIP', 'type' => 'radio:yes_no', 'explain' => false),
'send_encoding' => array('lang' => 'SEND_ENCODING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'gzip_compress' => array('lang' => 'ENABLE_GZIP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'legend2' => 'PATH_SETTINGS',
'smilies_path' => array('lang' => 'SMILIES_PATH', 'type' => 'text:20:255', 'explain' => true),
'icons_path' => array('lang' => 'ICONS_PATH', 'type' => 'text:20:255', 'explain' => true),
'upload_icons_path' => array('lang' => 'UPLOAD_ICONS_PATH', 'type' => 'text:20:255', 'explain' => true),
'ranks_path' => array('lang' => 'RANKS_PATH', 'type' => 'text:20:255', 'explain' => true),
'smilies_path' => array('lang' => 'SMILIES_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
'icons_path' => array('lang' => 'ICONS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
'upload_icons_path' => array('lang' => 'UPLOAD_ICONS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
'ranks_path' => array('lang' => 'RANKS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
'legend3' => 'SERVER_URL_SETTINGS',
'force_server_vars' => array('lang' => 'FORCE_SERVER_VARS', 'type' => 'radio:yes_no', 'explain' => true),
'server_protocol' => array('lang' => 'SERVER_PROTOCOL', 'type' => 'text:10:10', 'explain' => true),
'server_name' => array('lang' => 'SERVER_NAME', 'type' => 'text:40:255', 'explain' => true),
'server_port' => array('lang' => 'SERVER_PORT', 'type' => 'text:5:5', 'explain' => true),
'force_server_vars' => array('lang' => 'FORCE_SERVER_VARS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'server_protocol' => array('lang' => 'SERVER_PROTOCOL', 'validate' => 'string', 'type' => 'text:10:10', 'explain' => true),
'server_name' => array('lang' => 'SERVER_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
'server_port' => array('lang' => 'SERVER_PORT', 'validate' => 'int', 'type' => 'text:5:5', 'explain' => true),
)
);
break;
@@ -297,14 +296,16 @@ class acp_board
'title' => 'ACP_SECURITY_SETTINGS',
'vars' => array(
'legend1' => 'ACP_SECURITY_SETTINGS',
'allow_autologin' => array('lang' => 'ALLOW_AUTOLOGIN', 'type' => 'radio:yes_no', 'explain' => true),
'max_autologin_time' => array('lang' => 'AUTOLOGIN_LENGTH', 'type' => 'text:5:5', 'explain' => true),
'ip_check' => array('lang' => 'IP_VALID', 'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true),
'browser_check' => array('lang' => 'BROWSER_VALID', 'type' => 'radio:yes_no', 'explain' => true),
'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'type' => 'text:3:3', 'explain' => true),
'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'type' => 'text:3:3', 'explain' => true),
'tpl_allow_php' => array('lang' => 'TPL_ALLOW_PHP', 'type' => 'radio:yes_no', 'explain' => true),
'allow_autologin' => array('lang' => 'ALLOW_AUTOLOGIN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'max_autologin_time' => array('lang' => 'AUTOLOGIN_LENGTH', 'validate' => 'int', 'type' => 'text:5:5', 'explain' => true),
'ip_check' => array('lang' => 'IP_VALID', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true),
'browser_check' => array('lang' => 'BROWSER_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'check_dnsbl' => array('lang' => 'CHECK_DNSBL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'email_check_mx' => array('lang' => 'EMAIL_CHECK_MX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'tpl_allow_php' => array('lang' => 'TPL_ALLOW_PHP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
)
);
break;
@@ -314,28 +315,29 @@ class acp_board
'title' => 'ACP_EMAIL_SETTINGS',
'vars' => array(
'legend1' => 'GENERAL_SETTINGS',
'email_enable' => array('lang' => 'ENABLE_EMAIL', 'type' => 'radio:enabled_disabled', 'explain' => true),
'board_email_form' => array('lang' => 'BOARD_EMAIL_FORM', 'type' => 'radio:enabled_disabled', 'explain' => true),
'email_function_name' => array('lang' => 'EMAIL_FUNCTION_NAME', 'type' => 'text:20:50', 'explain' => true),
'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'type' => 'text:5:5', 'explain' => true),
'board_contact' => array('lang' => 'CONTACT_EMAIL', 'type' => 'text:25:100', 'explain' => true),
'board_email' => array('lang' => 'ADMIN_EMAIL', 'type' => 'text:25:100', 'explain' => true),
'board_email_sig' => array('lang' => 'EMAIL_SIG', 'type' => 'textarea:5:30', 'explain' => true),
'board_hide_emails' => array('lang' => 'BOARD_HIDE_EMAILS', 'type' => 'radio:yes_no', 'explain' => true),
'email_enable' => array('lang' => 'ENABLE_EMAIL', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
'board_email_form' => array('lang' => 'BOARD_EMAIL_FORM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
'email_function_name' => array('lang' => 'EMAIL_FUNCTION_NAME', 'validate' => 'string', 'type' => 'text:20:50', 'explain' => true),
'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'validate' => 'int', 'type' => 'text:5:5', 'explain' => true),
'board_contact' => array('lang' => 'CONTACT_EMAIL', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => true),
'board_email' => array('lang' => 'ADMIN_EMAIL', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => true),
'board_email_sig' => array('lang' => 'EMAIL_SIG', 'validate' => 'string', 'type' => 'textarea:5:30', 'explain' => true),
'board_hide_emails' => array('lang' => 'BOARD_HIDE_EMAILS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'SMTP_SETTINGS',
'smtp_delivery' => array('lang' => 'USE_SMTP', 'type' => 'radio:yes_no', 'explain' => true),
'smtp_host' => array('lang' => 'SMTP_SERVER', 'type' => 'text:25:50', 'explain' => false),
'smtp_port' => array('lang' => 'SMTP_PORT', 'type' => 'text:4:5', 'explain' => true),
'smtp_auth_method' => array('lang' => 'SMTP_AUTH_METHOD', 'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true),
'smtp_username' => array('lang' => 'SMTP_USERNAME', 'type' => 'text:25:255', 'explain' => true),
'smtp_password' => array('lang' => 'SMTP_PASSWORD', 'type' => 'password:25:255', 'explain' => true)
'smtp_delivery' => array('lang' => 'USE_SMTP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'smtp_host' => array('lang' => 'SMTP_SERVER', 'validate' => 'string', 'type' => 'text:25:50', 'explain' => false),
'smtp_port' => array('lang' => 'SMTP_PORT', 'validate' => 'int', 'type' => 'text:4:5', 'explain' => true),
'smtp_auth_method' => array('lang' => 'SMTP_AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true),
'smtp_username' => array('lang' => 'SMTP_USERNAME', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true),
'smtp_password' => array('lang' => 'SMTP_PASSWORD', 'validate' => 'string', 'type' => 'password:25:255', 'explain' => true)
)
);
break;
default:
trigger_error('NO_MODE');
trigger_error('NO_MODE', E_USER_ERROR);
break;
}
if (isset($display_vars['lang']))
@@ -344,7 +346,17 @@ class acp_board
}
$this->new_config = $config;
$cfg_array = (isset($_REQUEST['config'])) ? request_var('config', array('' => ''), true) : $this->new_config;
$cfg_array = (isset($_REQUEST['config'])) ? utf8_normalize_nfc(request_var('config', array('' => ''), true)) : $this->new_config;
$error = array();
// We validate the complete config if whished
validate_config_vars($display_vars['vars'], $cfg_array, $error);
// Do not write values if there is an error
if (sizeof($error))
{
$submit = false;
}
// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
foreach ($display_vars['vars'] as $config_name => $null)
@@ -448,14 +460,14 @@ class acp_board
{
set_config($config_name, $config_value);
}
trigger_error($error . adm_back_link($this->u_action));
trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
}
}
set_config('auth_method', $cfg_array['auth_method']);
}
else
{
trigger_error('NO_AUTH_PLUGIN');
trigger_error('NO_AUTH_PLUGIN', E_USER_ERROR);
}
}
}
@@ -473,6 +485,10 @@ class acp_board
$template->assign_vars(array(
'L_TITLE' => $user->lang[$display_vars['title']],
'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'] . '_EXPLAIN'],
'S_ERROR' => (sizeof($error)) ? true : false,
'ERROR_MSG' => implode('<br />', $error),
'U_ACTION' => $this->u_action)
);

View File

@@ -142,6 +142,12 @@ class acp_bots
}
$bot_row['bot_ip'] = str_replace(' ', '', $bot_row['bot_ip']);
// Make sure the admin is not adding a bot with an user agent similar to his one
if ($bot_row['bot_agent'] && substr($user->data['session_browser'], 0, 149) === substr($bot_row['bot_agent'], 0, 149))
{
$error[] = $user->lang['ERR_BOT_AGENT_MATCHES_UA'];
}
if (!sizeof($error))
{
$db->sql_transaction('begin');
@@ -159,7 +165,7 @@ class acp_bots
if (!$group_row)
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"));
trigger_error($user->lang['NO_BOT_GROUP'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"), E_USER_WARNING);
}
$user_id = user_add(array(
@@ -197,7 +203,7 @@ class acp_bots
if (!$row)
{
trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"));
trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"), E_USER_WARNING);
}
$sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array(
@@ -237,7 +243,7 @@ class acp_bots
if (!$bot_row)
{
trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"));
trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"), E_USER_WARNING);
}
$bot_row['bot_lang'] = $bot_row['user_lang'];

View File

@@ -21,91 +21,37 @@ class acp_captcha
$user->add_lang('acp/board');
$config_vars = array('enable_confirm' => 'REG_ENABLE',
'enable_post_confirm' => 'POST_ENABLE',
'policy_overlap' => 'OVERLAP_ENABLE',
'policy_overlap_noise_pixel' => 'OVERLAP_NOISE_PIXEL',
'policy_overlap_noise_line' => 'OVERLAP_NOISE_LINE_ENABLE',
'policy_entropy' => 'ENTROPY_ENABLE',
'policy_entropy_noise_pixel' => 'ENTROPY_NOISE_PIXEL',
'policy_entropy_noise_line' => 'ENTROPY_NOISE_LINE_ENABLE',
'policy_shape' => 'SHAPE_ENABLE',
'policy_shape_noise_pixel' => 'SHAPE_NOISE_PIXEL',
'policy_shape_noise_line' => 'SHAPE_NOISE_LINE_ENABLE',
'policy_3dbitmap' => 'THREEDBITMAP_ENABLE',
'policy_cells' => 'CELLS_ENABLE',
'policy_stencil' => 'STENCIL_ENABLE',
'policy_composite' => 'COMPOSITE_ENABLE'
);
$config_vars = array(
'enable_confirm' => 'REG_ENABLE',
'enable_post_confirm' => 'POST_ENABLE',
'captcha_gd' => 'CAPTCHA_GD',
'captcha_gd_noise' => 'CAPTCHA_GD_NOISE',
);
$policy_modules = array('policy_entropy', 'policy_3dbitmap', 'policy_overlap', 'policy_shape', 'policy_cells', 'policy_stencil', 'policy_composite');
switch ($mode)
$this->tpl_name = 'acp_captcha';
$this->page_title = 'ACP_VC_SETTINGS';
$submit = request_var('submit', '');
if ($submit)
{
case 'visual':
$this->tpl_name = 'acp_captcha';
$this->page_title = 'ACP_VC_SETTINGS';
$submit = request_var('submit', '');
if ($submit)
{
$config_vars = array_keys($config_vars);
foreach ($config_vars as $config_var)
{
set_config($config_var, request_var($config_var, ''));
}
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
}
else
{
$array = array();
$config_vars = array_keys($config_vars);
foreach ($config_vars as $config_var)
{
set_config($config_var, request_var($config_var, ''));
}
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
}
else
{
$array = array();
foreach ($config_vars as $config_var => $template_var)
{
$array[$template_var] = $config[$config_var];
}
$template->assign_vars($array);
if (@extension_loaded('gd'))
{
$template->assign_var('GD', true);
foreach ($policy_modules as $module_name)
{
$template->assign_var('U_' . strtoupper($module_name), sprintf($user->lang['CAPTCHA_EXPLAIN'], '<a href="' . append_sid("{$phpbb_root_path}adm/index.$phpEx", 'i=captcha&amp;mode=img&amp;policy=' . $module_name) . '" target="_blank">', '</a>'));
}
if (function_exists('imagettfbbox') && function_exists('imagettftext'))
{
$template->assign_var('TTF', true);
}
}
}
break;
case 'img':
$policy = request_var('policy', '');
if (!@extension_loaded('gd'))
{
trigger_error($user->lang['NO_GD']);
}
if (!($policy === 'policy_entropy' || $policy === 'policy_3dbitmap') && (!function_exists('imagettfbbox') || !function_exists('imagettftext')))
{
trigger_error($user->lang['NO_TTF']);
}
if (!in_array($policy, $policy_modules))
{
trigger_error($user->lang['BAD_POLICY']);
}
$user->add_lang('ucp');
include($phpbb_root_path . 'includes/captcha/captcha_gd.' . $phpEx);
$captcha = new captcha();
$captcha->execute(gen_rand_string(), $policy);
break;
if (@extension_loaded('gd') && function_exists('imagettfbbox') && function_exists('imagettftext'))
{
$template->assign_var('GD', true);
}
foreach ($config_vars as $config_var => $template_var)
{
$template->assign_var($template_var, $config[$config_var]);
}
}
}
}

View File

@@ -68,7 +68,9 @@ class acp_database
@set_time_limit(1200);
$filename = 'backup_' . time();
$time = time();
$filename = 'backup_' . $time;
// We set up the info needed for our on-the-fly creation :D
switch ($format)
@@ -111,7 +113,7 @@ class acp_database
if (!$fp)
{
trigger_error('Unable to write temporary file to storage folder');
trigger_error('Unable to write temporary file to storage folder', E_USER_ERROR);
}
}
@@ -128,10 +130,10 @@ class acp_database
$sql_data .= "#\n";
$sql_data .= "# phpBB Backup Script\n";
$sql_data .= "# Dump of tables for $table_prefix\n";
$sql_data .= "# DATE : " . gmdate("d-m-Y H:i:s", $filename) . " GMT\n";
$sql_data .= "# DATE : " . gmdate("d-m-Y H:i:s", $time) . " GMT\n";
$sql_data .= "#\n";
switch (SQL_LAYER)
switch ($db->sql_layer)
{
case 'sqlite':
$sql_data .= "BEGIN TRANSACTION;\n";
@@ -149,12 +151,37 @@ class acp_database
break;
}
if ($structure && $db->sql_layer == 'firebird')
{
$sql = 'SELECT RDB$FUNCTION_NAME, RDB$DESCRIPTION
FROM RDB$FUNCTIONS
ORDER BY RDB$FUNCTION_NAME';
$result = $db->sql_query($sql);
$rows = array();
while ($row = $db->sql_fetchrow($result))
{
$sql = 'SELECT F.RDB$FUNCTION_NAME, F.RDB$MODULE_NAME, F.RDB$ENTRYPOINT, F.RDB$RETURN_ARGUMENT, F.RDB$DESCRIPTION, FA.RDB$ARGUMENT_POSITION, FA.RDB$MECHANISM, FA.RDB$FIELD_TYPE, FA.RDB$FIELD_SCALE, FA.RDB$FIELD_LENGTH, FA.RDB$FIELD_SUB_TYPE, C.RDB$BYTES_PER_CHARACTER, C.RDB$CHARACTER_SET_NAME ,FA.RDB$FIELD_PRECISION
FROM RDB$FUNCTIONS F
LEFT JOIN RDB$FUNCTION_ARGUMENTS FA ON F.RDB$FUNCTION_NAME = FA.RDB$FUNCTION_NAME
LEFT JOIN RDB$CHARACTER_SETS C ON FA.RDB$CHARACTER_SET_ID = C.RDB$CHARACTER_SET_ID
WHERE (F.RDB$FUNCTION_NAME = ' . $row['FUNCTION_NAME'] . ')
ORDER BY FA.RDB$ARGUMENT_POSITION';
$result2 = $db->sql_query($sql);
while ($row2 = $db->sql_fetchrow($result2))
{
}
$db->sql_freeresult($result2);
}
$db->sql_freeresult($result);
}
foreach ($table as $table_name)
{
// Get the table structure
if ($structure)
{
switch (SQL_LAYER)
switch ($db->sql_layer)
{
case 'mysqli':
case 'mysql4':
@@ -197,27 +224,12 @@ class acp_database
}
$sql_data .= $this->get_table_structure($table_name);
}
// We might wanna empty out all that junk :D
else
{
switch (SQL_LAYER)
{
case 'mysqli':
case 'mysql4':
case 'mysql':
case 'mssql':
case 'mssql_odbc':
case 'oracle':
case 'postgres':
case 'firebird':
$sql_data .= 'TRUNCATE TABLE ' . $table_name . ";\n";
break;
case 'sqlite':
$sql_data .= 'DELETE FROM ' . $table_name . ";\n";
break;
}
// We might wanna empty out all that junk :D
$sql_data .= (($db->sql_layer == 'sqlite') ? 'DELETE FROM ' : 'TRUNCATE TABLE ') . $table_name . ";\n";
}
// Now write the data for the first time. :)
if ($store == true)
{
@@ -243,7 +255,7 @@ class acp_database
{
$sql_data .= "\n";
switch (SQL_LAYER)
switch ($db->sql_layer)
{
case 'mysqli':
@@ -263,8 +275,8 @@ class acp_database
$field_set[$j] = $field[$j]->name;
}
$search = array('\\', "'", "\x00", "\x0a", "\x0d", "\x1a");
$replace = array('\\\\\\\\', "''", '\0', '\n', '\r', '\Z');
$search = array("\\", "'", "\x00", "\x0a", "\x0d", "\x1a", '"');
$replace = array("\\\\", "\\'", '\0', '\n', '\r', '\Z', '\\"');
$fields = implode(', ', $field_set);
$values = array();
$schema_insert = 'INSERT INTO ' . $table_name . ' (' . $fields . ') VALUES (';
@@ -336,8 +348,8 @@ class acp_database
$field_set[$j] = $field[$j]->name;
}
$search = array('\\', "'", "\x00", "\x0a", "\x0d", "\x1a");
$replace = array('\\\\\\\\', "''", '\0', '\n', '\r', '\Z');
$search = array("\\", "'", "\x00", "\x0a", "\x0d", "\x1a", '"');
$replace = array("\\\\", "\\'", '\0', '\n', '\r', '\Z', '\\"');
$fields = implode(', ', $field_set);
$schema_insert = 'INSERT INTO ' . $table_name . ' (' . $fields . ') VALUES (';
@@ -406,7 +418,7 @@ class acp_database
$column_list = array();
$table_cols = explode(',', trim($matches[1]));
foreach($table_cols as $declaration)
foreach ($table_cols as $declaration)
{
$entities = preg_split('#\s+#', trim($declaration));
$column_name = preg_replace('/"?([^"]+)"?/', '\1', $entities[0]);
@@ -442,7 +454,7 @@ class acp_database
{
$row_data = "''";
}
else if (strpos($col_types[$row_name], 'text') !== false || strpos($col_types[$row_name], 'char') !== false)
else if (strpos($col_types[$row_name], 'text') !== false || strpos($col_types[$row_name], 'char') !== false || strpos($col_types[$row_name], 'blob') !== false)
{
$row_data = "'" . $row_data . "'";
}
@@ -516,7 +528,7 @@ class acp_database
{
$str_val = $row[$ary_name[$i]];
if (preg_match('#char|text|bool#i', $ary_type[$i]))
if (preg_match('#char|text|bool|bytea#i', $ary_type[$i]))
{
$str_quote = "'";
$str_empty = '';
@@ -637,7 +649,7 @@ class acp_database
{
$str_val = $row[$ary_name[$i]];
if (preg_match('#char|text|bool#i', $ary_type[$i]))
if (preg_match('#char|text|bool|varbinary#i', $ary_type[$i]))
{
$str_quote = "'";
$str_empty = '';
@@ -748,7 +760,7 @@ class acp_database
{
$str_val = $row[$ary_name[$i]];
if (preg_match('#char|text|bool#i', $ary_type[$i]))
if (preg_match('#char|text|bool|varbinary#i', $ary_type[$i]))
{
$str_quote = "'";
$str_empty = '';
@@ -843,7 +855,7 @@ class acp_database
{
$str_val = $row[strtolower($ary_name[$i])];
if (preg_match('#char|text|bool#i', $ary_type[$i]))
if (preg_match('#char|text|bool|varbinary#i', $ary_type[$i]))
{
$str_quote = "'";
$str_empty = '';
@@ -927,7 +939,7 @@ class acp_database
{
$str_val = $row[$ary_name[$i]];
if (preg_match('#char|text|bool#i', $ary_type[$i]))
if (preg_match('#char|text|bool|raw#i', $ary_type[$i]))
{
$str_quote = "'";
$str_empty = '';
@@ -989,7 +1001,7 @@ class acp_database
}
}
switch (SQL_LAYER)
switch ($db->sql_layer)
{
case 'sqlite':
case 'postgres':
@@ -1024,12 +1036,12 @@ class acp_database
unset($sql_data);
add_log('admin', 'LOG_DB_BACKUP');
trigger_error($user->lang['BACKUP_SUCCESS']);
trigger_error($user->lang['BACKUP_SUCCESS'] . adm_back_link($this->u_action));
break;
default:
$tables = array();
switch (SQL_LAYER)
switch ($db->sql_layer)
{
case 'sqlite':
$sql = "SELECT name
@@ -1167,13 +1179,13 @@ class acp_database
if (!(file_exists($file_name) && is_readable($file_name)))
{
trigger_error($user->lang['BACKUP_INVALID']);
trigger_error($user->lang['BACKUP_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if ($delete)
{
unlink($file_name);
trigger_error($user->lang['BACKUP_DELETE']);
trigger_error($user->lang['BACKUP_DELETE'] . adm_back_link($this->u_action));
}
$data = file_get_contents($file_name);
@@ -1220,13 +1232,13 @@ class acp_database
remove_remarks($data);
// SQLite gets improved performance when you shove all of these disk write queries at once :D
if (SQL_LAYER == 'sqlite')
if ($db->sql_layer == 'sqlite')
{
$db->sql_query($data);
}
else
{
switch (SQL_LAYER)
switch ($db->sql_layer)
{
case 'firebird':
$delim = ';;';
@@ -1263,7 +1275,7 @@ class acp_database
}
}
add_log('admin', 'LOG_DB_RESTORE');
trigger_error($user->lang['RESTORE_SUCCESS']);
trigger_error($user->lang['RESTORE_SUCCESS'] . adm_back_link($this->u_action));
break;
default:
@@ -1324,7 +1336,7 @@ class acp_database
$sql_data = '';
switch (SQL_LAYER)
switch ($db->sql_layer)
{
case 'mysqli':
case 'mysql4':
@@ -1370,11 +1382,22 @@ class acp_database
{
$kname = $row['Key_name'];
if ($kname != 'PRIMARY' && $row['Non_unique'] == 0)
if ($kname != 'PRIMARY')
{
$kname = "UNIQUE|$kname";
if ($row['Index_type'] == 'FULLTEXT')
{
$kname = "FULLTEXT|$kname";
}
else if ($row['Non_unique'] == 0)
{
$kname = "UNIQUE|$kname";
}
}
if ($row['Sub_part'])
{
$row['Column_name'] .= '(' . $row['Sub_part'] . ')';
}
$index[$kname][] = $row['Column_name'];
}
$db->sql_freeresult($result);
@@ -1391,6 +1414,10 @@ class acp_database
{
$line .= 'UNIQUE ' . substr($key, 7) . ' (' . implode(', ', $columns) . ')';
}
else if (strpos($key, 'FULLTEXT') === 0)
{
$line .= 'FULLTEXT ' . substr($key, 9) . ' (' . implode(', ', $columns) . ')';
}
else
{
$line .= "KEY $key (" . implode(', ', $columns) . ')';
@@ -1400,7 +1427,12 @@ class acp_database
}
$sql_data .= implode(",\n", $rows);
$sql_data .= "\n);\n\n";
$sql_data .= "\n)";
if ($db->sql_layer == 'mysql4' || $db->sql_layer == 'mysqli')
{
$sql_data .= ' CHARACTER SET `utf8` COLLATE `utf8_bin`';
}
$sql_data .= ";\n\n";
break;

View File

@@ -37,12 +37,14 @@ class acp_disallow
if (!$disallowed_user)
{
trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'INSERT INTO ' . DISALLOW_TABLE . ' ' . $db->sql_build_array('INSERT', array('disallow_username' => $disallowed_user));
$db->sql_query($sql);
$cache->destroy('_disallowed_usernames');
$message = $user->lang['DISALLOW_SUCCESSFUL'];
add_log('admin', 'LOG_DISALLOW_ADD', str_replace('%', '*', $disallowed_user));
@@ -54,16 +56,18 @@ class acp_disallow
if (!$disallowed_id)
{
trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'DELETE FROM ' . DISALLOW_TABLE . "
WHERE disallow_id = $disallowed_id";
$sql = 'DELETE FROM ' . DISALLOW_TABLE . '
WHERE disallow_id = ' . $disallowed_id;
$db->sql_query($sql);
$cache->destroy('_disallowed_usernames');
add_log('admin', 'LOG_DISALLOW_DELETE');
trigger_error($user->lang['DISALLOWED_DELETED'] . adm_back_link($this->u_action));
trigger_error($user->lang['DISALLOWED_DELETED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Grab the current list of disallowed usernames...

View File

@@ -28,7 +28,7 @@ class acp_email
$submit = (isset($_POST['submit'])) ? true : false;
$error = array();
$usernames = request_var('usernames', '');
$usernames = request_var('usernames', '', true);
$group_id = request_var('g', 0);
$subject = request_var('subject', '', true);
$message = request_var('message', '', true);
@@ -57,7 +57,7 @@ class acp_email
{
$sql = 'SELECT username, user_email, user_jabber, user_notify_type, user_lang
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('username', explode("\n", $usernames)) . '
WHERE ' . $db->sql_in_set('username_clean', array_map('utf8_clean_string', explode("\n", $usernames))) . '
AND user_allow_massemail = 1
ORDER BY user_lang, user_notify_type'; // , SUBSTRING(user_email FROM INSTR(user_email, '@'))
}
@@ -87,7 +87,7 @@ class acp_email
if (!$row)
{
$db->sql_freeresult($result);
trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$i = $j = 0;
@@ -150,15 +150,13 @@ class acp_email
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
$messenger->subject(html_entity_decode($subject));
$messenger->subject(htmlspecialchars_decode($subject));
$messenger->replyto($config['board_email']);
$messenger->set_mail_priority($priority);
$messenger->assign_vars(array(
'SITENAME' => $config['sitename'],
'CONTACT_EMAIL' => $config['board_contact'],
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']),
'MESSAGE' => html_entity_decode($message))
'MESSAGE' => htmlspecialchars_decode($message))
);
if (!($messenger->send($used_method)))
@@ -185,12 +183,13 @@ class acp_email
if (!$errored)
{
$message = ($use_queue) ? $user->lang['EMAIL_SENT_QUEUE'] : $user->lang['EMAIL_SENT'];
trigger_error($message . adm_back_link($this->u_action));
}
else
{
$message = sprintf($user->lang['EMAIL_SEND_ERROR'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=logs&amp;mode=critical') . '">', '</a>');
trigger_error($message . adm_back_link($this->u_action), E_USER_WARNING);
}
trigger_error($message . adm_back_link($this->u_action));
}
}
@@ -216,6 +215,7 @@ class acp_email
'S_GROUP_OPTIONS' => $select_list,
'USERNAMES' => $usernames,
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=acp_email&amp;field=usernames'),
'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=acp_email&field=usernames', false),
'SUBJECT' => $subject,
'MESSAGE' => $message,
'S_PRIORITY_OPTIONS' => $s_priority_options)

View File

@@ -36,11 +36,19 @@ class acp_forums
// Check additional permissions
switch ($action)
{
case 'progress_bar':
$start = request_var('start', 0);
$total = request_var('total', 0);
$this->display_progress_bar($start, $total);
exit;
break;
case 'delete':
if (!$auth->acl_get('a_forumdel'))
{
trigger_error($user->lang['NO_PERMISSION_FORUM_DELETE'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
trigger_error($user->lang['NO_PERMISSION_FORUM_DELETE'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
break;
@@ -49,7 +57,7 @@ class acp_forums
if (!$auth->acl_get('a_forumadd'))
{
trigger_error($user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
trigger_error($user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
break;
@@ -94,23 +102,24 @@ class acp_forums
'forum_type' => request_var('forum_type', FORUM_POST),
'type_action' => request_var('type_action', ''),
'forum_status' => request_var('forum_status', ITEM_UNLOCKED),
'forum_parents' => '',
'forum_name' => request_var('forum_name', '', true),
'forum_link' => request_var('forum_link', ''),
'forum_link_track' => request_var('forum_link_track', false),
'forum_desc' => request_var('forum_desc', '', true),
'forum_desc_uid' => '',
'forum_desc_options' => 0,
'forum_desc_options' => 7,
'forum_desc_bitfield' => '',
'forum_rules' => request_var('forum_rules', '', true),
'forum_rules_uid' => '',
'forum_rules_options' => 0,
'forum_rules_options' => 7,
'forum_rules_bitfield' => '',
'forum_rules_link' => request_var('forum_rules_link', ''),
'forum_image' => request_var('forum_image', ''),
'forum_style' => request_var('forum_style', 0),
'display_on_index' => request_var('display_on_index', false),
'forum_topics_per_page' => request_var('topics_per_page', 0),
'enable_indexing' => request_var('enable_indexing',true),
'enable_indexing' => request_var('enable_indexing', true),
'enable_icons' => request_var('enable_icons', false),
'enable_prune' => request_var('enable_prune', false),
'enable_post_review' => request_var('enable_post_review', true),
@@ -202,34 +211,8 @@ class acp_forums
$db->sql_freeresult($result);
// Now insert the data
switch (SQL_LAYER)
{
case 'mysql':
case 'mysql4':
case 'mysqli':
if (sizeof($users_sql_ary))
{
$db->sql_query('INSERT INTO ' . ACL_USERS_TABLE . ' ' . $db->sql_build_array('MULTI_INSERT', $users_sql_ary));
}
if (sizeof($groups_sql_ary))
{
$db->sql_query('INSERT INTO ' . ACL_GROUPS_TABLE . ' ' . $db->sql_build_array('MULTI_INSERT', $groups_sql_ary));
}
break;
default:
foreach ($users_sql_ary as $ary)
{
$db->sql_query('INSERT INTO ' . ACL_USERS_TABLE . ' ' . $db->sql_build_array('INSERT', $ary));
}
foreach ($groups_sql_ary as $ary)
{
$db->sql_query('INSERT INTO ' . ACL_GROUPS_TABLE . ' ' . $db->sql_build_array('INSERT', $ary));
}
break;
}
$db->sql_multi_insert(ACL_USERS_TABLE, $users_sql_ary);
$db->sql_multi_insert(ACL_GROUPS_TABLE, $groups_sql_ary);
}
$auth->acl_clear_prefetch();
@@ -265,7 +248,7 @@ class acp_forums
if (!$forum_id)
{
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -277,7 +260,7 @@ class acp_forums
if (!$row)
{
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
$move_forum_name = $this->move_forum_by($row, $action, 1);
@@ -293,7 +276,7 @@ class acp_forums
case 'sync':
if (!$forum_id)
{
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
$sql = 'SELECT forum_name, forum_type
@@ -305,10 +288,76 @@ class acp_forums
if (!$row)
{
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
sync('forum', 'forum_id', $forum_id, false, true);
$cache->destroy('sql', FORUMS_TABLE);
$url = $this->u_action . "&amp;parent_id={$this->parent_id}&amp;f=$forum_id&amp;action=sync_topic";
meta_refresh(0, $url);
$sql = 'SELECT forum_topics_real
FROM ' . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$template->assign_vars(array(
'U_PROGRESS_BAR' => $this->u_action . '&amp;action=progress_bar',
'UA_PROGRESS_BAR' => str_replace('&amp;', '&', $this->u_action) . '&action=progress_bar',
'S_CONTINUE_SYNC' => true,
'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], 0, $row['forum_topics_real']))
);
// add_log('admin', 'LOG_FORUM_SYNC', $row['forum_name']);
return;
break;
case 'sync_topic':
@set_time_limit(0);
$sql = 'SELECT forum_name, forum_topics_real
FROM ' . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($row['forum_topics_real'])
{
$start = request_var('start', 0);
$batch_size = 3000;
$end = $start + $batch_size;
// Sync all topics in batch mode...
sync('topic_approved', 'range', 'topic_id BETWEEN ' . $start . ' AND ' . $end, true, false);
sync('topic', 'range', 'topic_id BETWEEN ' . $start . ' AND ' . $end, true, true);
if ($end < $row['forum_topics_real'])
{
$start += $batch_size;
$url = $this->u_action . "&amp;parent_id={$this->parent_id}&amp;f=$forum_id&amp;action=sync_topic&amp;start=$start&amp;total={$row['forum_topics_real']}";
meta_refresh(0, $url);
$template->assign_vars(array(
'U_PROGRESS_BAR' => $this->u_action . "&amp;action=progress_bar&amp;start=$start&amp;total={$row['forum_topics_real']}",
'UA_PROGRESS_BAR' => str_replace('&amp;', '&', $this->u_action) . "&action=progress_bar&start=$start&total={$row['forum_topics_real']}",
'S_CONTINUE_SYNC' => true,
'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $start, $row['forum_topics_real']))
);
return;
}
}
sync('forum', 'forum_id', $forum_id);
add_log('admin', 'LOG_FORUM_SYNC', $row['forum_name']);
$cache->destroy('sql', FORUMS_TABLE);
@@ -322,12 +371,12 @@ class acp_forums
if ($update)
{
$forum_data['forum_flags'] = 0;
$forum_data['forum_flags'] += (request_var('forum_link_track', false)) ? 1 : 0;
$forum_data['forum_flags'] += (request_var('prune_old_polls', false)) ? 2 : 0;
$forum_data['forum_flags'] += (request_var('prune_announce', false)) ? 4 : 0;
$forum_data['forum_flags'] += (request_var('prune_sticky', false)) ? 8 : 0;
$forum_data['forum_flags'] += ($forum_data['show_active']) ? 16 : 0;
$forum_data['forum_flags'] += (request_var('enable_post_review', true)) ? 32 : 0;
$forum_data['forum_flags'] += (request_var('forum_link_track', false)) ? FORUM_FLAG_LINK_TRACK : 0;
$forum_data['forum_flags'] += (request_var('prune_old_polls', false)) ? FORUM_FLAG_PRUNE_POLL : 0;
$forum_data['forum_flags'] += (request_var('prune_announce', false)) ? FORUM_FLAG_PRUNE_ANNOUNCE : 0;
$forum_data['forum_flags'] += (request_var('prune_sticky', false)) ? FORUM_FLAG_PRUNE_STICKY : 0;
$forum_data['forum_flags'] += ($forum_data['show_active']) ? FORUM_FLAG_ACTIVE_TOPICS : 0;
$forum_data['forum_flags'] += (request_var('enable_post_review', true)) ? FORUM_FLAG_POST_REVIEW : 0;
}
// Show form to create/modify a forum
@@ -389,7 +438,7 @@ class acp_forums
'prune_days' => 7,
'prune_viewed' => 7,
'prune_freq' => 1,
'forum_flags' => 0,
'forum_flags' => FORUM_FLAG_POST_REVIEW,
'forum_password' => '',
'forum_password_confirm'=> '',
);
@@ -475,6 +524,39 @@ class acp_forums
}
$db->sql_freeresult($result);
// Subforum move options
if ($action == 'edit' && $forum_data['forum_type'] == FORUM_CAT)
{
$subforums_id = array();
$subforums = get_forum_branch($forum_id, 'children');
foreach ($subforums as $row)
{
$subforums_id[] = $row['forum_id'];
}
$forums_list = make_forum_select($forum_data['parent_id'], $subforums_id);
$sql = 'SELECT forum_id
FROM ' . FORUMS_TABLE . '
WHERE forum_type = ' . FORUM_POST . "
AND forum_id <> $forum_id";
$result = $db->sql_query($sql);
if ($db->sql_fetchrow($result))
{
$template->assign_vars(array(
'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $subforums_id)) // , false, true, false???
);
}
$db->sql_freeresult($result);
$template->assign_vars(array(
'S_HAS_SUBFORUMS' => ($forum_data['right_id'] - $forum_data['left_id'] > 1) ? true : false,
'S_FORUMS_LIST' => $forums_list)
);
}
$s_show_display_on_index = false;
if ($forum_data['parent_id'] > 0)
@@ -537,18 +619,20 @@ class acp_forums
'S_SHOW_DISPLAY_ON_INDEX' => $s_show_display_on_index,
'S_FORUM_POST' => ($forum_data['forum_type'] == FORUM_POST) ? true : false,
'S_FORUM_ORIG_POST' => (isset($old_forum_type) && $old_forum_type == FORUM_POST) ? true : false,
'S_FORUM_ORIG_CAT' => (isset($old_forum_type) && $old_forum_type == FORUM_CAT) ? true : false,
'S_FORUM_ORIG_LINK' => (isset($old_forum_type) && $old_forum_type == FORUM_LINK) ? true : false,
'S_FORUM_LINK' => ($forum_data['forum_type'] == FORUM_LINK) ? true : false,
'S_FORUM_CAT' => ($forum_data['forum_type'] == FORUM_CAT) ? true : false,
'S_ENABLE_INDEXING' => ($forum_data['enable_indexing']) ? true : false,
'S_TOPIC_ICONS' => ($forum_data['enable_icons']) ? true : false,
'S_DISPLAY_ON_INDEX' => ($forum_data['display_on_index']) ? true : false,
'S_PRUNE_ENABLE' => ($forum_data['enable_prune']) ? true : false,
'S_FORUM_LINK_TRACK' => ($forum_data['forum_flags'] & 1) ? true : false,
'S_PRUNE_OLD_POLLS' => ($forum_data['forum_flags'] & 2) ? true : false,
'S_PRUNE_ANNOUNCE' => ($forum_data['forum_flags'] & 4) ? true : false,
'S_PRUNE_STICKY' => ($forum_data['forum_flags'] & 8) ? true : false,
'S_DISPLAY_ACTIVE_TOPICS' => ($forum_data['forum_flags'] & 16) ? true : false,
'S_ENABLE_POST_REVIEW' => ($forum_data['forum_flags'] & 32) ? true : false,
'S_FORUM_LINK_TRACK' => ($forum_data['forum_flags'] & FORUM_FLAG_LINK_TRACK) ? true : false,
'S_PRUNE_OLD_POLLS' => ($forum_data['forum_flags'] & FORUM_FLAG_PRUNE_POLL) ? true : false,
'S_PRUNE_ANNOUNCE' => ($forum_data['forum_flags'] & FORUM_FLAG_PRUNE_ANNOUNCE) ? true : false,
'S_PRUNE_STICKY' => ($forum_data['forum_flags'] & FORUM_FLAG_PRUNE_STICKY) ? true : false,
'S_DISPLAY_ACTIVE_TOPICS' => ($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS) ? true : false,
'S_ENABLE_POST_REVIEW' => ($forum_data['forum_flags'] & FORUM_FLAG_POST_REVIEW) ? true : false,
)
);
@@ -560,14 +644,14 @@ class acp_forums
if (!$forum_id)
{
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
$forum_data = $this->get_forum_info($forum_id);
$subforums_id = array();
$subforums = get_forum_branch($forum_id, 'children');
foreach ($subforums as $row)
{
$subforums_id[] = $row['forum_id'];
@@ -598,6 +682,7 @@ class acp_forums
'FORUM_NAME' => $forum_data['forum_name'],
'S_FORUM_POST' => ($forum_data['forum_type'] == FORUM_POST) ? true : false,
'S_FORUM_LINK' => ($forum_data['forum_type'] == FORUM_LINK) ? true : false,
'S_HAS_SUBFORUMS' => ($forum_data['right_id'] - $forum_data['left_id'] > 1) ? true : false,
'S_FORUMS_LIST' => $forums_list,
'S_ERROR' => (sizeof($errors)) ? true : false,
@@ -634,7 +719,7 @@ class acp_forums
// Jumpbox
$forum_box = make_forum_select($this->parent_id, false, false, false, false); //make_forum_select($this->parent_id);
if ($action == 'sync')
if ($action == 'sync' || $action == 'sync_topic')
{
$template->assign_var('S_RESYNCED', true);
}
@@ -677,6 +762,8 @@ class acp_forums
$template->assign_block_vars('forums', array(
'FOLDER_IMAGE' => $folder_image,
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="" />' : '',
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
'FORUM_NAME' => $row['forum_name'],
'FORUM_DESCRIPTION' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']),
'FORUM_TOPICS' => $row['forum_topics'],
@@ -716,7 +803,10 @@ class acp_forums
'NAVIGATION' => $navigation,
'FORUM_BOX' => $forum_box,
'U_SEL_ACTION' => $this->u_action,
'U_ACTION' => $this->u_action . '&amp;parent_id=' . $this->parent_id)
'U_ACTION' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
'U_PROGRESS_BAR' => $this->u_action . '&amp;action=progress_bar',
'UA_PROGRESS_BAR' => str_replace('&amp;', '&', $this->u_action) . '&action=progress_bar')
);
}
@@ -747,7 +837,7 @@ class acp_forums
*/
function update_forum_data(&$forum_data)
{
global $db, $user;
global $db, $user, $cache;
$errors = array();
@@ -779,12 +869,12 @@ class acp_forums
// 16 = show active topics
// 32 = enable post review
$forum_data['forum_flags'] = 0;
$forum_data['forum_flags'] += ($forum_data['forum_link_track']) ? 1 : 0;
$forum_data['forum_flags'] += ($forum_data['prune_old_polls']) ? 2 : 0;
$forum_data['forum_flags'] += ($forum_data['prune_announce']) ? 4 : 0;
$forum_data['forum_flags'] += ($forum_data['prune_sticky']) ? 8 : 0;
$forum_data['forum_flags'] += ($forum_data['show_active']) ? 16 : 0;
$forum_data['forum_flags'] += ($forum_data['enable_post_review']) ? 32 : 0;
$forum_data['forum_flags'] += ($forum_data['forum_link_track']) ? FORUM_FLAG_LINK_TRACK : 0;
$forum_data['forum_flags'] += ($forum_data['prune_old_polls']) ? FORUM_FLAG_PRUNE_POLL : 0;
$forum_data['forum_flags'] += ($forum_data['prune_announce']) ? FORUM_FLAG_PRUNE_ANNOUNCE : 0;
$forum_data['forum_flags'] += ($forum_data['prune_sticky']) ? FORUM_FLAG_PRUNE_STICKY : 0;
$forum_data['forum_flags'] += ($forum_data['show_active']) ? FORUM_FLAG_ACTIVE_TOPICS : 0;
$forum_data['forum_flags'] += ($forum_data['enable_post_review']) ? FORUM_FLAG_POST_REVIEW : 0;
// Unset data that are not database fields
$forum_data_sql = $forum_data;
@@ -821,7 +911,7 @@ class acp_forums
if (!$row)
{
trigger_error($user->lang['PARENT_NOT_EXIST'] . adm_back_link($this->u_action . '&amp;' . $this->parent_id));
trigger_error($user->lang['PARENT_NOT_EXIST'] . adm_back_link($this->u_action . '&amp;' . $this->parent_id), E_USER_WARNING);
}
$sql = 'UPDATE ' . FORUMS_TABLE . '
@@ -885,7 +975,125 @@ class acp_forums
return array($user->lang['NO_FORUM_ACTION']);
}
$forum_data_sql['forum_posts'] = $forum_data_sql['forum_topics'] = $forum_data_sql['forum_topics_real'] = 0;
$forum_data_sql['forum_posts'] = $forum_data_sql['forum_topics'] = $forum_data_sql['forum_topics_real'] = $forum_data_sql['forum_last_post_id'] = $forum_data_sql['forum_last_poster_id'] = $forum_data_sql['forum_last_post_time'] = 0;
$forum_data_sql['forum_last_poster_name'] = $forum_data_sql['forum_last_poster_colour'] = '';
}
else if ($row['forum_type'] == FORUM_CAT && $forum_data_sql['forum_type'] == FORUM_LINK)
{
// Has subforums?
if ($row['right_id'] - $row['left_id'] > 1)
{
// We are turning a category into a link - but need to decide what to do with the subforums.
$action_subforums = request_var('action_subforums', '');
$subforums_to_id = request_var('subforums_to_id', 0);
if ($action_subforums == 'delete')
{
$log_action_forums = 'FORUMS';
$rows = get_forum_branch($row['forum_id'], 'children', 'descending', false);
foreach ($rows as $_row)
{
// Do not remove the forum id we are about to change. ;)
if ($_row['forum_id'] == $row['forum_id'])
{
continue;
}
$forum_ids[] = $_row['forum_id'];
$errors = array_merge($errors, $this->delete_forum_content($_row['forum_id']));
}
if (sizeof($errors))
{
return $errors;
}
if (sizeof($forum_ids))
{
$sql = 'DELETE FROM ' . FORUMS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
$db->sql_query($sql);
$sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
$db->sql_query($sql);
$sql = 'DELETE FROM ' . ACL_USERS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
$db->sql_query($sql);
// Delete forum ids from extension groups table
$sql = 'SELECT group_id, allowed_forums
FROM ' . EXTENSION_GROUPS_TABLE;
$result = $db->sql_query($sql);
while ($_row = $db->sql_fetchrow($result))
{
if (!$_row['allowed_forums'])
{
continue;
}
$allowed_forums = unserialize(trim($_row['allowed_forums']));
$allowed_forums = array_diff($allowed_forums, $forum_ids);
$sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . "
SET allowed_forums = '" . ((sizeof($allowed_forums)) ? serialize($allowed_forums) : '') . "'
WHERE group_id = {$_row['group_id']}";
$db->sql_query($sql);
}
$db->sql_freeresult($result);
$cache->destroy('_extensions');
}
}
else if ($action_subforums == 'move')
{
if (!$subforums_to_id)
{
return array($user->lang['NO_DESTINATION_FORUM']);
}
$log_action_forums = 'MOVE_FORUMS';
$sql = 'SELECT forum_name
FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . $subforums_to_id;
$result = $db->sql_query($sql);
$_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$_row)
{
return array($user->lang['NO_FORUM']);
}
$subforums_to_name = $_row['forum_name'];
$sql = 'SELECT forum_id
FROM ' . FORUMS_TABLE . "
WHERE parent_id = {$row['forum_id']}";
$result = $db->sql_query($sql);
while ($_row = $db->sql_fetchrow($result))
{
$this->move_forum($_row['forum_id'], $subforums_to_id);
}
$db->sql_freeresult($result);
$sql = 'UPDATE ' . FORUMS_TABLE . "
SET parent_id = $subforums_to_id
WHERE parent_id = {$row['forum_id']}";
$db->sql_query($sql);
}
// Adjust the left/right id
$sql = 'UPDATE ' . FORUMS_TABLE . '
SET right_id = left_id + 1
WHERE forum_id = ' . $row['forum_id'];
$db->sql_query($sql);
}
}
if (sizeof($errors))
@@ -1018,7 +1226,7 @@ class acp_forums
{
global $db;
$table_ary = array(ACL_GROUPS_TABLE, ACL_USERS_TABLE, LOG_TABLE, POSTS_TABLE, TOPICS_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
$table_ary = array(LOG_TABLE, POSTS_TABLE, TOPICS_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
foreach ($table_ary as $table)
{
@@ -1121,6 +1329,14 @@ class acp_forums
$sql = 'DELETE FROM ' . FORUMS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
$db->sql_query($sql);
$sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
$db->sql_query($sql);
$sql = 'DELETE FROM ' . ACL_USERS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
$db->sql_query($sql);
}
else if ($action_subforums == 'move')
{
@@ -1167,6 +1383,14 @@ class acp_forums
$sql = 'DELETE FROM ' . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
$db->sql_query($sql);
$sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . "
WHERE forum_id = $forum_id";
$db->sql_query($sql);
$sql = 'DELETE FROM ' . ACL_USERS_TABLE . "
WHERE forum_id = $forum_id";
$db->sql_query($sql);
}
}
@@ -1181,6 +1405,14 @@ class acp_forums
$sql = 'DELETE FROM ' . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
$db->sql_query($sql);
$sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . "
WHERE forum_id = $forum_id";
$db->sql_query($sql);
$sql = 'DELETE FROM ' . ACL_USERS_TABLE . "
WHERE forum_id = $forum_id";
$db->sql_query($sql);
}
// Resync tree
@@ -1290,7 +1522,21 @@ class acp_forums
delete_attachments('topic', $topic_ids, false);
switch (SQL_LAYER)
// Before we remove anything we make sure we are able to adjust the post counts later. ;)
$sql = 'SELECT poster_id
FROM ' . POSTS_TABLE . '
WHERE forum_id = ' . $forum_id . '
AND post_postcount = 1';
$result = $db->sql_query($sql);
$post_counts = array();
while ($row = $db->sql_fetchrow($result))
{
$post_counts[$row['poster_id']] = (!empty($post_counts[$row['poster_id']])) ? $post_counts[$row['poster_id']] + 1 : 1;
}
$db->sql_freeresult($result);
switch ($db->sql_layer)
{
case 'mysql4':
case 'mysqli':
@@ -1365,18 +1611,18 @@ class acp_forums
foreach ($tables as $table)
{
$db->sql_query("DELETE FROM $table WHERE " . $db->sql_in_set($field, $id_list));
$db->sql_query("DELETE FROM $table WHERE " . $db->sql_in_set($field, $ids));
}
}
}
while ($row);
}
unset($ids, $id_list);
unset($ids);
break;
}
$table_ary = array(ACL_GROUPS_TABLE, ACL_USERS_TABLE, FORUMS_ACCESS_TABLE, FORUMS_TRACK_TABLE, FORUMS_WATCH_TABLE, LOG_TABLE, MODERATOR_CACHE_TABLE, POSTS_TABLE, TOPICS_TABLE, TOPICS_TRACK_TABLE);
$table_ary = array(FORUMS_ACCESS_TABLE, FORUMS_TRACK_TABLE, FORUMS_WATCH_TABLE, LOG_TABLE, MODERATOR_CACHE_TABLE, POSTS_TABLE, TOPICS_TABLE, TOPICS_TRACK_TABLE);
foreach ($table_ary as $table)
{
@@ -1391,6 +1637,18 @@ class acp_forums
$db->sql_query("UPDATE $table SET forum_id = 0 WHERE forum_id = $forum_id");
}
// Adjust users post counts
if (sizeof($post_counts))
{
foreach ($post_counts as $poster_id => $substract)
{
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_posts = user_posts - ' . $substract . '
WHERE user_id = ' . $poster_id;
$db->sql_query($sql);
}
}
$db->sql_transaction('commit');
// Make sure the overall post/topic count is correct...
@@ -1428,8 +1686,6 @@ class acp_forums
set_config('upload_dir_size', (int) $row['stat'], true);
add_log('admin', 'LOG_RESYNC_STATS');
return array();
}
@@ -1513,6 +1769,27 @@ class acp_forums
return $target['forum_name'];
}
/**
* Display progress bar for syncinc forums
*/
function display_progress_bar($start, $total)
{
global $template, $user;
adm_page_header($user->lang['SYNC_IN_PROGRESS']);
$template->set_filenames(array(
'body' => 'progress_bar.html')
);
$template->assign_vars(array(
'L_PROGRESS' => $user->lang['SYNC_IN_PROGRESS'],
'L_PROGRESS_EXPLAIN' => ($start && $total) ? sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $start, $total) : $user->lang['SYNC_IN_PROGRESS'])
);
adm_page_footer();
}
}
?>

View File

@@ -30,7 +30,7 @@ class acp_groups
$action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['addusers'])) ? 'addusers' : request_var('action', ''));
$group_id = request_var('g', 0);
$mark_ary = request_var('mark', array(0));
$name_ary = request_var('usernames', '');
$name_ary = request_var('usernames', '', true);
$leader = request_var('leader', 0);
$default = request_var('default', 0);
$start = request_var('start', 0);
@@ -52,7 +52,13 @@ class acp_groups
if (!$group_row)
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Check if the user is allowed to manage this group if set to founder only.
if ($user->data['user_type'] != USER_FOUNDER && $group_row['group_founder_manage'])
{
trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
@@ -64,11 +70,11 @@ class acp_groups
case 'promote':
if (!$group_id)
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Approve, demote or promote
group_user_attributes($action, $group_id, $mark_ary, false, ($group_id) ? $group_row['group_name'] : false);
group_user_attributes($action, $group_id, $mark_ary, false, $group_row['group_name']);
switch ($action)
{
@@ -85,13 +91,15 @@ class acp_groups
break;
}
group_update_listings($group_id);
trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id));
break;
case 'default':
if (!$group_id)
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -134,6 +142,8 @@ class acp_groups
group_user_attributes('default', $group_id, $mark_ary, false, $group_row['group_name'], $group_row);
}
group_update_listings($group_id);
trigger_error($user->lang['GROUP_DEFS_UPDATED'] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id));
}
else
@@ -155,7 +165,7 @@ class acp_groups
{
if (!$group_id)
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$error = '';
@@ -165,7 +175,7 @@ class acp_groups
case 'delete':
if (!$auth->acl_get('a_groupdel'))
{
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$error = group_delete($group_id, $group_row['group_name']);
@@ -180,7 +190,7 @@ class acp_groups
if ($error)
{
trigger_error($user->lang[$error] . adm_back_link($back_link));
trigger_error($user->lang[$error] . adm_back_link($back_link), E_USER_WARNING);
}
$message = ($action == 'delete') ? 'GROUP_DELETED' : 'GROUP_USERS_REMOVE';
@@ -201,23 +211,24 @@ class acp_groups
case 'addusers':
if (!$group_id)
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!$name_ary)
{
trigger_error($user->lang['NO_USERS'] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id));
trigger_error($user->lang['NO_USERS'] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id), E_USER_WARNING);
}
$name_ary = array_unique(explode("\n", $name_ary));
$group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
// Add user/s to group
if ($error = group_user_add($group_id, false, $name_ary, $group_row['group_name'], $default, $leader, 0, $group_row))
if ($error = group_user_add($group_id, false, $name_ary, $group_name, $default, $leader, 0, $group_row))
{
trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id));
trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id), E_USER_WARNING);
}
$message = ($action == 'addleaders') ? 'GROUP_MODS_ADDED' : 'GROUP_USERS_ADDED';
$message = ($leader) ? 'GROUP_MODS_ADDED' : 'GROUP_USERS_ADDED';
trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&amp;action=list&amp;g=' . $group_id));
break;
@@ -228,12 +239,12 @@ class acp_groups
if ($action == 'edit' && !$group_id)
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if ($action == 'add' && !$auth->acl_get('a_groupadd'))
{
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$error = array();
@@ -258,13 +269,22 @@ class acp_groups
$delete = request_var('delete', '');
$submit_ary = array(
'colour' => request_var('group_colour', ''),
'rank' => request_var('group_rank', 0),
'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0,
'legend' => isset($_REQUEST['group_legend']) ? 1 : 0,
'message_limit' => request_var('group_message_limit', 0)
'colour' => request_var('group_colour', ''),
'rank' => request_var('group_rank', 0),
'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0,
'legend' => isset($_REQUEST['group_legend']) ? 1 : 0,
'message_limit' => request_var('group_message_limit', 0),
);
if ($user->data['user_type'] == USER_FOUNDER)
{
$submit_ary['founder_manage'] = isset($_REQUEST['group_founder_manage']) ? 1 : 0;
}
else
{
$submit_ary['founder_manage'] = 0;
}
if (!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl'] || $data['remotelink'])
{
$data['width'] = request_var('width', '');
@@ -313,7 +333,7 @@ class acp_groups
{
if (isset($group_row['group_avatar']) && $group_row['group_avatar'])
{
avatar_delete($group_row['group_avatar']);
avatar_delete('group', $group_row);
}
}
@@ -324,7 +344,7 @@ class acp_groups
// were made.
$group_attributes = array();
$test_variables = array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height', 'receive_pm', 'legend', 'message_limit');
$test_variables = array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height', 'receive_pm', 'legend', 'message_limit', 'founder_manage');
foreach ($test_variables as $test)
{
if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test]))
@@ -364,24 +384,7 @@ class acp_groups
$db->sql_freeresult($result);
// Now insert the data
if (sizeof($groups_sql_ary))
{
switch (SQL_LAYER)
{
case 'mysql':
case 'mysql4':
case 'mysqli':
$db->sql_query('INSERT INTO ' . ACL_GROUPS_TABLE . ' ' . $db->sql_build_array('MULTI_INSERT', $groups_sql_ary));
break;
default:
foreach ($groups_sql_ary as $ary)
{
$db->sql_query('INSERT INTO ' . ACL_GROUPS_TABLE . ' ' . $db->sql_build_array('INSERT', $ary));
}
break;
}
}
$db->sql_multi_insert(ACL_GROUPS_TABLE, $groups_sql_ary);
$auth->acl_clear_prefetch();
}
@@ -447,6 +450,8 @@ class acp_groups
if (isset($group_row['group_avatar']) && $group_row['group_avatar'])
{
$avatar_img = '';
switch ($group_row['group_avatar_type'])
{
case AVATAR_UPLOAD:
@@ -457,8 +462,8 @@ class acp_groups
$avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/';
break;
}
$avatar_img .= $group_row['group_avatar'];
$avatar_img .= $group_row['group_avatar'];
$avatar_img = '<img src="' . $avatar_img . '" width="' . $group_row['group_avatar_width'] . '" height="' . $group_row['group_avatar_height'] . '" alt="" />';
}
else
@@ -495,16 +500,19 @@ class acp_groups
'S_SPECIAL_GROUP' => ($group_type == GROUP_SPECIAL) ? true : false,
'S_DISPLAY_GALLERY' => ($config['allow_avatar_local'] && !$display_gallery) ? true : false,
'S_IN_GALLERY' => ($config['allow_avatar_local'] && $display_gallery) ? true : false,
'S_USER_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'GROUP_NAME' => ($group_type == GROUP_SPECIAL) ? $user->lang['G_' . $group_name] : $group_name,
'GROUP_INTERNAL_NAME' => $group_name,
'GROUP_DESC' => $group_desc_data['text'],
'GROUP_RECEIVE_PM' => (isset($group_row['group_receive_pm']) && $group_row['group_receive_pm']) ? ' checked="checked"' : '',
'GROUP_FOUNDER_MANAGE' => (isset($group_row['group_founder_manage']) && $group_row['group_founder_manage']) ? ' checked="checked"' : '',
'GROUP_LEGEND' => (isset($group_row['group_legend']) && $group_row['group_legend']) ? ' checked="checked"' : '',
'GROUP_MESSAGE_LIMIT' => (isset($group_row['group_message_limit'])) ? $group_row['group_message_limit'] : 0,
'GROUP_COLOUR' => (isset($group_row['group_colour'])) ? $group_row['group_colour'] : '',
'S_DESC_BBCODE_CHECKED' => $group_desc_data['allow_bbcode'],
'S_DESC_URLS_CHECKED' => $group_desc_data['allow_urls'],
'S_DESC_SMILIES_CHECKED'=> $group_desc_data['allow_smilies'],
@@ -542,7 +550,7 @@ class acp_groups
if (!$group_id)
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->page_title = 'GROUP_MEMBERS';
@@ -614,6 +622,7 @@ class acp_groups
'U_ACTION' => $this->u_action . "&amp;g=$group_id",
'U_BACK' => $this->u_action,
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=list&amp;field=usernames'),
'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=list&field=usernames', false),
'U_DEFAULT_ALL' => "{$this->u_action}&amp;action=default&amp;g=$group_id")
);

View File

@@ -60,7 +60,7 @@ class acp_icons
if ($action == 'edit' || $action == 'add' || $action == 'import')
{
$imglist = filelist($phpbb_root_path . $img_path, '');
foreach ($imglist as $path => $img_ary)
{
foreach ($img_ary as $img)
@@ -108,6 +108,7 @@ class acp_icons
ORDER BY {$fields}_order " . (($icon_id || $action == 'add') ? 'DESC' : 'ASC');
$result = $db->sql_query($sql);
$data = array();
while ($row = $db->sql_fetchrow($result))
{
if ($action == 'add')
@@ -135,14 +136,13 @@ class acp_icons
}
$after_txt = ($mode == 'smilies') ? $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;
$order_list = '<option value="' . ($row[$fields . '_order'] + 1) . '"' . $selected . '>' . sprintf($user->lang['AFTER_' . $lang], ' -&gt; ' . htmlspecialchars($after_txt)) . '</option>' . $order_list;
}
}
$db->sql_freeresult($result);
$order_list = '<option value="1"' . ((!isset($after)) ? ' selected="selected"' : '') . '>' . $user->lang['FIRST'] . '</option>' . $order_list;
$data = array();
if ($action == 'add')
{
$data = $_images;
@@ -242,11 +242,32 @@ class acp_icons
);
}
// Image_order holds the 'new' order value
if (!empty($image_order[$image]))
{
$img_sql = array_merge($img_sql, array(
$fields . '_order' => $image_order[$image] . '.5')
$fields . '_order' => $image_order[$image])
);
// Since we always add 'after' an item, we just need to increase all following + the current by one
$sql = "UPDATE $table
SET {$fields}_order = {$fields}_order + 1
WHERE {$fields}_order >= {$image_order[$image]}";
$db->sql_query($sql);
// If we adjust the order, we need to adjust all other orders too - they became inaccurate...
foreach ($image_order as $_image => $_order)
{
if ($_image == $image)
{
continue;
}
if ($_order >= $image_order[$image])
{
$image_order[$_image]++;
}
}
}
if ($action == 'modify')
@@ -261,45 +282,6 @@ class acp_icons
$sql = "INSERT INTO $table " . $db->sql_build_array('INSERT', $img_sql);
$db->sql_query($sql);
}
$update = false;
if ($action == 'modify' && !empty($image_order[$image]))
{
$update = true;
$sql = "SELECT {$fields}_order
FROM $table
WHERE {$fields}_id = " . $image_id[$image];
$result = $db->sql_query($sql);
$order_old = (int) $db->sql_fetchfield($fields . '_order');
$db->sql_freeresult($result);
if ($order_old == $image_order[$image])
{
$update = false;
}
if ($order_old > $image_order[$image])
{
$sign = '+';
$where = $fields . '_order >= ' . $image_order[$image] . " AND {$fields}_order < $order_old";
}
else if ($order_old < $image_order[$image])
{
$sign = '-';
$where = "{$fields}_order > $order_old AND {$fields}_order < " . $image_order[$image];
$sql[$fields . '_order'] = $image_order[$image] - 1;
}
}
if ($update)
{
$sql = "UPDATE $table
SET {$fields}_order = {$fields}_order $sign 1
WHERE $where";
$db->sql_query($sql);
}
}
}
@@ -329,7 +311,7 @@ class acp_icons
// The user has already selected a smilies_pak file
if ($current == 'delete')
{
$db->sql_query(((SQL_LAYER != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . $table);
$db->sql_query((($db->sql_layer != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . $table);
switch ($mode)
{
@@ -363,7 +345,7 @@ class acp_icons
if (!($pak_ary = @file($phpbb_root_path . $img_path . '/' . $pak)))
{
trigger_error($user->lang['PAK_FILE_NOT_READABLE'] . adm_back_link($this->u_action));
trigger_error($user->lang['PAK_FILE_NOT_READABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
foreach ($pak_ary as $pak_entry)
@@ -374,7 +356,7 @@ class acp_icons
if ((sizeof($data[1]) != 4 && $mode == 'icons') ||
(sizeof($data[1]) != 6 && $mode == 'smilies'))
{
trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($this->u_action));
trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Stripslash here because it got addslashed before... (on export)
@@ -523,7 +505,7 @@ class acp_icons
}
else
{
trigger_error($user->lang['NO_' . strtoupper($fields) . '_EXPORT'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_' . strtoupper($fields) . '_EXPORT'] . adm_back_link($this->u_action), E_USER_WARNING);
}
break;
@@ -562,14 +544,40 @@ class acp_icons
case 'move_up':
case 'move_down':
$image_order = request_var('order', 0);
$order_total = $image_order * 2 + (($action == 'move_up') ? -1 : 1);
// Get current order id...
$sql = "SELECT {$fields}_order as current_order
FROM $table
WHERE {$fields}_id = $icon_id";
$result = $db->sql_query($sql);
$current_order = (int) $db->sql_fetchfield('current_order');
$db->sql_freeresult($result);
$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) . ')';
if ($current_order == 0 && $action == 'move_up')
{
break;
}
// on move_down, switch position with next order_id...
// on move_up, switch position with previous order_id...
$switch_order_id = ($action == 'move_down') ? $current_order + 1 : $current_order - 1;
//
$sql = "UPDATE $table
SET {$fields}_order = $current_order
WHERE {$fields}_order = $switch_order_id
AND {$fields}_id <> $icon_id";
$db->sql_query($sql);
// Only update the other entry too if the previous entry got updated
if ($db->sql_affectedrows())
{
$sql = "UPDATE $table
SET {$fields}_order = $switch_order_id
WHERE {$fields}_order = $current_order
AND {$fields}_id = $icon_id";
$db->sql_query($sql);
}
$cache->destroy('icons');
$cache->destroy('sql', $table);
@@ -640,8 +648,8 @@ class acp_icons
'EMOTION' => (isset($row['emotion'])) ? $row['emotion'] : '',
'U_EDIT' => $this->u_action . '&amp;action=edit&amp;id=' . $row[$fields . '_id'],
'U_DELETE' => $this->u_action . '&amp;action=delete&amp;id=' . $row[$fields . '_id'],
'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;order=' . $row[$fields . '_order'],
'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;order=' . $row[$fields . '_order'])
'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;id=' . $row[$fields . '_id'],
'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;id=' . $row[$fields . '_id'])
);
if (!$spacer && !$row['display_on_posting'])

View File

@@ -0,0 +1,184 @@
<?php
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2006 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @package acp
*/
class acp_inactive
{
var $u_action;
var $p_master;
function acp_inactive(&$p_master)
{
$this->p_master = &$p_master;
}
function main($id, $mode)
{
global $config, $db, $user, $auth, $template;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
$user->add_lang('memberlist');
$action = request_var('action', '');
$mark = (isset($_REQUEST['mark'])) ? request_var('mark', array(0)) : array();
$start = request_var('start', 0);
// Sort keys
$sort_days = request_var('st', 0);
$sort_key = request_var('sk', 'i');
$sort_dir = request_var('sd', 'd');
if (sizeof($mark))
{
switch ($action)
{
case 'activate':
case 'delete':
$sql = 'SELECT username
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $mark);
$result = $db->sql_query($sql);
$user_affected = array();
while ($row = $db->sql_fetchrow($result))
{
$user_affected[] = $row['username'];
}
$db->sql_freeresult($result);
if ($action == 'activate')
{
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
user_active_flip('activate', $mark);
}
else if ($action == 'delete')
{
if (!$auth->acl_get('a_userdel'))
{
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'DELETE FROM ' . USER_GROUP_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
$db->sql_query($sql);
$sql = 'DELETE FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
$db->sql_query($sql);
add_log('admin', 'LOG_INACTIVE_' . strtoupper($action), implode(', ', $user_affected));
}
break;
case 'remind':
if (empty($config['email_enable']))
{
trigger_error($user->lang['EMAIL_DISABLED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $mark);
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
// Send the messages
include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx);
$messenger = new messenger();
$board_url = generate_board_url() . "/ucp.$phpEx?mode=activate";
$usernames = array();
do
{
$messenger->template('user_remind_inactive', $row['user_lang']);
$messenger->replyto($config['board_email']);
$messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($row['username']),
'REGISTER_DATE' => $user->format_date($row['user_regdate']),
'U_ACTIVATE' => "$board_url&mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey'])
);
$messenger->send($row['user_notify_type']);
$usernames[] = $row['username'];
}
while ($row = $db->sql_fetchrow($result));
$messenger->save_queue();
add_log('admin', 'LOG_INACTIVE_REMIND', implode(', ', $usernames));
unset($usernames);
}
$db->sql_freeresult($result);
break;
}
}
// 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'], 365 => $user->lang['1_YEAR']);
$sort_by_text = array('i' => $user->lang['SORT_INACTIVE'], 'j' => $user->lang['SORT_REG_DATE'], 'l' => $user->lang['SORT_LAST_VISIT'], 'r' => $user->lang['SORT_REASON'], 'u' => $user->lang['SORT_USERNAME']);
$sort_by_sql = array('i' => 'user_inactive_time', 'j' => 'user_regdate', 'l' => 'user_lastvisit', 'r' => 'user_inactive_reason', 'u' => 'username_clean');
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
// 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');
$inactive = array();
$inactive_count = 0;
view_inactive_users($inactive, $inactive_count, $config['topics_per_page'], $start, $sql_where, $sql_sort);
foreach ($inactive as $row)
{
$template->assign_block_vars('inactive', array(
'INACTIVE_DATE' => $user->format_date($row['user_inactive_time']),
'JOINED' => $user->format_date($row['user_regdate']),
'LAST_VISIT' => (!$row['user_lastvisit']) ? ' - ' : $user->format_date($row['user_lastvisit']),
'REASON' => $row['inactive_reason'],
'USER_ID' => $row['user_id'],
'USERNAME' => $row['username'],
'U_USER_ADMIN' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&amp;mode=overview&amp;u={$row['user_id']}"))
);
}
$option_ary = array('activate' => 'ACTIVATE', 'delete' => 'DELETE');
if ($config['email_enable'])
{
$option_ary += array('remind' => 'REMIND');
}
$template->assign_vars(array(
'S_INACTIVE_USERS' => true,
'S_INACTIVE_OPTIONS' => build_select($option_ary),
'S_LIMIT_DAYS' => $s_limit_days,
'S_SORT_KEY' => $s_sort_key,
'S_SORT_DIR' => $s_sort_dir,
'S_ON_PAGE' => on_page($inactive_count, $config['topics_per_page'], $start),
'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param", $inactive_count, $config['topics_per_page'], $start, true),
));
$this->tpl_name = 'acp_inactive';
$this->page_title = 'ACP_INACTIVE_USERS';
}
}
?>

View File

@@ -44,16 +44,9 @@ class acp_jabber
$jab_resource = request_var('jab_resource', $config['jab_resource']);
$jab_package_size = request_var('jab_package_size', $config['jab_package_size']);
$jabber = new jabber();
$jabber = new jabber($jab_host, $jab_port, $jab_username, $jab_password, $jab_resource);
$error = array();
// Setup the basis vars for jabber connection
$jabber->server = $jab_host;
$jabber->port = ($jab_port) ? $jab_port : 5222;
$jabber->username = $jab_username;
$jabber->password = $jab_password;
$jabber->resource = $jab_resource;
$message = $user->lang['JAB_SETTINGS_CHANGED'];
$log = 'JAB_SETTINGS_CHANGED';
@@ -65,7 +58,7 @@ class acp_jabber
{
if (!$jabber->connect())
{
trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action));
trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// First we'll try to authorise using this account, if that fails we'll try to create it.
@@ -94,12 +87,12 @@ class acp_jabber
{
if (!$jabber->connect())
{
trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action));
trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!$jabber->send_auth())
{
trigger_error($user->lang['ERR_JAB_AUTH'] . adm_back_link($this->u_action));
trigger_error($user->lang['ERR_JAB_AUTH'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$jabber->send_presence(NULL, NULL, 'online');
@@ -155,7 +148,7 @@ class acp_jabber
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'JAB_ENABLE' => $new['jab_enable'],
'L_JAB_SERVER_EXPLAIN' => sprintf($user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.xmpp.net/" rel="external">', '</a>'),
'L_JAB_SERVER_EXPLAIN' => sprintf($user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.jabber.org/">', '</a>'),
'JAB_HOST' => $new['jab_host'],
'JAB_PORT' => $new['jab_port'],
'JAB_USERNAME' => $new['jab_username'],

View File

@@ -47,8 +47,10 @@ class acp_language
$missing_file = request_var('missing_file', array('' => 0));
list($_REQUEST['language_file'], ) = array_keys($missing_file);
}
list($this->language_directory, $this->language_file) = explode('|', request_var('language_file', '|common.' . $phpEx));
$selected_lang_file = request_var('language_file', '|common.' . $phpEx);
list($this->language_directory, $this->language_file) = explode('|', $selected_lang_file);
$this->language_directory = basename($this->language_directory);
$this->language_file = basename($this->language_file);
@@ -76,7 +78,8 @@ class acp_language
break;
default:
trigger_error($user->lang['INVALID_UPLOAD_METHOD']);
trigger_error($user->lang['INVALID_UPLOAD_METHOD'], E_USER_ERROR);
break;
}
$test_connection = $transfer->open_session();
@@ -104,11 +107,11 @@ class acp_language
$hidden_data = build_hidden_fields(array(
'file' => $this->language_file,
'dir' => $this->language_directory,
'method' => $method,
'entry' => $_POST['entry']),
true
'method' => $method)
);
$hidden_data .= build_hidden_fields(array('entry' => $_POST['entry']), true, STRIP);
$template->assign_vars(array(
'S_UPLOAD' => true,
'NAME' => $method,
@@ -124,7 +127,7 @@ class acp_language
if (!$lang_id)
{
trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -153,14 +156,14 @@ class acp_language
case 'download_file':
case 'upload_data':
if (!$lang_id || !isset($_POST['entry']) || !is_array($_POST['entry']))
if (!$lang_id || empty($_POST['entry']))
{
trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!$this->language_file || (!$this->language_directory && !in_array($this->language_file, $this->main_files)))
{
trigger_error($user->lang['NO_FILE_SELECTED'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_FILE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -187,7 +190,7 @@ class acp_language
{
if (!@mkdir($dir, 0777))
{
trigger_error("Could not create directory $dir");
trigger_error("Could not create directory $dir", E_USER_ERROR);
}
@chmod($dir, 0777);
}
@@ -200,7 +203,7 @@ class acp_language
if (!$fp)
{
trigger_error($user->lang['UNABLE_TO_WRITE_FILE']);
trigger_error(sprintf($user->lang['UNABLE_TO_WRITE_FILE'], $filename) . adm_back_link($this->u_action . '&amp;id=' . $lang_id . '&amp;language_file=' . urlencode($selected_lang_file)), E_USER_WARNING);
}
if ($this->language_directory == 'email')
@@ -284,6 +287,8 @@ class acp_language
$file = request_var('file', '');
$dir = request_var('dir', '');
$selected_lang_file = $dir . '|' . $file;
$old_file = '/' . $this->get_filename($row['lang_iso'], $dir, $file, false, true);
$lang_path = 'language/' . $row['lang_iso'] . '/' . (($dir) ? $dir . '/' : '');
@@ -301,12 +306,13 @@ class acp_language
break;
default:
trigger_error($user->lang['INVALID_UPLOAD_METHOD']);
trigger_error($user->lang['INVALID_UPLOAD_METHOD'], E_USER_ERROR);
break;
}
if (($result = $transfer->open_session()) !== true)
{
trigger_error($user->lang[$result] . adm_back_link($this->u_action));
trigger_error($user->lang[$result] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id . '&amp;language_file=' . urlencode($selected_lang_file)), E_USER_WARNING);
}
$transfer->rename($lang_path . $file, $lang_path . $file . '.bak');
@@ -318,7 +324,7 @@ class acp_language
add_log('admin', 'LOG_LANGUAGE_FILE_REPLACED', $file);
trigger_error($user->lang['UPLOAD_COMPLETED']);
trigger_error($user->lang['UPLOAD_COMPLETED'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id . '&amp;language_file=' . urlencode($selected_lang_file)));
}
$action = 'details';
@@ -329,7 +335,7 @@ class acp_language
if (!$lang_id)
{
trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->page_title = 'LANGUAGE_PACK_DETAILS';
@@ -362,28 +368,28 @@ class acp_language
case 'email':
if (!in_array($this->language_file, $email_files))
{
trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id));
trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
}
break;
case 'acp':
if (!in_array($this->language_file, $acp_files))
{
trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id));
trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
}
break;
case 'mods':
if (!in_array($this->language_file, $mods_files))
{
trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id));
trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
}
break;
default:
if (!in_array($this->language_file, $this->main_files))
{
trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id));
trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id), E_USER_WARNING);
}
}
@@ -491,7 +497,7 @@ class acp_language
'S_MISSING_FILES' => true,
'L_MISSING_FILES' => sprintf($user->lang['THOSE_MISSING_LANG_FILES'], $lang_entries['lang_local_name']),
'MISSING_FILES' => implode('<br />', $missing_files))
);
);
}
if ($is_missing_var)
@@ -500,7 +506,7 @@ class acp_language
'S_MISSING_VARS' => true,
'L_MISSING_VARS_EXPLAIN' => sprintf($user->lang['THOSE_MISSING_LANG_VARIABLES'], $lang_entries['lang_local_name']),
'U_MISSING_ACTION' => $this->u_action . "&amp;action=$action&amp;id=$lang_id")
);
);
foreach ($missing_vars as $file => $vars)
{
@@ -532,7 +538,7 @@ class acp_language
$selected = (!$this->language_directory && $this->language_file == $file) ? ' selected="selected"' : '';
$s_lang_options .= '<option value="|' . $file . '"' . $selected . '>' . $prefix . $file . '</option>';
}
// Help Files
$s_lang_options .= '<option value="|common.' . $phpEx . '" class="sep">' . $user->lang['HELP_FILES'] . '</option>';
foreach ($this->main_files as $file)
@@ -559,7 +565,7 @@ class acp_language
}
$s_lang_options .= '<option value="|common.' . $phpEx . '" class="sep">' . $user->lang[strtoupper($check) . '_FILES'] . '</option>';
foreach (${$check . '_files'} as $file)
{
$prefix = (file_exists($phpbb_root_path . $this->get_filename($lang_iso, $check, $file, true, true))) ? '* ' : '';
@@ -599,6 +605,7 @@ class acp_language
unset($help);
}
}
$print_message = (($this->language_directory) ? $this->language_directory . '/' : '') . $this->language_file;
}
@@ -611,7 +618,7 @@ class acp_language
'PRINT_MESSAGE' => $print_message,
)
);
if (!$is_email_file)
{
$method = ($is_help_file) ? 'print_help_entries' : 'print_language_entries';
@@ -622,7 +629,7 @@ class acp_language
{
$tpl .= $this->$method($missing_vars[$name], '* ');
}
$tpl .= $this->$method($lang);
$template->assign_var('TPL', $tpl);
@@ -633,20 +640,21 @@ class acp_language
$template->assign_vars(array(
'LANG' => $lang)
);
unset($lang);
}
return;
break;
case 'delete':
if (!$lang_id)
{
trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
FROM ' . LANG_TABLE . '
WHERE lang_id = ' . $lang_id;
@@ -656,18 +664,18 @@ class acp_language
if ($row['lang_iso'] == $config['default_lang'])
{
trigger_error($user->lang['NO_REMOVE_DEFAULT_LANG'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_REMOVE_DEFAULT_LANG'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$db->sql_query('DELETE FROM ' . LANG_TABLE . ' WHERE lang_id = ' . $lang_id);
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_lang = '{$config['default_lang']}'
WHERE user_lang = '{$row['lang_iso']}'";
SET user_lang = '" . $db->sql_escape($config['default_lang']) . "'
WHERE user_lang = '" . $db->sql_escape($row['lang_iso']) . "'";
$db->sql_query($sql);
add_log('admin', 'LOG_LANGUAGE_PACK_DELETED', $row['lang_english_name']);
trigger_error(sprintf($user->lang['LANGUAGE_PACK_DELETED'], $row['lang_english_name']) . adm_back_link($this->u_action));
break;
@@ -677,7 +685,7 @@ class acp_language
if (!$lang_iso || !file_exists("{$phpbb_root_path}language/$lang_iso/iso.txt"))
{
trigger_error($user->lang['LANGUAGE_PACK_NOT_EXIST'] . adm_back_link($this->u_action));
trigger_error($user->lang['LANGUAGE_PACK_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$file = file("{$phpbb_root_path}language/$lang_iso/iso.txt");
@@ -685,8 +693,8 @@ class acp_language
$lang_pack = array(
'iso' => $lang_iso,
'name' => trim(htmlspecialchars($file[0])),
'local_name'=> trim(htmlspecialchars($file[1])),
'author' => trim(htmlspecialchars($file[2]))
'local_name'=> trim(htmlspecialchars($file[1], ENT_COMPAT, 'UTF-8')),
'author' => trim(htmlspecialchars($file[2], ENT_COMPAT, 'UTF-8'))
);
unset($file);
@@ -694,18 +702,19 @@ class acp_language
FROM ' . LANG_TABLE . "
WHERE lang_iso = '" . $db->sql_escape($lang_iso) . "'";
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
trigger_error($user->lang['LANGUAGE_PACK_ALREADY_INSTALLED'] . adm_back_link($this->u_action));
}
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($row)
{
trigger_error($user->lang['LANGUAGE_PACK_ALREADY_INSTALLED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!$lang_pack['name'] || !$lang_pack['local_name'])
{
trigger_error($user->lang['INVALID_LANGUAGE_PACK'] . adm_back_link($this->u_action));
trigger_error($user->lang['INVALID_LANGUAGE_PACK'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Add language pack
$sql_ary = array(
'lang_iso' => $lang_pack['iso'],
@@ -716,18 +725,18 @@ class acp_language
);
$db->sql_query('INSERT INTO ' . LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
add_log('admin', 'LOG_LANGUAGE_PACK_INSTALLED', $lang_pack['name']);
trigger_error(sprintf($user->lang['LANGUAGE_PACK_INSTALLED'], $lang_pack['name']) . adm_back_link($this->u_action));
break;
case 'download':
if (!$lang_id)
{
trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -747,7 +756,7 @@ class acp_language
{
continue;
}
$methods[] = $type;
}
@@ -768,7 +777,7 @@ class acp_language
'U_ACTION' => $this->u_action . "&amp;action=$action&amp;id=$lang_id",
'RADIO_BUTTONS' => $radio_buttons)
);
return;
}
@@ -820,9 +829,9 @@ class acp_language
$this->add_to_archive($compress, $mod_files, $row['lang_iso'], 'mods');
// Write ISO File
$iso_src = html_entity_decode($row['lang_english_name']) . "\n";
$iso_src .= html_entity_decode($row['lang_local_name']) . "\n";
$iso_src .= html_entity_decode($row['lang_author']);
$iso_src = htmlspecialchars_decode($row['lang_english_name']) . "\n";
$iso_src .= htmlspecialchars_decode($row['lang_local_name']) . "\n";
$iso_src .= htmlspecialchars_decode($row['lang_author']);
$compress->add_data($iso_src, 'language/' . $row['lang_iso'] . '/iso.txt');
// index.html files
@@ -838,7 +847,7 @@ class acp_language
$compress->close();
$compress->download('lang_' . $row['lang_iso']);
@unlink($phpbb_root_path . 'store/lang_' . $row['lang_iso'] . '.' . $use_method);
@unlink($phpbb_root_path . 'store/lang_' . $row['lang_iso'] . $use_method);
exit;
@@ -870,18 +879,16 @@ class acp_language
$tagstyle = ($row['lang_iso'] == $config['default_lang']) ? '*' : '';
$template->assign_block_vars('lang', array(
'U_DETAILS' => $this->u_action . "&amp;action=details&amp;id={$row['lang_id']}",
'U_DOWNLOAD' => $this->u_action . "&amp;action=download&amp;id={$row['lang_id']}",
'U_DELETE' => $this->u_action . "&amp;action=delete&amp;id={$row['lang_id']}",
'U_DETAILS' => $this->u_action . "&amp;action=details&amp;id={$row['lang_id']}",
'U_DOWNLOAD' => $this->u_action . "&amp;action=download&amp;id={$row['lang_id']}",
'U_DELETE' => $this->u_action . "&amp;action=delete&amp;id={$row['lang_id']}",
'ENGLISH_NAME' => $row['lang_english_name'],
'TAG' => $tagstyle,
'LOCAL_NAME' => $row['lang_local_name'],
'ISO' => $row['lang_iso'],
'USED_BY' => (isset($lang_count[$row['lang_iso']])) ? $lang_count[$row['lang_iso']] : 0,
)
);
'ENGLISH_NAME' => $row['lang_english_name'],
'TAG' => $tagstyle,
'LOCAL_NAME' => $row['lang_local_name'],
'ISO' => $row['lang_iso'],
'USED_BY' => (isset($lang_count[$row['lang_iso']])) ? $lang_count[$row['lang_iso']] : 0,
));
}
$db->sql_freeresult($result);
@@ -890,7 +897,7 @@ class acp_language
while (($file = readdir($dp)) !== false)
{
if ($file{0} != '.' && file_exists("{$phpbb_root_path}language/$file/iso.txt"))
if ($file[0] != '.' && file_exists("{$phpbb_root_path}language/$file/iso.txt"))
{
if (!in_array($file, $installed))
{
@@ -917,14 +924,14 @@ class acp_language
foreach ($new_ary as $iso => $lang_ary)
{
$template->assign_block_vars('notinst', array(
'ISO' => $lang_ary['iso'],
'LOCAL_NAME' => $lang_ary['local_name'],
'NAME' => $lang_ary['name'],
'ISO' => htmlspecialchars($lang_ary['iso']),
'LOCAL_NAME' => htmlspecialchars($lang_ary['local_name'], ENT_COMPAT, 'UTF-8'),
'NAME' => htmlspecialchars($lang_ary['name'], ENT_COMPAT, 'UTF-8'),
'U_INSTALL' => $this->u_action . '&amp;action=install&amp;iso=' . urlencode($lang_ary['iso']))
);
}
}
unset($new_ary);
}
@@ -942,7 +949,7 @@ class acp_language
* {FILENAME} [{LANG_NAME}]
*
* @package language
* @copyright (c) 2005 phpBB Group
* @copyright (c) 2006 phpBB Group
* @author {CHANGED} - {AUTHOR}
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
@@ -958,6 +965,8 @@ if (empty($lang) || !is_array($lang))
// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// \'Page %s of %s\' you can (and should) write \'Page %1$s of %2$s\', this allows
// translators to re-order the output of data while ensuring it remains correct
@@ -1032,7 +1041,7 @@ $lang = array_merge($lang, array(
{
$tpl .= '
<tr>
<td class="row3" colspan="2">' . $key_prefix . '<b>' . $key . '</b></td>
<td class="row3" colspan="2">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<b>' . htmlspecialchars($key, ENT_COMPAT, 'UTF-8') . '</b></td>
</tr>';
foreach ($value as $_key => $_value)
@@ -1041,23 +1050,23 @@ $lang = array_merge($lang, array(
{
$tpl .= '
<tr>
<td class="row3" colspan="2">' . $key_prefix . '&nbsp; &nbsp;<b>' . $_key . '</b></td>
<td class="row3" colspan="2">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '&nbsp; &nbsp;<b>' . htmlspecialchars($_key, ENT_COMPAT, 'UTF-8') . '</b></td>
</tr>';
foreach ($_value as $__key => $__value)
{
$tpl .= '
<tr>
<td class="row1" style="white-space: nowrap;">' . $key_prefix . '<b>' . $__key . '</b></td>
<td class="row1" style="white-space: nowrap;">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<b>' . htmlspecialchars($__key, ENT_COMPAT, 'UTF-8') . '</b></td>
<td class="row2">';
if ($input_field)
{
$tpl .= '<input type="text" name="entry[' . $key . '][' . $_key . '][' . $__key . ']" value="' . htmlspecialchars($__value) . '" size="50" />';
$tpl .= '<input type="text" name="entry[' . htmlspecialchars($key, ENT_COMPAT, 'UTF-8') . '][' . htmlspecialchars($_key, ENT_COMPAT, 'UTF-8') . '][' . htmlspecialchars($__key, ENT_COMPAT, 'UTF-8') . ']" value="' . htmlspecialchars($__value, ENT_COMPAT, 'UTF-8') . '" size="50" />';
}
else
{
$tpl .= '<b>' . htmlspecialchars($__value) . '</b>';
$tpl .= '<b>' . htmlspecialchars($__value, ENT_COMPAT, 'UTF-8') . '</b>';
}
$tpl .= '</td>
@@ -1068,16 +1077,16 @@ $lang = array_merge($lang, array(
{
$tpl .= '
<tr>
<td class="row1" style="white-space: nowrap;">' . $key_prefix . '<b>' . $_key . '</b></td>
<td class="row1" style="white-space: nowrap;">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<b>' . htmlspecialchars($_key, ENT_COMPAT, 'UTF-8') . '</b></td>
<td class="row2">';
if ($input_field)
{
$tpl .= '<input type="text" name="entry[' . $key . '][' . $_key . ']" value="' . htmlspecialchars($_value) . '" size="50" />';
$tpl .= '<input type="text" name="entry[' . htmlspecialchars($key, ENT_COMPAT, 'UTF-8') . '][' . htmlspecialchars($_key, ENT_COMPAT, 'UTF-8') . ']" value="' . htmlspecialchars($_value, ENT_COMPAT, 'UTF-8') . '" size="50" />';
}
else
{
$tpl .= '<b>' . htmlspecialchars($_value) . '</b>';
$tpl .= '<b>' . htmlspecialchars($_value, ENT_COMPAT, 'UTF-8') . '</b>';
}
$tpl .= '</td>
@@ -1094,16 +1103,16 @@ $lang = array_merge($lang, array(
{
$tpl .= '
<tr>
<td class="row1" style="white-space: nowrap;">' . $key_prefix . '<b>' . $key . '</b></td>
<td class="row1" style="white-space: nowrap;">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<b>' . htmlspecialchars($key, ENT_COMPAT, 'UTF-8') . '</b></td>
<td class="row2">';
if ($input_field)
{
$tpl .= '<input type="text" name="entry[' . $key . ']" value="' . htmlspecialchars($value) . '" size="50" />';
$tpl .= '<input type="text" name="entry[' . htmlspecialchars($key, ENT_COMPAT, 'UTF-8') . ']" value="' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '" size="50" />';
}
else
{
$tpl .= '<b>' . htmlspecialchars($value) . '</b>';
$tpl .= '<b>' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '</b>';
}
$tpl .= '</td>
@@ -1127,23 +1136,23 @@ $lang = array_merge($lang, array(
{
$tpl .= '
<tr>
<td class="row3" colspan="2">' . $key_prefix . '<b>' . $key . '</b></td>
<td class="row3" colspan="2">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<b>' . htmlspecialchars($key, ENT_COMPAT, 'UTF-8') . '</b></td>
</tr>';
foreach ($value as $_key => $_value)
{
$tpl .= '
<tr>
<td class="row1" style="width: 10%; white-space: nowrap;">' . $key_prefix . '<b>' . $_key . '</b></td>
<td class="row1" style="width: 10%; white-space: nowrap;">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<b>' . htmlspecialchars($_key, ENT_COMPAT, 'UTF-8') . '</b></td>
<td class="row2">';
if ($text_field)
{
$tpl .= '<textarea name="entry[' . $key . '][' . $_key . ']" cols="80" rows="5" style="width: 90%;">' . htmlspecialchars($_value) . '</textarea>';
$tpl .= '<textarea name="entry[' . htmlspecialchars($key, ENT_COMPAT, 'UTF-8') . '][' . htmlspecialchars($_key, ENT_COMPAT, 'UTF-8') . ']" cols="80" rows="5" style="width: 90%;">' . htmlspecialchars($_value, ENT_COMPAT, 'UTF-8') . '</textarea>';
}
else
{
$tpl .= '<b>' . htmlspecialchars($_value) . '</b>';
$tpl .= '<b>' . htmlspecialchars($_value, ENT_COMPAT, 'UTF-8') . '</b>';
}
$tpl .= '</td>
@@ -1159,23 +1168,23 @@ $lang = array_merge($lang, array(
{
$tpl .= '
<tr>
<td class="row1" style="width: 10%; white-space: nowrap;">' . $key_prefix . '<b>' . $key . '</b></td>
<td class="row1" style="width: 10%; white-space: nowrap;">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<b>' . htmlspecialchars($key, ENT_COMPAT, 'UTF-8') . '</b></td>
<td class="row2">';
if ($text_field)
{
$tpl .= '<textarea name="entry[' . $key . ']" cols="80" rows="5" style="width: 90%;">' . htmlspecialchars($value) . '</textarea>';
$tpl .= '<textarea name="entry[' . htmlspecialchars($key, ENT_COMPAT, 'UTF-8') . ']" cols="80" rows="5" style="width: 90%;">' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '</textarea>';
}
else
{
$tpl .= '<b>' . htmlspecialchars($value) . '</b>';
$tpl .= '<b>' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '</b>';
}
$tpl .= '</td>
</tr>';
}
}
return $tpl;
}

View File

@@ -68,7 +68,7 @@ class acp_logs
// 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'], 365 => $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' => 'u.username', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation');
$sort_by_sql = array('u' => 'u.username_clean', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation');
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
@@ -127,8 +127,8 @@ class acp_logs
}
$template->assign_block_vars('log', array(
'USERNAME' => $row['username'],
'REPORTEE_USERNAME' => ($row['reportee_username'] && $row['user_id'] != $row['reportee_id']) ? $row['reportee_username'] : '',
'USERNAME' => $row['username_full'],
'REPORTEE_USERNAME' => ($row['reportee_username'] && $row['user_id'] != $row['reportee_id']) ? $row['reportee_username_full'] : '',
'IP' => $row['ip'],
'DATE' => $user->format_date($row['time']),

View File

@@ -20,131 +20,43 @@ class acp_main
global $config, $db, $user, $auth, $template;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
$action = request_var('action', '');
$mark = (isset($_REQUEST['mark'])) ? request_var('mark', array(0)) : array();
if (sizeof($mark))
// Show restore permissions notice
if ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm'))
{
switch ($action)
{
case 'activate':
case 'delete':
$this->tpl_name = 'acp_main';
$this->page_title = 'ACP_MAIN';
if (!$auth->acl_get('a_user'))
{
trigger_error($user->lang['NO_ADMIN']);
}
$sql = 'SELECT user_id, username, user_colour
FROM ' . USERS_TABLE . '
WHERE user_id = ' . $user->data['user_perm_from'];
$result = $db->sql_query($sql);
$user_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$sql = 'SELECT username
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $mark);
$result = $db->sql_query($sql);
$user_affected = array();
while ($row = $db->sql_fetchrow($result))
{
$user_affected[] = $row['username'];
}
$db->sql_freeresult($result);
$perm_from = '<strong' . (($user_row['user_colour']) ? ' style="color: #' . $user_row['user_colour'] . '">' : '>');
$perm_from .= ($user_row['user_id'] != ANONYMOUS) ? '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $user_row['user_id']) . '">' : '';
$perm_from .= $user_row['username'];
$perm_from .= ($user_row['user_id'] != ANONYMOUS) ? '</a>' : '';
$perm_from .= '</strong>';
if ($action == 'activate')
{
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
$template->assign_vars(array(
'S_RESTORE_PERMISSIONS' => true,
'U_RESTORE_PERMISSIONS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm'),
'PERM_FROM' => $perm_from,
'L_PERMISSIONS_TRANSFERED_EXPLAIN' => sprintf($user->lang['PERMISSIONS_TRANSFERED_EXPLAIN'], $perm_from, append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm')),
));
foreach ($mark as $user_id)
{
user_active_flip($user_id, USER_INACTIVE);
}
set_config('num_users', $config['num_users'] + sizeof($mark), true);
// Update latest username
update_last_username();
}
else if ($action == 'delete')
{
if (!$auth->acl_get('a_userdel'))
{
trigger_error($user->lang['NO_ADMIN']);
}
$sql = 'DELETE FROM ' . USER_GROUP_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
$db->sql_query($sql);
$sql = 'DELETE FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
$db->sql_query($sql);
add_log('admin', 'LOG_INDEX_' . strtoupper($action), implode(', ', $user_affected));
}
break;
case 'remind':
if (!$auth->acl_get('a_user'))
{
trigger_error($user->lang['NO_ADMIN']);
}
if (empty($config['email_enable']))
{
trigger_error($user->lang['EMAIL_DISABLED']);
}
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $mark);
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
// Send the messages
include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx);
$messenger = new messenger();
$board_url = generate_board_url() . "/ucp.$phpEx?mode=activate";
$sig = str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']);
$usernames = array();
do
{
$messenger->template('user_remind_inactive', $row['user_lang']);
$messenger->replyto($config['board_email']);
$messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']);
$messenger->assign_vars(array(
'EMAIL_SIG' => $sig,
'USERNAME' => html_entity_decode($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'])
);
$messenger->send($row['user_notify_type']);
$usernames[] = $row['username'];
}
while ($row = $db->sql_fetchrow($result));
$messenger->save_queue();
add_log('admin', 'LOG_INDEX_REMIND', implode(', ', $usernames));
unset($usernames);
}
$db->sql_freeresult($result);
break;
}
return;
}
$action = request_var('action', '');
switch ($action)
{
case 'online':
if (!$auth->acl_get('a_board'))
{
trigger_error($user->lang['NO_ADMIN']);
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
set_config('record_online_users', 1, true);
@@ -155,47 +67,47 @@ class acp_main
case 'stats':
if (!$auth->acl_get('a_board'))
{
trigger_error($user->lang['NO_ADMIN']);
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$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', (int) $row['stat'], true);
$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', (int) $row['stat'], true);
$sql = 'SELECT COUNT(user_id) AS stat
FROM ' . USERS_TABLE . '
WHERE user_type IN (' . USER_NORMAL . ',' . USER_FOUNDER . ')';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
set_config('num_users', (int) $row['stat'], true);
$sql = 'SELECT COUNT(attach_id) as stat
FROM ' . ATTACHMENTS_TABLE;
FROM ' . ATTACHMENTS_TABLE . '
WHERE is_orphan = 0';
$result = $db->sql_query($sql);
set_config('num_files', (int) $db->sql_fetchfield('stat'), true);
$db->sql_freeresult($result);
$sql = 'SELECT SUM(filesize) as stat
FROM ' . ATTACHMENTS_TABLE;
FROM ' . ATTACHMENTS_TABLE . '
WHERE is_orphan = 0';
$result = $db->sql_query($sql);
set_config('upload_dir_size', (int) $db->sql_fetchfield('stat'), true);
$db->sql_freeresult($result);
@@ -205,7 +117,7 @@ class acp_main
case 'user':
if (!$auth->acl_get('a_board'))
{
trigger_error($user->lang['NO_ADMIN']);
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
@@ -227,7 +139,7 @@ class acp_main
case 'date':
if (!$auth->acl_get('a_board'))
{
trigger_error($user->lang['NO_ADMIN']);
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
set_config('board_startdate', time() - 1);
@@ -235,7 +147,7 @@ class acp_main
break;
case 'db_track':
$db->sql_query(((SQL_LAYER != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . TOPICS_POSTED_TABLE);
$db->sql_query((($db->sql_layer != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . TOPICS_POSTED_TABLE);
// This can get really nasty... therefore we only do the last six months
$get_from_time = time() - (6 * 4 * 7 * 24 * 60 * 60);
@@ -290,24 +202,7 @@ class acp_main
}
unset($posted);
if (sizeof($sql_ary))
{
switch (SQL_LAYER)
{
case 'mysql':
case 'mysql4':
case 'mysqli':
$db->sql_query('INSERT INTO ' . TOPICS_POSTED_TABLE . ' ' . $db->sql_build_array('MULTI_INSERT', $sql_ary));
break;
default:
foreach ($sql_ary as $ary)
{
$db->sql_query('INSERT INTO ' . TOPICS_POSTED_TABLE . ' ' . $db->sql_build_array('INSERT', $ary));
}
break;
}
}
$db->sql_multi_insert(TOPICS_POSTED_TABLE, $sql_ary);
}
add_log('admin', 'LOG_RESYNC_POST_MARKING');
@@ -337,7 +232,7 @@ class acp_main
{
while (($file = readdir($avatar_dir)) !== false)
{
if ($file{0} != '.' && $file != 'CVS' && strpos($file, 'index.') === false)
if ($file[0] != '.' && $file != 'CVS' && strpos($file, 'index.') === false)
{
$avatar_dir_size += filesize($phpbb_root_path . $config['avatar_path'] . '/' . $file);
}
@@ -375,6 +270,21 @@ class acp_main
$files_per_day = $total_files;
}
if ($config['allow_attachments'] || $config['allow_pm_attach'])
{
$sql = 'SELECT COUNT(attach_id) AS total_orphan
FROM ' . ATTACHMENTS_TABLE . '
WHERE is_orphan = 1
AND filetime < ' . (time() - 3*60*60);
$result = $db->sql_query($sql);
$total_orphan = (int) $db->sql_fetchfield('total_orphan');
$db->sql_freeresult($result);
}
else
{
$total_orphan = false;
}
$dbsize = get_database_size();
$s_action_options = build_select(array('online' => 'RESET_ONLINE', 'date' => 'RESET_DATE', 'stats' => 'RESYNC_STATS', 'user' => 'RESYNC_POSTCOUNTS', 'db_track' => 'RESYNC_POST_MARKING'));
@@ -391,11 +301,14 @@ class acp_main
'AVATAR_DIR_SIZE' => $avatar_dir_size,
'DBSIZE' => $dbsize,
'UPLOAD_DIR_SIZE' => $upload_dir_size,
'TOTAL_ORPHAN' => $total_orphan,
'S_TOTAL_ORPHAN' => ($total_orphan === false) ? false : true,
'GZIP_COMPRESSION' => ($config['gzip_compress']) ? $user->lang['ON'] : $user->lang['OFF'],
'DATABASE_INFO' => $db->sql_server_info(),
'U_ACTION' => append_sid("{$phpbb_admin_path}index.$phpEx"),
'U_ADMIN_LOG' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=logs&amp;mode=admin'),
'U_INACTIVE_USERS' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=inactive&amp;mode=list'),
'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? $s_action_options : '',
)
@@ -411,7 +324,7 @@ class acp_main
foreach ($log_data as $row)
{
$template->assign_block_vars('log', array(
'USERNAME' => $row['username'],
'USERNAME' => $row['username_full'],
'IP' => $row['ip'],
'DATE' => $user->format_date($row['time']),
'ACTION' => $row['action'])
@@ -421,17 +334,18 @@ class acp_main
if ($auth->acl_get('a_user'))
{
$sql = 'SELECT user_id, username, user_regdate, user_lastvisit
FROM ' . USERS_TABLE . '
WHERE user_type = ' . USER_INACTIVE . '
ORDER BY user_regdate ASC';
$result = $db->sql_query($sql);
$inactive = array();
$inactive_count = 0;
while ($row = $db->sql_fetchrow($result))
view_inactive_users($inactive, $inactive_count, 10);
foreach ($inactive as $row)
{
$template->assign_block_vars('inactive', array(
'DATE' => $user->format_date($row['user_regdate']),
'INACTIVE_DATE' => $user->format_date($row['user_inactive_time']),
'JOINED' => $user->format_date($row['user_regdate']),
'LAST_VISIT' => (!$row['user_lastvisit']) ? ' - ' : $user->format_date($row['user_lastvisit']),
'REASON' => $row['inactive_reason'],
'USER_ID' => $row['user_id'],
'USERNAME' => $row['username'],
'U_USER_ADMIN' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&amp;mode=overview&amp;u={$row['user_id']}"))
@@ -450,12 +364,6 @@ class acp_main
);
}
// Display debug_extra notice
if (defined('DEBUG_EXTRA'))
{
$template->assign_var('S_DEBUG_EXTRA', true);
}
// Warn if install is still present
if (file_exists($phpbb_root_path . 'install'))
{

View File

@@ -24,6 +24,7 @@
class acp_modules
{
var $module_class = '';
var $parent_id;
var $u_action;
function main($id, $mode)
@@ -51,7 +52,7 @@ class acp_modules
$this->page_title = strtoupper($this->module_class);
$parent_id = request_var('parent_id', 0);
$this->parent_id = request_var('parent_id', 0);
$module_id = request_var('m', 0);
$action = request_var('action', '');
$errors = array();
@@ -61,9 +62,9 @@ class acp_modules
case 'delete':
if (!$module_id)
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id));
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
if (confirm_box(true))
{
$errors = $this->delete_module($module_id);
@@ -71,7 +72,7 @@ class acp_modules
if (!sizeof($errors))
{
$this->remove_cache_file();
trigger_error($user->lang['MODULE_DELETED'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id));
trigger_error($user->lang['MODULE_DELETED'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
}
}
else
@@ -79,7 +80,7 @@ class acp_modules
confirm_box(false, 'DELETE_MODULE', build_hidden_fields(array(
'i' => $id,
'mode' => $mode,
'parent_id' => $parent_id,
'parent_id' => $this->parent_id,
'module_id' => $module_id,
'action' => $action,
)));
@@ -91,9 +92,9 @@ class acp_modules
case 'disable':
if (!$module_id)
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id));
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
$sql = 'UPDATE ' . MODULES_TABLE . '
SET module_enabled = ' . (($action == 'enable') ? 1 : 0) . "
WHERE module_id = $module_id";
@@ -108,7 +109,7 @@ class acp_modules
case 'move_down':
if (!$module_id)
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id));
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -121,7 +122,7 @@ class acp_modules
if (!$row)
{
trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id));
trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
$move_module_name = $this->move_module_by($row, $action, 1);
@@ -156,7 +157,7 @@ class acp_modules
'module_basename' => $module_basename,
'module_enabled' => 0,
'module_display' => (isset($fileinfo['modes'][$module_mode]['display'])) ? $fileinfo['modes'][$module_mode]['display'] : 1,
'parent_id' => $parent_id,
'parent_id' => $this->parent_id,
'module_class' => $this->module_class,
'module_langname' => $fileinfo['modes'][$module_mode]['title'],
'module_mode' => $module_mode,
@@ -169,7 +170,7 @@ class acp_modules
{
$this->remove_cache_file();
trigger_error($user->lang['MODULE_ADDED'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id));
trigger_error($user->lang['MODULE_ADDED'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
}
}
}
@@ -178,7 +179,7 @@ class acp_modules
confirm_box(false, 'ADD_MODULE', build_hidden_fields(array(
'i' => $id,
'mode' => $mode,
'parent_id' => $parent_id,
'parent_id' => $this->parent_id,
'action' => 'quickadd',
'quick_install' => $quick_install,
)));
@@ -190,7 +191,7 @@ class acp_modules
if (!$module_id)
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id));
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
$module_row = $this->get_module_row($module_id);
@@ -228,7 +229,7 @@ class acp_modules
{
if (!$module_data['module_langname'])
{
trigger_error($user->lang['NO_MODULE_LANGNAME'] . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id));
trigger_error($user->lang['NO_MODULE_LANGNAME'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
$module_type = request_var('module_type', 'category');
@@ -257,14 +258,14 @@ class acp_modules
{
$this->remove_cache_file();
trigger_error((($action == 'add') ? $user->lang['MODULE_ADDED'] : $user->lang['MODULE_EDITED']) . adm_back_link($this->u_action . '&amp;parent_id=' . $parent_id));
trigger_error((($action == 'add') ? $user->lang['MODULE_ADDED'] : $user->lang['MODULE_EDITED']) . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
}
}
// Category/not category?
$is_cat = (!$module_data['module_basename']) ? true : false;
// Get module informations
// Get module information
$module_infos = $this->get_module_infos();
// Build name options
@@ -306,8 +307,8 @@ class acp_modules
'S_CAT_OPTIONS' => $s_cat_option . $this->make_module_select($module_data['parent_id'], ($action == 'edit') ? $module_row['module_id'] : false, false, false, false, true),
'S_MODULE_NAMES' => $s_name_options,
'S_MODULE_MODES' => $s_mode_options,
'U_BACK' => $this->u_action . '&amp;parent_id=' . $parent_id,
'U_EDIT_ACTION' => $this->u_action . '&amp;parent_id=' . $parent_id,
'U_BACK' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
'U_EDIT_ACTION' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
'L_TITLE' => $user->lang[strtoupper($action) . '_MODULE'],
@@ -341,7 +342,7 @@ class acp_modules
);
}
if (!$parent_id)
if (!$this->parent_id)
{
$navigation = strtoupper($this->module_class);
}
@@ -349,12 +350,13 @@ class acp_modules
{
$navigation = '<a href="' . $this->u_action . '">' . strtoupper($this->module_class) . '</a>';
$modules_nav = $this->get_module_branch($parent_id, 'parents', 'descending');
$modules_nav = $this->get_module_branch($this->parent_id, 'parents', 'descending');
foreach ($modules_nav as $row)
{
$langname = $this->lang_name($row['module_langname']);
if ($row['module_id'] == $parent_id)
if ($row['module_id'] == $this->parent_id)
{
$navigation .= ' -&gt; ' . $langname;
}
@@ -366,11 +368,11 @@ class acp_modules
}
// Jumpbox
$module_box = $this->make_module_select($parent_id, false, false, false, false);
$module_box = $this->make_module_select($this->parent_id, false, false, false, false);
$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
WHERE parent_id = $parent_id
WHERE parent_id = {$this->parent_id}
AND module_class = '" . $db->sql_escape($this->module_class) . "'
ORDER BY left_id";
$result = $db->sql_query($sql);
@@ -390,14 +392,17 @@ class acp_modules
$module_image = (!$row['module_basename'] || $row['left_id'] + 1 != $row['right_id']) ? '<img src="images/icon_subfolder.gif" width="46" height="25" alt="' . $user->lang['CATEGORY'] . '" />' : '<img src="images/icon_folder.gif" width="46" height="25" alt="' . $user->lang['MODULE'] . '" />';
}
$url = $this->u_action . '&amp;parent_id=' . $parent_id . '&amp;m=' . $row['module_id'];
$url = $this->u_action . '&amp;parent_id=' . $this->parent_id . '&amp;m=' . $row['module_id'];
$template->assign_block_vars('modules', array(
'MODULE_IMAGE' => $module_image,
'MODULE_TITLE' => $langname,
'MODULE_ENABLED' => ($row['module_enabled']) ? true : false,
'MODULE_DISPLAYED' => ($row['module_display']) ? true : false,
'S_ACP_CAT_SYSTEM' => ($this->module_class == 'acp' && $row['module_langname'] == 'ACP_CAT_SYSTEM') ? true : false,
'S_ACP_MODULE_MANAGEMENT' => ($this->module_class == 'acp' && ($row['module_basename'] == 'modules' || $row['module_langname'] == 'ACP_MODULE_MANAGEMENT')) ? true : false,
'U_MODULE' => $this->u_action . '&amp;parent_id=' . $row['module_id'],
'U_MOVE_UP' => $url . '&amp;action=move_up',
'U_MOVE_DOWN' => $url . '&amp;action=move_down',
@@ -409,11 +414,11 @@ class acp_modules
}
while ($row = $db->sql_fetchrow($result));
}
else if ($parent_id)
else if ($this->parent_id)
{
$row = $this->get_module_row($parent_id);
$row = $this->get_module_row($this->parent_id);
$url = $this->u_action . '&amp;parent_id=' . $parent_id . '&amp;m=' . $row['module_id'];
$url = $this->u_action . '&amp;parent_id=' . $this->parent_id . '&amp;m=' . $row['module_id'];
$template->assign_vars(array(
'S_NO_MODULES' => true,
@@ -449,11 +454,11 @@ class acp_modules
}
$template->assign_vars(array(
'U_SEL_ACTION' => $this->u_action,
'U_ACTION' => $this->u_action . '&amp;parent_id=' . $parent_id,
'NAVIGATION' => $navigation,
'MODULE_BOX' => $module_box,
'PARENT_ID' => $parent_id,
'U_SEL_ACTION' => $this->u_action,
'U_ACTION' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
'NAVIGATION' => $navigation,
'MODULE_BOX' => $module_box,
'PARENT_ID' => $this->parent_id,
'S_INSTALL_OPTIONS' => $s_install_options,
)
);
@@ -476,14 +481,14 @@ class acp_modules
if (!$row)
{
trigger_error($user->lang['NO_MODULE']);
trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
return $row;
}
/**
* Get available module informations from module files
* Get available module information from module files
*/
function get_module_infos($module = '', $module_class = false)
{
@@ -575,14 +580,10 @@ class acp_modules
$right = $row['right_id'];
/**
* @todo think about using module class here
*/
if (!$ignore_acl && $row['module_auth'])
{
$is_auth = false;
eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z_]+)#', '#cfg_([a-z_]+)#'), array('(int) $auth->acl_get("\\1"\\2)', 'true', '(int) $auth->acl_getf_global("\\1")', '(int) $config["\\1"]'), $row['module_auth']) . ');');
if (!$is_auth)
// We use zero as the forum id to check - global setting.
if (!p_master::module_auth($row['module_auth'], 0))
{
continue;
}
@@ -721,7 +722,7 @@ class acp_modules
return 'PARENT_NO_EXIST';
}
trigger_error($user->lang['PARENT_NO_EXIST']);
trigger_error($user->lang['PARENT_NO_EXIST'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
$sql = 'UPDATE ' . MODULES_TABLE . "
@@ -1007,6 +1008,14 @@ class acp_modules
return $this->lang_name($target['module_langname']);
}
/**
* Check if the module or her childs hold the management module(s)
*/
function is_management_module($module_id)
{
}
}
?>

View File

@@ -26,7 +26,7 @@ class acp_permission_roles
$auth_admin = new auth_admin();
$user->add_lang('acp/permissions');
$user->add_lang('acp/permissions_phpbb');
add_permission_language();
$this->tpl_name = 'acp_permission_roles';
@@ -58,7 +58,8 @@ class acp_permission_roles
break;
default:
trigger_error('INVALID_MODE');
trigger_error('NO_MODE', E_USER_ERROR);
break;
}
$template->assign_vars(array(
@@ -75,7 +76,7 @@ class acp_permission_roles
if (!$role_id)
{
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -87,7 +88,7 @@ class acp_permission_roles
if (!$role_row)
{
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -112,7 +113,7 @@ class acp_permission_roles
case 'edit':
if (!$role_id)
{
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Get role we edit
@@ -125,7 +126,7 @@ class acp_permission_roles
if (!$role_row)
{
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// no break;
@@ -138,22 +139,22 @@ class acp_permission_roles
if (!$role_name)
{
trigger_error($user->lang['NO_ROLE_NAME_SPECIFIED'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_ROLE_NAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// if we add/edit a role we check the name to be unique among the settings...
$sql = 'SELECT role_id
FROM ' . ACL_ROLES_TABLE . "
WHERE role_type = '" . $db->sql_escape($permission_type) . "'
AND LOWER(role_name) = '" . $db->sql_escape(strtolower($role_name)) . "'";
AND role_name = '" . $db->sql_escape($role_name) . "'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
// Make sure we only print out the error if we add the role or change it's name
if ($row && ($mode == 'add' || ($mode == 'edit' && strtolower($role_row['role_name']) != strtolower($role_name))))
if ($row && ($mode == 'add' || ($mode == 'edit' && $role_row['role_name'] != $role_name)))
{
trigger_error(sprintf($user->lang['ROLE_NAME_ALREADY_EXIST'], $role_name) . adm_back_link($this->u_action));
trigger_error(sprintf($user->lang['ROLE_NAME_ALREADY_EXIST'], $role_name) . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql_ary = array(
@@ -252,7 +253,7 @@ class acp_permission_roles
{
if (!$role_id)
{
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -279,7 +280,7 @@ class acp_permission_roles
if (!$role_row)
{
trigger_error($user->lang['NO_PRESET_SELECTED'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$template->assign_vars(array(

View File

@@ -27,7 +27,7 @@ class acp_permissions
$auth_admin = new auth_admin();
$user->add_lang('acp/permissions');
$user->add_lang('acp/permissions_phpbb');
add_permission_language();
$this->tpl_name = 'acp_permissions';
@@ -47,7 +47,7 @@ class acp_permissions
return;
}
trigger_error('NO_MODE');
trigger_error('NO_MODE', E_USER_ERROR);
}
// Set some vars
@@ -59,8 +59,8 @@ class acp_permissions
$subforum_id = request_var('subforum_id', 0);
$forum_id = request_var('forum_id', array(0));
$username = request_var('username', array(''));
$usernames = request_var('usernames', '');
$username = request_var('username', array(''), true);
$usernames = request_var('usernames', '', true);
$user_id = request_var('user_id', array(0));
$group_id = request_var('group_id', array(0));
@@ -70,7 +70,7 @@ class acp_permissions
if ($select_all_groups)
{
// Add default groups to selection
$sql_and = (!$config['coppa_enable']) ? " AND group_name NOT IN ('INACTIVE_COPPA', 'REGISTERED_COPPA')" : '';
$sql_and = (!$config['coppa_enable']) ? " AND group_name <> 'REGISTERED_COPPA'" : '';
$sql = 'SELECT group_id
FROM ' . GROUPS_TABLE . '
@@ -98,7 +98,7 @@ class acp_permissions
if (!sizeof($user_id))
{
trigger_error($user->lang['SELECTED_USER_NOT_EXIST'] . adm_back_link($this->u_action));
trigger_error($user->lang['SELECTED_USER_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
unset($username);
@@ -190,7 +190,8 @@ class acp_permissions
break;
default:
trigger_error('INVALID_MODE');
trigger_error('NO_MODE', E_USER_ERROR);
break;
}
$template->assign_vars(array(
@@ -203,7 +204,7 @@ class acp_permissions
if (!in_array($permission_type, $this->permission_dropdown))
{
trigger_error($user->lang['WRONG_PERMISSION_TYPE'] . adm_back_link($this->u_action));
trigger_error($user->lang['WRONG_PERMISSION_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -237,14 +238,14 @@ class acp_permissions
}
else
{
trigger_error($user->lang['NO_USER_GROUP_SELECTED'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_USER_GROUP_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
break;
case 'apply_permissions':
if (!isset($_POST['setting']))
{
trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->set_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id);
@@ -253,7 +254,7 @@ class acp_permissions
case 'apply_all_permissions':
if (!isset($_POST['setting']))
{
trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->set_all_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id);
@@ -330,7 +331,8 @@ class acp_permissions
$template->assign_vars(array(
'S_SELECT_USER' => true,
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=select_victim&amp;field=username'))
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=select_victim&amp;field=username'),
'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=select_victim&field=username', false))
);
break;
@@ -392,17 +394,23 @@ class acp_permissions
'S_DEFINED_USER_OPTIONS' => $items['user_ids_options'],
'S_DEFINED_GROUP_OPTIONS' => $items['group_ids_options'],
'S_ADD_GROUP_OPTIONS' => group_select_options(false, $items['group_ids']),
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=add_user&amp;field=username'))
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=add_user&amp;field=username'),
'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=add_user&field=username', false))
);
break;
}
// The S_ALLOW_SELECT parameter below is a measure to lower memory usage.
// If there are more than 5 forums selected the admin is not able to select all users/groups too.
// We need to see if the number of forums can be increased or need to be decreased.
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'ANONYMOUS_USER_ID' => ANONYMOUS,
'S_SELECT_VICTIM' => true,
'S_ALLOW_ALL_SELECT' => (sizeof($forum_id) > 5) ? false : true,
'S_CAN_SELECT_USER' => ($auth->acl_get('a_authusers')) ? true : false,
'S_CAN_SELECT_GROUP' => ($auth->acl_get('a_authgroups')) ? true : false,
'S_HIDDEN_FIELDS' => $s_hidden_fields)
@@ -436,7 +444,7 @@ class acp_permissions
// Do not allow forum_ids being set and no other setting defined (will bog down the server too much)
if (sizeof($forum_id) && !sizeof($user_id) && !sizeof($group_id))
{
trigger_error($user->lang['ONLY_FORUM_DEFINED'] . adm_back_link($this->u_action));
trigger_error($user->lang['ONLY_FORUM_DEFINED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$template->assign_vars(array(
@@ -566,7 +574,7 @@ class acp_permissions
if (!sizeof($ids))
{
trigger_error($user->lang['SELECTED_' . strtoupper($mode) . '_NOT_EXIST'] . adm_back_link($this->u_action));
trigger_error($user->lang['SELECTED_' . strtoupper($mode) . '_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
@@ -585,7 +593,7 @@ class acp_permissions
// Check the permission setting again
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
{
trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$ug_id = $forum_id = 0;
@@ -643,7 +651,7 @@ class acp_permissions
// Remove users who are now moderators or admins from everyones foes list
if ($permission_type == 'm_' || $permission_type == 'a_')
{
$this->update_foes();
update_foes();
}
$this->log_action($mode, 'add', $permission_type, $ug_type, $ug_id, $forum_id);
@@ -664,7 +672,7 @@ class acp_permissions
// Check the permission setting again
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
{
trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$auth_settings = (isset($_POST['setting'])) ? $_POST['setting'] : array();
@@ -710,7 +718,7 @@ class acp_permissions
// Remove users who are now moderators or admins from everyones foes list
if ($permission_type == 'm_' || $permission_type == 'a_')
{
$this->update_foes();
update_foes();
}
$this->log_action($mode, 'add', $permission_type, $ug_type, $ug_ids, $forum_ids);
@@ -769,7 +777,7 @@ class acp_permissions
// Check the permission setting again
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
{
trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$auth_admin->acl_delete($ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : false), $permission_type);
@@ -839,32 +847,6 @@ class acp_permissions
}
}
/**
* Update foes - remove moderators and administrators from foe lists...
*/
function update_foes()
{
global $db, $auth;
$perms = array();
foreach ($auth->acl_get_list(false, array('a_', 'm_'), false) as $forum_id => $forum_ary)
{
foreach ($forum_ary as $auth_option => $user_ary)
{
$perms = array_merge($perms, $user_ary);
}
}
if (sizeof($perms))
{
$sql = 'DELETE FROM ' . ZEBRA_TABLE . '
WHERE ' . $db->sql_in_set('zebra_id', array_unique($perms)) . '
AND foe = 1';
$db->sql_query($sql);
}
unset($perms);
}
/**
* Display a complete trace tree for the selected permission to determine where settings are set/unset
*/
@@ -888,7 +870,7 @@ class acp_permissions
if (!$userdata)
{
trigger_error('NO_USERS');
trigger_error('NO_USERS', E_USER_ERROR);
}
$forum_name = false;

View File

@@ -22,7 +22,7 @@ class acp_php_info
if ($mode != 'info')
{
trigger_error('NO_MODE');
trigger_error('NO_MODE', E_USER_ERROR);
}
$this->tpl_name = 'acp_php_info';

View File

@@ -91,7 +91,7 @@ class acp_profile
if (!$field_id)
{
trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -107,7 +107,7 @@ class acp_profile
$db->sql_query('DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . " WHERE field_id = $field_id");
$db->sql_query('DELETE FROM ' . PROFILE_LANG_TABLE . " WHERE field_id = $field_id");
switch (SQL_LAYER)
switch ($db->sql_layer)
{
case 'sqlite':
$sql = "SELECT sql
@@ -119,6 +119,8 @@ class acp_profile
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$db->sql_transaction('begin');
// Create a temp table and populate it, destroy the existing one
$db->sql_query(preg_replace('#CREATE\s+TABLE\s+"?' . PROFILE_FIELDS_DATA_TABLE . '"?#i', 'CREATE TEMPORARY TABLE ' . PROFILE_FIELDS_DATA_TABLE . '_temp', $row['sql']));
$db->sql_query('INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . '_temp SELECT * FROM ' . PROFILE_FIELDS_DATA_TABLE);
@@ -127,12 +129,13 @@ class acp_profile
preg_match('#\((.*)\)#s', $row['sql'], $matches);
$new_table_cols = trim($matches[1]);
$old_table_cols = explode(',', $new_table_cols);
$old_table_cols = preg_split('/,(?=[\\sa-z])/im', $new_table_cols);
$column_list = array();
foreach($old_table_cols as $declaration)
foreach ($old_table_cols as $declaration)
{
$entities = preg_split('#\s+#', trim($declaration));
if ($entities[0] !== '_' . $field_ident)
if ($entities[0] !== 'pf_' . $field_ident)
{
$column_list[] = $entities[0];
}
@@ -140,16 +143,18 @@ class acp_profile
$columns = implode(',', $column_list);
$new_table_cols = preg_replace('/' . '_' . $field_ident . '[^,]+,/', '', $new_table_cols);
$new_table_cols = preg_replace('/' . 'pf_' . $field_ident . '[^,]+,/', '', $new_table_cols);
// create a new table and fill it up. destroy the temp one
$db->sql_query('CREATE TABLE ' . PROFILE_FIELDS_DATA_TABLE . ' (' . $new_table_cols . ');');
$db->sql_query('INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . PROFILE_FIELDS_DATA_TABLE . '_temp;');
$db->sql_query('DROP TABLE ' . PROFILE_FIELDS_DATA_TABLE . '_temp');
$db->sql_transaction('commit');
break;
default:
$db->sql_query('ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " DROP _$field_ident");
$db->sql_query('ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " DROP pf_$field_ident");
}
$order = 0;
@@ -192,7 +197,7 @@ class acp_profile
if (!$field_id)
{
trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT lang_id
@@ -204,7 +209,7 @@ class acp_profile
if (!in_array($default_lang_id, $lang_defs['entry'][$field_id]))
{
trigger_error($user->lang['DEFAULT_LANGUAGE_NOT_FILLED'] . adm_back_link($this->u_action));
trigger_error($user->lang['DEFAULT_LANGUAGE_NOT_FILLED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
@@ -229,7 +234,7 @@ class acp_profile
if (!$field_id)
{
trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
@@ -275,7 +280,7 @@ class acp_profile
{
if (!$field_id)
{
trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT l.*, f.*
@@ -289,7 +294,7 @@ class acp_profile
if (!$field_row)
{
trigger_error($user->lang['FIELD_NOT_FOUND'] . adm_back_link($this->u_action));
trigger_error($user->lang['FIELD_NOT_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$field_type = $field_row['field_type'];
@@ -319,7 +324,7 @@ class acp_profile
if (!$field_type)
{
trigger_error($user->lang['NO_FIELD_TYPE'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_FIELD_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$field_row = array_merge($default_values[$field_type], array(
@@ -359,7 +364,7 @@ class acp_profile
$cp->vars['lang_name'] = request_var('lang_name', $field_row['lang_name'], true);
$cp->vars['lang_explain'] = request_var('lang_explain', $field_row['lang_explain'], true);
$cp->vars['lang_default_value'] = request_var('lang_default_value', $field_row['lang_default_value'], true);
// Field option...
if (isset($_REQUEST['field_option']))
{
@@ -525,7 +530,8 @@ class acp_profile
}
}
if ($submit && $step == 1)
// Check for general issues in every step
if ($submit) // && $step == 1
{
// Check values for step 1
if ($cp->vars['field_ident'] == '')
@@ -538,16 +544,39 @@ class acp_profile
$error[] = $user->lang['INVALID_CHARS_FIELD_IDENT'];
}
if (strlen($cp->vars['field_ident']) > 17)
{
$error[] = $user->lang['INVALID_FIELD_IDENT_LEN'];
}
if ($cp->vars['lang_name'] == '')
{
$error[] = $user->lang['EMPTY_USER_FIELD_NAME'];
}
if ($field_type == FIELD_BOOL || $field_type == FIELD_DROPDOWN)
if ($field_type == FIELD_DROPDOWN && !sizeof($cp->vars['lang_options']))
{
if (!sizeof($cp->vars['lang_options']))
$error[] = $user->lang['NO_FIELD_ENTRIES'];
}
if ($field_type == FIELD_BOOL && (empty($cp->vars['lang_options'][0]) || empty($cp->vars['lang_options'][1])))
{
$error[] = $user->lang['NO_FIELD_ENTRIES'];
}
// Check for already existing field ident
if ($action != 'edit')
{
$sql = 'SELECT field_ident
FROM ' . PROFILE_FIELDS_TABLE . "
WHERE field_ident = '" . $db->sql_escape($cp->vars['field_ident']) . "'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($row)
{
$error[] = $user->lang['NO_FIELD_ENTRIES'];
$error[] = $user->lang['FIELD_IDENT_ALREADY_EXIST'];
}
}
}
@@ -730,12 +759,20 @@ class acp_profile
ORDER BY field_order';
$result = $db->sql_query($sql);
$s_one_need_edit = false;
while ($row = $db->sql_fetchrow($result))
{
$active_lang = (!$row['field_active']) ? 'ACTIVATE' : 'DEACTIVATE';
$active_value = (!$row['field_active']) ? 'activate' : 'deactivate';
$id = $row['field_id'];
$s_need_edit = (sizeof($lang_defs['diff'][$row['field_id']])) ? true : false;
if ($s_need_edit)
{
$s_one_need_edit = true;
}
$template->assign_block_vars('fields', array(
'FIELD_IDENT' => $row['field_ident'],
'FIELD_TYPE' => $user->lang['FIELD_' . strtoupper($cp->profile_types[$row['field_type']])],
@@ -743,15 +780,22 @@ class acp_profile
'L_ACTIVATE_DEACTIVATE' => $user->lang[$active_lang],
'U_ACTIVATE_DEACTIVATE' => $this->u_action . "&amp;action=$active_value&amp;field_id=$id",
'U_EDIT' => $this->u_action . "&amp;action=edit&amp;field_id=$id",
'U_TRANSLATE' => $this->u_action . "&amp;action=edit&amp;field_id=$id&amp;step=3",
'U_DELETE' => $this->u_action . "&amp;action=delete&amp;field_id=$id",
'U_MOVE_UP' => $this->u_action . "&amp;action=move_up&amp;order={$row['field_order']}",
'U_MOVE_DOWN' => $this->u_action . "&amp;action=move_down&amp;order={$row['field_order']}",
'S_NEED_EDIT' => (sizeof($lang_defs['diff'][$row['field_id']])) ? true : false)
'S_NEED_EDIT' => $s_need_edit)
);
}
$db->sql_freeresult($result);
// At least one option field needs editing?
if ($s_one_need_edit)
{
$template->assign_var('S_NEED_EDIT', true);
}
$s_select_type = '';
foreach ($cp->profile_types as $key => $value)
{
@@ -831,12 +875,11 @@ class acp_profile
$lang_options[$lang_id]['lang_iso'] = $lang_iso;
foreach ($options as $field => $field_type)
{
$value = ($action == 'create') ? request_var('l_' . $field, '', true) : $cp->vars['l_' . $field];
$value = ($action == 'create') ? request_var('l_' . $field, array(0 => ''), true) : $cp->vars['l_' . $field];
if ($field == 'lang_options')
{
$var = ($action == 'create' || !is_array($cp->vars['lang_options'][$lang_id])) ? $cp->vars['lang_options'] : $cp->vars['lang_options'][$lang_id];
$var = ($action == 'create' || !is_array($cp->vars['l_lang_options'][$lang_id])) ? $cp->vars['lang_options'] : $cp->vars['lang_options'][$lang_id];
switch ($field_type)
{
@@ -893,7 +936,7 @@ class acp_profile
$field_id = request_var('field_id', 0);
// Collect all informations, if something is going wrong, abort the operation
// Collect all information, if something is going wrong, abort the operation
$profile_sql = $profile_lang = $empty_lang = $profile_lang_fields = array();
$default_lang_id = $lang_defs['iso'][$config['default_lang']];
@@ -948,7 +991,7 @@ class acp_profile
if ($action == 'create')
{
$field_ident = '_' . $field_ident;
$field_ident = 'pf_' . $field_ident;
$profile_sql[] = $this->add_field_ident($field_ident, $field_type);
}
@@ -1003,10 +1046,11 @@ class acp_profile
}
}
$cp->vars['l_lang_name'] = request_var('l_lang_name', '', true);
$cp->vars['l_lang_explain'] = request_var('l_lang_explain', '', true);
$cp->vars['l_lang_default_value'] = request_var('l_lang_default_value', '', true);
$cp->vars['l_lang_options'] = request_var('l_lang_options', '', true);
// These are always arrays because the key is the language id...
$cp->vars['l_lang_name'] = request_var('l_lang_name', array(0 => ''), true);
$cp->vars['l_lang_explain'] = request_var('l_lang_explain', array(0 => ''), true);
$cp->vars['l_lang_default_value'] = request_var('l_lang_default_value', array(0 => ''), true);
$cp->vars['l_lang_options'] = request_var('l_lang_options', array(0 => ''), true);
if ($cp->vars['lang_options'])
{
@@ -1155,7 +1199,7 @@ class acp_profile
}
else
{
add_log('admin', 'LOG_PROFILE_FIELD_CREATE', substr($field_ident, 1) . ':' . $cp->vars['lang_name']);
add_log('admin', 'LOG_PROFILE_FIELD_CREATE', substr($field_ident, 3) . ':' . $cp->vars['lang_name']);
trigger_error($user->lang['ADDED_PROFILE_FIELD'] . adm_back_link($this->u_action));
}
}
@@ -1215,7 +1259,7 @@ class acp_profile
{
global $db;
switch (SQL_LAYER)
switch ($db->sql_layer)
{
case 'mysql':
case 'mysql4':

View File

@@ -155,7 +155,7 @@ class acp_prune
if (!$row)
{
$db->sql_freeresult($result);
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$forum_list = $s_hidden_fields = '';
@@ -196,17 +196,18 @@ class acp_prune
{
if (confirm_box(true))
{
$users = request_var('users', '');
$users = request_var('users', '', true);
$action = request_var('action', 'deactivate');
$deleteposts = request_var('deleteposts', 0);
if ($users)
{
$where_sql = ' AND ' . $db->sql_in_set('username', explode("\n", $users));
$users = explode("\n", $users);
$where_sql = ' AND ' . $db->sql_in_set('username_clean', array_map('utf8_clean_string', $users));
}
else
{
$username = request_var('username', '');
$username = request_var('username', '', true);
$email = request_var('email', '');
$joined_select = request_var('joined_select', 'lt');
@@ -224,7 +225,7 @@ class acp_prune
$sort_by_types = array('username', 'user_email', 'user_posts', 'user_regdate', 'user_lastvisit');
$where_sql = '';
$where_sql .= ($username) ? " AND username LIKE '" . $db->sql_escape(str_replace('*', '%', $username)) . "'" : '';
$where_sql .= ($username) ? " AND username_clean LIKE '" . $db->sql_escape(str_replace('*', '%', utf8_clean_string($username))) . "'" : '';
$where_sql .= ($email) ? " AND user_email LIKE '" . $db->sql_escape(str_replace('*', '%', $email)) . "' " : '';
$where_sql .= (sizeof($joined)) ? " AND user_regdate " . $key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, (int) $joined[1], (int) $joined[2], (int) $joined[0]) : '';
$where_sql .= ($count) ? " AND user_posts " . $key_match[$count_select] . " $count " : '';
@@ -244,7 +245,8 @@ class acp_prune
$db->sql_freeresult($result);
// Do not prune founder members
$sql = 'SELECT username, user_id FROM ' . USERS_TABLE . '
$sql = 'SELECT user_id, username
FROM ' . USERS_TABLE . '
WHERE user_id <> ' . ANONYMOUS . '
AND user_type <> ' . USER_FOUNDER . "
$where_sql";
@@ -267,11 +269,7 @@ class acp_prune
{
if ($action == 'deactivate')
{
foreach ($user_ids as $user_id)
{
user_active_flip($user_id, USER_NORMAL, false, false, true);
}
user_active_flip('deactivate', $user_ids);
$l_log = 'LOG_PRUNE_USER_DEAC';
}
else if ($action == 'delete')
@@ -309,7 +307,7 @@ class acp_prune
'prune' => 1,
'users' => request_var('users', ''),
'username' => request_var('username', ''),
'username' => request_var('username', '', true),
'email' => request_var('email', ''),
'joined_select' => request_var('joined_select', ''),
'joined' => request_var('joined', ''),

View File

@@ -48,14 +48,14 @@ class acp_ranks
if (!$rank_title)
{
trigger_error($user->lang['NO_RANK_TITLE'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_RANK_TITLE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql_ary = array(
'rank_title' => $rank_title,
'rank_special' => $special_rank,
'rank_min' => $min_posts,
'rank_image' => html_entity_decode($rank_image)
'rank_image' => htmlspecialchars_decode($rank_image)
);
if ($rank_id)
@@ -96,7 +96,7 @@ class acp_ranks
}
else
{
trigger_error($user->lang['MUST_SELECT_RANK'] . adm_back_link($this->u_action));
trigger_error($user->lang['MUST_SELECT_RANK'] . adm_back_link($this->u_action), E_USER_WARNING);
}
break;

View File

@@ -61,11 +61,11 @@ class acp_reasons
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($row['reason_title'] == 'other')
if (strtolower($row['reason_title']) == 'other')
{
$reason_row['reason_title'] = 'other';
}
else if (strtolower($row['reason_title']) != strtolower($reason_row['reason_title']))
else if ($row['reason_title'] != $reason_row['reason_title'])
{
$check_double = true;
}
@@ -76,12 +76,12 @@ class acp_reasons
{
$sql = 'SELECT reason_id
FROM ' . REPORTS_REASONS_TABLE . "
WHERE LOWER(reason_title) = '" . strtolower($db->sql_escape($reason_row['reason_title'])) . "'";
WHERE reason_title = '" . $db->sql_escape($reason_row['reason_title']) . "'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($row)
if ($row || ($action == 'add' && strtolower($reason_row['reason_title']) == 'other'))
{
$error[] = $user->lang['REASON_ALREADY_EXIST'];
}
@@ -137,7 +137,7 @@ class acp_reasons
if (!$reason_row)
{
trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
@@ -159,10 +159,14 @@ class acp_reasons
'REASON_TITLE' => $reason_row['reason_title'],
'REASON_DESCRIPTION' => $reason_row['reason_description'],
'S_EDIT_REASON' => true,
'S_TRANSLATED' => $translated,
'S_ERROR' => (sizeof($error)) ? true : false,
'TRANSLATED_TITLE' => ($translated) ? $user->lang['report_reasons']['TITLE'][strtoupper($reason_row['reason_title'])] : '',
'TRANSLATED_DESCRIPTION'=> ($translated) ? $user->lang['report_reasons']['DESCRIPTION'][strtoupper($reason_row['reason_title'])] : '',
'S_AVAILABLE_TITLES' => implode(', ', array_map('htmlspecialchars', array_keys($user->lang['report_reasons']['TITLE']))),
'S_EDIT_REASON' => true,
'S_TRANSLATED' => $translated,
'S_ERROR' => (sizeof($error)) ? true : false,
)
);
@@ -180,12 +184,12 @@ class acp_reasons
if (!$reason_row)
{
trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if ($reason_row['reason_title'] == 'other')
if (strtolower($reason_row['reason_title']) == 'other')
{
trigger_error($user->lang['NO_REMOVE_DEFAULT_REASON'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_REMOVE_DEFAULT_REASON'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Let the deletion be confirmed...
@@ -193,12 +197,12 @@ class acp_reasons
{
$sql = 'SELECT reason_id
FROM ' . REPORTS_REASONS_TABLE . "
WHERE reason_title = 'other'";
WHERE LOWER(reason_title) = 'other'";
$result = $db->sql_query($sql);
$other_reason_id = (int) $db->sql_fetchfield('reason_id');
$db->sql_freeresult($result);
switch (SQL_LAYER)
switch ($db->sql_layer)
{
// The ugly one!
case 'mysqli':
@@ -214,9 +218,17 @@ class acp_reasons
case 'mssql':
case 'mssql_odbc':
// Change the reports using this reason to 'other'
$sql = 'UPDATE ' . REPORTS_TABLE . '
SET reason_id = ' . $other_reason_id . ", report_text = '" . $db->sql_escape($reason_row['reason_description']) . "\n\n' + report_text
WHERE reason_id = $reason_id";
$sql = "DECLARE @ptrval binary(16)
SELECT @ptrval = TEXTPTR(report_text)
FROM " . REPORTS_TABLE . "
WHERE reason_id = " . $reason_id . "
UPDATETEXT " . REPORTS_TABLE . ".report_text @ptrval 0 0 '" . $db->sql_escape($reason_row['reason_description']) . "\n\n'
UPDATE " . REPORTS_TABLE . '
SET reason_id = ' . $other_reason_id . "
WHERE reason_id = $reason_id";
break;
// Teh standard
@@ -319,7 +331,7 @@ class acp_reasons
// If the reason is defined within the language file, we will use the localized version, else just use the database entry...
if (isset($user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]) && isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]))
{
$row['reson_description'] = $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])];
$row['reason_description'] = $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])];
$row['reason_title'] = $user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])];
$translated = true;

View File

@@ -152,7 +152,7 @@ class acp_search
}
else
{
trigger_error($error);
trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
}
}
else
@@ -168,7 +168,7 @@ class acp_search
}
else
{
trigger_error($error);
trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
}
}
@@ -228,7 +228,8 @@ class acp_search
break;
default:
trigger_error('NO_ACTION');
trigger_error('NO_ACTION', E_USER_ERROR);
break;
}
if (empty($this->state[0]))
@@ -240,7 +241,7 @@ class acp_search
$error = false;
if ($this->init_search($this->state[0], $this->search, $error))
{
trigger_error($error);
trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
}
$action = &$this->state[1];
@@ -262,7 +263,7 @@ class acp_search
{
$this->state = array('');
$this->save_state();
trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js());
trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js(), E_USER_WARNING);
}
}
else
@@ -294,7 +295,7 @@ class acp_search
if ($post_counter <= $this->max_post_id)
{
redirect($this->u_action . '&amp;action=delete', 3);
redirect($this->u_action . '&amp;action=delete');
}
}
@@ -314,12 +315,12 @@ class acp_search
{
$this->state = array('');
$this->save_state();
trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js());
trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js(), E_USER_WARNING);
}
}
else
{
$sql = 'SELECT post_id, post_subject, post_text, post_encoding, poster_id, forum_id
$sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id
FROM ' . POSTS_TABLE . '
WHERE post_id >= ' . (int) ($post_counter + 1) . '
AND post_id < ' . (int) ($post_counter + $this->batch_size);
@@ -327,7 +328,7 @@ class acp_search
while ($row = $db->sql_fetchrow($result))
{
$this->search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['post_encoding'], $row['poster_id'], $row['forum_id']);
$this->search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['poster_id'], $row['forum_id']);
}
$db->sql_freeresult($result);
@@ -338,7 +339,7 @@ class acp_search
if ($post_counter <= $this->max_post_id)
{
redirect($this->u_action . '&amp;action=create', 3);
redirect($this->u_action . '&amp;action=create');
}
}
@@ -440,7 +441,7 @@ class acp_search
adm_page_header($user->lang[$l_type]);
$template->set_filenames(array(
'body' => 'search_index_progress_bar.html')
'body' => 'progress_bar.html')
);
$template->assign_vars(array(
@@ -456,7 +457,7 @@ class acp_search
/**
* @todo remove Javascript
*/
return '<script language="javascript" type="text/javascript">
return '<script type="text/javascript">
<!--
close_waitscreen = 1;
//-->

View File

@@ -191,7 +191,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if ($style_id == $config['default_style'])
{
trigger_error($user->lang['DEACTIVATE_DEFAULT'] . adm_back_link($this->u_action));
trigger_error($user->lang['DEACTIVATE_DEFAULT'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'UPDATE ' . STYLES_TABLE . '
@@ -234,7 +234,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$template_row)
{
trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -311,12 +311,12 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$theme_row)
{
trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!$theme_row['theme_storedb'])
{
trigger_error($user->lang['THEME_ERR_REFRESH_FS'] . adm_back_link($this->u_action));
trigger_error($user->lang['THEME_ERR_REFRESH_FS'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -369,7 +369,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$imageset_row)
{
trigger_error($user->lang['NO_IMAGESET'] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_IMAGESET'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -397,9 +397,12 @@ pagination_sep = \'{PAGINATION_SEP}\'
}
unset($cfg_data);
$sql = 'UPDATE ' . STYLES_IMAGESET_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
WHERE imageset_id = $style_id";
$db->sql_query($sql);
if (sizeof($sql_ary))
{
$sql = 'UPDATE ' . STYLES_IMAGESET_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
WHERE imageset_id = $style_id";
$db->sql_query($sql);
}
$cache->destroy('sql', STYLES_IMAGESET_TABLE);
@@ -533,7 +536,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
while (($file = readdir($dp)) !== false)
{
$subpath = ($mode != 'style') ? "$mode/" : '';
if ($file{0} != '.' && file_exists("{$phpbb_root_path}styles/$file/$subpath$mode.cfg"))
if ($file[0] != '.' && file_exists("{$phpbb_root_path}styles/$file/$subpath$mode.cfg"))
{
if ($cfg = file("{$phpbb_root_path}styles/$file/$subpath$mode.cfg"))
{
@@ -590,7 +593,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
$_POST['template_data'] = (isset($_POST['template_data']) && !empty($_POST['template_data'])) ? str_replace(array("\r\n", "\r"), array("\n", "\n"), $_POST['template_data']) : '';
$template_data = (STRIP) ? stripslashes($_POST['template_data']) : $_POST['template_data'];
$template_file = request_var('template_file', '');
$template_file = request_var('template_file', '');
$text_rows = max(5, min(999, request_var('text_rows', 20)));
$save_changes = (isset($_POST['save'])) ? true : false;
@@ -602,13 +605,14 @@ pagination_sep = \'{PAGINATION_SEP}\'
FROM ' . STYLES_TEMPLATE_TABLE . "
WHERE template_id = $template_id";
$result = $db->sql_query($sql);
if (!($template_info = $db->sql_fetchrow($result)))
{
trigger_error($user->lang['NO_TEMPLATE']);
}
$template_info = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$template_info)
{
trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// save changes to the template if the user submitted any
if ($save_changes && $template_file)
{
@@ -621,7 +625,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
{
if (!($fp = fopen($file, 'wb')))
{
trigger_error($user->lang['NO_TEMPLATE']);
trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
fwrite($fp, $template_data);
fclose($fp);
@@ -674,7 +678,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
{
if (!file_exists($template_path . "/$template_file") || !($template_data = file_get_contents($template_path . "/$template_file")))
{
trigger_error($user->lang['NO_TEMPLATE']);
trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
}
@@ -779,7 +783,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
'SELECTED_TEMPLATE' => $template_info['template_name'],
'TEMPLATE_FILE' => $template_file,
'TEMPLATE_DATA' => htmlentities($template_data),
'TEMPLATE_DATA' => htmlspecialchars($template_data),
'TEXT_ROWS' => $text_rows)
);
}
@@ -801,13 +805,14 @@ pagination_sep = \'{PAGINATION_SEP}\'
FROM ' . STYLES_TEMPLATE_TABLE . "
WHERE template_id = $template_id";
$result = $db->sql_query($sql);
if (!($template_row = $db->sql_fetchrow($result)))
{
trigger_error($user->lang['NO_TEMPLATE']);
}
$template_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$template_row)
{
trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// User wants to delete one or more files ...
if ($submit && $file_ary)
{
@@ -941,7 +946,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!($theme_info = $db->sql_fetchrow($result)))
{
trigger_error($user->lang['NO_THEME']);
trigger_error($user->lang['NO_THEME'] . adm_bacl_link($this->u_action), E_USER_WARNING);
}
$db->sql_freeresult($result);
@@ -951,7 +956,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
{
if (!file_exists($stylesheet_path) || !($stylesheet = file_get_contents($stylesheet_path)))
{
trigger_error($user->lang['NO_THEME']);
trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
else
@@ -961,7 +966,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
// Pull out a list of classes
$classes = array();
if (preg_match_all('/^([a-z0-9\.:#> \t]+?)[ \t\n]*?\{.*?\}/msi', $stylesheet, $matches))
if (preg_match_all('/^([a-z0-9\.,:#> \t]+?)[ \t\n]*?\{.*?\}/msi', $stylesheet, $matches))
{
$classes = $matches[1];
}
@@ -973,7 +978,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
foreach ($classes as $class)
{
$selected = ($class == $edit_class) ? ' selected="selected"' : '';
$s_classes .= '<option value="' . $class . '"' . $selected . '>' . $class . '</option>';
$s_classes .= '<option value="' . $class . '" title="' . $class . '"' . $selected . '>' . truncate_string($class, 40, false, '...') . '</option>';
}
$template->assign_vars(array(
@@ -1007,7 +1012,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
// Used in an sprintf statement to generate appropriate output for rawcss mode
$map_elements = array(
'colors' => '%s',
'sizes' => '%d',
'sizes' => '%1.10f',
'images' => 'url(\'./%s\')',
'repeat' => '%s',
'other' => '%s',
@@ -1015,11 +1020,11 @@ pagination_sep = \'{PAGINATION_SEP}\'
$units = array('px', '%', 'em', 'pt');
$repeat_types = array(
'' => $user->lang['UNSET'],
'none' => $user->lang['REPEAT_NO'],
'repeat-x' => $user->lang['REPEAT_X'],
'repeat-y' => $user->lang['REPEAT_Y'],
'both' => $user->lang['REPEAT_ALL'],
'' => $user->lang['UNSET'],
'none' => $user->lang['REPEAT_NO'],
'repeat-x' => $user->lang['REPEAT_X'],
'repeat-y' => $user->lang['REPEAT_Y'],
'both' => $user->lang['REPEAT_ALL'],
);
// Fill css_data with the class contents from the stylesheet
@@ -1030,7 +1035,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!isset($matches[1]))
{
trigger_error($user->lang['NO_CLASS']);
trigger_error($user->lang['NO_CLASS'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$css_data = implode(";\n", array_diff(array_map('trim', explode("\n", preg_replace("#;[\n]*#s", "\n", $matches[1]))), array('')));
@@ -1183,11 +1188,11 @@ pagination_sep = \'{PAGINATION_SEP}\'
$value = '';
$unit = '';
// retrieve and validate date for this setting
// retrieve and validate data for this setting
switch ($type)
{
case 'sizes':
$value = request_var($var, 0);
$value = request_var($var, 0.0);
$unit = request_var($var . '_unit', '');
if ((request_var($var, '') === '') || !in_array($unit, $units))
@@ -1227,7 +1232,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
// use the element mapping to create raw css code
if ($value !== '')
{
$css_data .= $match . ': ' . sprintf($map_elements[$type], $value) . $unit . ";\n";
$css_data .= $match . ': ' . ($type == 'sizes' ? rtrim(sprintf($map_elements[$type], $value), '0') : sprintf($map_elements[$type], $value)) . $unit . ";\n";
}
}
}
@@ -1262,7 +1267,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
// check whether the custom class name is valid
if (!preg_match('/^[a-z0-9#:.\- ]+$/i', $add_custom))
{
trigger_error($user->lang['THEME_ERR_CLASS_CHARS'] . adm_back_link($this->u_action . "&amp;action=edit&amp;id=$theme_id&amp;text_rows=$text_rows"));
trigger_error($user->lang['THEME_ERR_CLASS_CHARS'] . adm_back_link($this->u_action . "&amp;action=edit&amp;id=$theme_id&amp;text_rows=$text_rows"), E_USER_WARNING);
}
else
{
@@ -1278,7 +1283,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
// write stylesheet to file
if (!($fp = fopen($stylesheet_path, 'wb')))
{
trigger_error($user->lang['NO_THEME']);
trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
}
fwrite($fp, $stylesheet);
fclose($fp);
@@ -1348,17 +1353,20 @@ pagination_sep = \'{PAGINATION_SEP}\'
if ($imageset_id)
{
$sql_select = ($imgname) ? ", $imgname" : '';
$sql = "SELECT imageset_path, imageset_name, imageset_copyright$sql_select
FROM " . STYLES_IMAGESET_TABLE . "
WHERE imageset_id = $imageset_id";
$result = $db->sql_query($sql);
if (!extract($db->sql_fetchrow($result)))
{
trigger_error($user->lang['NO_IMAGESET']);
}
$imageset_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$imageset_row)
{
trigger_error($user->lang['NO_IMAGESET'] . adm_back_link($this->u_action), E_USER_WARNING);
}
extract($imageset_row);
// Check to see whether the selected image exists in the table
$valid_name = ($update) ? false : true;
@@ -1431,7 +1439,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
$dp = opendir($dir);
while (($file = readdir($dp)) !== false)
{
if (!is_file($dir . '/' . $file) && !is_link($dir . '/' . $file) && $file{0} != '.' && strtoupper($file) != 'CVS' && !sizeof($imagesetlist['lang']))
if (!is_file($dir . '/' . $file) && !is_link($dir . '/' . $file) && $file[0] != '.' && strtoupper($file) != 'CVS' && !sizeof($imagesetlist['lang']))
{
$dp2 = opendir("$dir/$file");
while (($file2 = readdir($dp2)) !== false)
@@ -1540,7 +1548,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$style_row)
{
trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = "SELECT {$mode}_id, {$mode}_name
@@ -1561,7 +1569,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
}
else
{
trigger_error($user->lang['ONLY_' . $l_prefix] . adm_back_link($this->u_action));
trigger_error($user->lang['ONLY_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
}
$db->sql_freeresult($result);
@@ -1719,7 +1727,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$style_row)
{
trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
}
$var_ary = array('style_id', 'style_name', 'style_copyright', 'template_id', 'template_name', 'template_path', 'template_copyright', 'template_storedb', 'bbcode_bitfield', 'theme_id', 'theme_name', 'theme_path', 'theme_copyright', 'theme_storedb', 'theme_mtime', 'theme_data', 'imageset_id', 'imageset_name', 'imageset_path', 'imageset_copyright');
@@ -1843,7 +1851,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
{
foreach ($key_array as $key)
{
$imageset_cfg .= "\n" . $key . ' = ' . str_replace("styles/{$style_row['imageset_path']}/imageset/", '{PATH}', $style_row[$key]);
$imageset_cfg .= "\nimg_" . $key . ' = ' . str_replace("styles/{$style_row['imageset_path']}/imageset/", '{PATH}', $style_row[$key]);
}
}
@@ -1951,7 +1959,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$style_row)
{
trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->page_title = $l_prefix . '_EXPORT';
@@ -2021,7 +2029,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$style_row)
{
trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action), E_USER_WARNING);
}
$style_row['style_default'] = ($mode == 'style' && $config['default_style'] == $style_id) ? 1 : 0;
@@ -2057,12 +2065,12 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!sizeof($error))
{
// Check length settings
if (strlen($name) > 30)
if (utf8_strlen($name) > 30)
{
$error[] = $user->lang[$l_type . '_ERR_NAME_LONG'];
}
if (strlen($copyright) > 60)
if (utf8_strlen($copyright) > 60)
{
$error[] = $user->lang[$l_type . '_ERR_COPY_LONG'];
}
@@ -2308,7 +2316,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
{
foreach ($matches[0] as $idx => $match)
{
$stylesheet = str_replace($match, $this->load_css_file($theme_row['theme_path'], $matches[1][$idx]), $stylesheet);
$stylesheet = str_replace($match, acp_styles::load_css_file($theme_row['theme_path'], $matches[1][$idx]), $stylesheet);
}
}
@@ -2331,7 +2339,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
{
if (!($fp = fopen("{$phpbb_root_path}styles/$template_path$pathfile$file", 'r')))
{
trigger_error("Could not open {$phpbb_root_path}styles/$template_path$pathfile$file");
trigger_error("Could not open {$phpbb_root_path}styles/$template_path$pathfile$file", E_USER_ERROR);
}
$template_data = fread($fp, filesize("{$phpbb_root_path}styles/$template_path$pathfile$file"));
fclose($fp);
@@ -2396,7 +2404,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!($dp = @opendir("{$phpbb_root_path}cache")))
{
trigger_error($user->lang['TEMPLATE_ERR_CACHE_READ']);
trigger_error($user->lang['TEMPLATE_ERR_CACHE_READ'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$file_ary = array();
@@ -2538,7 +2546,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
}
else
{
trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action));
trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action), E_USER_WARNING);
}
$style_row['store_db'] = request_var('store_db', 0);
@@ -2822,12 +2830,12 @@ pagination_sep = \'{PAGINATION_SEP}\'
}
// Check length settings
if (strlen($name) > 30)
if (utf8_strlen($name) > 30)
{
$error[] = $user->lang['STYLE_ERR_NAME_LONG'];
}
if (strlen($copyright) > 60)
if (utf8_strlen($copyright) > 60)
{
$error[] = $user->lang['STYLE_ERR_COPY_LONG'];
}
@@ -2932,12 +2940,12 @@ pagination_sep = \'{PAGINATION_SEP}\'
}
// Check length settings
if (strlen($name) > 30)
if (utf8_strlen($name) > 30)
{
$error[] = $user->lang[$l_type . '_ERR_NAME_LONG'];
}
if (strlen($copyright) > 60)
if (utf8_strlen($copyright) > 60)
{
$error[] = $user->lang[$l_type . '_ERR_COPY_LONG'];
}

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