1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-09-18 12:01:33 +02:00

Compare commits

...

264 Commits

Author SHA1 Message Date
(no author)
7068d8b462 This commit was manufactured by cvs2svn to create tag
'release_3_0_B5'.

git-svn-id: file:///svn/phpbb/tags/release_3_0_B5@6949 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-28 17:00:03 +00:00
Dominik Dröscher
2b12afa025 forgot that one ...
git-svn-id: file:///svn/phpbb/trunk@6948 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-28 17:00:03 +00:00
Dominik Dröscher
f0cc122948 First bunch of changes for #5712
git-svn-id: file:///svn/phpbb/trunk@6947 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-28 16:46:26 +00:00
Meik Sievertsen
46bf79ec78 some important changes to let the update work. ;)
git-svn-id: file:///svn/phpbb/trunk@6946 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-28 15:37:11 +00:00
Meik Sievertsen
00aec3a339 oh my god... someone please slap me very hard for this.
git-svn-id: file:///svn/phpbb/trunk@6945 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-28 14:00:59 +00:00
Nils Adermann
eaef76a100 - ignore too short/too long search words [Bug #7438]
git-svn-id: file:///svn/phpbb/trunk@6944 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-28 13:43:46 +00:00
Meik Sievertsen
b4568af559 fixing a signature bug being there for more than two years [Bug #7436]
git-svn-id: file:///svn/phpbb/trunk@6943 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-28 13:09:50 +00:00
Jonathan Stanley
0df3802cfb Presentational (X)HTML tags makes Bertiezilla cire. Replaced examples with the semantically neutral "<span>" and styling them via inline CSS.
git-svn-id: file:///svn/phpbb/trunk@6942 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-27 18:33:26 +00:00
Nils Adermann
bda5255ed3 Display a note, that UTF-8 support in fulltext_mysql is not available with certain versins of PHP
git-svn-id: file:///svn/phpbb/trunk@6941 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-27 17:38:45 +00:00
Jonathan Stanley
6a4c01cdc3 SEPARATOR, not SEPERATOR... also "neutralised" variable naming as it's used elsewhere outside of pagination. :)
git-svn-id: file:///svn/phpbb/trunk@6940 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-27 17:21:20 +00:00
Meik Sievertsen
538ffb5bfb some very tiny adjustements.
git-svn-id: file:///svn/phpbb/trunk@6939 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-27 16:41:14 +00:00
Meik Sievertsen
3f53551fa8 look what david found...
git-svn-id: file:///svn/phpbb/trunk@6938 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-27 16:36:09 +00:00
Nils Adermann
84b87c7209 another oops
git-svn-id: file:///svn/phpbb/trunk@6937 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-27 16:24:32 +00:00
Nils Adermann
aa8ebc7bf3 - introducing read/unread images in the MCP, if you view something through the MCP it will not update the "read" status of a post/topic/forum [includes Bug #6796]
git-svn-id: file:///svn/phpbb/trunk@6936 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-27 16:04:58 +00:00
David M
14e209a487 - generate fewer opcodes, make a smaller cache, a bit more readable
git-svn-id: file:///svn/phpbb/trunk@6935 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-27 13:36:50 +00:00
Meik Sievertsen
3c5c5154ab #7424
- rebuild username_clean column due to changes in utf8_clean_string()


git-svn-id: file:///svn/phpbb/trunk@6934 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-27 12:30:54 +00:00
Nils Adermann
9ebe6b6b1f oops
git-svn-id: file:///svn/phpbb/trunk@6933 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-26 19:56:33 +00:00
Nils Adermann
5bb75c590d - allow underscores in CSS class names / ids
- remove control characters from clean strings, and map all space characters to ASCII space (\x20)


git-svn-id: file:///svn/phpbb/trunk@6932 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-26 18:15:17 +00:00
Meik Sievertsen
4274eb2a07 heh
git-svn-id: file:///svn/phpbb/trunk@6931 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-26 16:10:43 +00:00
Meik Sievertsen
ddddda47fb - fix some oddities (doubled spaces for example)
- changed the way make_forum_select() is returning the forum list - now including skipped forums but being disabled. This should make identifying the correct forum much more easier.
- Changed some permission namings based on suggestions by the community
- Tried to comply to the permission field ordering within the language files while displaying permission sets. Hopefully it's worth the additional processing time.
- Disable submit buttons after clicking for installation and conversions.


git-svn-id: file:///svn/phpbb/trunk@6930 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-26 16:09:51 +00:00
Nils Adermann
920fc0156d - correctly check custom class names [Bug #7206]
git-svn-id: file:///svn/phpbb/trunk@6929 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-25 23:28:57 +00:00
Dominik Dröscher
6651b34a1b #7230 and first part of #5706
git-svn-id: file:///svn/phpbb/trunk@6928 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-24 18:24:43 +00:00
Meik Sievertsen
01b491e8f5 - fix severe bug with email hash calculation
- fix bug in convertor not correctly converting config values


git-svn-id: file:///svn/phpbb/trunk@6927 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-24 17:19:35 +00:00
Meik Sievertsen
5f0b61065f unknown
git-svn-id: file:///svn/phpbb/trunk@6926 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-24 12:33:36 +00:00
Meik Sievertsen
9e5c25504e - added confirm box to ucp zebra (adding fried/foe)
- permission fixes for conversions
- use more appropiate error message within convertor if source tables could not be found
- other tiny fixes


git-svn-id: file:///svn/phpbb/trunk@6925 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-24 11:29:56 +00:00
Jonathan Stanley
180a5a243d #7150 ... part 3. As per http://www.phpbb.com/bugs/viewreport.php?b=7150#c15182 ... hopefully this works first time. RTL language (Arabic, Hebrew, etc) testers might was to have a gander using CVS and see if everything "works" as expected.
git-svn-id: file:///svn/phpbb/trunk@6924 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-24 02:04:16 +00:00
Jonathan Stanley
2a2814265d #7150 ... take 3
git-svn-id: file:///svn/phpbb/trunk@6923 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-24 02:02:25 +00:00
Jonathan Stanley
756907cbc6 #7114 ... blablabla
git-svn-id: file:///svn/phpbb/trunk@6922 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-24 00:58:45 +00:00
David M
f6aefc53b5 #7274
git-svn-id: file:///svn/phpbb/trunk@6921 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-22 17:06:50 +00:00
Meik Sievertsen
60d817416b fixing mcp bugs by introducing a new feature to check for loaded/accessible modules/modes. If the MCP module "logs" get disabled the quick mod tools on viewtopic still show a link to the logs, this will then lead to an error message. This is not fixable. The logs should be accessible to all moderators by default.
git-svn-id: file:///svn/phpbb/trunk@6920 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-22 17:05:23 +00:00
Dominik Dröscher
41d0347eb4 Well, why not.
git-svn-id: file:///svn/phpbb/trunk@6919 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-22 02:12:39 +00:00
Dominik Dröscher
d6584aeb88 #7246
git-svn-id: file:///svn/phpbb/trunk@6918 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-21 21:33:42 +00:00
Dominik Dröscher
cc0e43cedc #7320
git-svn-id: file:///svn/phpbb/trunk@6917 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-21 21:09:19 +00:00
Dominik Dröscher
097856f4a0 Some permission interface updates:
- checkbox now hidden by default, only shown when an advanced view is opened
- mark all and unmark all now available


git-svn-id: file:///svn/phpbb/trunk@6916 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-21 19:32:38 +00:00
Meik Sievertsen
576bb754e9 fixing some bugs, most being submitted grammatical/spelling errors.
git-svn-id: file:///svn/phpbb/trunk@6915 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-21 18:33:45 +00:00
Dominik Dröscher
61d4209aaf #7254
#7258
#7268
#7278
#7314


git-svn-id: file:///svn/phpbb/trunk@6914 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-21 17:32:26 +00:00
Nils Adermann
fcfe045307 sql_in_set only allows empty sets if the last parameter is set to true, otherwise it will throw an error message and a backtrace
git-svn-id: file:///svn/phpbb/trunk@6913 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-20 23:35:47 +00:00
Meik Sievertsen
31e546c5e4 - fixing some bugs
- removing utf8 characters from email files (has been discussed internally, you guys know why)
- making sure some opendir calls are checked before calling readdir.


git-svn-id: file:///svn/phpbb/trunk@6912 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-20 17:58:27 +00:00
David M
fae887b3a1 - tiny issue in display_forums() made is possible for get_moderators() to cache the same query twice
git-svn-id: file:///svn/phpbb/trunk@6911 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-20 16:33:19 +00:00
David M
9359939eb2 #7256
git-svn-id: file:///svn/phpbb/trunk@6910 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-20 04:20:18 +00:00
Jonathan Stanley
7e954145c4 #7150
Part 2... see: http://www.phpbb.com/bugs/viewreport.php?b=7150#c14962


git-svn-id: file:///svn/phpbb/trunk@6909 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-19 17:23:25 +00:00
Meik Sievertsen
84c3a073df some opendir/closedir fixes
git-svn-id: file:///svn/phpbb/trunk@6908 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-19 11:58:44 +00:00
Meik Sievertsen
2c4a82fdd3 #7248
git-svn-id: file:///svn/phpbb/trunk@6907 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-19 11:42:45 +00:00
Dominik Dröscher
bc553355d6 Some more permission updates
git-svn-id: file:///svn/phpbb/trunk@6906 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-18 16:57:46 +00:00
Meik Sievertsen
ff7686797a fixing some bugs
git-svn-id: file:///svn/phpbb/trunk@6905 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-18 14:41:13 +00:00
Dominik Dröscher
916c410044 The apply to selected items checkbox
git-svn-id: file:///svn/phpbb/trunk@6904 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-18 14:28:34 +00:00
Dominik Dröscher
1b1d9d2365 #7242
git-svn-id: file:///svn/phpbb/trunk@6903 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-18 14:27:00 +00:00
Dominik Dröscher
2af1a4ca6a This could help to make it work I guess ... :)
git-svn-id: file:///svn/phpbb/trunk@6902 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-18 13:08:36 +00:00
Dominik Dröscher
a034d24431 Hello new permission interface. Everyone please give it a proper welcome and test the beejesus out of it.
git-svn-id: file:///svn/phpbb/trunk@6901 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-18 12:52:38 +00:00
Meik Sievertsen
1b4bae94a0 *** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@6900 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-18 10:24:35 +00:00
Meik Sievertsen
e6f685c25f fixing some bugs i introduced while fixing other bugs. :)
git-svn-id: file:///svn/phpbb/trunk@6899 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-18 10:00:39 +00:00
David M
a64caea9b6 - found a small bug in the list parser while working on another bug
git-svn-id: file:///svn/phpbb/trunk@6898 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-18 05:09:35 +00:00
David M
de07a9e0ad #7228
git-svn-id: file:///svn/phpbb/trunk@6897 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-18 04:25:11 +00:00
Dominik Dröscher
360dff8a47 #7220
git-svn-id: file:///svn/phpbb/trunk@6896 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-17 22:48:52 +00:00
Dominik Dröscher
a815c191a4 #7198 and some related issues
git-svn-id: file:///svn/phpbb/trunk@6895 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-17 19:41:52 +00:00
Meik Sievertsen
a841fe70a8 ok, handled some bugs... the most important being validate_username (the variable passed to validate_data([...]array('username', [...])) and updating group listings while doing relevant group actions. Oh, and PM icons are working now. :o
git-svn-id: file:///svn/phpbb/trunk@6894 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-17 18:41:49 +00:00
Dominik Dröscher
708113b790 #7092
#7088


git-svn-id: file:///svn/phpbb/trunk@6893 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-17 15:40:30 +00:00
David M
5d42587e56 #7156
git-svn-id: file:///svn/phpbb/trunk@6892 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-17 01:36:51 +00:00
Dominik Dröscher
f4263042d5 Forgot that one for #7110
git-svn-id: file:///svn/phpbb/trunk@6891 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-16 23:52:38 +00:00
Dominik Dröscher
07d7486389 #7110
git-svn-id: file:///svn/phpbb/trunk@6890 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-16 23:46:37 +00:00
Dominik Dröscher
348edb41d9 hmmm ...
git-svn-id: file:///svn/phpbb/trunk@6889 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-16 23:20:26 +00:00
Dominik Dröscher
18f64960cd #7120
- some consistency fixes


git-svn-id: file:///svn/phpbb/trunk@6888 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-16 13:02:37 +00:00
Jonathan Stanley
ce60114a71 #7150
git-svn-id: file:///svn/phpbb/trunk@6887 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-14 22:29:05 +00:00
Nils Adermann
e6421f9274 - solved a problem with magic urls inside brackets, and with bbcodes being treated as IPv6 addresses
- turn NOT IN () and IN () into 1=1 and 1=0 so the database will understand it, instead of throwing an error in sql_in_set [Bug #7118]
- some tiny fixes to fulltext_native


git-svn-id: file:///svn/phpbb/trunk@6886 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-13 22:32:03 +00:00
Dominik Dröscher
9372acd017 Remains from #6998
git-svn-id: file:///svn/phpbb/trunk@6885 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-11 13:37:41 +00:00
Dominik Dröscher
e133e4a727 #7036
git-svn-id: file:///svn/phpbb/trunk@6884 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-11 13:34:33 +00:00
Dominik Dröscher
09ed27b4aa #7032
git-svn-id: file:///svn/phpbb/trunk@6883 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-11 13:11:28 +00:00
Dominik Dröscher
bb5e17f40b Some cleanup. Be gone you outdated JS code!
git-svn-id: file:///svn/phpbb/trunk@6882 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-11 13:02:33 +00:00
David M
a0ff2c859d meh
git-svn-id: file:///svn/phpbb/trunk@6881 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-11 12:33:34 +00:00
David M
3a2a61baa4 #6772
- some other random things


git-svn-id: file:///svn/phpbb/trunk@6880 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-11 05:44:22 +00:00
David M
7c18792a6e #7034
git-svn-id: file:///svn/phpbb/trunk@6879 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-11 03:59:17 +00:00
Dominik Dröscher
0165b873ef Some remains from #6998
git-svn-id: file:///svn/phpbb/trunk@6878 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-11 01:01:26 +00:00
David M
eb56722d2f #6944
git-svn-id: file:///svn/phpbb/trunk@6877 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-10 21:20:18 +00:00
Jonathan Stanley
8e1adf93b6 pagination_sep is dead... removing the reference to it in the commented part.
git-svn-id: file:///svn/phpbb/trunk@6876 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-10 20:52:14 +00:00
Dominik Dröscher
96ac0fe0a2 #7006
git-svn-id: file:///svn/phpbb/trunk@6875 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-10 18:24:48 +00:00
Jonathan Stanley
2c4d3771ff Changed the example date from 2005-01-10T17:57Z to 2007-01-01T13:37Z to better illustrate the difference between "d" and "j" in the PHP date(). Also, since phpBB's language files tend towards formal, using "jS" (for 1st, 2nd, 3rd, etc) as opposed to just "s".
Translators should pick whatever appropiate set of date format codes for their own locale, since PHP* doesn't offer any number ordinal suffixes apart from English. :(

* PHP6.x probably will/could, though that's a long way of from being the _minimum_ required version for any current PHP app.


git-svn-id: file:///svn/phpbb/trunk@6874 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-10 18:13:04 +00:00
Meik Sievertsen
d46d56f956 hmm, no, this was not meant to go in
git-svn-id: file:///svn/phpbb/trunk@6873 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-10 16:54:27 +00:00
Meik Sievertsen
b621bb66c5 fix some general bugs and some convertor related
git-svn-id: file:///svn/phpbb/trunk@6872 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-10 16:47:16 +00:00
Dominik Dröscher
31ee257ab8 #6998
MY EYES, MY EYES ... did I ever mention that I hate tables that are abused for layout purposes?


git-svn-id: file:///svn/phpbb/trunk@6871 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-10 00:23:37 +00:00
Dominik Dröscher
c154f124f8 bullseye
git-svn-id: file:///svn/phpbb/trunk@6870 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-09 22:53:51 +00:00
Dominik Dröscher
216bf7e324 #6988
Nicely caught by Schumi


git-svn-id: file:///svn/phpbb/trunk@6869 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-09 22:03:49 +00:00
Dominik Dröscher
ccaae47b6c Just some minor thing I need
git-svn-id: file:///svn/phpbb/trunk@6868 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-09 20:46:57 +00:00
David M
289998c5e7 #6776
git-svn-id: file:///svn/phpbb/trunk@6867 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-09 20:16:06 +00:00
Dominik Dröscher
11300e3ceb Multiple and single recepients now work properly
git-svn-id: file:///svn/phpbb/trunk@6866 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-09 14:32:34 +00:00
Meik Sievertsen
2b35b9d60d - some bugfixes
- bugfixes for the convertor (typecasting for example was totally broken)


git-svn-id: file:///svn/phpbb/trunk@6865 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-09 14:10:44 +00:00
Dominik Dröscher
164fb66f44 #6098
"Find a member" now supports single clicks. Thanks for Highway of Life for helping out here. :)


git-svn-id: file:///svn/phpbb/trunk@6864 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-09 14:01:37 +00:00
David M
5cf6e00cf9 - installer now checks if the page size is correct for Firebird
- Firebird now has a proper explain page


git-svn-id: file:///svn/phpbb/trunk@6863 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-09 01:33:20 +00:00
Nils Adermann
27f915f305 - new homographs or IDN confusables ( http://www.unicode.org/reports/tr39/data/international.txt )
- also added character names to old homographs
- pagination_sep theme option removed, PAGINATION_SEPERATOR can be set in language files and the theme can overwrite it using span.page-sep [Bug #6872]


git-svn-id: file:///svn/phpbb/trunk@6862 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-08 21:14:49 +00:00
Meik Sievertsen
4be1329803 ups. :)
git-svn-id: file:///svn/phpbb/trunk@6861 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-08 17:19:56 +00:00
Meik Sievertsen
55b5e71411 - ok... first of all, let the forum names and descriptions being recoded correctly...
- fixed the php notices for a non-existant poster id. They were related to user signature conversion
- adjusted the topic_poster id; this should solve wrong user assignments for topic poster
- adjusted private message author; normally here some users should have encountered wrong ids.
- adjusted the batch sizes to support the usual 2.0.x target base - the old values were used for really huge conversions. :)
- commented out meta refresh for the time being - we will add a setting for this, some may want to sit in front, some may want to go away while converting (most likely when they did a test run before)


git-svn-id: file:///svn/phpbb/trunk@6860 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-08 16:47:16 +00:00
David M
b94a240d2f #6868
git-svn-id: file:///svn/phpbb/trunk@6859 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-07 20:34:41 +00:00
Meik Sievertsen
6f20a87425 ok, let's recode other text fields too...
git-svn-id: file:///svn/phpbb/trunk@6858 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-07 18:53:15 +00:00
David M
0ac5a3bdbe silly pants
git-svn-id: file:///svn/phpbb/trunk@6857 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-07 18:02:46 +00:00
David M
5474f1a0ae #6836
git-svn-id: file:///svn/phpbb/trunk@6856 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-07 17:45:19 +00:00
Meik Sievertsen
29ef0fdb86 erm...
git-svn-id: file:///svn/phpbb/trunk@6855 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-07 17:38:51 +00:00
Meik Sievertsen
8f4c3a1fee some fixes...
git-svn-id: file:///svn/phpbb/trunk@6854 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-07 17:25:47 +00:00
Meik Sievertsen
ec7936509a do not reset complete convert_row. :o
git-svn-id: file:///svn/phpbb/trunk@6853 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-07 16:27:26 +00:00
David M
8f0f2e1f0d #6828
git-svn-id: file:///svn/phpbb/trunk@6852 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-07 14:24:01 +00:00
Meik Sievertsen
3c352ba4ef - fix some convertor bugs.
- added support for the validated birthday mod and fixed the integration of nils' birthday mod


git-svn-id: file:///svn/phpbb/trunk@6851 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-07 14:08:47 +00:00
Meik Sievertsen
09ce0caad6 fix for bug #6728
git-svn-id: file:///svn/phpbb/trunk@6850 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-07 11:58:28 +00:00
David M
a643f85f6b - prefer ISO over CP as ISO is more common
- added TIS-620 and cp-1251


git-svn-id: file:///svn/phpbb/trunk@6849 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-07 04:24:08 +00:00
Nils Adermann
f3b5143682 - Treat system messages as ISO-8859-1 just like PHP does it
git-svn-id: file:///svn/phpbb/trunk@6848 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-07 00:44:15 +00:00
Meik Sievertsen
5d91d46384 what is this? is it a plane? is it super-grobi? no, it is the convertor...
git-svn-id: file:///svn/phpbb/trunk@6847 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-06 19:39:56 +00:00
Meik Sievertsen
48b76be50b tiny alterations
git-svn-id: file:///svn/phpbb/trunk@6846 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-06 19:37:09 +00:00
Meik Sievertsen
962be6ed09 recode_basic and recode_cjk (this one is most probably not within the full release but available seperatly due to it's sheer size) for converting to utf8
git-svn-id: file:///svn/phpbb/trunk@6845 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-06 19:23:23 +00:00
Meik Sievertsen
e1b549a967 - updated/new documents
git-svn-id: file:///svn/phpbb/trunk@6844 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-06 18:31:42 +00:00
Nils Adermann
ce13b9b996 - use constants no weird numbers ;-)
- solved problem with \w using UTF-8 search (fulltext_mysql) by using PCRE unicode character properties if available [Bug #5768]


git-svn-id: file:///svn/phpbb/trunk@6843 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-05 21:17:28 +00:00
Meik Sievertsen
77335d94e4 unique cookie name anyone?
git-svn-id: file:///svn/phpbb/trunk@6842 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-05 15:31:04 +00:00
Meik Sievertsen
94b50f1797 fix message length calculation for parsing bbcodes as well as saving some bytes of memory. ;)
git-svn-id: file:///svn/phpbb/trunk@6841 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-05 11:21:09 +00:00
Meik Sievertsen
e86c24a419 forgot to add true to the var_export function. :(
git-svn-id: file:///svn/phpbb/trunk@6840 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-05 09:30:46 +00:00
Meik Sievertsen
3a8c3971da - use var_export instead of our format_array function [Bug #6748]
- fix dumb error in column naming [Bug #6750]
- Make sure to catch some special conditions for cpf translation as well as correctly removing/adding default values on language installation/removing [Bug #6752]


git-svn-id: file:///svn/phpbb/trunk@6839 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-04 16:07:38 +00:00
Meik Sievertsen
fbef3990e7 #6746
git-svn-id: file:///svn/phpbb/trunk@6838 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-03 21:15:06 +00:00
Meik Sievertsen
6348898fd5 fix for bug #6742
git-svn-id: file:///svn/phpbb/trunk@6837 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-03 21:09:29 +00:00
Dominik Dröscher
2851b9ea80 #6712
- Posts in search results with empty subjects get a Jump to post message


git-svn-id: file:///svn/phpbb/trunk@6836 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-03 20:10:53 +00:00
Dominik Dröscher
826a045ddd #6120
- Making overall_header nicer for text-browsers


git-svn-id: file:///svn/phpbb/trunk@6835 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-03 19:43:21 +00:00
Dominik Dröscher
30c2aca53e #6214
git-svn-id: file:///svn/phpbb/trunk@6834 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-03 19:38:12 +00:00
Dominik Dröscher
a512cc0f2e #6282
- more logical tabindex


git-svn-id: file:///svn/phpbb/trunk@6833 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-03 19:30:30 +00:00
Nils Adermann
17a27175fd - allow login with redirect parameter
- altered URL regular expression so it won't cause problem with long URLs - PCRE >:( [Bug #6720]
- moderator list on index should have coloured groups in bold as everywhere else too
- correctly handle password requirements in UCP [Bug #6692]
- added soft-hyphen to utf8_clean_string(), if you know any more evil characters (or whitespace characters that are not in ASCII range) then tell me about them (bug report) ;-)


git-svn-id: file:///svn/phpbb/trunk@6832 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-03 18:58:19 +00:00
Meik Sievertsen
732ad23cd7 - removed download mode selection (the column info and constants will not be removed, we or others may be able to re-use them later on)
- removing extension from physical filename for uploaded attachments (as has been suggested some time ago from our community), can still be used by using the new 'unique_ext' mode on file cleaning
- fixed a bug with copying attachments if copying a topic
- made sure no attachment files get removed used at another location
- changed media player "embed" code. For some this may result in no auto-resizing - though a download link has been added.


git-svn-id: file:///svn/phpbb/trunk@6831 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-03 16:38:25 +00:00
Dominik Dröscher
1ca8081635 #6620
git-svn-id: file:///svn/phpbb/trunk@6830 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-02 16:51:09 +00:00
Meik Sievertsen
46c9da77a4 - do not allow setting the parent to currently assigned childs [Bug #6708]
- Allow the display_on_index setting to be specified for link forums [Bug #6660]
- Rank code in functions_display.php [Bug #6656]
- Added some new locations for the viewonline page [Related to bug #6484]
- Do not display attached images inline if user disabled image display in posts; the same with flash files [Bug #6226]


git-svn-id: file:///svn/phpbb/trunk@6829 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-02 16:35:48 +00:00
David M
1c32dcaeb1 meh
git-svn-id: file:///svn/phpbb/trunk@6828 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-01 19:01:24 +00:00
Meik Sievertsen
595bed3354 fix typo
git-svn-id: file:///svn/phpbb/trunk@6827 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-01-01 12:56:14 +00:00
Meik Sievertsen
46f3bd40a8 - telling the admin for what the board contact and board email addresses are used for and also making sure this explanation is correct ;)
- fixes for bugs #6694, #6664 and #6662


git-svn-id: file:///svn/phpbb/trunk@6826 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-31 16:56:15 +00:00
Jonathan Stanley
54f79e200f #6666 - Diablo-Bertiezilla shall be vanquished!
git-svn-id: file:///svn/phpbb/trunk@6825 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-29 20:14:05 +00:00
David M
ca7f397cd4 - added GB2312 support, made things nicer :D
git-svn-id: file:///svn/phpbb/trunk@6824 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-29 07:12:47 +00:00
David M
8914025c39 #6646
git-svn-id: file:///svn/phpbb/trunk@6823 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-28 20:46:15 +00:00
Jonathan Stanley
2dfbf0da8e #6566
Switched the link to Google, dhn would be happy. :P phpBB.com hasn't allowed hotlinking in ages anyway... so it wouldn't have worked even if the link to the image was correct. :D


git-svn-id: file:///svn/phpbb/trunk@6822 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-28 20:26:22 +00:00
David M
7ed8dda36d hah! finally :D
git-svn-id: file:///svn/phpbb/trunk@6821 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-28 18:59:47 +00:00
Jonathan Stanley
0af60d92cc Farewell Asterix the Gaul. :P
#6616


git-svn-id: file:///svn/phpbb/trunk@6820 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-28 18:28:09 +00:00
Meik Sievertsen
cbb50049a5 - add return links to approve details [#6252]
- lets decide on input field or textarea based on the entry length in language pack management [#6280]


git-svn-id: file:///svn/phpbb/trunk@6819 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-28 17:28:28 +00:00
Meik Sievertsen
d6ef968a67 - made sure ranks are displayed correctly (used RANK instead of RANK_TITLE)
- #6630
- hide a few links from bots (forum/topic marking, memberlist, post/reply/quote/edit/etc. buttons) [#6354]
- #5698


git-svn-id: file:///svn/phpbb/trunk@6818 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-28 16:21:17 +00:00
David M
69ef685cde #6642
git-svn-id: file:///svn/phpbb/trunk@6817 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-28 14:27:19 +00:00
Meik Sievertsen
945afbc5fa Unused Code inside function update_forum_data [Bug #6606]
Copy permissions protection for groups [Bug #6594]
HTML issues in ACP [Bug #6580, #6578]
Always send the correct encoding [related to bug #6576]
Mass email fixes for first loop iteration [Bug #6570]
Extension groups to be allowed in PM's and/or Posts [Bug #6558]
Extension allowance checking clarified (no longer using forum id 0 for private messaging)
Using request_var() array method for some variables [Bug #6556]
Added confirmation for deletion of ranks/smilies/icons/word censores [Bug #6548, #6530, #6512, #6466]
Only show postable forums in dropdown list for moving posts on forum deletion as well as correct re-indexing [Bug #6510, #6476, #6384]
Jabber password being password field in jabber settings screen [Bug #6478]
user activity language variable if viewing not own profile [Bug #6432]
Show moderator group/user-name colour [Bug #6402]
Log rank creation/updating/removing [Bug #6398]
Update check permission changed from a_ to a_board [Bug #6392]


git-svn-id: file:///svn/phpbb/trunk@6816 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-27 17:43:55 +00:00
David M
b9da985180 #6600
git-svn-id: file:///svn/phpbb/trunk@6815 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-27 16:51:56 +00:00
Nils Adermann
b41365fcd4 - display search type as page title for premade searches [Bug #6508]
- flash enabled on user side by default, so that admins can actually change anything by activating it (still disabled by default)
- properly implemented password complexity check [Bug #6584]
- do not ldap_escape paramaters for the bind function [Bug #6208]
- deleted words in edited post subjects weren't getting there search cache refreshed [Bug #6288]
- made common word threshold configurable [Bug #6168]
- recreated word match table entries after installation, side effect of bug #6060
- option to only allow ASCII usernames
- adjusted search page pagination [Bug #6424]
- correctly calculate unformatted search result extract length


git-svn-id: file:///svn/phpbb/trunk@6814 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-27 00:06:39 +00:00
David M
677dc5d2e1 #6598
- should have fixed all uses of curly braces


git-svn-id: file:///svn/phpbb/trunk@6813 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-26 20:49:20 +00:00
David M
1d8e391d19 #6596
git-svn-id: file:///svn/phpbb/trunk@6812 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-26 13:56:50 +00:00
Jonathan Stanley
5225e5da5c FACKing BBCode FAQ. [attachment=] forever! :P Ho-ho-ho.
#6568


git-svn-id: file:///svn/phpbb/trunk@6811 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-25 17:48:25 +00:00
Jonathan Stanley
8135652345 #6564
git-svn-id: file:///svn/phpbb/trunk@6810 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-25 17:36:08 +00:00
Jonathan Stanley
0ea0a361ae Possessed about possessives... and re-titlecasing an ACP title. Ho-ho-ho.
git-svn-id: file:///svn/phpbb/trunk@6809 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-25 17:07:52 +00:00
Meik Sievertsen
fcc22ef2b0 show dropdown box for choosing the forum in user management screen -> permissions
git-svn-id: file:///svn/phpbb/trunk@6808 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-25 15:19:45 +00:00
David M
c428ca8f23 #6472
git-svn-id: file:///svn/phpbb/trunk@6807 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-24 21:05:08 +00:00
David M
fb4e1920fc #6372
git-svn-id: file:///svn/phpbb/trunk@6806 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-24 15:35:24 +00:00
David M
cbd1fb07ed sprintf
git-svn-id: file:///svn/phpbb/trunk@6805 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-24 14:34:26 +00:00
David M
f0129b6f27 #6542
git-svn-id: file:///svn/phpbb/trunk@6804 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-24 14:28:01 +00:00
Meik Sievertsen
ae1cb0316e some fixes today
- most important change is the consolidation of the display attachment functions; merging them together to have one function we need to call.


git-svn-id: file:///svn/phpbb/trunk@6803 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-24 13:11:54 +00:00
David M
9cc0b364bc #6206
git-svn-id: file:///svn/phpbb/trunk@6802 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-24 06:53:48 +00:00
David M
49b8060b0c #6504
git-svn-id: file:///svn/phpbb/trunk@6801 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-24 06:26:03 +00:00
David M
8e72037e67 #6414
git-svn-id: file:///svn/phpbb/trunk@6800 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-23 19:06:53 +00:00
David M
c4a7d13055 #6520
git-svn-id: file:///svn/phpbb/trunk@6797 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-23 18:49:38 +00:00
David M
0d502f3b07 - quite a few optimizations to the template engine. bitwise arithmatic is used to check odd/even, usage of ref to the root template variables should reduce the number of hash lookups needed, usage of refs within loops should reduce the amount of hash lookups, incrementing vars were turned from class variables to regular variables, cache now uses preincrementing variables instead of postincrementing variables, some regex were optimized/trimmed
- a bug fix somewhere in there...


git-svn-id: file:///svn/phpbb/trunk@6796 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-23 18:27:15 +00:00
Meik Sievertsen
3182317ef1 comment the version mapping more appropiatly.
git-svn-id: file:///svn/phpbb/trunk@6795 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-23 18:17:05 +00:00
David M
c0f64d360f regex man strikes again!
git-svn-id: file:///svn/phpbb/trunk@6794 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-23 17:56:50 +00:00
David M
6d0a00a446 #6492
git-svn-id: file:///svn/phpbb/trunk@6793 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-23 17:50:48 +00:00
Meik Sievertsen
9b6e76a808 *** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@6792 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-23 10:49:46 +00:00
David M
7b86f3b9a8 #6502
git-svn-id: file:///svn/phpbb/trunk@6791 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-23 02:34:18 +00:00
Jonathan Stanley
803f64c724 Bertiezilla make Bertie-smash on language files!
#6244
#6278
#6284
#6286
#6336
#6340
#6342
#6344
#6346
#6352
#6358
#6364
#6376
#6382
#6386
#6388
#6418
#6420
#6426
#6428
#6430
#6434
#6452
#6454
#6458


git-svn-id: file:///svn/phpbb/trunk@6790 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-22 22:51:33 +00:00
Meik Sievertsen
e66429cba1 only tiny change
git-svn-id: file:///svn/phpbb/trunk@6789 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-22 16:34:00 +00:00
Jonathan Stanley
7dbef7096d Bertie does the Office 2007 dance!
git-svn-id: file:///svn/phpbb/trunk@6788 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-21 16:36:39 +00:00
Meik Sievertsen
515085a2a2 - some fixes
- important bugfix for the mcp and determining allowed ids in general (if global announcements are included)


git-svn-id: file:///svn/phpbb/trunk@6787 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-21 10:37:50 +00:00
David M
2e1eef2713 #6462, not a bug unless you run a version of PHP 5 that is less than 5.0.4...
git-svn-id: file:///svn/phpbb/trunk@6786 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-21 04:50:38 +00:00
David M
d9f3aed704 #6460, thanks to ToonArmy for the patch :D
- removed pregenerated template variables from the installer


git-svn-id: file:///svn/phpbb/trunk@6785 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-21 02:07:52 +00:00
David M
9e5819ac4c #6368, thanks to ToonArmy
git-svn-id: file:///svn/phpbb/trunk@6784 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-20 22:36:06 +00:00
David M
3503830c47 #6436, thanks ToonArmy for the patch :D
git-svn-id: file:///svn/phpbb/trunk@6783 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-19 23:48:32 +00:00
David M
c32156a616 don't mind me...
git-svn-id: file:///svn/phpbb/trunk@6782 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-19 02:37:36 +00:00
Meik Sievertsen
7ca8a4a662 - Modules are not added correctly [#6370]
- Minor bug in ucp_prefs_personal.html (Opera) [#6348]
- MCP-Warnings section colspan problem in Opera [#6338]
- Loading extensions on install [#6332]
- Adjust PM rules if folder removed [#6326]
- #6318
- Coppa registration [#6306]
- Quick-Mod Topic Type Changes Fail when Topic == Global [#6228]
- added the possibility to change topic type for more than one topic (within mcp)


git-svn-id: file:///svn/phpbb/trunk@6781 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-18 17:29:39 +00:00
David M
4e5466d276 #6328
git-svn-id: file:///svn/phpbb/trunk@6780 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-17 23:21:34 +00:00
David M
c1b5a3b328 - using the PHP_VERSION constant is faster
git-svn-id: file:///svn/phpbb/trunk@6779 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-17 18:17:10 +00:00
David M
f50d52588c - we need at least 4.3.3, "phpversion() < '4.3'" will always be false
git-svn-id: file:///svn/phpbb/trunk@6778 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-17 18:06:39 +00:00
David M
e84d85d88c - Changed handling of the bitfield in bbcode.php
- #6270, reverted to an earlier version of list handling + bug fixes


git-svn-id: file:///svn/phpbb/trunk@6777 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-17 17:59:08 +00:00
David M
f4c8c73a8b - exclude the IP of the post in the "other IP's" list
git-svn-id: file:///svn/phpbb/trunk@6776 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-17 16:11:48 +00:00
Nils Adermann
1e34820cd8 - Optimize acl_getf_global a bit
- a little performance improvement of the IP regular expressions
- convert post_text/subject collation to utf8_unicode_ci if a user wants to use mysql_fulltext to allow case insensitivity [Bug #6272]
- mysql_fulltext should alter all necessary columns at once to speed up the process
- validate URLs against RFC3986
- fixed some weirdness in make_clickable
I hope I didn't break any URLs with this commit, if I did then report it to the bugtracker please!


git-svn-id: file:///svn/phpbb/trunk@6774 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-16 20:24:34 +00:00
Meik Sievertsen
6938688e75 let set_config() calls success instead of fail if the config value already exist.
git-svn-id: file:///svn/phpbb/trunk@6773 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-16 13:16:22 +00:00
Meik Sievertsen
204187187d fix for bug #6140 (jabber not working)
git-svn-id: file:///svn/phpbb/trunk@6771 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-16 12:57:01 +00:00
Meik Sievertsen
2e4cd16058 - fixed bug within the database update script
- #6254
- #6242
- #6184
- #6160
- #6020


git-svn-id: file:///svn/phpbb/trunk@6770 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-15 14:54:52 +00:00
David M
11e70be6ed - remove some of my mess :P
git-svn-id: file:///svn/phpbb/trunk@6769 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-15 03:11:34 +00:00
David M
522d52efe4 - nobody found this bug :D
git-svn-id: file:///svn/phpbb/trunk@6768 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-15 03:06:57 +00:00
David M
c3a2557108 FALSE -> false
TRUE -> true


git-svn-id: file:///svn/phpbb/trunk@6767 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-15 02:45:42 +00:00
David M
35ac391fe3 count -> sizeof
git-svn-id: file:///svn/phpbb/trunk@6766 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-15 02:41:43 +00:00
David M
950d67d60e elseif -> else if
git-svn-id: file:///svn/phpbb/trunk@6765 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-15 02:38:14 +00:00
David M
837fcd1295 #6264
git-svn-id: file:///svn/phpbb/trunk@6764 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-14 20:36:07 +00:00
Jonathan Stanley
62763d3f3d Speeling... ;)
git-svn-id: file:///svn/phpbb/trunk@6763 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-14 18:18:45 +00:00
Meik Sievertsen
18ae2e2ff9 two changes related to the convertor
git-svn-id: file:///svn/phpbb/trunk@6762 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-14 17:54:44 +00:00
David M
6adbaea175 #5242
- forgot to *show* the change!


git-svn-id: file:///svn/phpbb/trunk@6761 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-14 03:21:24 +00:00
Jonathan Stanley
31d0f9328c #6218
git-svn-id: file:///svn/phpbb/trunk@6760 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-13 22:36:01 +00:00
Jonathan Stanley
834cc6a5fe #6212 - Oooh Bertie, spank me with that casing stick, spank me spank me spaaaaannnnk mee!
git-svn-id: file:///svn/phpbb/trunk@6759 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-13 22:32:02 +00:00
Jonathan Stanley
dfd189dbd2 #6084
git-svn-id: file:///svn/phpbb/trunk@6758 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-13 22:16:37 +00:00
Jonathan Stanley
586cd68ac1 #5984
git-svn-id: file:///svn/phpbb/trunk@6757 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-13 22:08:21 +00:00
Jonathan Stanley
0d94eb2daf #5946
git-svn-id: file:///svn/phpbb/trunk@6756 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-13 22:04:02 +00:00
Jonathan Stanley
9ae7da3fa5 #5942
git-svn-id: file:///svn/phpbb/trunk@6755 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-13 21:57:15 +00:00
Jonathan Stanley
7b1b55bc1a #5846
git-svn-id: file:///svn/phpbb/trunk@6754 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-13 21:32:26 +00:00
Jonathan Stanley
37de46aede #5708
git-svn-id: file:///svn/phpbb/trunk@6753 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-13 21:18:41 +00:00
David M
a2e512b218 #6192
- i wanted to do this using streams but found myself unable to do so. if one could figure out how to do so, i would like to find out :D


git-svn-id: file:///svn/phpbb/trunk@6752 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-13 00:56:56 +00:00
Jonathan Stanley
515993f5ae Begone hardcoded ellipsis of the secret template! Putting into language file so that it is i18n/L10n-able...
git-svn-id: file:///svn/phpbb/trunk@6751 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-12 17:53:13 +00:00
Meik Sievertsen
6875bd59b4 until nils comes to inspecting this further we will use this "workaround"
git-svn-id: file:///svn/phpbb/trunk@6750 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-12 09:55:15 +00:00
David M
f2bdbcfecd #6158
git-svn-id: file:///svn/phpbb/trunk@6748 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-11 20:13:33 +00:00
David M
9164895301 #6164
git-svn-id: file:///svn/phpbb/trunk@6747 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-11 20:07:57 +00:00
Nils Adermann
96858686ff Haha, slowly it's starting to look stupid ...
git-svn-id: file:///svn/phpbb/trunk@6746 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-10 21:33:01 +00:00
Nils Adermann
f8aa743b5f I'm very oblivious today :@
git-svn-id: file:///svn/phpbb/trunk@6745 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-10 21:31:35 +00:00
Nils Adermann
81832ca645 I'm a little oblivious today ;-)
git-svn-id: file:///svn/phpbb/trunk@6744 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-10 20:13:46 +00:00
David M
9b03d2a67e blah
git-svn-id: file:///svn/phpbb/trunk@6743 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-10 18:23:49 +00:00
David M
7eff1949ca #5242
git-svn-id: file:///svn/phpbb/trunk@6742 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-10 18:14:47 +00:00
Meik Sievertsen
c02215f7cc add the added config vars
git-svn-id: file:///svn/phpbb/trunk@6741 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-10 18:06:27 +00:00
Nils Adermann
f40e2aba22 - finally correctly calculate current time for birthday calculation [Bug #6030]
- allow searching forums with unsearchable subforums [Bug #6056]
- addition of an optional HTTP_X_FORWARDED_FOR check in sessions, including bans
- do not index forums which have indexing disabled on index recreation [Bug #6060]
- properly handle html entities in the theme editor [Bug #6048]
- anonymous access is no longer required for the LDAP auth plugin [Bug #6046]
- corrected mcp_front queue link to point to approve_details [Bug #6134]
- added direct (dis)approval to mcp_front queue items [Bug #6134]
- proper mysql version test for fulltext-compatibility [Bug #6054]
- added note to style/language "used by" column so it's clear that bots are included
- correctly update bot last visit time [Bug #6108]


git-svn-id: file:///svn/phpbb/trunk@6740 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-10 17:44:45 +00:00
Meik Sievertsen
7e47135792 - #6144
- #6132
- #6122


git-svn-id: file:///svn/phpbb/trunk@6739 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-10 15:52:31 +00:00
Meik Sievertsen
564e6782f0 - #6110
- #6102
- #6096


git-svn-id: file:///svn/phpbb/trunk@6738 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-10 15:09:31 +00:00
Meik Sievertsen
e274c6abc6 #6094
git-svn-id: file:///svn/phpbb/trunk@6737 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-10 14:43:59 +00:00
Meik Sievertsen
4e2d04dd4a implemented updater changes
git-svn-id: file:///svn/phpbb/trunk@6736 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-10 14:33:21 +00:00
David M
94476d05e0 #6090
- some cool regex stuff (one of them looks kinda weird :\ ...)


git-svn-id: file:///svn/phpbb/trunk@6735 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-10 01:19:54 +00:00
David M
b72caf0be4 - tiny bit of sunshine :D
git-svn-id: file:///svn/phpbb/trunk@6734 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-09 23:52:40 +00:00
David M
bf2a0e7eb2 #6130
git-svn-id: file:///svn/phpbb/trunk@6733 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-09 22:47:50 +00:00
David M
90457c7f8c #6118
git-svn-id: file:///svn/phpbb/trunk@6732 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-09 20:05:12 +00:00
David M
9df6b75f32 proper solution to #6114, guarantees $seed lies below 0x7FFFFFFF
git-svn-id: file:///svn/phpbb/trunk@6731 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-09 19:17:01 +00:00
Meik Sievertsen
1c41450bd9 - re-add script_path for "strange configurations" to let them force the generated urls correctly
- show rank title if no rank image present in memberlist
- other fixes.


git-svn-id: file:///svn/phpbb/trunk@6730 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-08 15:20:57 +00:00
David M
4519c51066 #6076
- removed unused junk from functions.php


git-svn-id: file:///svn/phpbb/trunk@6729 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-08 00:08:46 +00:00
Dominik Dröscher
dddffa2347 Blah, so obvious
git-svn-id: file:///svn/phpbb/trunk@6728 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-07 17:35:26 +00:00
Dominik Dröscher
ac5b7a578f oopsie
git-svn-id: file:///svn/phpbb/trunk@6727 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-07 17:11:37 +00:00
Dominik Dröscher
3886559e83 #5822 Thanks to TerraFrost for this fix! :)
git-svn-id: file:///svn/phpbb/trunk@6726 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-07 17:05:52 +00:00
Dominik Dröscher
7f3114364d I really hate embed, but I guess there is no way around it apart from dirty object hacks. Please note that this might break everything below Media Player 7, but as we are at 11 now, this should be fine.
#5744


git-svn-id: file:///svn/phpbb/trunk@6725 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-07 16:55:50 +00:00
Meik Sievertsen
277910a016 #6024
git-svn-id: file:///svn/phpbb/trunk@6724 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-07 15:11:28 +00:00
Dominik Dröscher
7428cdfd85 Do not display the "You have reached your blah blah folder limit" when the administrator has set the limit to 0. Existing folders that were created before the limit was set to 0 can still be edited. This only affects the "Add folder" section.
git-svn-id: file:///svn/phpbb/trunk@6723 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-07 12:40:55 +00:00
Dominik Dröscher
c848979cdd No need to show the current messages / total messages data when unlimited private messages are allowed.
git-svn-id: file:///svn/phpbb/trunk@6722 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-07 11:58:50 +00:00
David M
c6c994eaef - removed a regex that made no sense
git-svn-id: file:///svn/phpbb/trunk@6721 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-07 02:52:09 +00:00
David M
d76c4d54a1 - do data validation via is_int instead of preg_match, ctype has bugs so it can't be trusted
git-svn-id: file:///svn/phpbb/trunk@6720 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-07 02:30:33 +00:00
Meik Sievertsen
b508c57b80 minor bugfixing
git-svn-id: file:///svn/phpbb/trunk@6719 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-06 22:13:11 +00:00
Dominik Dröscher
a9b2e99974 Custom BBCodes? Never heard of 'em.
git-svn-id: file:///svn/phpbb/trunk@6718 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-06 18:30:33 +00:00
Dominik Dröscher
6e7c29adfb What the? Did Paul try to sneak in a new feature without our knowledge a few years back. O_o #5788
git-svn-id: file:///svn/phpbb/trunk@6717 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-06 18:23:42 +00:00
Dominik Dröscher
ef6f81a64d #5938
git-svn-id: file:///svn/phpbb/trunk@6716 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-06 18:13:36 +00:00
Meik Sievertsen
676fd08c47 changes to how errors are processed by the messenger
git-svn-id: file:///svn/phpbb/trunk@6715 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-06 17:35:04 +00:00
Meik Sievertsen
daeef71d81 some updater changes as well as tiny bugfixes
git-svn-id: file:///svn/phpbb/trunk@6714 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-06 15:47:50 +00:00
Dominik Dröscher
cb505ce4b0 what
git-svn-id: file:///svn/phpbb/trunk@6713 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-06 14:44:40 +00:00
David M
5766035741 #6000
git-svn-id: file:///svn/phpbb/trunk@6712 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-05 20:24:28 +00:00
David M
fae4e2bd96 oops :D
git-svn-id: file:///svn/phpbb/trunk@6711 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-05 20:06:58 +00:00
David M
f43a46fcf4 #6010
git-svn-id: file:///svn/phpbb/trunk@6710 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-04 21:55:34 +00:00
David M
1a5791e19f #6010
git-svn-id: file:///svn/phpbb/trunk@6709 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-04 21:52:55 +00:00
Nils Adermann
9d9624a886 - author search should use clean names for searching [Bug #5752]
- local moderators are moderators too!
- don't show a "word is not contained in any post" message for ignored common words
- bold search words in search error messages [Bug #5762]


git-svn-id: file:///svn/phpbb/trunk@6708 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-03 18:03:33 +00:00
David M
3d38552c69 blah
git-svn-id: file:///svn/phpbb/trunk@6707 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-03 17:48:00 +00:00
David M
83443a362d none of you saw that! at least, not for this version :P
git-svn-id: file:///svn/phpbb/trunk@6706 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-03 17:40:28 +00:00
David M
ec80eb74aa #5734
- replaced array_rand($array) with mt_rand(0, sizeof($array) - 1) as array_rand did not take my seed


git-svn-id: file:///svn/phpbb/trunk@6705 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-03 17:36:59 +00:00
David M
1f7224c601 only works if you do it _before_ the connect :P
git-svn-id: file:///svn/phpbb/trunk@6704 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-03 16:43:18 +00:00
David M
d63ccbe8ac - FreeTDS builds lets you specify a character set encoding, lets take advantage of that
git-svn-id: file:///svn/phpbb/trunk@6703 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-03 16:33:32 +00:00
Meik Sievertsen
2b4525ae97 some tiny bugfixes.
git-svn-id: file:///svn/phpbb/trunk@6702 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-03 16:12:03 +00:00
David M
e08317eb71 - pretty serious speed improvement for strtoupper/strtolower
- mbstring envrio checks
#5774


git-svn-id: file:///svn/phpbb/trunk@6701 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-02 18:16:25 +00:00
David M
7a79c74288 by the power of math!
git-svn-id: file:///svn/phpbb/trunk@6700 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-02 16:52:17 +00:00
Meik Sievertsen
fbe0c22293 fix
git-svn-id: file:///svn/phpbb/trunk@6699 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-02 13:43:21 +00:00
Meik Sievertsen
7ad986c37e - a bunch of fixes
- added todos to the updater to make sure i do not forget. :)


git-svn-id: file:///svn/phpbb/trunk@6698 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-02 13:19:40 +00:00
Jonathan Stanley
de1c536548 Titlecase be gone! Suprised John Hjorth hadn't picked these up as they've been bugging me for a while. ;)
git-svn-id: file:///svn/phpbb/trunk@6697 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-12-01 16:12:15 +00:00
Meik Sievertsen
5e9becda17 sorry, i can't stand this uglification. To let the added fieldsets being valid i simply reverted the previous layout by changing the css.
git-svn-id: file:///svn/phpbb/trunk@6696 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-30 15:05:51 +00:00
Meik Sievertsen
7ed41c4de1 updates for the updater and the diff engine.
- this update also includes an important change for including the diff engine, since we may need to include an updated engine before updating. This basically means that for a future update (B4 to another version) requires copying the new diff files first... the new include method should prevent this needed handwork for later versions then.


git-svn-id: file:///svn/phpbb/trunk@6695 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-29 15:51:54 +00:00
David M
d417d53c0a better regex
git-svn-id: file:///svn/phpbb/trunk@6694 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-29 01:33:14 +00:00
Dominik Dröscher
ae58794cbb Some tiny bug fixes - cannot stand seeing more than 1 page of Olympus bugs in the tracker
git-svn-id: file:///svn/phpbb/trunk@6693 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-29 00:36:40 +00:00
Meik Sievertsen
149f928963 begin working on getting this thing a bit faster. I need to finish the other calls, this commit actually will break the diff engine and the updater. The speed increase noticed is from 89 seconds to 22 seconds as well as saving a lot of memory.
git-svn-id: file:///svn/phpbb/trunk@6692 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-28 16:34:28 +00:00
David M
ff2b4e4e8f #5656
git-svn-id: file:///svn/phpbb/trunk@6691 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-28 15:01:13 +00:00
Meik Sievertsen
4f41d936e2 fix for bug #5658
git-svn-id: file:///svn/phpbb/trunk@6690 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-28 14:44:46 +00:00
Meik Sievertsen
e0a33e05bd fix for ftp update bug...
git-svn-id: file:///svn/phpbb/trunk@6689 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-28 14:31:55 +00:00
David M
6349635039 #5654
- bzopen_or_bzdopen in bzlib.c appends us our binary mode in a strcat call, we don't need it for bzopen();


git-svn-id: file:///svn/phpbb/trunk@6688 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-28 14:29:47 +00:00
David M
4308f5e8a5 #5672
git-svn-id: file:///svn/phpbb/trunk@6687 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-28 13:44:21 +00:00
Dominik Dröscher
a538fb2a9e #5678
git-svn-id: file:///svn/phpbb/trunk@6686 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-28 13:29:38 +00:00
Meik Sievertsen
38efea8d58 different time limit for installer
git-svn-id: file:///svn/phpbb/trunk@6685 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-28 12:27:20 +00:00
Meik Sievertsen
ed24dd9aeb fix for bug #5676 - of course the "delete install folder" notice should not occur if directly within installation.
git-svn-id: file:///svn/phpbb/trunk@6684 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-28 11:04:26 +00:00
Dominik Dröscher
e759598fc6 In honor of Beta4!
git-svn-id: file:///svn/phpbb/trunk@6683 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-28 09:38:31 +00:00
Dominik Dröscher
59e4c4b810 per common request
git-svn-id: file:///svn/phpbb/trunk@6682 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-28 09:34:08 +00:00
Meik Sievertsen
bb718d8406 - the same procedure as every... oh. this is taken.
- also including the first bugfix within beta4, just noticed at area51 that quicktools are not working in global announcements. :D


git-svn-id: file:///svn/phpbb/trunk@6681 89ea8834-ac86-4346-8a33-228a782c2dd0
2006-11-27 23:31:09 +00:00
299 changed files with 62969 additions and 5372 deletions

View File

@@ -150,14 +150,11 @@ function adm_page_header($page_title)
'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'])
);
));
// application/xhtml+xml not used because of IE
header('Content-type: text/html; charset=UTF-8');
if ($config['send_encoding'])
{
header('Content-type: text/html; charset=UTF-8');
}
header('Cache-Control: private, no-cache="set-cookie"');
header('Expires: 0');
header('Pragma: no-cache');
@@ -184,7 +181,7 @@ function adm_page_footer($copyright_html = true)
$db->sql_report('display');
}
$debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress']) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime);
$debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress']) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime);
if ($auth->acl_get('a_') && defined('DEBUG_EXTRA'))
{
@@ -408,6 +405,35 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
$cfg_array[$config_name] = (int) $cfg_array[$config_name];
break;
// Absolute path
case 'script_path':
if (!$cfg_array[$config_name])
{
break;
}
$destination = str_replace('\\', '/', $cfg_array[$config_name]);
if ($destination !== '/')
{
// Adjust destination path (no trailing slash)
if (substr($destination, -1, 1) == '/')
{
$destination = substr($destination, 0, -1);
}
$destination = str_replace(array('../', './'), '', $destination);
if ($destination[0] != '/')
{
$destination = '/' . $destination;
}
}
$cfg_array[$config_name] = trim($destination);
break;
// Relative path (appended $phpbb_root_path)
case 'rpath':
case 'rwpath':
@@ -419,9 +445,9 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
$destination = $cfg_array[$config_name];
// Adjust destination path (no trailing slash)
if ($destination{(sizeof($destination)-1)} == '/' || $destination{(sizeof($destination)-1)} == '\\')
if (substr($destination, -1, 1) == '/' || substr($destination, -1, 1) == '\\')
{
$destination = substr($destination, 0, sizeof($destination)-2);
$destination = substr($destination, 0, -1);
}
$destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination);

View File

@@ -2,6 +2,10 @@
<a name="maincontent"></a>
<!-- IF U_BACK -->
<a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
<!-- ENDIF -->
<h1>{L_TITLE}</h1>
<p>{L_TITLE_EXPLAIN}</p>
@@ -183,10 +187,6 @@
<dt><label for="allow_in_pm">{L_ALLOW_IN_PM}:</label></dt>
<dd><input type="checkbox" class="radio" id="allow_in_pm" name="allow_in_pm" value="1"<!-- IF ALLOW_IN_PM --> checked="checked"<!-- ENDIF --> /></dd>
</dl>
<dl>
<dt><label for="download_mode">{L_DOWNLOAD_MODE}:</label><br /><span>{L_DOWNLOAD_MODE_EXPLAIN}</span></dt>
<dd>{S_DOWNLOAD_SELECT}</dd>
</dl>
<dl>
<dt><label for="upload_icon">{L_UPLOAD_ICON}:</label></dt>
<dd><select name="upload_icon" id="upload_icon" onchange="update_image(this.options[selectedIndex].value);">
@@ -234,17 +234,18 @@
</thead>
<tbody>
<!-- BEGIN groups -->
<!-- IF groups.S_ADD_SPACER -->
<!-- IF groups.S_ADD_SPACER and not groups.S_FIRST_ROW -->
<tr>
<td class="spacer" colspan="3">&nbsp;</td>
</tr>
<!-- ENDIF -->
<tr>
<td><a href="{groups.U_EDIT}">{groups.GROUP_NAME}</a>
<td><strong>{groups.GROUP_NAME}</strong>
<!-- IF groups.S_GROUP_ALLOWED and not groups.S_ALLOWED_IN_PM --><br /><span>&raquo; {L_NOT_ALLOWED_IN_PM}</span><!-- ENDIF -->
<!-- IF groups.S_ALLOWED_IN_PM and not groups.S_GROUP_ALLOWED --><br /><span>&raquo; {L_ONLY_ALLOWED_IN_PM}</span><!-- ENDIF -->
</td>
<td>{groups.CATEGORY}</td>
<td align="center" valign="middle" style="white-space: nowrap;">&nbsp;<a href="{groups.U_EDIT}">{L_EDIT}</a> | <a href="{groups.U_DELETE}">{L_DELETE}</a> | <a href="{groups.U_ACT_DEACT}">{groups.L_ACT_DEACT}</a>&nbsp;</td>
<td align="center" valign="middle" style="white-space: nowrap;">&nbsp;<a href="{groups.U_EDIT}">{ICON_EDIT}</a>&nbsp;&nbsp;<a href="{groups.U_DELETE}">{ICON_DELETE}</a>&nbsp;</td>
</tr>
<!-- END groups -->
</tbody>
@@ -323,7 +324,7 @@
<form id="orphan" method="post" action="{U_ACTION}">
<fieldset>
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
<table cellspacing="1">

View File

@@ -51,7 +51,7 @@
<dl>
<dt><label for="banlength">{L_BAN_LENGTH}:</label></dt>
<dd><select name="banlength" id="banlength">{S_BAN_END_OPTIONS}</select></dd>
<dd><input type="text" name="banlengthother" /> (YYYY-MM-DD)</dd>
<dd><input type="text" name="banlengthother" maxlength="10" /> (YYYY-MM-DD)</dd>
</dl>
<dl>
<dt><label for="banexclude">{L_BAN_EXCLUDE}:</label><br /><span>{L_BAN_EXCLUDE_EXPLAIN}</span></dt>
@@ -59,11 +59,11 @@
</dl>
<dl>
<dt><label for="banreason">{L_BAN_REASON}:</label></dt>
<dd><input name="banreason" type="text" id="banreason" class="medium" /></dd>
<dd><input name="banreason" type="text" id="banreason" class="medium" maxlength="3000" /></dd>
</dl>
<dl>
<dt><label for="bangivereason">{L_BAN_GIVE_REASON}:</label></dt>
<dd><input name="bangivereason" type="text" id="bangivereason" class="medium" /></dd>
<dd><input name="bangivereason" type="text" id="bangivereason" class="medium" maxlength="3000" /></dd>
</dl>
<p class="submit-buttons">

View File

@@ -23,7 +23,7 @@
<legend>{L_TITLE}</legend>
<dl>
<dt><label for="bot_name">{L_BOT_NAME}:</label><br /><span>{L_BOT_NAME_EXPLAIN}</span></dt>
<dd><input name="bot_name" type="text" id="bot_name" value="{BOT_NAME}" /></dd>
<dd><input name="bot_name" type="text" id="bot_name" value="{BOT_NAME}" maxlength="255" /></dd>
</dl>
<dl>
<dt><label for="bot_style">{L_BOT_STYLE}:</label><br /><span>{L_BOT_STYLE_EXPLAIN}</span></dt>
@@ -39,11 +39,11 @@
</dl>
<dl>
<dt><label for="bot_agent">{L_BOT_AGENT}:</label><br /><span>{L_BOT_AGENT_EXPLAIN}</span></dt>
<dd><input name="bot_agent" type="text" id="bot_agent" value="{BOT_AGENT}" /></dd>
<dd><input name="bot_agent" type="text" id="bot_agent" value="{BOT_AGENT}" maxlength="255" /></dd>
</dl>
<dl>
<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>
<dd><input name="bot_ip" type="text" id="bot_ip" value="{BOT_IP}" maxlength="255" /></dd>
</dl>
<p class="submit-buttons">

View File

@@ -29,10 +29,11 @@
</dl>
<!-- ENDIF -->
<p class="submit-buttons">
</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}" />
</p>
</fieldset>
</form>

View File

@@ -12,11 +12,11 @@
<fieldset>
<legend>{L_RESTORE_OPTIONS}</legend>
<dl>
<dt><label for="user">{L_SELECT_FILE}:</label></dt>
<dt><label for="file">{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>
<!-- IF EXISTS -->
<!-- IF .files -->
<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;
@@ -53,26 +53,27 @@
<fieldset>
<legend>{L_BACKUP_OPTIONS}</legend>
<dl>
<dt><label for="user">{L_BACKUP_TYPE}:</label></dt>
<dd><input type="radio" class="radio" name="type" value="full" id="type" checked="checked" />&nbsp;{L_FULL_BACKUP}&nbsp;&nbsp;<input type="radio" name="type" class="radio" value="structure" id="type" />&nbsp;{L_STRUCTURE_ONLY}&nbsp;&nbsp;<input type="radio" class="radio" name="type" value="data" id="type" />&nbsp;{L_DATA_ONLY}</dd>
<dt><label for="type">{L_BACKUP_TYPE}:</label></dt>
<dd><input type="radio" class="radio" name="type" value="full" id="type" checked="checked" />&nbsp;{L_FULL_BACKUP}&nbsp;&nbsp;<input type="radio" name="type" class="radio" value="structure" />&nbsp;{L_STRUCTURE_ONLY}&nbsp;&nbsp;<input type="radio" class="radio" name="type" value="data" />&nbsp;{L_DATA_ONLY}</dd>
</dl>
<dl>
<dt><label for="user">{L_FILE_TYPE}:</label></dt>
<dt><label for="method">{L_FILE_TYPE}:</label></dt>
<dd><!-- BEGIN methods -->
<input name="method" id="method" type="radio" class="radio" value="{methods.TYPE}"<!-- IF methods.S_FIRST_ROW -->checked="checked"<!-- ENDIF --> />&nbsp;{methods.TYPE}
<input name="method"<!-- IF methods.S_FIRST_ROW --> id="method" checked="checked"<!-- ENDIF --> type="radio" class="radio" value="{methods.TYPE}" />&nbsp;{methods.TYPE}
<!-- END methods --></dd>
</dl>
<dl>
<dt><label for="user">{L_ACTION}:</label></dt>
<dd><input type="radio" class="radio" name="where" value="store_and_download" id="where" checked="checked" />&nbsp;{L_STORE_AND_DOWNLOAD}&nbsp;&nbsp;<input type="radio" class="radio" name="where" value="store" id="where" />&nbsp;{L_STORE_LOCAL}&nbsp;&nbsp;<input type="radio" class="radio" name="where" value="download" id="where" />&nbsp;{L_DOWNLOAD}</dd>
<dt><label for="where">{L_ACTION}:</label></dt>
<dd><input type="radio" class="radio" name="where" value="store_and_download" id="where" checked="checked" />&nbsp;{L_STORE_AND_DOWNLOAD}&nbsp;&nbsp;<input type="radio" class="radio" name="where" value="store" />&nbsp;{L_STORE_LOCAL}&nbsp;&nbsp;<input type="radio" class="radio" name="where" value="download" />&nbsp;{L_DOWNLOAD}</dd>
</dl>
<dl>
<dt><label for="user">{L_TABLE_SELECT}:</label></dt>
<dd><select id="table" name="table[]" size="10" multiple="true">
<dt><label for="table">{L_TABLE_SELECT}:</label></dt>
<dd><select id="table" name="table[]" size="10" multiple="multiple">
<!-- BEGIN tables -->
<option value="{tables.TABLE}">{tables.TABLE}</option>
<!-- 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>
</select></dd>
<dd><a href="#" onclick="selector(true)">{L_SELECT_ALL}</a> :: <a href="#" onclick="selector(false)">{L_DESELECT_ALL}</a></dd>
</dl>
<p class="submit-buttons">

View File

@@ -12,7 +12,7 @@
<legend>{L_ADD_DISALLOW_TITLE}</legend>
<dl>
<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>
<dd><input id="user" type="text" name="disallowed_user" class="medium" maxlength="255" /></dd>
</dl>
<p class="quick">

View File

@@ -39,8 +39,8 @@
<dd><select id="priority" name="mail_priority_flag">{S_PRIORITY_OPTIONS}</select></dd>
</dl>
<dl>
<dt><label for="send">{L_SEND_IMMEDIATLY}:</label></dt>
<dd><input id="send" type="checkbox" class="radio" name="send_immediatly" checked="checked" /></dd>
<dt><label for="send">{L_SEND_IMMEDIATELY}:</label></dt>
<dd><input id="send" type="checkbox" class="radio" name="send_immediately" checked="checked" /></dd>
</dl>
<p class="submit-buttons">

View File

@@ -143,23 +143,23 @@
</dl>
<dl>
<dt><label for="forum_name">{L_FORUM_NAME}:</label></dt>
<dd><input class="medium" type="text" id="forum_name" name="forum_name" value="{FORUM_NAME}" /></dd>
<dd><input class="medium" type="text" id="forum_name" name="forum_name" value="{FORUM_NAME}" maxlength="255" /></dd>
</dl>
<dl>
<dt><label for="forum_desc">{L_FORUM_DESC}:</label><br /><span>{L_FORUM_DESC_EXPLAIN}</span></dt>
<dd><textarea id="forum_desc" name="forum_desc" rows="5" cols="45">{FORUM_DESC}</textarea></dd>
<dd><textarea id="forum_desc" name="forum_desc" rows="5" cols="45" maxlength="255">{FORUM_DESC}</textarea></dd>
<dd><input type="checkbox" class="radio" name="desc_parse_bbcode"<!-- IF S_DESC_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE} &nbsp; <input type="checkbox" class="radio" name="desc_parse_smilies"<!-- IF S_DESC_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES} &nbsp; <input type="checkbox" class="radio" name="desc_parse_urls"<!-- IF S_DESC_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}</dd>
</dl>
<dl>
<dt><label for="forum_image">{L_FORUM_IMAGE}:</label><br /><span>{L_FORUM_IMAGE_EXPLAIN}</span></dt>
<dd><input class="medium" type="text" id="forum_image" name="forum_image" value="{FORUM_IMAGE}" /></dd>
<dd><input class="medium" type="text" id="forum_image" name="forum_image" value="{FORUM_IMAGE}" maxlength="255" /></dd>
<!-- IF FORUM_IMAGE_SRC -->
<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>
<dd><input type="password" id="forum_password" name="forum_password" value="{FORUM_PASSWORD}" maxlength="40" /></dd>
</dl>
<dl>
<dt><label for="forum_password_confirm">{L_FORUM_PASSWORD_CONFIRM}:</label><br /><span>{L_FORUM_PASSWORD_CONFIRM_EXPLAIN}</span></dt>
@@ -192,12 +192,10 @@
<dt><label for="forum_status">{L_FORUM_STATUS}:</label></dt>
<dd><select id="forum_status" name="forum_status">{S_STATUS_OPTIONS}</select></dd>
</dl>
<!-- IF S_SHOW_DISPLAY_ON_INDEX -->
<dl>
<dt><label for="display_on_index">{L_LIST_INDEX}:</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
<dd><input type="radio" class="radio" name="display_on_index" value="1"<!-- IF S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" class="radio" name="display_on_index" value="0"<!-- IF not S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
</dl>
<!-- ENDIF -->
<dl>
<dt><label for="enable_post_review">{L_ENABLE_POST_REVIEW}:</label><br /><span>{L_ENABLE_POST_REVIEW_EXPLAIN}</span></dt>
<dd><input type="radio" class="radio" name="enable_post_review" value="1"<!-- IF S_ENABLE_POST_REVIEW --> id="enable_post_review" checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" class="radio" name="enable_post_review" value="0"<!-- IF not S_ENABLE_POST_REVIEW --> id="enable_post_review" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
@@ -216,7 +214,7 @@
</dl>
<dl>
<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>
<dd><input type="text" id="topics_per_page" name="topics_per_page" value="{TOPICS_PER_PAGE}" size="4" maxlength="4" /></dd>
</dl>
</fieldset>
@@ -228,15 +226,15 @@
</dl>
<dl>
<dt><label for="prune_freq">{L_AUTO_PRUNE_FREQ}:</label><br /><span>{L_AUTO_PRUNE_FREQ_EXPLAIN}</span></dt>
<dd><input type="text" id="prune_freq" name="prune_freq" value="{PRUNE_FREQ}" /> {L_DAYS}</dd>
<dd><input type="text" id="prune_freq" name="prune_freq" value="{PRUNE_FREQ}" maxlength="4" size="4" /> {L_DAYS}</dd>
</dl>
<dl>
<dt><label for="prune_days">{L_AUTO_PRUNE_DAYS}:</label><br /><span>{L_AUTO_PRUNE_DAYS_EXPLAIN}</span></dt>
<dd><input type="text" id="prune_days" name="prune_days" value="{PRUNE_DAYS}" /> {L_DAYS}</dd>
<dd><input type="text" id="prune_days" name="prune_days" value="{PRUNE_DAYS}" maxlength="4" size="4" /> {L_DAYS}</dd>
</dl>
<dl>
<dt><label for="prune_viewed">{L_AUTO_PRUNE_VIEWED}:</label><br /><span>{L_AUTO_PRUNE_VIEWED_EXPLAIN}</span></dt>
<dd><input type="text" id="prune_viewed" name="prune_viewed" value="{PRUNE_VIEWED}" /> {L_DAYS}</dd>
<dd><input type="text" id="prune_viewed" name="prune_viewed" value="{PRUNE_VIEWED}" maxlength="4" size="4" /> {L_DAYS}</dd>
</dl>
<dl>
<dt><label for="prune_old_polls">{L_PRUNE_OLD_POLLS}:</label><br /><span>{L_PRUNE_OLD_POLLS_EXPLAIN}</span></dt>
@@ -256,9 +254,13 @@
<div id="forum_link_options">
<fieldset>
<legend>{L_GENERAL_FORUM_SETTINGS}</legend>
<dl>
<dt><label for="link_display_on_index">{L_LIST_INDEX}:</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
<dd><input type="radio" class="radio" name="link_display_on_index" value="1"<!-- IF S_DISPLAY_ON_INDEX --> id="link_display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" class="radio" name="link_display_on_index" value="0"<!-- IF not S_DISPLAY_ON_INDEX --> id="link_display_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
</dl>
<dl>
<dt><label for="forum_link">{L_FORUM_LINK}:</label><br /><span>{L_FORUM_LINK_EXPLAIN}</span></dt>
<dd><input class="medium" type="text" id="forum_link" name="forum_link" value="{FORUM_DATA_LINK}" /></dd>
<dd><input class="medium" type="text" id="forum_link" name="forum_link" value="{FORUM_DATA_LINK}" maxlength="255" /></dd>
</dl>
<dl>
<dt><label for="forum_link_track">{L_FORUM_LINK_TRACK}:</label><br /><span>{L_FORUM_LINK_TRACK_EXPLAIN}</span></dt>
@@ -272,7 +274,7 @@
<legend>{L_FORUM_RULES}</legend>
<dl>
<dt><label for="forum_rules_link">{L_FORUM_RULES_LINK}:</label><br /><span>{L_FORUM_RULES_LINK_EXPLAIN}</span></dt>
<dd><input class="medium" type="text" id="forum_rules_link" name="forum_rules_link" value="{FORUM_RULES_LINK}" /></dd>
<dd><input class="medium" type="text" id="forum_rules_link" name="forum_rules_link" value="{FORUM_RULES_LINK}" maxlength="255" /></dd>
</dl>
<!-- IF FORUM_RULES_PREVIEW -->
<dl>
@@ -461,7 +463,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="" maxlength="255" />
<input class="button2" name="addforum" type="submit" value="{L_CREATE_FORUM}" />
</fieldset>

View File

@@ -44,7 +44,7 @@
<input name="group_type" type="hidden" value="{GROUP_TYPE_SPECIAL}" />
<!-- ENDIF -->
<!-- IF S_ADD_GROUP -->
<!-- IF S_ADD_GROUP and S_GROUP_PERM -->
<dl>
<dt><label for="group_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
<dd><select id="group_perm_from" name="group_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_GROUP_OPTIONS}</select></dd>
@@ -221,20 +221,16 @@
<!-- END member -->
</tbody>
</table>
<div class="pagination" style="float: left;">
<!-- IF PAGINATION -->
<!-- IF PAGINATION -->
<div class="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>
<!-- ENDIF -->
<fieldset class="quick">
<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}" />
<p class="small"><a href="#" onclick="marklist('list', 'mark', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('list', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
</fieldset>
<h1>{L_ADD_USERS}</h1>

View File

@@ -45,8 +45,8 @@
<td style="text-align: center;"><img src="{items.IMG_SRC}" alt="" title="" /><input type="hidden" name="image[{items.IMG}]" value="1" /></td>
<td style="vertical-align: top;">[{items.IMG}]</td>
<!-- IF S_SMILIES -->
<td><input class="post" type="text" name="code[{items.IMG}]" value="{items.CODE}" size="10" /></td>
<td><input class="post" type="text" name="emotion[{items.IMG}]" value="{items.EMOTION}" size="10" /></td>
<td><input class="post" type="text" name="code[{items.IMG}]" value="{items.CODE}" size="10" maxlength="50" /></td>
<td><input class="post" type="text" name="emotion[{items.IMG}]" value="{items.EMOTION}" size="10" maxlength="50" /></td>
<!-- ENDIF -->
<td><input class="post" type="text" size="3" name="width[{items.IMG}]" value="{items.WIDTH}" /></td>
<td><input class="post" type="text" size="3" name="height[{items.IMG}]" value="{items.HEIGHT}" /></td>
@@ -122,11 +122,13 @@
<!-- 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>
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
<table cellspacing="1">
<thead>
<tr>
@@ -151,19 +153,10 @@
<td style="text-align: center;">{items.CODE}</td>
<td style="text-align: center;">{items.EMOTION}</td>
<!-- 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 style="text-align: right; white-space: nowrap;">
<!-- IF items.S_FIRST_ROW -->{ICON_MOVE_UP_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_UP}">{ICON_MOVE_UP}</a><!-- ENDIF -->&nbsp;
<!-- IF items.S_LAST_ROW -->{ICON_MOVE_DOWN_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a><!-- ENDIF -->
&nbsp;<a href="{items.U_EDIT}">{ICON_EDIT}</a> <a href="{items.U_DELETE}">{ICON_DELETE}</a>
</td>
</tr>
<!-- END items -->

View File

@@ -10,13 +10,11 @@
<div class="clearfix"></div>
<!-- IF PAGINATION -->
<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>
<!-- ENDIF -->
<table cellspacing="1">
<thead>
@@ -48,27 +46,25 @@
</tbody>
</table>
<!-- IF .inactive -->
<fieldset class="quick" style="float: left;">
<fieldset class="display-options">
{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>
<hr />
<!-- IF PAGINATION -->
<div class="pagination">
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
</div>
<!-- ENDIF -->
<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}" />
<p class="small"><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>
</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>

View File

@@ -27,7 +27,7 @@
</dl>
<dl>
<dt><label for="jab_port">{L_JAB_PORT}:</label><br /><span>{L_JAB_PORT_EXPLAIN}</span></dt>
<dd><input type="text" id="jab_port" name="jab_port" value="{JAB_PORT}" /></dd>
<dd><input type="text" id="jab_port" name="jab_port" value="{JAB_PORT}" maxlength="5" size="5" /></dd>
</dl>
<dl>
<dt><label for="jab_username">{L_JAB_USERNAME}:</label><br /><span>{L_JAB_USERNAME_EXPLAIN}</span></dt>
@@ -35,7 +35,7 @@
</dl>
<dl>
<dt><label for="jab_password">{L_JAB_PASSWORD}:</label></dt>
<dd><input type="text" id="jab_password" name="jab_password" value="{JAB_PASSWORD}" /></dd>
<dd><input type="password" id="jab_password" name="jab_password" value="{JAB_PASSWORD}" /></dd>
</dl>
<dl>
<dt><label for="jab_resource">{L_JAB_RESOURCE}:</label><br /><span>{L_JAB_RESOURCE_EXPLAIN}</span></dt>
@@ -43,7 +43,7 @@
</dl>
<dl>
<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>
<dd><input type="text" id="jab_package_size" name="jab_package_size" value="{JAB_PACKAGE_SIZE}" maxlength="5" size="5" /></dd>
</dl>
<p class="submit-buttons">

View File

@@ -7,7 +7,7 @@
<a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
<h1>{L_SELECT_DOWNLOAD_FORMAT}</h1>
<form id="selectmethod" method="post" action="{U_ACTION}">
<fieldset>
@@ -36,11 +36,11 @@
<legend>{LANG_LOCAL_NAME}</legend>
<dl>
<dt><label for="lang_english_name">{L_LANG_ENGLISH_NAME}:</label></dt>
<dd><input type="text" id="lang_english_name" name="lang_english_name" value="{LANG_ENGLISH_NAME}" /></dd>
<dd><input type="text" id="lang_english_name" name="lang_english_name" value="{LANG_ENGLISH_NAME}" maxlength="100" /></dd>
</dl>
<dl>
<dt><label for="lang_local_name">{L_LANG_LOCAL_NAME}:</label></dt>
<dd><input type="text" id="lang_local_name" name="lang_local_name" value="{LANG_LOCAL_NAME}" /></dd>
<dd><input type="text" id="lang_local_name" name="lang_local_name" value="{LANG_LOCAL_NAME}" maxlength="255" /></dd>
</dl>
<dl>
<dt><label>{L_LANG_ISO_CODE}:</label></dt>
@@ -48,7 +48,7 @@
</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>
<dd><input type="text" id="lang_author" name="lang_author" value="{LANG_AUTHOR}" maxlength="255" /></dd>
</dl>
<p class="quick" style="margin-top: -15px;">
@@ -72,7 +72,7 @@
<h1>{L_MISSING_LANG_VARIABLES}</h1>
<p>{L_MISSING_VARS_EXPLAIN}</p>
<form id="missing" method="post" action="{U_MISSING_ACTION}">
<table cellspacing="1">
@@ -104,20 +104,29 @@
<p>{L_LANGUAGE_ENTRIES_EXPLAIN}</p>
<form id="entries" method="post" action="{U_ENTRY_ACTION}">
<form id="lang_entries" method="post" action="{U_ENTRY_ACTION}">
<!-- IF S_FROM_STORE -->
<fieldset class="quick" style="float: left;">
<input type="submit" name="remove_store" value="{L_REMOVE_FROM_STORAGE_FOLDER}" class="button2" />
</fieldset>
<!-- ENDIF -->
<fieldset class="quick" style="float: right;">
<select name="language_file">{S_LANG_OPTIONS}</select>&nbsp;<input type="submit" class="button2" name="change" value="{L_SELECT}" />
</fieldset>
<br /><br /><br />
<!-- DIRTY DIRTY DIRTY IE -->
<!--[if lt IE 8]>
<style type="text/css">
input.langvalue, textarea.langvalue {
width: 450px;
}
</style>
< ![endif]-->
<table cellspacing="1">
<thead>
<!-- IF S_EMAIL_FILE -->
@@ -185,7 +194,7 @@
<!-- 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>
<dd><input type="<!-- IF data.DATA == 'password' -->password<!-- ELSE -->text<!-- ENDIF -->" id="{data.DATA}" name="{data.DATA}" value="{data.DEFAULT}" /></dd>
</dl>
<!-- END data -->
</fieldset>

View File

@@ -8,20 +8,11 @@
<form id="list" method="post" action="{U_ACTION}">
<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>
<div class="clearfix"></div>
<!-- IF PAGINATION -->
<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>
<!-- ENDIF -->
<!-- IF .log -->
<table cellspacing="1">
@@ -46,7 +37,7 @@
</td>
<td style="text-align: center;">{log.IP}</td>
<td style="text-align: center;">{log.DATE}</td>
<td>{log.ACTION}<!-- IF log.DATA --><br />{log.DATA}</span><!-- ENDIF --></td>
<td>{log.ACTION}<!-- IF log.DATA --><br /><span>{log.DATA}</span><!-- ENDIF --></td>
<td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{log.ID}" /></td>
</tr>
<!-- END log -->
@@ -61,8 +52,19 @@
<!-- ENDIF -->
<fieldset class="display-options">
{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>
<hr />
<!-- IF PAGINATION -->
<div class="pagination">
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
</div>
<!-- ENDIF -->
<!-- IF S_SHOW_FORUMS -->
<fieldset class="quick" style="float: left;">
<fieldset class="quick">
{L_SELECT_FORUM}: <select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{S_FORUM_BOX}</select>
<input class="button2" type="submit" value="{L_GO}" />
</fieldset>
@@ -70,19 +72,13 @@
<!-- IF S_CLEARLOGS -->
<fieldset class="quick">
<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;
<input class="button2" type="submit" name="delall" value="{L_DELETE_ALL}" /><br />
<p class="small"><a href="#" onclick="marklist('list', 'mark', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('list', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
</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>

View File

@@ -4,9 +4,9 @@
<!-- IF S_RESTORE_PERMISSIONS -->
<h1>{L_PERMISSIONS_TRANSFERED}</h1>
<h1>{L_PERMISSIONS_TRANSFERRED}</h1>
<p>{L_PERMISSIONS_TRANSFERED_EXPLAIN}</p>
<p>{L_PERMISSIONS_TRANSFERRED_EXPLAIN}</p>
<!-- ELSE -->

View File

@@ -27,6 +27,7 @@
// Create the new select tag
var new_node = document.createElement('select');
new_node.setAttribute('id', 'module_mode');
new_node.setAttribute('name', 'module_mode');
// Substitute it for the old one
item.parentNode.replaceChild(new_node, item);
@@ -191,7 +192,7 @@
<input type="hidden" name="action" value="add" />
<input type="hidden" name="module_parent_id" value="{PARENT_ID}" />
<input type="text" name="module_langname" />
<input type="text" name="module_langname" maxlength="255" />
<input class="button2" name="addmodule" type="submit" value="{L_CREATE_MODULE}" />
</fieldset>

View File

@@ -6,53 +6,22 @@
<script type="text/javascript">
<!--
var active_option = 'options0';
var active_pmask = '0';
var active_fmask = '0';
var active_cat = '0';
/**
* Show/hide option panels
* value = suffix for ID to show
*/
function swap_options(id)
{
if (id == active_option)
{
return;
}
// Hide active options and display container
dE(active_option, -1);
dE(id, 1);
var id = '000';
active_option = id;
}
/**
* Mark all radio buttons in one panel
* id = table ID container, s = status ['y'/'u'/'n']
*/
function mark_options(id, s)
{
var t = document.getElementById(id);
if (!t)
{
return;
}
var rb = t.getElementsByTagName('input');
for (var r = 0; r < rb.length; r++ )
{
if (rb[r].id.substr(rb[r].id.length-1) == s)
{
rb[r].checked = true;
}
}
}
var role_options = new Array();
<!-- IF S_ROLE_JS_ARRAY -->
{S_ROLE_JS_ARRAY}
<!-- ENDIF -->
//-->
</script>
<script type="text/javascript" src="style/permissions.js"></script>
<a href="{U_BACK}" style="float: right">&laquo; {L_BACK}</a>
<h1>{L_TITLE}</h1>
@@ -68,7 +37,7 @@
<legend>{L_ROLE_DETAILS}</legend>
<dl>
<dt><label for="role_name">{L_ROLE_NAME}:</label></dt>
<dd><input name="role_name" type="text" id="role_name" value="{ROLE_NAME}" /></dd>
<dd><input name="role_name" type="text" id="role_name" value="{ROLE_NAME}" maxlength="255" /></dd>
</dl>
<dl>
<dt><label for="role_description">{L_ROLE_DESCRIPTION}:</label><br /><span>{L_ROLE_DESCRIPTION_EXPLAIN}</span></dt>
@@ -96,62 +65,64 @@
<h1>{L_ACL_TYPE}</h1>
<fieldset class="quick">
<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>
<a href="#" onclick="mark_options('advanced00', 'y'); init_colours('00'); return false;">{L_ALL_YES}</a> &bull; <a href="#" onclick="mark_options('advanced00', 'n'); init_colours('00'); return false;">{L_ALL_NEVER}</a> &bull; <a href="#" onclick="mark_options('advanced00', 'u'); init_colours('00'); return false;">{L_ALL_NO}</a>
</fieldset>
<fieldset class="permissions">
<fieldset class="perm nolegend">
<table cellspacing="1" class="pmask">
<thead>
<tr>
<!-- BEGIN auth -->
<th>{auth.CAT_NAME}</th>
<!-- END auth -->
</tr>
</thead>
<tbody>
<tr>
<!-- BEGIN auth -->
<!-- IF auth.S_YES -->
<td class="preset preset_yes">
<!-- ELSEIF auth.S_NEVER -->
<td class="preset preset_never">
<!-- ELSEIF auth.S_NO -->
<td class="preset preset_no">
<!-- ELSE -->
<td class="preset preset_custom">
<!-- ENDIF -->
<a href="#" onclick="swap_options('options{auth.S_ROW_COUNT}'); return false;"><span></span></a></td>
<!-- END auth -->
</tr>
<tr class="row3">
<td colspan="{S_NUM_PERM_COLS}" id="a_options" style="vertical-align: top; text-align: left; width: 100%;">
<div id="advanced00">
<div class="perm_cat">
<ul>
<!-- BEGIN auth -->
<!-- IF auth.S_YES -->
<li class="perm_preset_yes<!-- IF auth.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab00{auth.S_ROW_COUNT}">
<!-- ELSEIF auth.S_NEVER -->
<li class="perm_preset_never<!-- IF auth.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab00{auth.S_ROW_COUNT}">
<!-- ELSEIF auth.S_NO -->
<li class="perm_preset_no<!-- IF auth.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab00{auth.S_ROW_COUNT}">
<!-- ELSE -->
<li class="perm_preset_custom<!-- IF auth.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab00{auth.S_ROW_COUNT}">
<!-- ENDIF -->
<a href="#" onclick="swap_options('0','0','{auth.S_ROW_COUNT}'); return false;"><span class="tabbg"><span class="colour"></span>{auth.CAT_NAME}</span></a></li>
<!-- END auth -->
</ul>
</div>
<!-- BEGIN auth -->
<table cellspacing="1" id="options{auth.S_ROW_COUNT}" class="type3" style="width: 100%; text-align: left;<!-- IF auth.S_FIRST_ROW --><!-- ELSE --> display: none;<!-- ENDIF -->">
<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="#" 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>
<!-- BEGIN mask -->
<!-- IF auth.mask.S_ROW_COUNT is even --><tr class="row4"><!-- ELSE --><tr class="row3"><!-- ENDIF -->
<th>{auth.mask.PERMISSION}</th>
<td class="no"><input id="setting[{auth.mask.FIELD_NAME}]_y" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_YES --> checked="checked"<!-- ENDIF --> value="1" /></td>
<td class="no"><input id="setting[{auth.mask.FIELD_NAME}]_u" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_NO --> checked="checked"<!-- ENDIF --> value="-1" /></td>
<td class="no"><input id="setting[{auth.mask.FIELD_NAME}]_n" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_NEVER --> checked="checked"<!-- ENDIF --> value="0" /></td>
</tr>
<!-- END mask -->
</tbody>
</table>
<div class="perm_panel" id="options00{auth.S_ROW_COUNT}"<!-- IF auth.S_FIRST_ROW --><!-- ELSE --> style="display: none;"<!-- ENDIF -->>
<span class="corners-top"><span></span></span>
<div class="tablewrap">
<table id="table00{auth.S_ROW_COUNT}" cellspacing="1">
<colgroup>
<col class="permissions_name" />
<col class="permissions_yes" />
<col class="permissions_no" />
<col class="permissions_never" />
</colgroup>
<thead>
<tr>
<th class="name" scope="col"><strong>{L_ACL_SETTING}</strong></th>
<th class="value" scope="col"><a href="#" onclick="mark_options('options00{auth.S_ROW_COUNT}', 'y'); set_colours('00{auth.S_ROW_COUNT}', false, 'yes'); return false;">{L_ACL_YES}</a></th>
<th class="value" scope="col"><a href="#" onclick="mark_options('options00{auth.S_ROW_COUNT}', 'u'); set_colours('00{auth.S_ROW_COUNT}', false, 'no'); return false;">{L_ACL_NO}</a></th>
<th class="value" scope="col"><a href="#" onclick="mark_options('options00{auth.S_ROW_COUNT}', 'n'); set_colours('00{auth.S_ROW_COUNT}', false, 'never'); return false;">{L_ACL_NEVER}</a></th>
</tr>
</thead>
<tbody>
<!-- BEGIN mask -->
<!-- IF auth.mask.S_ROW_COUNT is even --><tr class="row4"><!-- ELSE --><tr class="row3"><!-- ENDIF -->
<th class="permission_name<!-- IF auth.mask.S_ROW_COUNT is even --> row4<!-- ELSE --> row3<!-- ENDIF -->">{auth.mask.PERMISSION}</th>
<td><label for="{auth.mask.FIELD_NAME}_y"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting[{auth.mask.FIELD_NAME}]_y" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_YES --> checked="checked"<!-- ENDIF --> value="1" /></label></td>
<td><label for="{auth.mask.FIELD_NAME}_u"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting[{auth.mask.FIELD_NAME}]_u" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_NO --> checked="checked"<!-- ENDIF --> value="-1" /></label></td>
<td><label for="{auth.mask.FIELD_NAME}_n"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting[{auth.mask.FIELD_NAME}]_n" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_NEVER --> checked="checked"<!-- ENDIF --> value="0" /></label></td>
</tr>
<!-- END mask -->
</tbody>
</table>
</div>
<span class="corners-bottom"><span></span></span>
</div>
<!-- END auth -->
</td>
</tr>
</tbody>
</table>
</div>
</fieldset>
@@ -190,11 +161,11 @@
<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>
<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 -->
<!-- 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 -->
@@ -210,13 +181,13 @@
</table>
<fieldset class="quick">
{L_CREATE_ROLE}: <input type="text" name="role_name" value="" /><!-- IF S_ROLE_OPTIONS --> <select name="options_from"><option value="0" selected="selected">{L_CREATE_ROLE_FROM}</option>{S_ROLE_OPTIONS}</select><!-- ENDIF --> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" /><br />
{L_CREATE_ROLE}: <input type="text" name="role_name" value="" maxlength="255" /><!-- IF S_ROLE_OPTIONS --> <select name="options_from"><option value="0" selected="selected">{L_CREATE_ROLE_FROM}</option>{S_ROLE_OPTIONS}</select><!-- ENDIF --> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" /><br />
</fieldset>
</form>
<!-- IF S_DISPLAY_ROLE_MASK -->
<a name="assigned_to"></a>
<h1>{L_ROLE_ASSIGNED_TO}</h1>
@@ -225,8 +196,6 @@
<!-- ENDIF -->
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -261,8 +261,8 @@
<fieldset>
<legend>{L_LOOK_UP_GROUP}</legend>
<dl>
<dt><label for="group">{L_LOOK_UP_GROUP}:</label></dt>
<dd><select name="group_id[]" id="group">{S_ADD_GROUP_OPTIONS}</select></dd>
<dt><label for="group_select">{L_LOOK_UP_GROUP}:</label></dt>
<dd><select name="group_id[]" id="group_select">{S_ADD_GROUP_OPTIONS}</select></dd>
<dd>&nbsp;</dd>
</dl>
</fieldset>
@@ -337,14 +337,9 @@
<br /><br />
<fieldset class="quick" style="float: left; text-align: left;">
{L_PERMISSION_APPLIED_TO_ALL}<br />
<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;">
<input class="button1" type="submit" name="action[apply_all_permissions]" value="{L_APPLY_ALL_PERMISSIONS}" />
<input class="button2" type="reset" name="cancel" value="{L_RESET}" />
<input class="button2" type="button" name="cancel" value="{L_RESET}" onclick="document.forms['set_permissions'].reset(); init_colours(active_pmask + active_fmask);" />
</fieldset>
<br /><br />

View File

@@ -26,7 +26,7 @@
<legend>{L_ACP_RANKS}</legend>
<dl>
<dt><label for="title">{L_RANK_TITLE}:</label></dt>
<dd><input name="title" type="text" id="title" value="{RANK_TITLE}" /></dd>
<dd><input name="title" type="text" id="title" value="{RANK_TITLE}" maxlength="255" /></dd>
</dl>
<dl>
<dt><label for="rank_image">{L_RANK_IMAGE}:</label></dt>

View File

@@ -30,7 +30,7 @@
<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>
<dd><input name="reason_title" type="text" id="reason_title" value="{REASON_TITLE}" maxlength="255" /></dd>
</dl>
<!-- IF S_TRANSLATED -->
<dl>
@@ -64,7 +64,7 @@
<p>{L_ACP_REASONS_EXPLAIN}</p>
<form id="reasons" method="post" action="{U_ACTION}">
<fieldset class="tabuled">
<fieldset class="tabulated">
<legend>{L_ACP_REASONS}</legend>
<!-- IF .reasons -->

View File

@@ -17,11 +17,11 @@
</dl>
<dl>
<dt><label for="search_interval">{L_SEARCH_INTERVAL}:</label><br /><span>{L_SEARCH_INTERVAL_EXPLAIN}</span></dt>
<dd><input id="search_interval" type="text" size="4" maxlength="4" name="config[search_interval]" value="{SEARCH_INTERVAL}" /></dd>
<dd><input id="search_interval" type="text" size="4" maxlength="4" name="config[search_interval]" value="{SEARCH_INTERVAL}" /> {L_SECONDS}</dd>
</dl>
<dl>
<dt><label for="search_anonymous_interval">{L_SEARCH_GUEST_INTERVAL}:</label><br /><span>{L_SEARCH_GUEST_INTERVAL_EXPLAIN}</span></dt>
<dd><input id="search_anonymous_interval" type="text" size="4" maxlength="4" name="config[search_anonymous_interval]" value="{SEARCH_GUEST_INTERVAL}" /></dd>
<dd><input id="search_anonymous_interval" type="text" size="4" maxlength="4" name="config[search_anonymous_interval]" value="{SEARCH_GUEST_INTERVAL}" /> {L_SECONDS}</dd>
</dl>
<dl>
<dt><label for="limit_search_load">{L_LIMIT_SEARCH_LOAD}:</label><br /><span>{L_LIMIT_SEARCH_LOAD_EXPLAIN}</span></dt>
@@ -33,7 +33,7 @@
</dl>
<dl>
<dt><label for="search_store_results">{L_SEARCH_STORE_RESULTS}:</label><br /><span>{L_SEARCH_STORE_RESULTS_EXPLAIN}</span></dt>
<dd><input id="search_store_results" type="text" size="4" maxlength="6" name="config[search_store_results]" value="{SEARCH_STORE_RESULTS}" /></dd>
<dd><input id="search_store_results" type="text" size="4" maxlength="6" name="config[search_store_results]" value="{SEARCH_STORE_RESULTS}" /> {L_SECONDS}</dd>
</dl>
</fieldset>
@@ -91,10 +91,13 @@
<!-- BEGIN backend -->
<!-- IF backend.S_STATS -->
<form id="acp_search_index_{backend.NAME}" method="post" action="{U_ACTION}">
<fieldset class="tabulated">
{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">
@@ -130,7 +133,7 @@
<!-- ENDIF -->
</p>
</fieldset>
</form>
<!-- END backend -->

View File

@@ -322,15 +322,15 @@
</dl>
<dl>
<dt><label for="font_weight">{L_BOLD}:</label></dt>
<dd><input id="font_weight" type="radio" class="radio" name="font_weight" value="bold"<!-- IF FONT_WEIGHT eq "bold" --> checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" class="radio" name="font_weight" value="normal"<!-- IF FONT_WEIGHT eq "normal" --> checked="checked"<!-- ENDIF --> /> {L_NO} &nbsp; <input type="radio" class="radio" name="font_weight" value=""<!-- IF not FONT_WEIGHT --> checked="checked"<!-- ENDIF --> /> {L_UNSET}</dd>
<dd><input id="font_weight" type="radio" class="radio" name="font_weight" value="bold"<!-- IF FONT_WEIGHT eq "bold" --> checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" class="radio" name="font_weight" value="none"<!-- IF FONT_WEIGHT eq "none" --> checked="checked"<!-- ENDIF --> /> {L_NO} &nbsp; <input type="radio" class="radio" name="font_weight" value=""<!-- IF not FONT_WEIGHT --> checked="checked"<!-- ENDIF --> /> {L_UNSET}</dd>
</dl>
<dl>
<dt><label for="font_style">{L_ITALIC}:</label></dt>
<dd><input id="font_style" type="radio" class="radio" name="font_style" value="italic"<!-- IF FONT_STYLE eq "italic" --> checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" class="radio" name="font_style" value="normal"<!-- IF FONT_STYLE eq "normal" --> checked="checked"<!-- ENDIF --> /> {L_NO} &nbsp; <input type="radio" class="radio" name="font_style" value=""<!-- IF not FONT_STYLE --> checked="checked"<!-- ENDIF --> /> {L_UNSET}</dd>
<dd><input id="font_style" type="radio" class="radio" name="font_style" value="italic"<!-- IF FONT_STYLE eq "italic" --> checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" class="radio" name="font_style" value="none"<!-- IF FONT_STYLE eq "none" --> checked="checked"<!-- ENDIF --> /> {L_NO} &nbsp; <input type="radio" class="radio" name="font_style" value=""<!-- IF not FONT_STYLE --> checked="checked"<!-- ENDIF --> /> {L_UNSET}</dd>
</dl>
<dl>
<dt><label for="text_decoration">{L_UNDERLINE}:</label></dt>
<dd><input id="text_decoration" type="radio" class="radio" name="text_decoration" value="underline"<!-- IF TEXT_DECORATION eq "underline" --> checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" class="radio" name="text_decoration" value="normal"<!-- IF TEXT_DECORATION eq "normal" --> checked="checked"<!-- ENDIF --> /> {L_NO} &nbsp; <input type="radio" class="radio" name="text_decoration" value=""<!-- IF not TEXT_DECORATION --> checked="checked"<!-- ENDIF --> /> {L_UNSET}</dd>
<dd><input id="text_decoration" type="radio" class="radio" name="text_decoration" value="underline"<!-- IF TEXT_DECORATION eq "underline" --> checked="checked"<!-- ENDIF --> /> {L_YES} &nbsp; <input type="radio" class="radio" name="text_decoration" value="none"<!-- IF TEXT_DECORATION eq "none" --> checked="checked"<!-- ENDIF --> /> {L_NO} &nbsp; <input type="radio" class="radio" name="text_decoration" value=""<!-- IF not TEXT_DECORATION --> checked="checked"<!-- ENDIF --> /> {L_UNSET}</dd>
</dl>
<dl>
<dt><label for="line_height">{L_LINE_SPACING}</label></dt>
@@ -516,7 +516,7 @@
</tr>
<!-- BEGIN installed -->
<tr>
<td><strong>{installed.NAME}</strong></a><!-- IF installed.S_DEFAULT_STYLE --> *<!-- ENDIF --></td>
<td><strong>{installed.NAME}</strong><!-- IF installed.S_DEFAULT_STYLE --> *<!-- ENDIF --></td>
<!-- IF S_STYLE -->
<td style="text-align: center;">{installed.STYLE_COUNT}</td>
<!-- ENDIF -->

View File

@@ -111,6 +111,10 @@
<dt><label>{L_POSTS}:</label></dt>
<dd><strong>{USER_POSTS}</strong></dd>
</dl>
<dl>
<dt><label>{L_WARNINGS}:</label></dt>
<dd><strong>{USER_WARNINGS}</strong></dd>
</dl>
<dl>
<dt><label for="user_founder">{L_FOUNDER}:</label><br /><span>{L_FOUNDER_EXPLAIN}</span></dt>
<dd><input type="radio" class="radio" name="user_founder" value="1"<!-- IF S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp; <input type="radio" class="radio" name="user_founder" value="0"<!-- IF not S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> />&nbsp;{L_NO}&nbsp;</dd>
@@ -136,10 +140,6 @@
<fieldset>
<legend>{L_USER_TOOLS}</legend>
<dl>
<dt><label for="warnings">{L_WARNINGS}:</label><br /><span>{L_WARNINGS_EXPLAIN}</span></dt>
<dd><input type="text" id="warnings" name="warnings" value="{USER_WARNINGS}" size="2" /></dd>
</dl>
<dl>
<dt><label for="quicktools">{L_QUICK_TOOLS}:</label></dt>
<dd><select id="quicktools" name="action">{S_ACTION_OPTIONS}</select></dd>
@@ -164,20 +164,9 @@
<form id="list" method="post" action="{U_ACTION}">
<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>
<div class="clearfix"></div>
<!-- IF PAGINATION -->
<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>
<!-- ENDIF -->
@@ -188,7 +177,7 @@
<th>{L_REPORT_BY}</th>
<th>{L_IP}</th>
<th>{L_TIME}</th>
<th>{L_ACTION}</th>
<th>{L_FEEDBACK}</th>
<th>{L_MARK}</th>
</tr>
</thead>
@@ -213,12 +202,23 @@
<p>{L_NO_ENTRIES}</p>
</div>
<!-- ENDIF -->
<fieldset class="display-options">
{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>
<hr />
<!-- IF PAGINATION -->
<div class="pagination">
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
</div>
<!-- ENDIF -->
<!-- IF S_CLEARLOGS -->
<fieldset class="quick">
<b class="small"><a href="#" onclick="marklist('list', 'mark', true);">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('list', 'mark', 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;
<input class="button2" type="submit" name="delall" value="{L_DELETE_ALL}" />
<p class="small"><a href="#" onclick="marklist('list', 'mark', true);">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('list', 'mark', false);">{L_UNMARK_ALL}</a></p>
</fieldset>
<!-- ENDIF -->
@@ -548,31 +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
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 -->
}
// 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>
@@ -600,7 +600,7 @@ var help_line = {
<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')" />
<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')" />
@@ -609,12 +609,12 @@ var help_line = {
<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')" onmouseout="helpline('tip')">
{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>
<option value="24">{L_FONT_HUGE}</option>
</select>
<!-- IF .custom_tags -->
<br /><br />
@@ -625,8 +625,10 @@ var help_line = {
</div>
<p><input type="text" name="helpbox" value="{L_STYLES_TIP}" class="full" style="border: 0; background: none;" /></p>
<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 -->
<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 -->
@@ -636,7 +638,7 @@ var help_line = {
<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>
</div>
</fieldset>
<fieldset class="quick">
@@ -678,20 +680,12 @@ var help_line = {
<form id="user_attachments" method="post" action="{U_ACTION}">
<fieldset class="quick" style="float: left;">
{L_SORT_BY}: <select name="sk">{S_SORT_KEY}</select> <select name="sd">{S_SORT_DIR}</select>
<input class="button2" type="submit" value="{L_GO}" name="sort" />
</fieldset>
<div class="pagination" style="float: right;">
<!-- 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 -->
<!-- IF PAGINATION -->
<div class="pagination">
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
</div>
<div class="clearfix"></div>
<!-- ENDIF -->
<!-- IF .attach -->
<table cellspacing="1">
@@ -701,17 +695,17 @@ var help_line = {
<th>{L_POST_TIME}</th>
<th>{L_FILESIZE}</th>
<th>{L_DOWNLOADS}</th>
<th>{L_DELETE}</th>
<th>{L_MARK}</th>
</tr>
</thead>
<tbody>
<!-- BEGIN attach -->
<!-- IF attach.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td><a href="{attach.U_DOWNLOAD}">{attach.REAL_FILENAME}</a><br /><span class="small"><!-- IF attach.S_IN_MESSAGE --><b>{L_PM}: </b><!-- ELSE --><b>{L_TOPIC}: </b><!-- ENDIF --><a href="{attach.U_VIEW_TOPIC}">{attach.TOPIC_TITLE}</a></span></td>
<td>{attach.POST_TIME}</td>
<td>{attach.SIZE}</td>
<td>{attach.DOWNLOAD_COUNT}</td>
<td><input type="checkbox" class="radio" name="mark[]" value="{attach.ATTACH_ID}" /></td>
<td style="text-align: center">{attach.POST_TIME}</td>
<td style="text-align: center">{attach.SIZE}</td>
<td style="text-align: center">{attach.DOWNLOAD_COUNT}</td>
<td style="text-align: center"><input type="checkbox" class="radio" name="mark[]" value="{attach.ATTACH_ID}" /></td>
</tr>
<!-- END attach -->
</tbody>
@@ -721,20 +715,41 @@ var help_line = {
<p>{L_NO_ENTRIES}</p>
</div>
<!-- ENDIF -->
<fieldset class="display-options">
{L_SORT_BY}: <select name="sk">{S_SORT_KEY}</select> <select name="sd">{S_SORT_DIR}</select>
<input class="button2" type="submit" value="{L_GO}" name="sort" />
</fieldset>
<hr />
<!-- IF PAGINATION -->
<div class="pagination">
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
</div>
<!-- ENDIF -->
<fieldset class="quick">
<b class="small"><a href="#" onclick="marklist('user_attachments', 'mark', true);">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('user_attachments', 'mark', false);">{L_UNMARK_ALL}</a></b><br />
<input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
<p class="small"><a href="#" onclick="marklist('user_attachments', 'mark', true);">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('user_attachments', 'mark', false);">{L_UNMARK_ALL}</a></p>
</fieldset>
</form>
<!-- ELSEIF S_PERMISSIONS -->
<fieldset class="quick">
<div style="float: right;">
<a href="{U_USER_PERMISSIONS}">&raquo; {L_SET_USERS_PERMISSIONS}</a><br />
<a href="{U_USER_FORUM_PERMISSIONS}">&raquo; {L_SET_USERS_FORUM_PERMISSIONS}</a>
</fieldset>
</div>
<form id="select_forum" method="post" action="{U_ACTION}">
<fieldset class="quick" style="text-align: left;">
{L_SELECT_FORUM}: <select name="f">{S_FORUM_OPTIONS}</select>
<input class="button2" type="submit" value="{L_GO}" name="select" />
</fieldset>
</form>
<br clear="all" />
<!-- INCLUDE permission_mask.html -->

View File

@@ -16,11 +16,11 @@
<legend>{L_EDIT_WORD}</legend>
<dl>
<dt><label for="word">{L_WORD}</label></dt>
<dd><input id="word" type="text" name="word" value="{WORD}" /></dd>
<dd><input id="word" type="text" name="word" value="{WORD}" maxlength="255" /></dd>
</dl>
<dl>
<dt><label for="replacement">{L_REPLACEMENT}</label></dt>
<dd><input id="replacement" type="text" name="replacement" value="{REPLACEMENT}" /></dd>
<dd><input id="replacement" type="text" name="replacement" value="{REPLACEMENT}" maxlength="255" /></dd>
</dl>
{S_HIDDEN_FIELDS}
@@ -52,7 +52,7 @@
<tr>
<th>{L_WORD}</th>
<th>{L_REPLACEMENT}</th>
<th colspan="2">{L_ACTION}</th>
<th>{L_ACTION}</th>
</tr>
</thead>
<tbody>
@@ -60,8 +60,7 @@
<!-- IF words.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td style="text-align: center;">{words.WORD}</td>
<td style="text-align: center;">{words.REPLACEMENT}</td>
<td>&nbsp;<a href="{words.U_EDIT}">{L_EDIT}</a>&nbsp;</td>
<td>&nbsp;<a href="{words.U_DELETE}">{L_DELETE}</a>&nbsp;</td>
<td>&nbsp;<a href="{words.U_EDIT}">{ICON_EDIT}</a>&nbsp;&nbsp;<a href="{words.U_DELETE}">{ICON_DELETE}</a>&nbsp;</td>
</tr>
<!-- END words -->
</tbody>

View File

@@ -48,6 +48,17 @@ h2, caption {
margin-top: 25px;
}
.rtl h2, .rtl caption {
text-align: right;
}
h3, h4 {
font: bold 1.2em "Lucida Grande", Arial, Helvetica, sans-serif;
text-decoration: none;
line-height: 120%;
margin-top: 25px;
}
p {
margin-bottom: 0.7em;
line-height: 1.4em;
@@ -56,8 +67,11 @@ p {
ul {
list-style: disc;
margin-left: 2em;
margin-bottom: 1em;
margin: 0 0 1em 2em;
}
.rtl ul {
margin: 0 2em 1em 0;
}
hr {
@@ -98,6 +112,10 @@ a:hover {
height: 84px;
}
.rtl #page-header {
text-align: left;
}
#page-header h1 {
font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
font-size: 1.5em;
@@ -129,12 +147,17 @@ a:hover {
}
#main {
float:left;
float: left;
width: 76%;
margin-left: 3%;
margin: 0 0 0 3%;
min-height: 350px;
}
.rtl #main {
float: right;
margin: 0 3% 0 0;
}
* html #main {
height: 350px;
}
@@ -149,6 +172,10 @@ a:hover {
min-width: 570px;
}
.rtl #tabs {
margin: 0 7px -6px 0;
}
#tabs ul {
margin:0;
padding: 0;
@@ -164,7 +191,7 @@ a:hover {
}
#tabs a {
float:left;
float: left;
background:url("../images/bg_tabs1.gif") no-repeat 0% -35px;
margin: 0 1px 0 0;
padding: 0 0 0 6px;
@@ -172,6 +199,12 @@ a:hover {
position: relative;
}
.rtl #tabs a {
float: right;
margin: 0 0 0 1px;
padding: 0 6px 0 0;
}
#tabs a span {
float: left;
display: block;
@@ -182,8 +215,13 @@ a:hover {
text-transform: uppercase;
}
.rtl #tabs a span {
float: left;
padding: 7px 6px 6px 12px;
}
/* Commented Backslash Hack hides rule from IE5-Mac \*/
#tabs a span { float:none; }
#tabs a span, .rtl #tabs a span { float:none;}
/* End hack */
#tabs a:hover span {
@@ -237,6 +275,10 @@ span.corners-top span, span.corners-bottom span {
padding: 0;
}
.rtl #menu {
float: right;
}
#menu p {
font-size: 1em;
}
@@ -316,11 +358,16 @@ th, td {
text-align: left;
}
.rtl th, .rtl td {
text-align: right;
}
th {
padding: 6px 4px;
color: #FFA34F;
font-weight: bold;
background: #006699 url("../images/cellpic3.gif") 0 0 repeat-x;
white-space: nowrap;
}
td {
@@ -328,12 +375,12 @@ td {
line-height: 1.2em;
}
.row1 { background-color: #EFEFEF; }
.row2 { background-color: #DEE3E7; }
.row3 { background-color: #D1D7DC; }
.row4 { background-color: #E4E8EB; }
.col1 { background-color: #DEE3E7; }
.col2 { background-color: #EFEFEF; }
.row1 { background-color: #EFEFEF;}
.row2 { background-color: #DEE3E7;}
.row3 { background-color: #D1D7DC;}
.row4 { background-color: #E4E8EB;}
.col1 { background-color: #DEE3E7;}
.col2 { background-color: #EFEFEF;}
.spacer {
background-color: #D1D7DC;
@@ -363,44 +410,40 @@ table.type2 td {
/* General form styles
----------------------------------------*/
fieldset {
fieldset {
background-color: #DDD;
padding: 10px;
margin: 15px 0;
padding: 10px;
border-right: 1px solid #AFAEAA;
border-bottom: 1px solid #AFAEAA;
border-left: 1px solid #D5D5C8;
border-top: 1px solid #D5D5C8;
background-color: #ECECEC;
background-color: #ECECEC;
position: relative;
}
* html fieldset {
padding: 0 10px 5px 10px;
.rtl fieldset {
border-right: 1px solid #D5D5C8;
border-bottom: 1px solid #AFAEAA;
border-left: 1px solid #AFAEAA;
border-top: 1px solid #D5D5C8;
}
legend {
position: absolute;
top: -0.5em;
font-size: 1.1em;
color:#006699;
font-family: "Lucida Grande",Arial,Verdana,Sans-serif;
font-weight: bold;
line-height: 100%;
text-transform: uppercase;
}
fieldset p {
font-size: 1.1em;
}
legend {
padding: 1px 0;
font-family: "Lucida Grande", Arial, Verdana,Sans-serif;
font-size: 1.1em;
font-weight: bold;
color: #006699;
position: relative;
text-transform: uppercase;
line-height: 100%;
top: 0em;
vertical-align:middle;
}
* html legend {
margin-bottom: -10px;
margin-left: -7px;
top: -1.2em;
}
input {
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
font-size: 100%;
@@ -416,6 +459,17 @@ input {
vertical-align: middle;
}
.rtl input {
border-left: 1px solid #D5D5C8;
border-top: 1px solid #AFAEAA;
border-right: 1px solid #AFAEAA;
border-bottom: 1px solid #D5D5C8;
}
input.langvalue, textarea.langvalue {
width: 90%;
}
select {
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
font-size: 100%;
@@ -434,12 +488,16 @@ optgroup {
}
option {
padding-right: 1em;
padding: 0 1em 0 0;
}
.rtl option {
padding: 0 0 0 1em;
}
.sep {
color: black;
background-color: #FFA34F;
font-weight: bold;
}
textarea {
@@ -455,10 +513,21 @@ textarea {
cursor: text;
}
.rtl textarea {
border-left: 1px solid #D5D5C8;
border-top: 1px solid #AFAEAA;
border-right: 1px solid #AFAEAA;
border-bottom: 1px solid #D5D5C8;
}
label {
cursor:pointer;
cursor: pointer;
font-size: 1.1em;
padding-right: 5px;
padding: 0 5px 0 0;
}
.rtl label {
padding: 0 0 0 5px;
}
label input {
@@ -471,20 +540,33 @@ label img {
}
fieldset.quick, p.quick {
margin: 0 0 5px 0;
padding: 5px 0 0 0;
margin: 0 0 5px;
padding: 5px 0 0;
border: none;
background-color: transparent;
text-align: right;
font-size: 1.1em;
}
.rtl fieldset.quick, .rtl p.quick {
text-align: left;
}
fieldset.quick legend {
display: none;
}
fieldset.tabulated {
background-color: #DADFE4;
/* background-color: #DADFE4;*/
background: none;
margin: 0;
padding: 0;
padding-top: 5px;
border: 0;
}
fieldset.tabulated legend {
display: none;
}
fieldset.nobg {
@@ -533,11 +615,16 @@ dt {
width: auto;
}
dd { color: #000; }
dd + dd { padding-top: 5px; }
dt span { padding-right: 5px; }
.rtl dt {
float: right;
}
dt .explain { font-style: italic; }
dd { color: #000;}
dd + dd { padding-top: 5px;}
dt span { padding: 0 5px 0 0;}
.rtl dt span { padding: 0 0 0 5px;}
dt .explain { font-style: italic;}
dt label {
font-size: 100%;
@@ -545,12 +632,20 @@ dt label {
font-weight: bold;
}
dd label {
white-space: nowrap;
margin-right: 10px;
.rtl dt label {
text-align: right;
}
html>body dd label input { vertical-align: text-bottom; } /* Tweak for Moz to align checkboxes/radio buttons nicely */
dd label {
white-space: nowrap;
margin: 0 10px 0 0;
}
.rtl dd label {
margin: 0 0 0 10px;
}
html>body dd label input { vertical-align: text-bottom;} /* Tweak for Moz to align checkboxes/radio buttons nicely */
dd input,
dd select {
@@ -561,7 +656,7 @@ dd textarea {
width: 100%;
}
input.radio {
input.radio, input.perm_cb {
width: auto !important;
background-color: transparent;
border: none;
@@ -581,21 +676,36 @@ fieldset dl {
fieldset dt {
width: 45%;
text-align: left;
border: none;
border-right: 1px solid #CCC;
padding-top: 3px;
}
.rtl fieldset dt {
text-align: right;
border: none;
border-left: 1px solid #CCC;
}
fieldset dd {
margin-left: 45%;
padding-left: 5px;
margin: 0 0 0 45%;
padding: 0 0 0 5px;
border: none;
border-left: 1px solid #CCC;
vertical-align: top;
}
.rtl fieldset dd {
margin: 0 45% 0 0;
padding: 0 5px 0 0;
border: none;
border-right: 1px solid #CCC;
}
dd.full {
margin-left: 0;
margin: 0;
border: 0;
padding-left: 0;
padding: 0;
padding-top: 3px;
text-align: center;
width: 95%;
@@ -652,6 +762,13 @@ fieldset.submit-buttons legend {
width: 75%;
}
.rtl .inputbox {
border-left: 1px solid #D5D5C8;
border-top: 1px solid #AFAEAA;
border-right: 1px solid #AFAEAA;
border-bottom: 1px solid #D5D5C8;
}
select.inputbox {
cursor: pointer;
padding: 0;
@@ -659,10 +776,7 @@ select.inputbox {
}
.inputbox:hover {
border-left: 1px solid #AFAEAA;
border-top: 1px solid #AFAEAA;
border-right: 1px solid #AFAEAA;
border-bottom: 1px solid #AFAEAA;
border: 1px solid #AFAEAA;
background-color: #E9E9E2;
}
@@ -677,12 +791,12 @@ textarea.full {
width: 99%;
}
* html input.full, * html textarea.full { width: 95%; }
input.medium { width: 50%; }
input.narrow { width: 25%; }
input.tiny { width: 10%; }
input.autowidth { width: auto !important; }
.box2 .inputbox { background-color: #E9E9E9; }
* html input.full, * html textarea.full { width: 95%;}
input.medium { width: 50%;}
input.narrow { width: 25%;}
input.tiny { width: 10%;}
input.autowidth { width: auto !important;}
.box2 .inputbox { background-color: #E9E9E9;}
/* Pagination
@@ -696,6 +810,10 @@ input.autowidth { width: auto !important; }
padding-bottom: 2px;
}
.rtl .pagination {
text-align: left;
}
.pagination strong,
.pagination b {
font-weight: normal;
@@ -761,167 +879,9 @@ a.button2, a.button2:link, a.button2:visited, a.button2:active {
padding: 4px 8px;
}
/* Permission related
---------------------------------------- */
.permissions {
margin: 15px 0 0 0;
padding: 0;
border: none;
background-color: transparent;
}
.permissions table {
width: 100%;
/*empty-cells: hide;*/
border: 1px solid #CCCFD3;
background-color: #FFFFFF;
padding: 1px;
}
.permissions th {
padding: 3px 4px;
color: #FFFFFF;
background: #DDE1E4 url("../images/gradient2b.gif") bottom left repeat-x;
border-top: 1px solid #6DACD2;
border-bottom: 1px solid #327AA5;
text-align: left;
font-size: .85em;
text-transform: uppercase;
}
.permissions td {
text-align: left;
font-size: 1.1em;
padding: 4px;
line-height: 120%;
}
table.pmask {
border: none;
background: none;
padding: 0;
}
table.pmask th {
background: none;
border-top: none;
text-align: center;
vertical-align: bottom;
color: #115098;
padding: 2px 0;
}
table.pmask td {
padding: 0px;
}
table.pmask td.name {
padding: 2px;
vertical-align: middle;
}
.permissions th.name {
text-align: left;
width: auto;
padding-left: 4px;
}
.permissions .entry {
text-align: left;
input.disabled {
font-weight: normal;
}
.permissions td.name {
text-align: left;
font-weight: bold;
}
.permissions table.type3 {
float: right;
width: 350px; /* Setting the length of the permission view box */
border: none;
background-color: transparent;
padding: 0;
}
.permissions table.type3 thead th {
background-color: transparent;
border-top: none;
text-align: center;
color: #115098;
padding: 0 3px;
font-size: .9em;
font-weight: normal;
text-transform: none;
}
.permissions table.type3 tbody th {
border-top: none;
text-align: left;
text-transform: none;
padding: 0;
border: none;
font-size: 1em;
font-weight: normal;
width: 100%;
vertical-align: middle;
}
.permissions table.type3 td {
text-align: center;
padding: 1px;
}
.permissions td.yes {
width: 20px;
background-color: #40C53D;
}
.permissions td.never {
width: 20px;
background-color: #EC7181;
}
.permissions td.no {
width: 20px;
background-color: transparent;
}
/* Preset Styles
---------------------------------------- */
.preset {
width: 60px;
}
.preset a {
float: left;
display: block;
width: 100%;
height: 20px;
cursor: pointer;
background: transparent;
}
.preset a:hover {
background: url("../images/arrow_down.gif") no-repeat 50% 50%;
text-decoration: none;
}
.preset_yes {
background: #D3F3D2 url("../images/bg_hash1.gif") repeat;
}
.preset_custom {
background: #DAE4EC url("../images/bg_hash2.gif") repeat;
}
.preset_never {
background: #ECD7DA url("../images/bg_hash3.gif") repeat;
}
.preset_no {
background: #ECD7DA url("../images/bg_hash4.gif") repeat;
color: #666;
}
/* Action Highlighting
@@ -1046,6 +1006,10 @@ table.pmask td.name {
padding: 0px;
}
.rtl .sourcenum {
text-align: left;
}
.source {
font-family: Monaco, 'Courier New', monospace;
font-size: 125%;
@@ -1076,3 +1040,307 @@ table.pmask td.name {
.syntaxstring {
color: #DD0000;
}
/* Permission interface
---------------------------------------- */
fieldset.perm legend {
text-transform: none;
}
fieldset.perm legend input{
height: 1.1em;
}
/* Permission sections */
fieldset.perm .perm_simple {
text-align: left;
padding-top: 3px;
}
.rtl fieldset.perm .perm_simple {
text-align: right;
}
fieldset.perm .perm_advanced {
padding: 10px 0 0 5px;
vertical-align: top;
clear: right;
}
.rtl fieldset.perm .perm_advanced {
padding: 10px 5px 0 0;
clear: left;
}
fieldset.perm .perm_switch {
float: right;
font-size: 1.1em;
}
.rtl fieldset.perm .perm_switch {
float: left;
}
.perm_switch a {
text-decoration: underline;
}
/* Tabbed menu */
.perm_cat {
line-height: normal;
margin: 0 0 0 7px;
min-width: 570px;
font-size: 1em;
}
.rtl .perm_cat {
margin: 0 7px 0 0;
}
.perm_cat ul {
margin: 0;
padding: 0;
list-style: none;
}
.perm_cat li {
display: inline;
margin: 0;
padding: 0;
font-size: 1em;
font-weight: bold;
}
.perm_cat a {
float: left;
background: url("../images/bg_tabs1.gif") no-repeat 0% -35px;
margin: 0 1px 0 0;
padding: 0 0 0 6px;
text-decoration: none;
position: relative;
}
.rtl .perm_cat a {
float: right;
margin: 0 0 0 1px;
padding: 0 6px 0 0;
}
.perm_cat a span.tabbg {
float: left;
display: block;
background: url("../images/bg_tabs2.gif") no-repeat 100% -35px;
padding: 7px 12px 6px 6px;
color: #536482;
white-space: nowrap;
}
.rtl .perm_cat a span.tabbg {
float: left;
padding: 7px 6px 6px 12px;
}
/* Commented Backslash Hack hides rule from IE5-Mac \*/
.perm_cat a span.tabbg, .rtl .perm_cat a span.tabbg { float: none;}
/* End hack */
.perm_cat a:hover span.tabbg {
color: #DD6900;
}
.perm_cat .activetab a {
background-position: 0 0px;
}
.perm_cat .activetab a span.tabbg {
background-position: 100% 0px;
padding-bottom: 7px;
color: #333333;
}
.perm_cat a:hover {
background-position: 0 -70px;
}
.perm_cat a:hover span.tabbg {
background-position: 100% -70px;
}
.perm_cat .activetab a:hover span.tabbg {
color: #333333;
background-position: 100% 0px;
}
.perm_cat .activetab a:hover {
background-position: 0 0px;
}
.perm_cat a span.colour {
border: 1px solid #536482;
display: block;
float: left;
width: 10px;
height: 10px;
margin: 0 5px 0 0;
}
.rtl .perm_cat a span.colour {
float: right;
margin: 0 0 0 5px;
}
.perm_cat .activetab span.colour {
border-color: #333333;
}
.perm_cat a:hover span.colour {
border-color: #DD6900;
}
.perm_cat .activetab a:hover span.colour {
border-color: #333333;
}
/* Permission preset colours */
.perm_preset_yes span.colour,
.yes {
background-color: #86F786;
}
.perm_preset_custom span.colour {
background-color: #B2BBDD;
}
.perm_preset_never span.colour {
background-color: #DD0000;
}
.perm_preset_no span.colour,
.never {
background-color: #EFB0B2;
}
/* Pemrission panel
---------------------------------------- */
.perm_panel {
float: left;
background-color: #FFF;
width: 100%;
border: 1px solid #A9B8C2;
margin-top: -1px;
}
.rtl .perm_panel {
float: right;
}
.perm_panel span.corners-top {
background-image: url("../images/corners_left2.gif");
}
.perm_panel span.corners-top span {
background-image: url("../images/corners_right2.gif");
}
.perm_panel span.corners-bottom {
background-image: url("../images/corners_left2.gif");
}
.perm_panel span.corners-bottom span {
background-image: url("../images/corners_right2.gif");
}
.perm_panel span.corners-top, .perm_panel span.corners-bottom,
.perm_panel span.corners-top span, .perm_panel span.corners-bottom span {
font-size: 1px;
line-height: 1px;
display: block;
height: 5px;
background-repeat: no-repeat;
}
.perm_panel span.corners-top {
background-image: url("../images/corners_left2.gif");
background-position: 0 0;
margin: 0 0;
}
.perm_panel span.corners-top span {
background-image: url("../images/corners_right2.gif");
background-position: 100% 0;
}
.perm_panel span.corners-bottom {
background-image: url("../images/corners_left2.gif");
background-position: 0 100%;
margin: 0 0;
clear: both;
}
.perm_panel span.corners-bottom span {
background-image: url("../images/corners_right2.gif");
background-position: 100% 100%;
}
/* Permission table
---------------------------------------- */
.perm_panel .tablewrap {
margin: 0 10px;
}
.perm_panel table {
width: 100%;
}
.perm_panel th {
text-transform: none;
}
.perm_panel th.value {
text-align: center;
}
.perm_panel th.name {
text-align: left;
width: auto;
text-transform: none;
}
.rtl .perm_panel th.name {
text-align: right;
}
.perm_panel th.permission_name {
border: none;
color: #536482;
font-weight: normal;
}
.perm_panel th.permission_name a.trace {
display: inline;
}
.perm_panel th.row3 {
background-image: none;
background-color: #D1D7DC;
}
.perm_panel th.row4 {
background-image: none;
background-color: #E4E8EB;
}
.perm_panel th a:link, .perm_panel th a:hover, .perm_panel th a:visited {
display: block;
color: #FFA34F;
text-decoration: underline;
}
.perm_panel td {
padding: 0;
text-align: center;
}
.perm_panel td label {
display: block;
}

View File

@@ -13,10 +13,10 @@ var clientPC = navigator.userAgent.toLowerCase(); // Get client info
var clientVer = parseInt(navigator.appVersion); // Get browser version
var is_ie = ((clientPC.indexOf('msie') != -1) && (clientPC.indexOf('opera') == -1));
var is_nav = ((clientPC.indexOf('mozilla') != -1) && (clientPC.indexOf('spoofer') == -1) && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera') == -1) && (clientPC.indexOf('webtv') == -1) && (clientPC.indexOf('hotjava') == -1));
var is_win = ((clientPC.indexOf('win') != -1) || (clientPC.indexOf('16bit') != -1));
var is_mac = (clientPC.indexOf('mac') != -1);
var baseHeight;
window.onload = initInsertions;
/**
* Shows the help messages in the helpline window
@@ -27,44 +27,19 @@ function helpline(help)
}
/**
* Replacement for arrayname.length property
*/
function getarraysize(thearray)
* Fix a bug involving the TextRange object. From
* http://www.frostjedi.com/terra/scripts/demo/caretBug.html
*/
function initInsertions()
{
for (i = 0; i < thearray.length; i++)
var textarea = document.forms[form_name].elements[text_name];
textarea.focus();
if (is_ie && typeof(baseHeight) != 'number')
{
if (typeof thearray[i] == 'undefined' || thearray[i] == '' || thearray[i] == null)
{
return i;
}
baseHeight = document.selection.createRange().duplicate().boundingHeight;
}
return thearray.length;
}
/**
* Replacement for arrayname.push(value) not implemented in IE until version 5.5
* Appends element to the array
*/
function arraypush(thearray,value)
{
thearray[getarraysize(thearray)] = value;
}
/**
* Replacement for arrayname.pop() not implemented in IE until version 5.5
* Removes and returns the last element of an array
*/
function arraypop(thearray)
{
thearraysize = getarraysize(thearray);
retval = thearray[thearraysize - 1];
delete thearray[thearraysize - 1];
return retval;
}
/**
* bbstyle
*/
@@ -168,6 +143,11 @@ function insert_text(text, spaces, popup)
else if (textarea.createTextRange && textarea.caretPos)
{
if (baseHeight != textarea.caretPos.boundingHeight)
{
textarea.focus();
storeCaret(textarea);
}
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;

View File

@@ -1,100 +1,125 @@
<!-- INCLUDE install_header.html -->
<form id="install_convert" method="post" action="{U_ACTION}">
<!-- IF S_NOT_INSTALLED -->
<h2>{TITLE}</h2>
<p>{BODY}</p>
<h1>{TITLE}</h1>
<!-- IF S_LIST -->
<table cellspacing="1">
<caption>{L_AVAILABLE_CONVERTORS}</caption>
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
<thead>
<tr>
<th>{L_SOFTWARE}</th>
<th>{L_VERSION}</th>
<th>{L_AUTHOR}</th>
<th>{L_OPTIONS}</th>
</tr>
</thead>
<tbody>
<!-- IF .convertors -->
<!-- BEGIN convertors -->
<p>{BODY}</p>
<!-- ELSE -->
<form id="install_convert" method="post" action="{U_ACTION}">
<h1>{TITLE}</h1>
<p>{BODY}</p>
<!-- IF S_LIST -->
<table cellspacing="1">
<caption>{L_AVAILABLE_CONVERTORS}</caption>
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
<thead>
<tr>
<td>{convertors.SOFTWARE}</td>
<td>{convertors.VERSION}</td>
<td>{convertors.AUTHOR}</td>
<td><a href="{convertors.U_CONVERT}">{L_CONVERT}</a></td>
</tr>
<!-- END convertors -->
<!-- ELSE -->
<tr>
<td>{L_NO_CONVERTORS}</td>
<td>-</td>
<td>-</td>
<td>-</td>
<th>{L_SOFTWARE}</th>
<th>{L_VERSION}</th>
<th>{L_AUTHOR}</th>
<th>{L_OPTIONS}</th>
</tr>
</thead>
<tbody>
<!-- IF .convertors -->
<!-- BEGIN convertors -->
<tr>
<td>{convertors.SOFTWARE}</td>
<td>{convertors.VERSION}</td>
<td>{convertors.AUTHOR}</td>
<td><a href="{convertors.U_CONVERT}">{L_CONVERT}</a></td>
</tr>
<!-- END convertors -->
<!-- ELSE -->
<tr>
<td>{L_NO_CONVERTORS}</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<!-- ENDIF -->
</tbody>
</table>
<!-- ENDIF -->
</tbody>
</table>
<!-- ENDIF -->
<!-- IF .checks -->
<fieldset>
<!-- IF S_CONTINUE -->
</form>
<!-- BEGIN checks -->
<!-- IF checks.S_LEGEND -->
<!-- IF not checks.S_FIRST_ROW -->
</fieldset>
<fieldset class="submit-buttons">
<form method="post" action="{U_NEW_ACTION}">
<input class="button1" type="submit" name="submit_new" value="{L_NEW}" />
</form>
<br />
<form method="post" action="{U_CONTINUE_ACTION}">
<input class="button1" type="submit" name="submit_cont" value="{L_CONTINUE}" />
</form>
</fieldset>
<fieldset>
<!-- ENDIF -->
<legend>{checks.LEGEND}</legend>
<!-- IF checks.LEGEND_EXPLAIN --><p>{checks.LEGEND_EXPLAIN}</p><!-- ENDIF -->
<!-- ELSE -->
<form method="post" action="{U_ACTION}">
<!-- ENDIF -->
<dl>
<dt>{checks.TITLE}:</label><!-- IF checks.S_EXPLAIN --><br /><span class="explain">{checks.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{checks.RESULT}</dd>
</dl>
<!-- ENDIF -->
<!-- END checks -->
<!-- IF .checks -->
<fieldset>
</fieldset>
<!-- ENDIF -->
<!-- IF .options -->
<fieldset>
<!-- BEGIN options -->
<!-- IF options.S_LEGEND -->
<!-- IF not options.S_FIRST_ROW -->
<!-- BEGIN checks -->
<!-- IF checks.S_LEGEND -->
<!-- IF not checks.S_FIRST_ROW -->
</fieldset>
<fieldset>
<!-- ENDIF -->
<legend>{checks.LEGEND}</legend>
<!-- IF checks.LEGEND_EXPLAIN --><p>{checks.LEGEND_EXPLAIN}</p><!-- ENDIF -->
<!-- ELSE -->
<dl>
<dt>{checks.TITLE}:</label><!-- IF checks.S_EXPLAIN --><br /><span class="explain">{checks.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{checks.RESULT}</dd>
</dl>
<!-- ENDIF -->
<legend>{options.LEGEND}</legend>
<!-- ELSE -->
<!-- END checks -->
<dl>
<dt><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span class="explain">{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{options.CONTENT}</dd>
</dl>
</fieldset>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- END options -->
<!-- IF .options -->
<fieldset>
</fieldset>
<!-- BEGIN options -->
<!-- IF options.S_LEGEND -->
<!-- IF not options.S_FIRST_ROW -->
</fieldset>
<fieldset>
<!-- ENDIF -->
<legend>{options.LEGEND}</legend>
<!-- ELSE -->
<dl>
<dt><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span class="explain">{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{options.CONTENT}</dd>
</dl>
<!-- ENDIF -->
<!-- END options -->
</fieldset>
<!-- ENDIF -->
<!-- IF L_SUBMIT -->
<fieldset class="submit-buttons">
<!-- IF L_MESSAGE --><p>{L_MESSAGE}</p><!-- ENDIF -->
{S_HIDDEN}
<!-- IF L_SUBMIT --><input class="button1<!-- IF S_REFRESH --> disabled<!-- ENDIF -->" type="submit" id="submit" <!-- IF S_REFRESH -->disabled="disabled" <!-- ELSE --> onclick="this.className = 'button1 disabled';" onsubmit="this.disabled = 'disabled';" <!-- ENDIF -->name="submit" value="{L_SUBMIT}" /><!-- ENDIF -->
</fieldset>
<!-- ENDIF -->
</form>
<!-- ENDIF -->
<!-- IF L_SUBMIT -->
<fieldset class="submit-buttons">
<!-- IF L_MESSAGE --><p>{L_MESSAGE}</p><!-- ENDIF -->
{S_HIDDEN}
<!-- IF L_SUBMIT --><input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /><!-- ENDIF -->
</fieldset>
<!-- ENDIF -->
</form>
<!-- INCLUDE install_footer.html -->

View File

@@ -2,7 +2,7 @@
<form id="install_install" method="post" action="{U_ACTION}">
<!-- IF TITLE --><h2>{TITLE}</h2><!-- ENDIF -->
<!-- IF TITLE --><h1>{TITLE}</h1><!-- ENDIF -->
<!-- IF BODY --><p>{BODY}</p><!-- ENDIF -->
<!-- IF .checks -->
@@ -54,7 +54,7 @@
<!-- ENDIF -->
<!-- IF S_SHOW_DOWNLOAD -->
<h2>{L_DL_CONFIG}</h2>
<h1>{L_DL_CONFIG}</h1>
<p>{L_DL_CONFIG_EXPLAIN}</p>
<fieldset class="submit-buttons">
@@ -68,7 +68,7 @@
<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 -->
<!-- IF L_SUBMIT --><input class="button1" type="submit" id="submit" onclick="this.className = 'button1 disabled';" onsubmit="this.disabled = 'disabled';" name="submit" value="{L_SUBMIT}" /><!-- ENDIF -->
</fieldset>
<!-- ENDIF -->

View File

@@ -1,6 +1,6 @@
<!-- INCLUDE install_header.html -->
<h2>{TITLE}</h2>
<h1>{TITLE}</h1>
<p>{BODY}</p>
<!-- INCLUDE install_footer.html -->

View File

@@ -2,11 +2,11 @@
<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;
}
function popup(url, width, height)
{
window.open(url.replace(/&amp;/g, '&'), 'diff', 'height=' + height + ',resizable=yes,scrollbars=yes,width=' + width);
return false;
}
//-->
</script>
@@ -71,14 +71,16 @@ function popup(url, width, height)
</fieldset>
<!-- IF not S_UP_TO_DATE -->
<form id="install_update" method="post" action="{U_ACTION}">
<form id="install_dbupdate" method="post" action="{U_DB_UPDATE_ACTION}">
<fieldset class="submit-buttons">
<p>{L_CHECK_FILES_EXPLAIN}</p>
<input class="button1" type="submit" name="submit" value="{L_CHECK_FILES}" />
<p>{L_UPDATE_DATABASE_EXPLAIN}</p>
<input class="button1" type="submit" name="db_update" value="{L_UPDATE_DATABASE}" />
</fieldset>
</form>
<!-- ELSE -->
<form id="install_update" method="post" action="{U_ACTION}">
@@ -90,90 +92,147 @@ function popup(url, width, height)
</form>
<!-- ENDIF -->
<!-- ELSEIF S_FILE_CHECK -->
<!-- ELSEIF S_DB_UPDATE -->
<h1>{L_COLLECTED_INFORMATION}</h1>
<!-- IF not S_DB_UPDATE_FINISHED -->
<p>{L_COLLECTED_INFORMATION_EXPLAIN}</p>
<h1>{L_PERFORM_DATABASE_UPDATE}</h1>
<!-- IF S_NO_UPDATE_FILES -->
<div class="errorbox">
<h3>{L_NO_UPDATE_FILES}</h3>
<p>
{L_PERFORM_DATABASE_UPDATE_EXPLAIN}<br />
<br />
<a href="{U_DB_UPDATE}" target="update"><strong>&raquo; {L_RUN_DATABASE_SCRIPT} &laquo;</strong></a>
</p>
<p>{L_NO_UPDATE_FILES_EXPLAIN}</p><br />
<br /><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 -->
<form id="install_dbupdate" method="post" action="{U_DB_UPDATE_ACTION}">
<fieldset class="submit-buttons">
<input class="button1" type="submit" name="db_update" value="{L_CHECK_UPDATE_DATABASE}" />
</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}">
<!-- ELSE -->
<h1>{L_UPDATE_DB_SUCCESS}</h1>
<br /><br />
<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>
<!-- ENDIF -->
<!-- ELSEIF S_FILE_CHECK -->
<!-- IF S_ALL_UP_TO_DATE -->
<div class="successbox">
<h3>{L_UPDATE_SUCCESS}</h3>
<p>{L_ALL_FILES_UP_TO_DATE}</p>
</div>
<!-- ELSE -->
<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 style="width: 60%;">
<strong><!-- IF files.DIR_PART -->{files.DIR_PART}<br /><!-- ENDIF -->{files.FILE_PART}</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 style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[ <a href="{files.U_SHOW_DIFF}" onclick="popup('{files.U_SHOW_DIFF}', 700, 500); return false;">{files.L_SHOW_DIFF}</a> ]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
<!-- IF files.S_CUSTOM -->
<dd style="margin-left: 60%;"><input type="checkbox" name="no_update[]" value="{files.FILENAME}" class="radio" />&nbsp; {L_DO_NOT_UPDATE}</dd>
<!-- ENDIF -->
<!-- IF files.STATUS eq 'conflict' -->
</dl>
<dl>
<dt style="width: 60%"><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="1" checked="checked" />&nbsp; {L_MERGE_NO_MERGE_NEW_OPTION}</dt>
<dd style="margin-left: 60%;">[<a href="{files.U_VIEW_NO_MERGE_NEW}" onclick="popup('{files.U_VIEW_NO_MERGE_NEW}', 700, 500); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
</dl>
<dl>
<dt style="width: 60%"><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="2" />&nbsp; {L_MERGE_NO_MERGE_MOD_OPTION}</dt>
<dd style="margin-left: 60%;">[<a href="{files.U_VIEW_NO_MERGE_MOD}" onclick="popup('{files.U_VIEW_NO_MERGE_MOD}', 700, 500); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
</dl>
<!-- IF not files.S_BINARY -->
<dl>
<dt style="width: 60%"><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="3" />&nbsp; {L_MERGE_NEW_FILE_OPTION}</dt>
<dd style="margin-left: 60%;">[<a href="{files.U_VIEW_NEW_FILE}" onclick="popup('{files.U_VIEW_NEW_FILE}', 700, 500); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
</dl>
<dl>
<dt style="width: 60%"><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="4" />&nbsp; {L_MERGE_MOD_FILE_OPTION}</dt>
<dd style="margin-left: 60%;">[<a href="{files.U_VIEW_MOD_FILE}" onclick="popup('{files.U_VIEW_MOD_FILE}', 700, 500); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
</dl>
<!-- ENDIF -->
<!-- IF not files.S_LAST_ROW -->
</fieldset>
<fieldset>
<legend><img src="{T_IMAGE_PATH}file_{files.STATUS}.gif" alt="{files.L_STATUS}" /></legend>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF files.STATUS neq 'conflict' --></dl><!-- ENDIF -->
<!-- ENDIF -->
<!-- END files -->
<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 -->
<br />
<fieldset class="quick">
<input class="button1" type="submit" name="check_again" value="{L_CHECK_FILES_AGAIN}" />
</fieldset>
<br />
<h1>{L_UPDATE_METHOD}</h1>
<p>{L_UPDATE_METHOD_EXPLAIN}</p>
@@ -182,9 +241,9 @@ function popup(url, width, height)
<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>
</form>
<!-- ENDIF -->
<!-- ELSEIF S_DOWNLOAD_FILES -->
@@ -258,7 +317,7 @@ function popup(url, width, height)
<!-- 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>
<dd><input type="<!-- IF data.DATA == 'password' -->password<!-- ELSE -->text<!-- ENDIF -->" id="{data.DATA}" name="{data.DATA}" value="{data.DEFAULT}" /></dd>
</dl>
<!-- END data -->
</fieldset>
@@ -272,16 +331,6 @@ function popup(url, width, height)
</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

@@ -11,6 +11,26 @@
<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
<!--
function resize_panel()
{
var block = document.getElementById('codepanel');
var height;
if (window.innerHeight)
{
height = window.innerHeight - 150;
block.style.height = height + 'px';
}
else
{
//whatever IE needs to do this
}
}
-->
</script>
<style type="text/css">
<!--
@@ -22,13 +42,23 @@
width: 99%;
}
<!-- IF not S_DIFF_NEW_FILE -->
<!-- IF DIFF_MODE neq 'side_by_side' and DIFF_MODE neq 'raw' -->
div#codepanel {
overflow: auto;
width: 100%;
height: 350px;
}
<!-- ELSE -->
div#codepanel {
background-color: #eee;
}
<!-- ENDIF -->
<!-- IF not IS_DIFF_NEW_FILE -->
/**
* Unified Diff
*/
.file {
border: 1px solid #eee;
line-height: .7em;
}
@@ -69,8 +99,11 @@
* Column Diff
*/
table.hrdiff {
width: 99%;
margin: 0 0 8px 5px;
width: 100%;
overflow: hidden;
border-bottom: 1px solid #999;
table-layout: fixed;
}
table.hrdiff th {
@@ -89,9 +122,30 @@ table.hrdiff thead th {
padding: 2px;
}
table.hrdiff tr:first-child th {
border-top: none;
}
table.hrdiff tbody th {
padding: 2em 1px 1px 1px;
font-size: 80%;
border-top: 1px solid #999;
}
table.hrdiff tbody td.old {
border-left: 1px solid #999;
border-right: 1px solid #999;
}
table.hrdiff tbody td.new {
border-right: 1px solid #999;
}
table.hrdiff td pre {
overflow: auto;
display: block;
width: 100%;
overflow: auto;
display: block;
}
table.hrdiff .unmodified {
@@ -144,11 +198,17 @@ table.hrdiff caption span {
</head>
<!-- IF DIFF_MODE neq 'side_by_side' and DIFF_MODE neq 'raw' -->
<body onresize="resize_panel();" onload="resize_panel();">
<!-- ELSE -->
<body>
<!-- ENDIF -->
<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>
@@ -158,24 +218,27 @@ table.hrdiff caption span {
<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">
<div class="panel" id="codepanel">
<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}
{DIFF_CONTENT}
</div>
</div>
<span class="corners-bottom"><span></span></span>
</div>
</div>
<!-- INCLUDE simple_footer.html -->

View File

@@ -93,7 +93,7 @@ function trace(link)
function find_username()
{
<!-- IF UA_FIND_USERNAME -->
window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740');
window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=570, resizable=yes, scrollbars=yes, width=760');
<!-- ENDIF -->
return false;
}
@@ -113,7 +113,7 @@ function swatch(field)
</script>
</head>
<body>
<body class="{S_CONTENT_DIRECTION}">
<div id="wrap">
<div id="page-header">
<h1>{L_ADMIN_PANEL}</h1>

View File

@@ -5,251 +5,126 @@
var active_fmask = '0';
var active_cat = '0';
var id = '000';
var role_options = new Array();
<!-- IF S_ROLE_JS_ARRAY -->
{S_ROLE_JS_ARRAY}
<!-- ENDIF -->
/**
* Show/hide option panels
* value = suffix for ID to show
*/
function swap_options(pmask, fmask, cat)
{
id = pmask + fmask + cat;
active_option = active_pmask + active_fmask + active_cat;
if (id == active_option)
{
return;
}
// Hide active options
dE('options' + active_option, -1);
dE('head' + active_pmask + active_fmask, 1, 'inline');
dE('apply' + active_pmask + active_fmask, -1);
// Display container
dE('options' + id, 1);
dE('head' + pmask + fmask, -1, 'inline');
dE('apply' + pmask + fmask, 1);
active_pmask = pmask;
active_fmask = fmask;
active_cat = cat;
}
/**
* Mark all radio buttons in one panel
* id = table ID container, s = status ['y'/'u'/'n']
*/
function mark_options(id, s)
{
var t = document.getElementById(id);
if (!t)
{
return;
}
var rb = t.getElementsByTagName('input');
for (var r = 0; r < rb.length; r++ )
{
if (rb[r].id.substr(rb[r].id.length-1) == s)
{
rb[r].checked = true;
}
}
}
/**
* Mark one radio button in one panel
* id = table ID container, field_name = the auth option, s = status ['y'/'u'/'n']
*/
function mark_one_option(id, field_name, s)
{
var t = document.getElementById(id);
if (!t)
{
return;
}
var rb = t.getElementsByTagName('input');
for (var r = 0; r < rb.length; r++ )
{
if (rb[r].id.substr(rb[r].id.length-field_name.length-3, field_name.length) == field_name && rb[r].id.substr(rb[r].id.length-1) == s)
{
rb[r].checked = true;
}
}
}
/**
* Reset role dropdown field to Select role... if an option gets changed
*/
function reset_role(id)
{
var t = document.getElementById(id);
if (!t)
{
return;
}
t.options[0].selected = true;
}
/**
* Load role and set options accordingly
*/
function set_role_settings(role_id, target_id)
{
settings = role_options[role_id];
if (!settings)
{
return;
}
// Mark all options to no (unset) first...
mark_options(target_id, 'u');
for (var r in settings)
{
mark_one_option(target_id, r, (settings[r] == 1) ? 'y' : 'n');
}
}
//-->
</script>
<script type="text/javascript" src="style/permissions.js"></script>
<!-- BEGIN p_mask -->
<div class="clearfix"></div>
<h3>{p_mask.NAME}<!-- IF p_mask.S_LOCAL --> <span class="small"> [{p_mask.L_ACL_TYPE}]</span><!-- ENDIF --></h3>
<fieldset class="permissions">
<!-- IF p_mask.USER_GROUPS_DEFAULT or p_mask.USER_GROUPS_CUSTOM -->
<br />
<p>
<!-- IF p_mask.USER_GROUPS_DEFAULT --><b>{p_mask.NAME}</b> {L_USER_IS_MEMBER_OF_DEFAULT}: <b>{p_mask.USER_GROUPS_DEFAULT}</b><br /><!-- ENDIF -->
<!-- IF p_mask.USER_GROUPS_CUSTOM --><b>{p_mask.NAME}</b> {L_USER_IS_MEMBER_OF_CUSTOM}: <b>{p_mask.USER_GROUPS_CUSTOM}</b><!-- ENDIF -->
</p>
<!-- BEGIN f_mask -->
<fieldset class="perm" id="perm{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">
<legend id="legend{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">
<!-- IF not p_mask.S_VIEW -->
<input type="checkbox" style="display: none;" class="perm_cb" name="inherit[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" id="checkbox{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" value="1" onclick="toggle_opacity('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}')" />
<!-- ELSE -->
<!-- ENDIF -->
{p_mask.f_mask.NAME}
</legend>
<!-- IF not p_mask.S_VIEW -->
<div class="perm_switch">
<a href="#" onclick="swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '0', true); return false;">{L_ADVANCED_PERMISSIONS}</a>
</div>
<dl class="perm_simple">
<dt style="width: 20%"><label for="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">{L_ROLE}:</label></dt>
<!-- IF p_mask.f_mask.S_ROLE_OPTIONS -->
<dd style="margin-left: 20%"><select id="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" name="role[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" onchange="set_role_settings(this.options[selectedIndex].value, 'advanced{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); init_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}')">{p_mask.f_mask.S_ROLE_OPTIONS}</select></dd>
<!-- ELSE -->
<dd>{L_NO_ROLE_AVAILABLE}</dd>
<!-- ENDIF -->
</dl>
<!-- ENDIF -->
<table cellspacing="1" class="pmask">
<thead>
<tr>
<th style="text-align: left; width: 70%">{p_mask.NAME}<!-- IF p_mask.S_LOCAL --><span class="small" style="text-transform: none;"> [{p_mask.L_ACL_TYPE}]</span><!-- ENDIF --></th>
<th>{p_mask.CATEGORIES}</th>
</tr>
</thead>
<tbody>
<!-- BEGIN category -->
<!-- IF p_mask.f_mask.category.S_FIRST_ROW -->
<div class="perm_advanced" id="advanced{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}"<!-- IF not p_mask.S_VIEW --> style="display: none;"<!-- ENDIF -->>
<!-- BEGIN f_mask -->
<!-- IF p_mask.f_mask.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td class="name">
<table cellspacing="0" cellpadding="0" class="type2" style="background-color: transparent; border: 0;">
<tbody>
<tr>
<td width="16">
<span id="head{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}"<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW --> style="display: none;"<!-- ENDIF -->>
<!-- 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><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;
<!-- ELSE -->
<!-- IF p_mask.f_mask.S_ROLE_OPTIONS -->
<b>{L_ROLE}:</b>&nbsp; &nbsp;<select id="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" name="role[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" onchange="set_role_settings(this.options[selectedIndex].value, 'a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}')">{p_mask.f_mask.S_ROLE_OPTIONS}</select>
<!-- ELSE -->
<b>{L_ROLE}:</b> {L_NO_ROLE_AVAILABLE}
<!-- ENDIF -->
<!-- ENDIF -->
</td>
</tr>
</tbody>
</table>
</td>
<!-- BEGIN category -->
<!-- IF p_mask.f_mask.category.S_YES -->
<td class="preset preset_yes">
<!-- ELSEIF p_mask.f_mask.category.S_NEVER -->
<td class="preset preset_never">
<!-- ELSEIF p_mask.f_mask.category.S_NO -->
<td class="preset preset_no">
<!-- ELSE -->
<td class="preset preset_custom">
<!-- ENDIF -->
<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">
<td style="vertical-align: top;">
<div id="apply{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" style="text-align: left; width: 98%; margin: 5px;<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW --><!-- ELSE --> display: none;<!-- ENDIF -->">
<!-- IF not p_mask.S_VIEW -->
<div style="float: left; width: 60%;">
<p class="small">{L_APPLY_PERMISSIONS_EXPLAIN}</p>
<input class="button1" type="submit" name="psubmit[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" value="{L_APPLY_PERMISSIONS}" />
</div>
<div style="float: right; text-align: right; width: 35%;">
<p class="small">
[<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 -->
&nbsp;
<!-- ENDIF -->
<div class="perm_cat">
<ul>
<!-- ENDIF -->
<!-- IF p_mask.f_mask.category.S_YES -->
<li class="perm_preset_yes<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}">
<!-- ELSEIF p_mask.f_mask.category.S_NEVER -->
<li class="perm_preset_never<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}">
<!-- ELSEIF p_mask.f_mask.category.S_NO -->
<li class="perm_preset_no<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}">
<!-- ELSE -->
<li class="perm_preset_custom<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}">
<!-- ENDIF -->
<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}', false<!-- IF p_mask.S_VIEW -->, true<!-- ENDIF -->); return false;"><span class="tabbg"><span class="colour"></span>{category.CAT_NAME}</span></a></li>
<!-- END category -->
</ul>
</div>
</td>
<td colspan="{p_mask.S_NUM_CATS}" id="a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" style="vertical-align: top; text-align: left;">
<div style="width: 350px; height: 0; line-height: 0;">&nbsp;</div>
<!-- BEGIN category -->
<table cellspacing="1" id="options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}" class="type3"<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --><!-- ELSE --> style="display: none;"<!-- ENDIF -->>
<!-- BEGIN category -->
<div class="perm_panel" id="options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}" <!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --><!-- ELSE --> style="display: none;"<!-- ENDIF -->>
<span class="corners-top"><span></span></span>
<div class="tablewrap">
<table id="table{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}" cellspacing="1">
<colgroup>
<col class="permissions_name" />
<col class="permissions_yes" />
<col class="permissions_no" />
<!-- IF not p_mask.S_VIEW -->
<col class="permissions_never" />
<!-- ENDIF -->
</colgroup>
<thead>
<tr>
<th scope="col" style="text-align: left; padding-left: 0;"><strong>{L_ACL_SETTING} [{p_mask.f_mask.category.CAT_NAME}]</strong></th>
<th class="name" scope="col"><strong>{L_ACL_SETTING}</strong></th>
<!-- IF p_mask.S_VIEW -->
<th scope="col">{L_ACL_YES}</th>
<th scope="col">{L_ACL_NEVER}</th>
<th style="width: 40px;" class="value" scope="col">{L_ACL_YES}</th>
<th style="width: 40px;" class="value" scope="col">{L_ACL_NEVER}</th>
<!-- ELSE -->
<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>
<th class="value" 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}'); set_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', false, 'yes'); return false;">{L_ACL_YES}</a></th>
<th class="value" 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}'); set_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', false, 'no'); return false;">{L_ACL_NO}</a></th>
<th class="value" 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}'); set_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', false, 'never'); 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="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>
<th class="permission_name<!-- IF p_mask.f_mask.category.mask.S_ROW_COUNT is even --> row4<!-- ELSE --> row3<!-- ENDIF -->"><!-- IF p_mask.f_mask.category.mask.U_TRACE --><a href="#" class="trace" 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>
<td<!-- IF p_mask.f_mask.category.mask.S_YES --> class="yes"<!-- ENDIF -->>&nbsp;</td>
<td<!-- IF p_mask.f_mask.category.mask.S_NEVER --> class="never"<!-- ENDIF -->></td>
<!-- ELSE -->
<td class="no"><input onchange="reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}')" id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_y" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" class="radio" type="radio"<!-- IF p_mask.f_mask.category.mask.S_YES --> checked="checked"<!-- ENDIF --> value="1" /></td>
<td class="no"><input onchange="reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}')" id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_u" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" class="radio" type="radio"<!-- IF p_mask.f_mask.category.mask.S_NO --> checked="checked"<!-- ENDIF --> value="-1" /></td>
<td class="no"><input onchange="reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}')" id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_n" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" class="radio" type="radio"<!-- IF p_mask.f_mask.category.mask.S_NEVER --> checked="checked"<!-- ENDIF --> value="0" /></td>
<td><label for="{p_mask.f_mask.category.mask.S_FIELD_NAME}_y"><input onchange="reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); set_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', false)" id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_y" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" class="radio" type="radio"<!-- IF p_mask.f_mask.category.mask.S_YES --> checked="checked"<!-- ENDIF --> value="1" /></label></td>
<td><label for="{p_mask.f_mask.category.mask.S_FIELD_NAME}_u"><input onchange="reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); set_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', false)" id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_u" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" class="radio" type="radio"<!-- IF p_mask.f_mask.category.mask.S_NO --> checked="checked"<!-- ENDIF --> value="-1" /></label></td>
<td><label for="{p_mask.f_mask.category.mask.S_FIELD_NAME}_n"><input onchange="reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); set_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', false)" id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_n" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" class="radio" type="radio"<!-- IF p_mask.f_mask.category.mask.S_NEVER --> checked="checked"<!-- ENDIF --> value="0" /></label></td>
<!-- ENDIF -->
</tr>
<!-- END mask -->
</tbody>
</table>
<!-- END category -->
</td>
</tr>
<!-- END f_mask -->
</tbody>
</table>
</div>
<!-- IF not p_mask.S_VIEW -->
<fieldset class="quick" style="margin-right: 11px;">
<p class="small">{L_APPLY_PERMISSIONS_EXPLAIN}</p>
<input class="button1" type="submit" name="psubmit[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" value="{L_APPLY_PERMISSIONS}" />
<p class="small"><a href="#" onclick="reset_opacity(0, '{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="reset_opacity(1, '{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); return false;">{L_UNMARK_ALL}</a></p>
</fieldset>
<!-- ENDIF -->
<span class="corners-bottom"><span></span></span>
</div>
<!-- END category -->
</div>
</fieldset>
<!-- END f_mask -->
<!-- END p_mask -->

View File

@@ -0,0 +1,359 @@
/**
* Hide and show all checkboxes
* status = true (show boxes), false (hide boxes)
*/
function display_checkboxes(status)
{
var form = document.getElementById('set_permissions');
var cb = document.getElementsByTagName('input');
var display;
//show
if (status)
{
display = 'inline';
}
//hide
else
{
display = 'none';
}
for (var i = 0; i < cb.length; i++ )
{
if (cb[i].className == 'perm_cb')
{
cb[i].style.display = display;
}
}
}
/**
* Change opacity of element
* e = element
* value = 0 (hidden) till 10 (fully visible)
*/
function set_opacity(e, value) {
e.style.opacity = value/10;
//IE opacity currently turned off, because of its astronomical stupidity
//e.style.filter = 'alpha(opacity=' + value*10 + ')';
}
/**
* Reset the opacity and checkboxes
* block_id = id of the element that needs to be toggled
*/
function toggle_opacity(block_id) {
var cb = document.getElementById('checkbox' + block_id);
var fs = document.getElementById('perm' + block_id);
if (cb.checked)
{
set_opacity(fs, 5);
}
else
{
set_opacity(fs, 10);
}
}
/**
* Reset the opacity and checkboxes
* value = 0 (checked) and 1 (unchecked)
* except_id = id of the element not to hide
*/
function reset_opacity(status, except_id) {
var perm = document.getElementById('set_permissions');
var fs = perm.getElementsByTagName('fieldset');
var opacity = 5;
if (status)
{
opacity = 10;
}
for (var i = 0; i < fs.length; i++ )
{
if (fs[i].className != 'quick')
{
set_opacity(fs[i], opacity);
}
}
if (typeof(except_id) != 'undefined')
{
set_opacity(document.getElementById('perm' + except_id), 10);
}
//reset checkboxes too
marklist('set_permissions', 'inherit', !status);
}
/**
* Check whether we have a full radiobutton row of true
* index = offset for the row of inputs (0 == first row, 1 == second, 2 == third),
* rb = array of radiobuttons
*/
function get_radio_status(index, rb)
{
for (var i = index; i < rb.length; i = i + 3 )
{
if (rb[i].checked != true)
{
if (i > index)
{
//at least one is true, but not all (custom)
return 2;
}
//first one is not true
return 0;
}
}
// all radiobuttons true
return 1;
}
/**
* Set tab colours
* id = panel the tab needs to be set for,
* init = initialising on open,
* quick = If no calculation needed, this contains the colour
*/
function set_colours(id, init, quick)
{
var table = document.getElementById('table' + id);
var tab = document.getElementById('tab' + id);
if (typeof(quick) != 'undefined')
{
tab.className = 'perm_preset_' + quick + ' activetab';
return;
}
var rb = table.getElementsByTagName('input');
var colour = 'custom';
var status = get_radio_status(0, rb);
if (status == 1)
{
colour = 'yes';
}
else if (status == 0)
{
// We move on to No
status = get_radio_status(1, rb);
if (status == 1)
{
colour = 'no';
}
else if (status == 0)
{
// We move on to Never
status = get_radio_status(2, rb);
if (status == 1)
{
colour = 'never';
}
}
}
if (init)
{
tab.className = 'perm_preset_' + colour;
}
else
{
tab.className = 'perm_preset_' + colour + ' activetab';
}
}
/**
* Initialise advanced tab colours on first load
* block_id = block that is opened
*/
function init_colours(block_id)
{
var block = document.getElementById('advanced' + block_id);
var panels = block.getElementsByTagName('div');
var tab = document.getElementById('tab' + id);
for (var i = 0; i < panels.length; i++)
{
if(panels[i].className == 'perm_panel')
{
set_colours(panels[i].id.replace(/options/, ''), true);
}
}
tab.className = tab.className + ' activetab';
}
/**
* Show/hide option panels
* value = suffix for ID to show
* adv = we are opening advanced permissions
* view = called from view permissions
*/
function swap_options(pmask, fmask, cat, adv, view)
{
id = pmask + fmask + cat;
active_option = active_pmask + active_fmask + active_cat;
var old_tab = document.getElementById('tab' + active_option);
var new_tab = document.getElementById('tab' + id);
var adv_block = document.getElementById('advanced' + pmask + fmask);
if (adv_block.style.display == 'block' && adv == true)
{
dE('advanced' + pmask + fmask, -1);
reset_opacity(1);
display_checkboxes(false);
return;
}
// no need to set anything if we are clicking on the same tab again
if (new_tab == old_tab && !adv)
{
return;
}
// init colours
if (adv && (pmask + fmask) != (active_pmask + active_fmask))
{
init_colours(pmask + fmask);
display_checkboxes(true);
reset_opacity(1);
}
else if (adv)
{
//Checkbox might have been clicked, but we need full visibility
display_checkboxes(true);
reset_opacity(1);
}
// set active tab
old_tab.className = old_tab.className.replace(/\ activetab/g, '');
new_tab.className = new_tab.className + ' activetab';
if (id == active_option && adv != true)
{
return;
}
dE('options' + active_option, -1);
//hiding and showing the checkbox
if (document.getElementById('checkbox' + active_pmask + active_fmask))
{
dE('checkbox' + pmask + fmask, -1);
if ((pmask + fmask) != (active_pmask + active_fmask))
{
document.getElementById('checkbox' + active_pmask + active_fmask).style.display = 'inline';
}
}
if (!view)
{
dE('advanced' + active_pmask + active_fmask, -1);
}
if (!view)
{
dE('advanced' + pmask + fmask, 1);
}
dE('options' + id, 1);
active_pmask = pmask;
active_fmask = fmask;
active_cat = cat;
}
/**
* Mark all radio buttons in one panel
* id = table ID container, s = status ['y'/'u'/'n']
*/
function mark_options(id, s)
{
var t = document.getElementById(id);
if (!t)
{
return;
}
var rb = t.getElementsByTagName('input');
for (var r = 0; r < rb.length; r++)
{
if (rb[r].id.substr(rb[r].id.length-1) == s)
{
rb[r].checked = true;
}
}
}
function mark_one_option(id, field_name, s)
{
var t = document.getElementById(id);
if (!t)
{
return;
}
var rb = t.getElementsByTagName('input');
for (var r = 0; r < rb.length; r++)
{
if (rb[r].id.substr(rb[r].id.length-field_name.length-3, field_name.length) == field_name && rb[r].id.substr(rb[r].id.length-1) == s)
{
rb[r].checked = true;
}
}
}
/**
* Reset role dropdown field to Select role... if an option gets changed
*/
function reset_role(id)
{
var t = document.getElementById(id);
if (!t)
{
return;
}
t.options[0].selected = true;
}
/**
* Load role and set options accordingly
*/
function set_role_settings(role_id, target_id)
{
settings = role_options[role_id];
if (!settings)
{
return;
}
// Mark all options to no (unset) first...
mark_options(target_id, 'u');
for (var r in settings)
{
mark_one_option(target_id, r, (settings[r] == 1) ? 'y' : 'n');
}
}

View File

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

View File

@@ -79,7 +79,7 @@ function marklist(id, name, state)
function find_username()
{
<!-- IF UA_FIND_USERNAME -->
window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740');
window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=570, resizable=yes, scrollbars=yes, width=760');
<!-- ENDIF -->
return false;
}
@@ -99,6 +99,6 @@ function swatch(field)
</script>
</head>
<body>
<body class="{S_CONTENT_DIRECTION}">
<div id="page-body" style="padding: 0 10px;">

View File

@@ -36,8 +36,6 @@ $template->assign_vars(array(
'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

@@ -76,7 +76,7 @@ function deregister_globals()
}
// If we are on PHP >= 6.0.0 we do not need some code
if (version_compare(phpversion(), '6.0.0-dev', '>='))
if (version_compare(PHP_VERSION, '6.0.0-dev', '>='))
{
/**
* @ignore

View File

@@ -949,6 +949,7 @@ function get_schema_struct()
'session_id' => array('CHAR:32', ''),
'confirm_type' => array('TINT:3', 0),
'code' => array('VCHAR:8', ''),
'seed' => array('UINT:10', 0),
),
'PRIMARY_KEY' => array('session_id', 'confirm_id'),
'KEYS' => array(
@@ -1043,9 +1044,9 @@ function get_schema_struct()
'enable_icons' => array('BOOL', 1),
'enable_prune' => array('BOOL', 0),
'prune_next' => array('TIMESTAMP', 0),
'prune_days' => array('TINT:4', 0),
'prune_viewed' => array('TINT:4', 0),
'prune_freq' => array('TINT:4', 0),
'prune_days' => array('UINT', 0),
'prune_viewed' => array('UINT', 0),
'prune_freq' => array('UINT', 0),
),
'PRIMARY_KEY' => 'forum_id',
'KEYS' => array(
@@ -1326,7 +1327,7 @@ function get_schema_struct()
'rule_user_id' => array('UINT', 0),
'rule_group_id' => array('UINT', 0),
'rule_action' => array('UINT', 0),
'rule_folder_id' => array('INT:4', 0),
'rule_folder_id' => array('INT:11', 0),
),
'PRIMARY_KEY' => 'rule_id',
'KEYS' => array(
@@ -1345,7 +1346,7 @@ function get_schema_struct()
'pm_replied' => array('BOOL', 0),
'pm_marked' => array('BOOL', 0),
'pm_forwarded' => array('BOOL', 0),
'folder_id' => array('INT:4', 0),
'folder_id' => array('INT:11', 0),
),
'KEYS' => array(
'msg_id' => array('INDEX', 'msg_id'),
@@ -1487,6 +1488,7 @@ function get_schema_struct()
'session_time' => array('TIMESTAMP', 0),
'session_ip' => array('VCHAR:40', ''),
'session_browser' => array('VCHAR:150', ''),
'session_forwarded_for' => array('VCHAR:255', ''),
'session_page' => array('VCHAR_UNI', ''),
'session_viewonline' => array('BOOL', 1),
'session_autologin' => array('BOOL', 0),
@@ -1876,7 +1878,7 @@ function get_schema_struct()
'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_options' => array('UINT:11', 895),
'user_avatar' => array('VCHAR', ''),
'user_avatar_type' => array('TINT:2', 0),
'user_avatar_width' => array('USINT', 0),
@@ -1932,10 +1934,7 @@ function get_schema_struct()
'friend' => array('BOOL', 0),
'foe' => array('BOOL', 0),
),
'KEYS' => array(
'user_id' => array('INDEX', 'user_id'),
'zebra_id' => array('INDEX', 'zebra_id'),
),
'PRIMARY_KEY' => array('user_id', 'zebra_id'),
);
return $schema_data;

View File

@@ -89,7 +89,7 @@ function my_var_export($var)
return 'array(' . implode(',', $lines) . ')';
}
elseif (is_string($var))
else if (is_string($var))
{
return "'" . str_replace(array('\\', "'"), array('\\\\', "\\'"), $var) . "'";
}

View File

@@ -320,7 +320,7 @@ while ($line = fgets($fp, 1024))
*/
$map[$cp] = strtolower($capture[1]);
}
elseif (isset($m[13][0]))
else if (isset($m[13][0]))
{
/**
* If the letter has a lowercased form, use it
@@ -455,7 +455,7 @@ function my_var_export($var)
return 'array(' . implode(',', $lines) . ')';
}
elseif (is_string($var))
else if (is_string($var))
{
return "'" . str_replace(array('\\', "'"), array('\\\\', "\\'"), $var) . "'";
}
@@ -544,11 +544,11 @@ function cp_to_utf($cp)
{
return chr(0xF0 | ($cp >> 18)) . chr(0x80 | (($cp >> 12) & 0x3F)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
}
elseif ($cp > 0x7FF)
else if ($cp > 0x7FF)
{
return chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
}
elseif ($cp > 0x7F)
else if ($cp > 0x7F)
{
return chr(0xC0 | ($cp >> 6)) . chr(0x80 | ($cp & 0x3F));
}

View File

@@ -60,7 +60,7 @@ while ($module = array_shift($keys))
$compare = "Equal";
$equal++;
}
elseif (strcasecmp($kkeys[$module][$dup], $kkeys[$other_module][$dup]) == 0)
else if (strcasecmp($kkeys[$module][$dup], $kkeys[$other_module][$dup]) == 0)
{
$compare = "Differ in case";
$case++;

74
phpBB/develop/regex.php Normal file
View File

@@ -0,0 +1,74 @@
<?php
// IP regular expressions
$dec_octet = '(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])';
$h16 = '[\dA-F]{1,4}';
$ipv4 = "(?:$dec_octet\.){3}$dec_octet";
$ls32 = "(?:$h16:$h16|$ipv4)";
$ipv6_construct = array(
array(false, '', '{6}', $ls32),
array(false, '::', '{5}', $ls32),
array('', ':', '{4}', $ls32),
array('{1,2}', ':', '{3}', $ls32),
array('{1,3}', ':', '{2}', $ls32),
array('{1,4}', ':', '', $ls32),
array('{1,5}', ':', false, $ls32),
array('{1,6}', ':', false, $h16),
array('{1,7}', ':', false, '')
);
$ipv6 = '(?:';
foreach ($ipv6_construct as $ip_type)
{
$ipv6 .= '(?:';
if ($ip_type[0] !== false)
{
$ipv6 .= "(?:$h16:)" . $ip_type[0];
}
$ipv6 .= $ip_type[1];
if ($ip_type[2] !== false)
{
$ipv6 .= "(?:$h16:)" . $ip_type[2];
}
$ipv6 .= $ip_type[3] . ')|';
}
$ipv6 = substr($ipv6, 0, -1) . ')';
echo 'IPv4: ' . $ipv4 . "<br />\nIPv6: " . $ipv6 . "<br />\n";
// URL regular expressions
$pct_encoded = "%[\dA-F]{2}";
$unreserved = 'a-z0-9\-._~';
$sub_delims = '!$&\'()*+,;=';
$pchar = "(?:[$unreserved$sub_delims:@|]+|$pct_encoded)"; // rfc: no "|"
$scheme = '[a-z][a-z\d+\-.]*';
$reg_name = "(?:[$unreserved$sub_delims|@]+|$pct_encoded)+"; // rfc: * instead of + and no "|" and no "@" (included instead of userinfo
//$userinfo = "(?:(?:[$unreserved$sub_delims:]+|$pct_encoded))*";
$ipv4_simple = '[0-9.]+';
$ipv6_simple = '\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\]';
$host = "(?:$reg_name|$ipv4_simple|$ipv6_simple)";
$port = '\d*';
//$authority = "(?:$userinfo@)?$host(?::$port)?";
$authority = "$host(?::$port)?";
$segment = "$pchar*";
$path_abempty = "(?:/$segment)*";
$hier_part = "/{2}$authority$path_abempty";
$query = "(?:[$unreserved$sub_delims:@/?|]+|$pct_encoded)*"; // pchar | "/" | "?", rfc: no "|"
$fragment = $query;
$url = "$scheme:$hier_part(?:\?$query)?(?:\#$fragment)?";
echo 'URL: ' . $url . "<br />\n";
// no scheme, shortened authority, but host has to start with www.
$www_url = "www\.$reg_name(?::$port)?$path_abempty(?:\?$query)?(?:\#$fragment)?";
echo 'www.URL: ' . $www_url . "<br />\n";
// no schema and no authority
$relative_url = "$segment$path_abempty(?:\?$query)?(?:\#$fragment)?";
echo 'relative URL: ' . $relative_url . "<br />\n";
?>

View File

@@ -82,7 +82,7 @@ for(;$postcounter <= $max_post_id; $postcounter += $batchsize)
$rowset = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$post_rows = count($rowset);
$post_rows = sizeof($rowset);
if( $post_rows )
{

View File

@@ -71,7 +71,7 @@ $test_suite = array(
require_once($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
$i = $n = 0;
$failed = FALSE;
$failed = false;
$tested_chars = array();
$fp = fopen($phpbb_root_path . 'develop/NormalizationTest.txt', 'rb');
@@ -127,7 +127,7 @@ while (!feof($fp))
if (strcmp($utf_expected, $utf_result))
{
$failed = TRUE;
$failed = true;
$hex_result = utf_to_hexseq($utf_result);
echo "\nFAILED $expected == $form($test) ($hex_expected != $hex_result)";
@@ -365,11 +365,11 @@ function cp_to_utf($cp)
{
return chr(0xF0 | ($cp >> 18)) . chr(0x80 | (($cp >> 12) & 0x3F)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
}
elseif ($cp > 0x7FF)
else if ($cp > 0x7FF)
{
return chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
}
elseif ($cp > 0x7F)
else if ($cp > 0x7F)
{
return chr(0xC0 | ($cp >> 6)) . chr(0x80 | ($cp & 0x3F));
}

View File

@@ -14,13 +14,13 @@ phpBB Project Manager : theFinn (James Atkinson)
phpBB Lead Developers : Acyd Burn (Meik Sievertsen)
psoTFX (Paul S. Owen) [2001 - 09/2005]
phpBB Developers : Ashe (Ludovic Arnaud) - [10/2002 - 11/2003, 06/2006 - ]
DavidMJ (David M.)
phpBB Developers : DavidMJ (David M.)
GrahamJE (Graham Eames)
naderman (Nils Adermann)
subBlue (Tom Beddard)
BartVB (Bart van Bragt) - [11/2000 - 03/2006]
Ashe (Ludovic Arnaud) - [10/2002 - 11/2003, 06/2006 - 10/2006]
Original subSilver by subBlue Design, Tom Beddard, (c) 2001 phpBB Group

215
phpBB/docs/CHANGELOG.html Normal file
View File

@@ -0,0 +1,215 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>phpBB 3.0.x Changelog</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="resource-type" content="document" />
<meta name="description" lang="en" content="phpBB 3.0.x Changelog" />
<meta name="keywords" lang="en" content="" />
<meta name="author" content="phpBB Group" />
<meta name="copyright" content="phpBB Group" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<style type="text/css">
<!--
/* The original "subSilver" theme for phpBB2 Created by subBlue design :: http://www.subBlue.com */
body {
background-color: white;
font-family: Verdana, Arial, Helvetica, sans-serif;
margin: 0;
border: 0;
padding: 0;
}
img {
border: 0;
}
p {
font-size: 8pt;
}
hr {
height: 0;
border: solid #D1D7DC 0;
border-top-width: 1px;
}
#title, h1 {
font: bold 18pt 'Trebuchet MS', Verdana, sans-serif;
text-decoration: none;
line-height: 120%;
}
h2 {
font: bold 12pt Arial, Helvetica, sans-serif;
text-decoration: none;
line-height: 120%;
}
h3 {
font: bold 10pt Arial, Helvetica, sans-serif;
text-decoration: none;
line-height: 120%;
}
.paragraph {
margin-left: 20px;
}
/* Structure */
#logo {
background: #fff url(header_bg.jpg) repeat-x top right;
height: 60px;
}
#title {
color: #12749b;
float: right;
margin: 10px 10px 0;
}
#main {
margin-left: 25px;
margin-right: 25px;
}
.good {
color: green;
}
.bad {
color: red;
}
#footer {
margin-left: 75px;
font-size: 70%;
color: #006600;
}
code {
color: #006600;
font-weight: normal;
font-family: 'Courier New', monospace;
border-color: #D1D7DC;
border-width: 1px;
border-style: solid;
background-color: #FAFAFA;
}
.indent p {
padding-left: 20px;
font-size: 90%;
}
/* Anchors */
a {
font-size: 70%;
}
a:link, a:active, a:visited {
color: #006699;
text-decoration: none;
}
a:hover {
color: #DD6900;
text-decoration: underline;
}
a.nav {
color: #006699;
text-decoration: none;
}
a.nav:hover {
text-decoration: underline;
}
p a {
font-size: 100%;
}
.menu {
font-size: 80%;
}
.menu li a {
font-size: 100%;
}
.comment {
color: green;
}
//-->
</style>
</head>
<body>
<div id="logo">
<div id="title">phpBB 3.0.x Changelog</div>
<img src="header_left.jpg" alt="phpBB Logo" />
</div>
<a name="top"></a><div id="main">
<!-- BEGIN DOCUMENT -->
<p>This is a non-exhaustive (but still near complete) changelog for phpBB 3.0.x including release candidate versions. Our thanks to all those people who've contributed bug reports and code fixes.</p>
<h1>Changelog</h1>
<ol class="menu">
<li><a href="#changelog">Changelog</a>
<ol type="i">
<li><a href="#v30rc1">Changes since RC-1</a></li>
</ol>
</li>
<li><a href="#disclaimer">Copyright and disclaimer</a></li>
</ol>
<hr />
<a name="changelog"></a><h1>1. Changelog</h1>
<a name="v30rc1"></a><b>1.i. Changes since 3.0.RC1</b>
<br /><br />
<div class="paragraph">
<ul class="menu">
<li>&nbsp;</li>
</ul>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="disclaimer"></a><h1>2. Copyright and disclaimer</h1>
<div class="paragraph">
<p>This application is opensource software released under the <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>
<a href="#top">Top</a>
<!-- END DOCUMENT -->
</div>
<br /><br />
<div id="footer">Note that a full list of fixed bugs can be found at the bug tracker (<a href="README.html#bugs">see section on bug reporting</a>)<br /><br /></div>
</body>
</html>

380
phpBB/docs/FAQ.html Normal file
View File

@@ -0,0 +1,380 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>phpBB 3.0.x FAQ</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="resource-type" content="document" />
<meta name="description" lang="en" content="phpBB 3.0.x frequently asked questions" />
<meta name="keywords" lang="en" content="" />
<meta name="author" content="phpBB Group" />
<meta name="copyright" content="phpBB Group" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<style type="text/css">
<!--
/* The original "subSilver" theme for phpBB2 Created by subBlue design :: http://www.subBlue.com */
body {
background-color: white;
font-family: Verdana, Arial, Helvetica, sans-serif;
margin: 0;
border: 0;
padding: 0;
}
img {
border: 0;
}
p {
font-size: 8pt;
}
hr {
height: 0;
border: solid #D1D7DC 0;
border-top-width: 1px;
}
#title, h1 {
font: bold 18pt 'Trebuchet MS', Verdana, sans-serif;
text-decoration: none;
line-height: 120%;
}
h2 {
font: bold 12pt Arial, Helvetica, sans-serif;
text-decoration: none;
line-height: 120%;
}
h3 {
font: bold 10pt Arial, Helvetica, sans-serif;
text-decoration: none;
line-height: 120%;
}
.paragraph {
margin-left: 20px;
}
/* Structure */
#logo {
background: #fff url(header_bg.jpg) repeat-x top right;
height: 60px;
}
#title {
color: #12749b;
float: right;
margin: 10px 10px 0;
}
#main {
margin-left: 25px;
margin-right: 25px;
}
.good {
color: green;
}
.bad {
color: red;
}
#footer {
margin-left: 75px;
font-size: 70%;
color: #006600;
}
code {
color: #006600;
font-weight: normal;
font-family: 'Courier New', monospace;
border-color: #D1D7DC;
border-width: 1px;
border-style: solid;
background-color: #FAFAFA;
}
.indent p {
padding-left: 20px;
font-size: 90%;
}
/* Anchors */
a {
font-size: 70%;
}
a:link, a:active, a:visited {
color: #006699;
text-decoration: none;
}
a:hover {
color: #DD6900;
text-decoration: underline;
}
a.nav {
color: #006699;
text-decoration: none;
}
a.nav:hover {
text-decoration: underline;
}
p a {
font-size: 100%;
}
.menu {
font-size: 80%;
}
.menu li a {
font-size: 100%;
}
.comment {
color: green;
}
//-->
</style>
</head>
<body>
<div id="logo">
<div id="title">phpBB 3.0.x FAQ</div>
<img src="header_left.jpg" alt="phpBB Logo" />
</div>
<a name="top"></a><div id="main">
<!-- BEGIN DOCUMENT -->
<p>This is a very basic Frequently Asked Questions (FAQ) page which attempts to answer some of the more commonly asked questions. It is by no means exhaustive and should be used in combination with the 'built-in' User FAQ within phpBB3, the community forums and our IRC channel (see <a href="README.html">README</a> for details).</p>
<h1>FAQ</h1>
<!-- add entry about common UTF8 problems (for example wrong uploading, editing) -->
<ul class="menu">
<li><a href="#install">I cannot install this it is too difficult! Will you do it?</a></li>
<li><a href="#legal">I am having problems with the admin at a certain board, help!</a></li>
<li><a href="#legal">A board has ripped off my graphics/software/etc., stop them!</a></li>
<li><a href="#legal">A board is dealing in warez/porn/etc., you need to prevent them doing this!</a></li>
<li><a href="#legal">I want to sue you because i think you host an illegal board!</a></li>
<li><a href="#viewonline">According to viewonline a user is doing/reading something they should not be able to!</a></li>
<li><a href="#mail">I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!</a></li>
<li><a href="#mail_language">My users are complaining that emails are not in their selected language!</a></li>
<li><a href="#aol_browser">My AOL based users keep getting logged out!</a></li>
<li><a href="#avatars">No matter what I set the uploadable avatars to I cannot upload one from my computer!</a></li>
<li><a href="#gallery_avatars">I just cannot get gallery avatars to appear!</a></li>
<li><a href="#permissions">How do I use/set permissions?</a></li>
<li><a href="#login_issues">I (or my users) cannot stay logged in to the forum!</a></li>
<li><a href="#logout_issues">My users are complaining about being logged out too quickly!</a></li>
<li><a href="#not_answered">My question isn't answered here!</a></li>
<li><a href="#disclaimer">Copyright and disclaimer</a></li>
</ul>
<hr />
<a name="install"></a><h3>I cannot install this it is too difficult! Will you do it?</h3>
<div class="paragraph">
<p>Simple answer, no we will not. We are not being difficult when we say this we are actually trying to help you. phpBB has a reputation for being easy to install, that reputation is we believe well deserved. It is a simple process of unarchiving a single file, uploading the resulting directory/files to their intended location and entering some data in a web based form. The sequence of events, what to type where, etc. is covered in detail in the accompanying <a href="INSTALL.html">INSTALL.html</a> documentation. If you cannot install phpBB3 the chances are you will be unable to administer or update it.</p>
<p>There are people, companies (unrelated to your hosting provider), etc. that will install your forum, either for free or for a payment. We do not recommend you make use of these offers. Unless the service is provided by your hosting company you will have to divulge passwords and other sensitive details. If you did not know how to use an ATM would you give a passer-by your bank card and PIN and ask them to show you what to do? No, probably not! The same applies to your hosting account details!</p>
<p>We think a better solution is for you to carefully read the enclosed documentation, read through our knowledge base at <a href="http://www.phpbb.com/">www.phpbb.com</a> and if necessary ask for help on any thing you get stuck on. However, the decision is yours but please note we may not offer support if we believe you have had the board installed by a third party. In such cases you should direct your questions to that company or person/s.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="legal"></a>
<h3>I am having problems with the admin at a certain board, help!</h3>
<h3>A board has ripped off my graphics/software/etc., stop them!</h3>
<h3>A board is dealing in warez/porn/etc., you need to prevent them doing this!</h3>
<h3>I want to sue you because i think you host an illegal board!</h3>
<div class="paragraph">
<p>We provide the software, we have absolutely nothing to do with any board that runs it (beyond phpbb.com of course!) and we also do not host any site. The GPL grants the user an unlimited right of use subject to their adherence of that licence. Therefore we cannot prevent, dictate, control or otherwise limit the use of phpBB software. So please do not contact us for such matters.</p>
<p>If you have a problem with a given board please take it up with them, not us. We are not and cannot be held legally responsible for any third party use of this software (much like Microsoft et al cannot be held responsible for the use of Windows in illegal activities, etc.). Additionally we do <strong>not</strong> track the use of phpBB software in any way. So please do not ask us for details on a &quot;given&quot; board we will not be able to help you. If any law firms or lawyers out there send us writs, cease and desist orders, etc. for third party website use of this software we reserve the right to charge for time wasted dealing with such issues...</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="viewonline"></a><h3>According to viewonline a user is doing/reading something they should not be able to!</h3>
<div class="paragraph">
<p>No, they probably are not. phpBB uses sessions to keep track of users as they move between pages. The session information tells us who this user is. Therefore in order to determine what a user can do on a page we first need the session details. Once this data is available we can check whether the user is permitted to do whatever it is they are trying to do. This can result in it appearing as if a user is reading a topic in a forum they should not be able to access. Or perhaps viewing private messages when they are only guests, etc. In practice the user is not doing these things, they are viewing a &quot;You are not permitted to do this&quot; type message. The session data has simply been updated before we were able to determine what the user could or could not do.</p>
<p>Of course this only applies where permissions have been set correctly!</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="mail"></a><h3>I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!</h3>
<div class="paragraph">
<p>This error will occur if phpBB cannot send mail. phpBB can send email two ways; using the PHP <code>mail()</code> function or directly via SMTP. Some hosting providers limit the <code>mail()</code> function to prevent its use in spamming, others may rename it or limit its functionality. If the <code>mail()</code> function got renamed, you are able to enter the correct name within the administration control panel. In either case you may need to make use of SMTP. This requires that you have access to such a facility, e.g. your hosting provider may provide one (perhaps requiring specific written authorisation), etc. Please see <a href="http://www.phpbb.com/">www.phpbb.com</a> for additional help on this matter.</p>
<p>If you do require SMTP services please do not ask (on our forums or elsewhere) for someone to provide you with one. Open relays are now things of the past thanks to the unthinking spammers out there. Therefore you are unlikely to find someone willing to offer you (free) services.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="mail_language"></a><h3>My users are complaining that emails are not in their selected language!</h3>
<div class="paragraph">
<p>You must have deleted a language pack or the language pack is incomplete. phpBB will try to send emails in the users selected language. If it cannot find a suitable email template it will switch to the boards default language.</p>
<!-- additional entry about encoded emails -->
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="aol_browser"></a><h3>My AOL based users keep getting logged out!</h3>
<div class="paragraph">
<p>phpBB uses sessions to keep track of users as they browse the board. These sessions use a combination of a unique session id, the users IP and if specified the users browser and/or the users x-forwarded-for header to identify each user. We make use of all of this as an extra safe-guard to help prevent sessions being hijacked (by discovering the unique session id).</p>
<p>Unfortunately this only works when the users IP is constant as they browse the board. For most users this will be the case. However certain providers route their users via a cluster of proxys. In some cases, particularly the AOL browser, this results in different IPs being forwarded as the user moves between pages. We take account of this by not checking the entire IP by default but only the first "three quads" (<samp>A.B.C</samp>). Again in most cases this will be fine. However again AOL uses IPs which can vary so much that checking only the first two quads results in a fairly static IP being available for session validation.</p>
<p>If you are experiencing problems related to this you can set the Session IP validation parameter found in <code>Admin-&gt;General-&gt;Server Configuration-&gt;Security Settings</code> to <samp>A.B</samp>. Please note that reducing the IP validation length does potentially increase the risk of sessions being hijacked (this is something for you to consider, phpBB Group takes no responsibility should anything happen!). We suggest to at least additionally enable the browser validation.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="avatars"></a><h3>No matter what I set the uploadable avatars to I cannot upload one from my computer!</h3>
<div class="paragraph">
<p>There are two possibilities here, the first is you have not created the directory you specified as the storage location for avatars, ie. as specified in the <code>Admin -&gt; General -&gt; Board Configuration -&gt; Avatar settings</code> section. If the directory does not exist uploadeable avatars are automatically disabled. You should create the required directory (ensuring it has global write access or other appropriate permissions to allow the webserver to write files to it).</p>
<p>The second possibility is that your provider has disabled file_upload support. You should contact your provider and ask them if this is the case. There is not a lot you can do, there are still three other avatar settings left to choose from including uploading via an URL which will work fine.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="gallery_avatars"></a><h3>I just cannot get gallery avatars to appear!</h3>
<div class="paragraph">
<p>phpBB categorises gallery avatars and it does this by reading through folders contained in the location you specified as being the gallery path. For example, if you set the gallery path to <samp>images/avatars/gallery</samp> phpBB will expect to find a series of folders within that path, eg. <samp>images/avatars/gallery/moviestars</samp>, <samp>images/avatars/gallery/cartoons</samp>, <samp>images/avatars/gallery/misc</samp>, etc. Placing images directly in <samp>images/avatars/gallery/</samp> will result in nothing being listed in your gallery.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="permissions"></a><h3>How do I use/set permissions?</h3>
<div class="paragraph">
<p>Please read our documentation about <a href="#">permissions</a>.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="login_issues"></a><h3>I (or my users) cannot stay logged in to the forum!</h3>
<div class="paragraph">
<p>If you (or your users) are, after attempting a login, being returned to the index (or other page) without appearing to be logged in the most likely problem is incorrect cookie settings. phpBB uses cookies to store a session id and a small amount of user data. For this data to be stored correctly the cookie domain, name, path and secure settings must be correct. You can check this in <code>Admin-&gt;General-&gt;Server Configuration-&gt;Cookie Settings</code>. Typically the cookie domain can be left blank and the cookie path set to <samp>/</samp> (a single forward slash). Do <strong>not</strong> set the cookie as being secure unless your board is running over a secure sockets layer connection, ie. https://</p>
<p>If you still have problems try setting the cookie domain to your full domain name, eg. <samp>www.mysystem.tld</samp>, <samp>www.something.mydomain.tld</samp>. You <strong>must</strong> ensure the domain name contains at least two dots or browsers will be unlikely to recognise the cookie, eg. <samp>.mydomain.com</samp>, <samp>mydomain.com</samp>. Do <strong>not</strong> add http:// or anything else to the domain name!</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="logout_issues"></a><h3>My users are complaining about being logged out too quickly!</h3>
<div class="paragraph">
<p>You can increase the default length of sessions (ie. how long before a users session is considered 'dead') in <code>Admin-&gt;General-&gt;Server Configuration-&gt;Load Settings</code>. Set it to whatever value your users feel comfortable with, remember that security issues may affect your decision (ie. having too long a session may allow non-users to abuse your board should a user forget to logout or otherwise leave a current session on a public workstation).</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="not_answered"></a><h3>My question isn't answered here!</h3>
<div class="paragraph">
<p>Please read our <a href="#">extensive user documentation</a> first, it may just explain what you want to know.</p>
<p>Feel free to search our community forum for the information you require. <strong>PLEASE DO NOT</strong> post your question without having first used search, chances are someone has already asked and answered your question. You can find our board here:</p>
<p><a href="http://www.phpbb.com">www.phpbb.com</a></p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="disclaimer"></a><h3>Copyright and disclaimer</h3>
<div class="paragraph">
<p>This application is opensource software released under the <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>
<a href="#top">Top</a>
<!-- END DOCUMENT -->
</div>
<div id="footer">&nbsp; <br /><br /></div>
</body>
</html>

519
phpBB/docs/INSTALL.html Normal file
View File

@@ -0,0 +1,519 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>phpBB 3.0.x Install</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="resource-type" content="document" />
<meta name="description" lang="en" content="phpBB 3.0.x Installation, updating and conversion informations" />
<meta name="keywords" lang="en" content="" />
<meta name="author" content="phpBB Group" />
<meta name="copyright" content="phpBB Group" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<style type="text/css">
<!--
/* The original "subSilver" theme for phpBB2 Created by subBlue design :: http://www.subBlue.com */
body {
background-color: white;
font-family: Verdana, Arial, Helvetica, sans-serif;
margin: 0;
border: 0;
padding: 0;
}
img {
border: 0;
}
p {
font-size: 8pt;
}
hr {
height: 0;
border: solid #D1D7DC 0;
border-top-width: 1px;
}
#title, h1 {
font: bold 18pt 'Trebuchet MS', Verdana, sans-serif;
text-decoration: none;
line-height: 120%;
}
h2 {
font: bold 12pt Arial, Helvetica, sans-serif;
text-decoration: none;
line-height: 120%;
}
h3 {
font: bold 10pt Arial, Helvetica, sans-serif;
text-decoration: none;
line-height: 120%;
}
.paragraph {
margin-left: 20px;
}
/* Structure */
#logo {
background: #fff url(header_bg.jpg) repeat-x top right;
height: 60px;
}
#title {
color: #12749b;
float: right;
margin: 10px 10px 0;
}
#main {
margin-left: 25px;
margin-right: 25px;
}
.good {
color: green;
}
.bad {
color: red;
}
#footer {
margin-left: 75px;
font-size: 70%;
color: #006600;
}
code {
color: #006600;
font-weight: normal;
font-family: 'Courier New', monospace;
border-color: #D1D7DC;
border-width: 1px;
border-style: solid;
background-color: #FAFAFA;
}
.indent p {
padding-left: 20px;
font-size: 90%;
}
/* Anchors */
a {
font-size: 70%;
}
a:link, a:active, a:visited {
color: #006699;
text-decoration: none;
}
a:hover {
color: #DD6900;
text-decoration: underline;
}
a.nav {
color: #006699;
text-decoration: none;
}
a.nav:hover {
text-decoration: underline;
}
p a {
font-size: 100%;
}
.menu {
font-size: 80%;
}
.menu li a {
font-size: 100%;
}
.comment {
color: green;
}
//-->
</style>
</head>
<body>
<div id="logo">
<div id="title">phpBB 3.0.x Install</div>
<img src="header_left.jpg" alt="phpBB Logo" />
</div>
<a name="top"></a><div id="main">
<!-- BEGIN DOCUMENT -->
<p><strong>Please read this document completely before proceeding with installation, updating or converting.</strong></p>
<p>Please note these instructions are not fully comprehensive, a more thorough userguide will be available on the phpBB website in the near future. However, this document will walk you through the basics on installing, updating and converting the forum software.</p>
<p>A basic overview of running phpBB3 can be found in the accompanying <a href="README.html">README</a> documentation. Please ensure you read that document in addition to this! For more detailed information on using phpBB3 you should read <a href="http://www.phpbb.com/support/documentation/">the documentation</a> available online.</p>
<h1>Install</h1>
<ol class="menu">
<li><a href="#quickinstall">Quick install</a></li>
<li><a href="#require">Requirements</a></li>
<li><a href="#install">New installation</a></li>
<li><a href="#update">Updating from stable releases of phpBB 3.0.x</a>
<ol type="i">
<li><a href="#update_full">Full package</a></li>
<li><a href="#update_files">Changed files only</a></li>
<li><a href="#update_patch">Patch file</a></li>
<li><a href="#update_auto">Automatic update package</a></li>
<li><a href="#update_all">All package types</a></li>
</ol>
</li>
<li><a href="#convert">Conversion from phpBB 2.0.x to phpBB 3.0.x</a>
<ol type="i">
<li><a href="#prereq">Requirements before converting</a></li>
<li><a href="#conversion">Converting</a></li>
<li><a href="#postreq">Things to do after conversion</a></li>
</ol>
</li>
<li><a href="#postinstall">Important (security related) post-Install tasks for all installation methods</a>
<ol type="i">
<li><a href="#avatars">Uploadable avatars</a></li>
</ol>
</li>
<li><a href="#disclaimer">Disclaimer</a></li>
</ol>
<hr />
<a name="quickinstall"></a><h1>1. Quick install</h1>
<div class="paragraph">
<p>If you have basic knowledge of using FTP and are sure your hosting service or server will run phpBB3 you can use these steps to quickly get started. For a more detailed explanation you should skip this and go to <a href="#require">section 2</a> below.</p>
<ol class="menu">
<li>Decompress the phpBB3 archive to a local directory on your system.</li>
<li>Upload all the files contained in this archive (retaining the directory structure) to a web accessible directory on your server or hosting account.</li>
<li>Change the permissions on config.php to be writeable by all (666 or -rw-rw-rw- within your FTP Client)</li>
<li>Change the permissions on the following directories to be writeable by all (777 or -rwxrwxrwx within your FTP Client):<br />
<code>store/</code>, <code>cache/</code>, <code>files/</code> and <code>images/avatars/upload/</code>.</li>
<li>Using your web browser visit the location you placed phpBB3 with the addition of install/index.php or pointing directly to install/, e.g. http://www.mydomain.com/phpBB2/install/, http://www.mydomain.com/forum/install/ etc.</li>
<li>Click the <em>INSTALL</em> tab, follow the steps and fill out all the requested information.</li>
<li>Change the permissions on config.php to be writeable only by yourself (644 or -rw-r--r-- within your FTP Client)</li>
<li>phpBB3 should now be available, please <strong>MAKE SURE</strong> you read at least <a href="#postinstall">Section 6</a> below for important, security related post-installation instructions.</li>
</ol>
<p>If you experienced problems or do not know how to proceed with any of the steps above please read the rest of this document.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="require"></a><h1>2. Requirements</h1>
<div class="paragraph">
<p>phpBB3 has a few requirements which must be met before you are able to install and use it.</p>
<ul class="menu">
<li>A webserver or web hosting account running on any major Operating System with support for PHP</li>
<li>A SQL database system, <strong>one of</strong>:
<ul>
<li>MySQL 3.23 or above (MySQLi supported)</li>
<li>PostgreSQL 7.3+</li>
<li>SQLite 2.8.2+</li>
<li>Firebird 2.0</li>
<li>MS SQL Server 2000 or above (directly or via ODBC)</li>
<li>Oracle</li>
</ul>
</li>
<li><strong>PHP 4.3.3</strong> or above with support for the database you intend to use.</li>
<li>These optional presence of the following modules within PHP will provide access to additional features, but they are not required.
<ul>
<li>zlib Compression support</li>
<li>Remote FTP support</li>
<li>XML support</li>
<li>Imagemagick support</li>
<li>GD Support</li>
</ul>
</li>
</ul>
<p>If your server or hosting account does not meet the requirements above we are afraid phpBB3 is not for you.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="install"></a><h1>3. New installation</h1>
<div class="paragraph">
<p>Installation of phpBB3 will vary according to your server and database. If you have <em>shell access</em> to your account (via telnet or ssh for example) you may want to upload the entire phpBB3 archive (in binary mode!) to a directory on your host and unarchive it there.</p>
<p>If you do not have shell access or do not wish to use it you will need to decompress the phpBB3 archive to a local directory on your system using your favourite compression program, e.g. winzip, rar, zip, etc. From there you must FTP <strong>ALL</strong> the files it contains (being sure to retain the directory structure and filenames) to your host. Please ensure that the cases of filenames are retained, do <strong>NOT</strong> force filenames to all lower or upper case doing so will cause errors later.</p>
<p>All .php, .inc, .sql, .cfg, .html and .txt files should be uploaded in <strong>ASCII</strong> mode, while all graphics should be uploaded in <strong>BINARY</strong> mode. If you are unfamiliar with what this means please refer to your FTP client documentation. In most cases this is all handled transparantly by your ftp client but if you encounter problems later you should be sure the files where uploaded correctly as described here.</p>
<p>phpBB3 comes supplied with english as its standard language. However a number of separate packs for different languages are available. If you are not a native english speaker you may wish to install one or more of these packages before continuing. The installation process below will allow you to select a default language from those available (you can of course change this default at a later stage). For more details of language packs, where to obtain them and how to install them please see the <a href="README.html#i18n">README</a>.</p>
<p>Once all the files have been uploaded to your site you should point your browser at this location with the addition of <code>install/</code>. For example if your domain name is <em>www.mydomain.tld</em> and you placed phpBB3 in a directory /phpBB3 off your web root you would enter <em>http://www.mydomain.tld/phpBB3/install/</em> or (alternatively) <em>http://www.mydomain.tld/phpBB3/install/index.php</em> into your browser. When you have done this you should see the phpBB3 Installation screen appear.</p>
<h3>Introduction:</h3>
<p>The installation screen gives you a short introduction into phpBB. It allows you to read the license phpBB3 is released under (General Public License) and provides information about how you can receive support. To start the installation, use the <em>Install</em> button.</p>
<h3>Requirements</h3>
<p>The first page you will see after starting the installation is the Requirements list. phpBB3 checks automatically whether everything that it needs to run properly is installed on your server. You need to have at least the minimum PHP version installed, and at least one database available to continue the installation. Also important, is that all shown folders are available and do have the correct permissions. Please see the description of each section to find out whether they are optional or required for phpBB3 to run. If everything is in order, you can continue the installation with <em>Start Install</em>.</p>
<h3>Database settings</h3>
<p>You now have to decide which database to use. See the <a href="#require">Requirements section</a> for information on which databases are supported. If you do not know your database settings, please contact your host and ask for them. You will not be able to continue without them. You need:</p>
<ul class="menu">
<li>The Database Type - the database you will be using.</li>
<li>The Database server hostname or DSN - the address of the database server.</li>
<li>The Database server port - the port of the database server (most of the time this is not needed).</li>
<li>The Database name - the name of the database on the server.</li>
<li>The Database username and Database password - the login data to access the database.</li>
</ul>
<div class="indent">
<p><strong>Note:</strong> if you are installing using SQLite, you should enter the full path to your database file in the DSN field and leave the username and password fields blank. For security reasons, you should make sure that the database file is not stored in a location accessible from the web.</p>
</div>
<p>You don't need to change the Prefix for tables in database setting, unless you plan on using multipe phpBB installations on one database. In this case you can use a different prefix for each installation to make it work.</p>
<p>After you entered your details, you can continue with the Proceed to next step button. Now phpBB3 will check whether the data you entered will lead to a successful database connection and whether tables with the same prefix already exist.</p>
<p>A <em>Could not connect to the database</em> error means that you didn't enter the database data correctly and it is not possible for phpBB to connect. Make sure that everything you entered is in order and try again. Again, if you are unsure about your database settings, please contact your host.</p>
<p>If you installed another version of phpBB before on the same database with the same prefix, phpBB will inform you and you just need to enter a different database prefix.</p>
<p>If you see the Successful Connection message, you can continue to the next step.</p>
<h3>Administrator details</h3>
<p>Now you have to create your administration user. This user will have full administration access and he will be the first user on your forum. All fields on this page are required. You can also set the default language of your forum on this page. In a vanilla phpBB3 installation we only include English [GB]. You can download further languages from <a href="http://www.phpbb.com/">www.phpbb.com</a>, and add them before installing or later.</p>
<h3>Configuration file</h3>
<p>In this step, phpBB will try to write the configuration file automatically. The forum needs the configuration to run properly. It contains all database settings, so without it, phpBB will not be able to access the database.</p>
<p>Usually writing the configuration file automatically works fine. But in some cases it can fail due to wrong file permissions, for instance. In this case, you need to upload the file manually. phpBB asks you to download the config.php file and tells you what to do with it. Please read the instructions carefully. After you have uploaded the file, use <em>Done</em> to get to the last step. If <em>Done</em> returns you to the same page as before, and does not return a success message, you did not upload the file correctly.</p>
<h3>Advanced settings</h3>
<p>The Advanced settings allow you to set some parameters of the board configuration. They are optional, and you can always change them later. So if you are not sure what these settings mean, proceed to the final step and finish the installation.</p>
<p>If the installation was successful, you can now use the Login button to visit the Administration Control Panel. Congratulations, you have installed phpBB3 successfully. But there is still work ahead!</p>
<p>If you are unable to get phpBB3 installed even after reading this guide, please look at the support section to find out where you can ask for further assistance.</p>
<p>At this point if you are converting from phpBB 2.0.x, you should refer to the <a href="#convert">conversion steps</a> for further information. If not, you should remove the install directory from your server as you will only be able to access the Administration Control Panel whilst it is present.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="update"></a><h1>4. Updating from stable releases of phpBB 3.0.x</h1>
<p>If you are currently using a stable release of phpBB3 updating to this version is straightforward. You would have downloaded one of four packages and your choice determines what you need to do. <strong>Please Note</strong>: That before updating we heavily recommend you do a <em>full backup of your database and existing phpBB3 files</em>! If you are unsure how to achieve this please ask your hosting provider for advice.</p>
<p><strong>Please make sure you update your phpBB3 source files too, even if you run the <code>database_update.php</code> file.</strong></p>
<a name="update_full"></a><b>4.i. Full package</b>
<br /><br />
<div class="paragraph">
<p>The full package is normally meant for new installations, but if you want to replace all source files this package comes in handy.</p>
<p>First you should make a copy of your existing <em>config.php</em> file, keep it in a safe place! Next delete all the existing phpBB3 files, you may want to leave your <code>files/</code> and <code>images/</code> directory in place. You can leave alternative styles in-place too. With this complete you can upload the new phpBB3 files (see <a href="#install">New installation</a> for details if necessary). Once complete copy back your saved <em>config.php</em>, replacing the new one. Another method is to just <strong>replace</strong> the existing files with the files from the full package - though make sure you do <strong>not</strong> overwrite your config.php file.</p>
<p>You should now run <code>install/database_update.php</code> which, depending on your previous version, will make a number of database changes. You may receive <em>FAILURES</em> during this procedure, they should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker).</p>
<p>Once the install/database_update.php has completed you may proceed to the Administration Control Panel and check remove the install directory as advised.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<a name="update_files"></a><b>4.ii. Changed files only</b>
<br /><br />
<div class="paragraph">
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.0</samp> you should select the phpBB-3.0.0_to_3.0.1.zip/tar.gz file.</p>
<p>The directory structure has been preserved enabling you (if you wish) to simply upload the contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any Mods these files will overwrite the originals possibly destroying them in the process. You will need to re-add Mods to any affected file before uploading.</p>
<p>As for the other update procedures you should run <b>install/database_update.php</b> after you have finished updating the files. This will update your database schema and increment the version number.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<a name="update_patch"></a><b>4.iii. Patch file</b>
<br /><br />
<div class="paragraph">
<p>The patch file is probably the best solution for those with many Mods or other changes who do not want to re-add them back to all the changed files. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application but still want to use this update approach we recommend the <a href="update_auto">Automatic update package</a> explained below.</p>
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is 3.0.0 you need the phpBB-3.0.0_to_3.0.1.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 &lt; [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
<p>If you do get failures you should look at using the <a href="#update_files">Changed files only</a> package to replace the files which failed to patch, please note that you will need to manually re-add any Mods to these particular files. Alternatively if you know how you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.</p>
<p>You should of course delete the patch file (or files) after use. As for the other update procedures you should run <code>install/database_update.php</code> after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<a name="update_auto"></a><b>4.iv. Automatic update package</b>
<br /><br />
<div class="paragraph">
<p>The automatic update package is holding - contrary to the others - only the update informations for updating the last released version to the latest available version. These package is meant for use with the automatic update tool.</p>
<p>To perform the update, either follow the instructions from the <code>Administration Control Panel -&gt; System</code> Tab - this should point out that you are running an outdated version and will guide you through the update - or following the instructions listed below.</p>
<ul class="menu">
<li>Go to the <a href="http://www.phpbb.com/downloads/">downloads page</a> and download the latest update package listed there.</li>
<li>Upload the archives contents to your phpBB installation - only the install folder is required. Upload the whole install folder, retaining the file structure.</li>
<li>After the install folder is present, phpBB3 will go offline automatically.</li>
<li>Point your browser to the install directory, for example <samp>http://www.example.com/phpBB3/install/</samp></li>
<li>Choose the "Update" Tab and follow the instructions</li>
</ul>
</div>
<a href="#top">Top</a>
<br /><br />
<a name="update_all"></a><b>4.v. All package types</b>
<br /><br />
<div class="paragraph">
<p>If you have non-English language packs installed you may want to see if a new version has been made available. A number of missing strings may have been added which, though not essential, may be beneficial to users. Please note that at this time not all language packs have been updated so you should be prepared to periodically check for updates.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="convert"></a><h1>5. Conversion from phpBB 2.0.x to phpBB 3.0.x</h1>
<p>This paragraph explains the steps necessary to convert your existing phpBB2 installation to phpBB3.</p>
<a name="prereq"></a><b>5.i. Requirements before converting</b>
<br /><br />
<div class="paragraph">
<p>Before converting we heavily recommend you do a <em>full backup of your database and files</em>! If you are unsure how to achieve this please ask your hosting provider for advice. In order to convert, you need to have a new phpBB3 installation within the same database (but with a different prefix) as your old 2.0.x installation. You basically need to follow the basic instructions given for <a href="#install">New installations</a>. Please <strong>do not</strong> overwrite any old files - install phpBB3 at a different location.</p>
<p>Once you made a backup of everything and also have a brand new phpBB3 installation, you can now begin the conversion.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<a name="conversion"></a><b>5.ii. Converting</b>
<br /><br />
<div class="paragraph">
<p>To begin the conversion visit the install folder of your phpBB3 installation (the same as you have done for installing). Now you will see a new tab <em>Convert</em>. Click this tab.</p>
<p>As with install the conversion is automated. Your previous 2.0.x database tables will not be touched as well as the original 2.0.x files remaining untouched. The conversion is actually only filling your phpBB3 database tables and copying additional data over to your phpBB3 installation. This has the benefit that if something goes wrong you are able to either re-run the conversion or continue a conversion, while your old board is still accessible. We really recommend you disable your old installation while converting, else you may have inconsistent data after the conversion.</p>
<p>Please note that this conversion process may take quite some time and depending on your hosting provider this may result in it failing (due to web server or other timeout issues). If this is the case you should ask your provider if they are willing to allow the convert script to temporarily exceed their limits (be nice and they will probably be quite helpful).</p>
<p>Once completed your board should be immediately available. If you encountered errors you should report the problems to our bug tracker or seek help via our forums (see <a href="README.html">README</a> for details).</p>
</div>
<a href="#top">Top</a>
<br /><br />
<a name="postreq"></a><b>5.iii. Things to do after conversion</b>
<br /><br />
<div class="paragraph">
<p>After successful conversion there may be a few items you need to do - apart from checking if the installation is accessible and everything displayed correctly.</p>
<p>The first thing you may want to do is going to the administration control panel and checking every configuration item within the general tab. Thereafter you may want to adjust the forum descriptions/names if you entered HTML there. You also may want to access the other administrative sections, e.g. adjusting permissions, smilies, icons, ranks, etc.</p>
<p>Within the conversion the search index has not been created or transferred. This means after conversion you are not able to find any matches if you want to search for something. We recommend you rebuild your search index within <code>Admin -&gt; Maintenance -&gt; Database -&gt; Search Index</code>.</p>
<p>Once you are pleased with your new installation you may want to give it the name of your old installation, changing the directory name. With phpBB3 this is possible without any problems - but you may still want to check your cookie settings within the administration panel, if the cookie path need to be adjusted prior to renaming.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="postinstall"></a><h1>6. Important (security related) post-Install tasks for all installation methods</h1>
<div class="paragraph">
<p>Once you have succssfully installed phpBB3 you <strong>MUST</strong> ensure you remove the entire install/ directory. Leaving the install directory in place is a <em>very serious potential security issue</em> which may lead to deletion or alteration of files, etc. Please note that until this directory is not removed phpBB3 will not operate and a warning message will be displayed. Beyond this <strong>essential</strong> deletion you may also wish to delete the docs/ directories if you wish.</p>
<p>With these directories deleted you should proceed to the administration panel. Depending on how the installation completed you may have been directed there automatically. If not, login as the administrator you specified during install/conversion and click the <strong>Administration Panel</strong> link at the bottom of any page. Ensure that details specified in <code>Admin -&gt; General</code> are correct!</p>
</div>
<a href="#top">Top</a>
<br /><br />
<a name="avatars"></a><b>6.i. Uploadable avatars</b>
<br /><br />
<div class="paragraph">
<p>phpBB3 supports several methods for allowing users to select their own <em>avatar</em> (an avatar is a small image generally unique to a user and displayed just below their username in posts).</p>
<p>Two of these options allow users to upload an avatar from their machine or a remote location (via a URL). If you wish to enable this function you should first ensure the correct paths for uploadeable avatars is set in <code>Admin -&gt; General -&gt; Board Configuration -&gt; Avatar settings</code>. By default this is <em>images/avatars/uploads</em> but you can set it to whatever you like, just ensure the configuration setting is updated. You must also ensure this directory can be written to by the webserver. Usually this means you have to alter its permissions to allow anyone to read and write to. Exactly how you should do this depends on your ftp client or server operating system.</p>
<p>On UNIX systems for example you set the directory to a+rwx (or ugo+rwx or even 777). This can be done from a command line on your server using chmod or via your FTP client (using the Change Permissions, chmod or other Permissions dialoge box, see your FTP clients documentation for help). Most FTP clients list permissions in the form of User (Read, Write, Execute), Group (Read, Write, Execute) and Other (Read, Write, Execute). You need to tick all of these boxes to set correct permissions.</p>
<p>On Windows system you need to ensure the directory is not write-protected and that it has global write permissions (see your servers documentation or contact your hosting provider if you are unsure on how to achieve this).</p>
<p>Please be aware that setting a directories permissions to global write access is a potential security issue. While it is unlikely that anything nasty will occur (such as all the avatars being deleted) there are always people out there to cause trouble. Therefore you should monitor this directory and if possible make regular backups.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="disclaimer"></a><h1>7. Copyright and disclaimer</h1>
<div class="paragraph">
<p>This application is opensource software released under the <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>
<a href="#top">Top</a>
<!-- END DOCUMENT -->
</div>
<div id="footer">&nbsp;<br /><br /></div>
</body>
</html>

432
phpBB/docs/README.html Normal file
View File

@@ -0,0 +1,432 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>phpBB 3.0.x Readme</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="resource-type" content="document" />
<meta name="description" lang="en" content="phpBB 3.0.x Readme" />
<meta name="keywords" lang="en" content="" />
<meta name="author" content="phpBB Group" />
<meta name="copyright" content="phpBB Group" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<style type="text/css">
<!--
/* The original "subSilver" theme for phpBB2 Created by subBlue design :: http://www.subBlue.com */
body {
background-color: white;
font-family: Verdana, Arial, Helvetica, sans-serif;
margin: 0;
border: 0;
padding: 0;
}
img {
border: 0;
}
p {
font-size: 8pt;
}
hr {
height: 0;
border: solid #D1D7DC 0;
border-top-width: 1px;
}
#title, h1 {
font: bold 18pt 'Trebuchet MS', Verdana, sans-serif;
text-decoration: none;
line-height: 120%;
}
h2 {
font: bold 12pt Arial, Helvetica, sans-serif;
text-decoration: none;
line-height: 120%;
}
h3 {
font: bold 10pt Arial, Helvetica, sans-serif;
text-decoration: none;
line-height: 120%;
}
.paragraph {
margin-left: 20px;
}
/* Structure */
#logo {
background: #fff url(header_bg.jpg) repeat-x top right;
height: 60px;
}
#title {
color: #12749b;
float: right;
margin: 10px 10px 0;
}
#main {
margin-left: 25px;
margin-right: 25px;
}
.good {
color: green;
}
.bad {
color: red;
}
#footer {
margin-left: 75px;
font-size: 70%;
color: #006600;
}
code {
color: #006600;
font-weight: normal;
font-family: 'Courier New', monospace;
border-color: #D1D7DC;
border-width: 1px;
border-style: solid;
background-color: #FAFAFA;
}
.indent p {
padding-left: 20px;
font-size: 90%;
}
/* Anchors */
a {
font-size: 70%;
}
a:link, a:active, a:visited {
color: #006699;
text-decoration: none;
}
a:hover {
color: #DD6900;
text-decoration: underline;
}
a.nav {
color: #006699;
text-decoration: none;
}
a.nav:hover {
text-decoration: underline;
}
p a {
font-size: 100%;
}
.menu {
font-size: 80%;
}
.menu li a {
font-size: 100%;
}
.comment {
color: green;
}
//-->
</style>
</head>
<body>
<div id="logo">
<div id="title">phpBB 3.0.x Readme</div>
<img src="header_left.jpg" alt="phpBB Logo" />
</div>
<a name="top"></a><div id="main">
<!-- BEGIN DOCUMENT -->
<p>Thank you for downloading phpBB3. This README will guide through the basics of installation and operation of phpBB3. Please ensure you read this and the accompanying documentation fully <strong>before</strong> proceeding with the installation.</p>
<h1>Readme</h1>
<ol class="menu">
<li><a href="#install">Installing phpBB3</a></li>
<li><a href="#run">Running phpBB3</a>
<ol type="i">
<li><a href="#i18n">Internationalisation (i18n)</a></li>
<li><a href="#styles">Styles</a></li>
<li><a href="#mods">Mods</a></li>
</ol>
</li>
<li><a href="#help">Getting help with phpBB3</a>
<ol type="i">
<li><a href="#userguide">Userguide</a></li>
<li><a href="#website">Community Forums</a></li>
<li><a href="#irc">Internet Relay Chat</a></li>
</ol>
</li>
<li><a href="#status">Status of this version</a></li>
<li><a href="#bugs">Reporting Bugs</a>
<ol type="i">
<li><a href="#securitybugs">Security related bugs</a></li>
</ol>
</li>
<li><a href="#curbugs">Overview of current bug list</a></li>
<li><a href="#php">PHP compatibility issues</a></li>
<li><a href="#disclaimer">Disclaimer</a></li>
</ol>
<hr />
<a name="install"></a><h1>1. Installing phpBB3</h1>
<div class="paragraph">
<p>Installation and update/conversion instructions can be found in the <a href="INSTALL.html">INSTALL</a> document contained in this distribution. If you are intending to convert from a previous phpBB 2.0.x installation we highly recommend you backup any existing data before proceeding!</p>
<p>Users of phpBB3 Beta versions cannot directly update or convert.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="run"></a><h1>2. Running phpBB3</h1>
<p>Once installed phpBB is easily managed by both admin and moderator control panels. If you need help or advice with phpBB please see <a href="#help">Section 3</a> below.</p>
<a name="i18n"></a><b>2.i. Internationalisation (i18n)</b>
<br /><br />
<div class="paragraph">
<p>A number of language packs and style localisations are available. You can find them on our official download page:</p>
<p><a href="http://www.phpbb.com/downloads/">http://www.phpbb.com/downloads/</a></p>
<p>This is the <em>official</em> location for all supported language sets. If you download a package from a 3rd party site you do so with the understanding that we cannot offer support. So please, do not ask for help in these cases!</p>
<p>Installation of these packages is straightforward, simply download the required language pack and unarchive it into the <samp>languages/</samp> folder. Please ensure you retain the directory structure when doing this! Once uploaded go to the <code>Admin-&gt;System-&gt;Language Packs</code> and install the now appeared new language pack. To install the style image packs you should unarchive the file/s into the styles/subSilver/imageset directory, again you must retain the directory structure. Once installed the languages will become immediately available.</p>
<p>If your language is not available please visit our forums where you will find a topic listing translations currently available or in preparation. This topic also gives you information should you wish to volunteer to translate a language not currently listed</p>
</div>
<a href="#top">Top</a>
<br /><br />
<a name="styles"></a><b>2.ii. Styles</b>
<br /><br />
<div class="paragraph">
<p>Although phpBB Group are rather proud of the included styles we realise that it may not be to everyones tastes. Therefore phpBB3 allows styles to be switched with relative ease. Firstly you need to locate and download a style you like. We maintain such a site at</p>
<p><a href="http://www.phpbb.com/styles/">http://www.phpbb.com/styles/</a></p>
<p><strong>Please note</strong> that 3rd party styles downloaded for versions of phpBB2 will <strong>not</strong> work in phpBB3.</p>
<p>Once you have downloaded a style the usual next step is to unarchive (or upload the unarchived contents of) the package into your <samp>styles/</samp> directory. You then need to visit <code>Administration -&gt; Styles</code>, you should see the new style available, click install and it will become available for all your users.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<a name="mods"></a><b>2.iii. Mods</b>
<br /><br />
<div class="paragraph">
<p>Although not officially supported by phpBB Group, phpBB has a thriving modification scene. These third party modifications to the standard phpBB extend its capabilities still further and can be found at:</p>
<p><a href="http://www.phpbb.com/mods">http://www.phpbb.com/mods</a></p>
<p><strong>Please remember</strong> that any bugs or other issues that occur after you have added any modification should <strong>NOT</strong> be reported to the bug tracker (see below). First remove the modification and see if the problem is resolved.</p>
<p>Also remember that any modifications which modify the database in any way may render upgrading your forum to future versions more difficult unless we state otherwise. With all this said many users have and continue to utilise many of the mods already available with great success.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="help"></a><h1>3. Getting help with phpBB3</h1>
<p>phpBB3 can seem a little daunting to new users in places, particularly with regard the permission system. The first thing you should do is check the <a href="FAQ.html">FAQ</a> which covers a few basic getting started questions. If you need additional help there are several places you should look.</p>
<a name="userguide"></a><b>3.i. phpBB3 Userguide</b>
<br /><br />
<div class="paragraph">
<p>A comprehensive userguide is now available online and can be accessed from the following location:</p>
<p><a href="http://www.phpbb.com/support/documentation/">http://www.phpbb.com/support/documentation/</a></p>
<p>This covers everything from installation through setting permissions and managing users.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<a name="website"></a><b>3.ii. Community Forums</b>
<br /><br />
<div class="paragraph">
<p>phpBB Group maintains a thriving community where a number of people have generously decided to donate their time to help support users. This site can be found at:</p>
<p><a href="http://www.phpbb.com/">http://www.phpbb.com/</a></p>
<p>If you do seek help via our forums please be sure to do a Search before posting. This may well save both you and us time and allow the developer, moderator and support groups to spend more time responding to people with unknown issues and problems. Please also remember that phpBB is an entirely volunteer effort, no one receives any compensation for the time they give, this includes moderators as well as developers. So please be respectful and mindful when awaiting responses.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<a name="irc"></a><b>3.iii Internet Relay Chat</b>
<br /><br />
<div class="paragraph">
<p>Another place you may find help is our IRC channel. This operates on the Freenode IRC network, <em>irc.freenode.net</em> and the channel is <em>#phpbb</em> and can be accessed by any good IRC client such as mIRC, XChat, etc. Again, please do not abuse this service and be respectful of other users.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="status"></a><h1>4. Status of this version</h1>
<div class="paragraph">
<p>This is the third stable release of phpBB. The 3.0.x line is essentially feature frozen, point releases will see only bugs and such like fixed, though feature alterations and minor feature additions may be done. Our next major release will be phpBB 3.2 and the planning phase has begun (the unstable development version is 3.1). Please do not post questions asking when 3.2 will be available, no release date has been set.</p>
<p>For those interested in the development of phpBB should keep an eye on the community forums to see how things are progressing:</p>
<p><a href="http://area51.phpbb.com/">http://area51.phpbb.com/phpBB/</a></p>
<p>Please note that this forum should <strong>NOT</strong> be used to obtain support for or ask questions about phpBB 2.0.x or phpBB 3.0.x, the main community forums are the place for this. Any such posts will be locked and go unanswered.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="bugs"></a><h1>5. Reporting Bugs</h1>
<div class="paragraph">
<p>The phpBB Group uses a bug tracking system to store, list and manage all reported bugs, it can be found at the location listed below. Please <strong>DO NOT</strong> post bug reports to our forums, they will be locked. In addition please <strong>DO NOT</strong> use the bug tracker for support requests. Posting such a request will only see you directed to the support forums (while taking time away from working on real bugs).</p>
<p><a href="http://www.phpbb.com/bugs/">http://www.phpbb.com/bugs/</a></p>
<p>While we very much appreciate receiving bug reports (the more reports the more stable phpBB will be) we ask you carry out a few steps before adding new entries:</p>
<ul class="menu">
<li>Firstly determine if your bug is reproduceable, how to determine this depends on the bug in question. Only if the bug is reproduceable it is likely to be a problem with phpBB3 (or in some way connected). If something cannot be reproduced it may turn out to have been your hosting provider working on something, a user doing something silly, etc. Bug reports for non-reproduceable events can slow down our attempts to fix real, reproduceable issues<br /><br /></li>
<li>Next please read or search through the existing bug reports to see if <em>your</em> bug (or one very similar to it) is already listed. If it is please add to that existing bug rather than creating a new duplicate entry (all this does is slow us down).<br /><br /></li>
<li>Check the forums (use search!) to see if people have discussed anything that sounds similar to what you are seeing. However, as noted above please <strong>DO NOT</strong> post your particular bug to the forum unless it's non-reproduceable or you are sure it's related to something you have done rather phpBB3<br /><br /></li>
<li>If no existing bug exists then please feel free to add it</li>
</ul>
<p>If you do post a new bug (i.e. one that isn't already listed in the bug tracker) firstly make sure you have logged in (your username and password are the same as for the community forums) then please include the following details:</p>
<ul class="menu">
<li>Your server type/version, eg. Apache 1.3.28, IIS 4, Sambar, etc.</li>
<li>PHP version and mode of operation, eg. PHP 5.1.1 as a module, PHP 4.4.4 running as CGI, etc.</li>
<li>DB type/version, eg. MySQL 4.0.1, PostgreSQL 7.3.2, MSSQL Server 2000 SP1, etc.</li>
</ul>
<p>The relevant database type/version is listed within the administration control panel</p>
<p>Please also be as detailed as you can in your report, if possible list the steps required to duplicate the problem. If you have a fix which you are <strong>VERY SURE</strong> works (and is consistent with our <a href="coding-guidelines.html">coding guidelines</a>) and does not introduce further problems or incompatibilities please let us know. However only include it in the bug report if you really must, if we need it we'll ask you for it.</p>
<p>Once a bug has been submitted you will be emailed any follow up comments added to it. <strong>Please</strong> if you are requested to supply additional information, do so! It is frustrating for us to receive bug reports, ask for additional information but get nothing. In these cases we have a policy of closing the bug, which may leave a very real problem in place. Obviously we would rather not have this situation arise.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<a name="securitybugs"></a><b>5.i. Security related bugs</b>
<br /><br />
<div class="paragraph">
<p>If you find a potential security related vulnerability in phpBB please <strong>DO NOT</strong> post it to the bug tracker, public forums, etc.! Doing so may allow unscrupulous users to take advantage of it before we have time to put a fix in place. All security related bugs should be sent to our security tracker:</p>
<p><a href="http://www.phpbb.com/security/">http://www.phpbb.com/security/</a></p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="curbugs"></a><h1>6. Overview of current bug list</h1>
<div class="paragraph">
<p>This list is not complete but does represent those bugs which may effect users on a wider scale. Other bugs listed in the tracker have typically been shown to be limited to certain setups or methods of installation/upgrade.</p>
<ul class="menu">
<li>By default cannot post very large messages with MSSQL (this can be configured within MSSQL)</li>
<li>Conversions may fail to complete on large boards under some hosts</li>
</ul>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="php"></a><h1>7. PHP compatibility issues</h1>
<div class="paragraph">
<p>phpBB is no longer supported on PHP3 due to several compatibility issues and we recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 4.3.3.</p>
<p>Please remember that running any application on a developmental version of PHP can lead to strange/unexpected results which may appear to be bugs in the application (which may not be true). Therefore we recommend you upgrade to the newest stable version of PHP before running phpBB3. If you are running a developmental version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
<p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MSSQL Server 2000, PostgreSQL 7.x, Oracle 8, SQLite and Firebird. Versions of PHP used range from 4.3.3 to 6.0.0-dev without problem. </p>
</div>
<a href="#top">Top</a>
<br /><br />
<a name="phpsec"></a><b>7.i. Notice on PHP security issues</b>
<br /><br />
<div class="paragraph">
<p>Currently there are no known issues regarding PHP security.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="disclaimer"></a><h1>8. Copyright and disclaimer</h1>
<div class="paragraph">
<p>This application is opensource software released under the <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>
<a href="#top">Top</a>
<!-- END DOCUMENT -->
</div>
<div id="footer">&nbsp;<br /><br /></div>
</body>
</html>

View File

@@ -216,7 +216,7 @@ body {
$auth = new auth();
</pre></blockquote>
<p>Once an instance of the class has been created you are free to call the various methods it contains. Please note that should you wish to use the <code>auth_admin</code> methods you will need to instantiate this seperately but in the same way.</p>
<p>Once an instance of the class has been created you are free to call the various methods it contains. Please note that should you wish to use the <code>auth_admin</code> methods you will need to instantiate this separately but in the same way.</p>
</div>
<a href="#top">Top</a>
@@ -349,9 +349,9 @@ $result = acl_getf_global(<code>option</code>)
<div class="paragraph">
<p>A number of additional methods are available related to <code>auth</code>. These handle more basic functions such as adding user and group permissions, new options and clearing the user cache. These methods are contained within a seperate class, <code>auth_admin</code>. This can be found in <code>includes/acp/auth.php</code>.</p>
<p>A number of additional methods are available related to <code>auth</code>. These handle more basic functions such as adding user and group permissions, new options and clearing the user cache. These methods are contained within a separate class, <code>auth_admin</code>. This can be found in <code>includes/acp/auth.php</code>.</p>
<p>To use any methods this class contains it first needs to be instantiated seperately from <code>auth</code>. This is achieved in the same way as <code>auth</code>:</p>
<p>To use any methods this class contains it first needs to be instantiated separately from <code>auth</code>. This is achieved in the same way as <code>auth</code>:</p>
<blockquote><pre>
$auth_admin = new auth_admin();

View File

@@ -16,17 +16,13 @@
<style type="text/css">
<!--
/*
The original "subSilver" theme for phpBB2
Created by subBlue design :: http://www.subBlue.com
*/
/* The original "subSilver" theme for phpBB2 Created by subBlue design :: http://www.subBlue.com */
body {
background-color: white;
font-family: Verdana, Arial, Helvetica, sans-serif;
margin: 0px;
border: 0px;
padding: 0px;
background-color: white;
font-family: Verdana, Arial, Helvetica, sans-serif;
margin: 0;
border: 0;
padding: 0;
}
img {
@@ -34,40 +30,38 @@ img {
}
p {
font-size: 8pt;
font-size: 8pt;
}
hr {
height: 0px;
border: solid #D1D7DC 0px;
height: 0;
border: solid #D1D7DC 0;
border-top-width: 1px;
}
#title, h1 {
font: bold 18pt 'Trebuchet MS', Verdana, sans-serif;
text-decoration: none;
line-height: 120%;
text-decoration: none;
line-height: 120%;
}
h2 {
font: bold 12pt Arial, Helvetica, sans-serif;
text-decoration: none;
line-height: 120%;
text-decoration: none;
line-height: 120%;
}
h3 {
font: bold 10pt Arial, Helvetica, sans-serif;
text-decoration: none;
line-height: 120%;
text-decoration: none;
line-height: 120%;
}
.paragraph {
margin-left: 20px;
}
/*
Structure
*/
/* Structure */
#logo {
background: #fff url(header_bg.jpg) repeat-x top right;
height: 60px;
@@ -98,14 +92,14 @@ h3 {
color: #006600;
}
code {
code {
color: #006600;
font-weight: normal;
font-family: 'Courier New', monospace;
border-color: #D1D7DC;
border-width: 1px;
border-style: solid;
background-color: #FAFAFA;
font-weight: normal;
font-family: 'Courier New', monospace;
border-color: #D1D7DC;
border-width: 1px;
border-style: solid;
background-color: #FAFAFA;
}
.indent p {
@@ -113,30 +107,28 @@ code {
font-size: 90%;
}
/*
Anchors
*/
/* Anchors */
a {
font-size: 70%;
}
a:link, a:active, a:visited {
color: #006699;
text-decoration: none;
text-decoration: none;
}
a:hover {
color: #DD6900;
text-decoration: underline;
color: #DD6900;
text-decoration: underline;
}
a.nav {
color: #006699;
text-decoration: none;
color: #006699;
text-decoration: none;
}
a.nav:hover {
text-decoration: underline;
text-decoration: underline;
}
p a {
@@ -154,34 +146,23 @@ p a {
.comment {
color: green;
}
//-->
</style>
<!--[if IE]>
<style type="text/css">
body {
scrollbar-face-color: #DEE3E7;
scrollbar-highlight-color: white;
scrollbar-shadow-color: #DEE3E7;
scrollbar-3dlight-color: #D1D7DC;
scrollbar-arrow-color: #006699;
scrollbar-track-color: #EFEFEF;
scrollbar-darkshadow-color: #98AAB1;
}
</style>
<![endif]-->
</head>
<body>
<div id="logo">
<div id="title">Coding Guidelines</div>
<a href="index.php"><img src="header_left.jpg" alt="phpBB Logo" /></a>
<img src="header_left.jpg" alt="phpBB Logo" />
</div>
<a name="top"></a><div id="main">
<!-- BEGIN DOCUMENT -->
<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>
@@ -275,7 +256,7 @@ body {
<h3>Files containing only classes:</h3>
<p>Do not forget to comment the class. Classes need a seperate @package definition, it is the same as the header package name. Apart from this special case the above statement for files containing only functions needs to be applied to classes and it's methods too.</p>
<p>Do not forget to comment the class. Classes need a separate @package definition, it is the same as the header package name. Apart from this special case the above statement for files containing only functions needs to be applied to classes and it's methods too.</p>
<h3>Code following the header but only functions/classes file:</h3>
@@ -310,7 +291,7 @@ class ...
<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>phpBB3</b><br />Core files and all files not assigned to a separate package</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>
@@ -881,7 +862,7 @@ $sql_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',
@@ -1037,7 +1018,7 @@ trigger_error($user-&gt;lang['NO_FORUM']);
</pre></blockquote>
<blockquote><pre>
trigger_error('NO_APPROPIATE_MODE', E_USER_ERROR);
trigger_error('NO_APPROPRIATE_MODE', E_USER_ERROR);
</pre></blockquote>
<h3>Url formatting</h3>
@@ -1108,7 +1089,7 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
<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>The separate 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>
@@ -1212,7 +1193,7 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
!= [neq, ne]
&lt;&gt; (same as !=)
!== (not equivalent in value and type)
=== (equivalent in value and type)
=== (equivalent in value and type)
&gt; [gt]
&lt; [lt]
&gt;= [gte]
@@ -1554,6 +1535,8 @@ div
</div>
<a href="#top">Top</a>
<!-- END DOCUMENT -->
</div>
<div id="footer"> $Id$

View File

@@ -63,7 +63,8 @@ if ($attachment['is_orphan'])
trigger_error('ERROR_NO_ATTACHMENT');
}
$extensions = $cache->obtain_attach_extensions();
// Obtain all extensions...
$extensions = $cache->obtain_attach_extensions(true);
}
else
{
@@ -106,14 +107,14 @@ else
}
else
{
$row['forum_id'] = 0;
$row['forum_id'] = false;
if (!$auth->acl_get('u_pm_download'))
{
trigger_error('SORRY_AUTH_VIEW_ATTACH');
}
}
// disallowed ?
// disallowed?
$extensions = array();
if (!extension_allowed($row['forum_id'], $attachment['extension'], $extensions))
{
@@ -160,6 +161,7 @@ else if (($display_cat == ATTACHMENT_CATEGORY_NONE || $display_cat == ATTACHMENT
// Determine the 'presenting'-method
if ($download_mode == PHYSICAL_LINK)
{
// This presenting method should no longer be used
if (!@is_dir($phpbb_root_path . $config['upload_path']))
{
trigger_error($user->lang['PHYSICAL_DOWNLOAD_NOT_POSSIBLE']);

View File

@@ -32,7 +32,7 @@ switch ($mode)
break;
default:
$l_title = $user->lang['FAQ'];
$l_title = $user->lang['FAQ_EXPLAIN'];
$user->add_lang('faq', false, true);
break;
}

View File

@@ -71,12 +71,11 @@ class acm
}
global $phpEx;
$file = "<?php\n\$this->vars = " . $this->format_array($this->vars) . ";\n\n\$this->var_expires = " . $this->format_array($this->var_expires) . "\n?>";
if ($fp = @fopen($this->cache_dir . 'data_global.' . $phpEx, 'wb'))
{
@flock($fp, LOCK_EX);
fwrite($fp, $file);
fwrite($fp, "<?php\n\$this->vars = " . var_export($this->vars, true) . ";\n\n\$this->var_expires = " . var_export($this->var_expires, true) . "\n?>");
@flock($fp, LOCK_UN);
fclose($fp);
}
@@ -101,7 +100,13 @@ class acm
{
global $phpEx;
$dir = opendir($this->cache_dir);
$dir = @opendir($this->cache_dir);
if (!$dir)
{
return;
}
while (($entry = readdir($dir)) !== false)
{
if (!preg_match('/^(sql_|data_(?!global))/', $entry))
@@ -116,7 +121,7 @@ class acm
@unlink($this->cache_dir . $entry);
}
}
@closedir($dir);
closedir($dir);
if (file_exists($this->cache_dir . 'data_global.' . $phpEx))
{
@@ -151,7 +156,7 @@ class acm
return false;
}
include($this->cache_dir . 'data' . $var_name . ".$phpEx");
include($this->cache_dir . "data{$var_name}.$phpEx");
return (isset($data)) ? $data : false;
}
else
@@ -169,10 +174,10 @@ class acm
{
global $phpEx;
if ($fp = @fopen($this->cache_dir . 'data' . $var_name . ".$phpEx", 'wb'))
if ($fp = @fopen($this->cache_dir . "data{$var_name}.$phpEx", 'wb'))
{
@flock($fp, LOCK_EX);
fwrite($fp, "<?php\n\$expired = (time() > " . (time() + $ttl) . ") ? true : false;\nif (\$expired) { return; }\n\n\$data = unserialize('" . str_replace("'", "\\'", str_replace('\\', '\\\\', serialize($var))) . "');\n?>");
fwrite($fp, "<?php\n\$expired = (time() > " . (time() + $ttl) . ") ? true : false;\nif (\$expired) { return; }\n\n\$data = " . var_export($var, true) . ";\n?>");
@flock($fp, LOCK_UN);
fclose($fp);
}
@@ -191,7 +196,13 @@ class acm
function purge()
{
// Purge all phpbb cache files
$dir = opendir($this->cache_dir);
$dir = @opendir($this->cache_dir);
if (!$dir)
{
return;
}
while (($entry = readdir($dir)) !== false)
{
if (strpos($entry, 'sql_') !== 0 && strpos($entry, 'data_') !== 0 && strpos($entry, 'ctpl_') !== 0 && strpos($entry, 'tpl_') !== 0)
@@ -201,7 +212,7 @@ class acm
@unlink($this->cache_dir . $entry);
}
@closedir($dir);
closedir($dir);
unset($this->vars);
unset($this->var_expires);
@@ -222,7 +233,13 @@ class acm
{
$regex = '(' . ((is_array($table)) ? implode('|', $table) : $table) . ')';
$dir = opendir($this->cache_dir);
$dir = @opendir($this->cache_dir);
if (!$dir)
{
return;
}
while (($entry = readdir($dir)) !== false)
{
if (strpos($entry, 'sql_') !== 0)
@@ -239,7 +256,7 @@ class acm
@unlink($this->cache_dir . $entry);
}
}
@closedir($dir);
closedir($dir);
return;
}
@@ -290,37 +307,6 @@ class acm
}
}
/**
* Format an array to be stored on filesystem
*/
function format_array($array, $tab = '')
{
$tab .= "\t";
$lines = array();
foreach ($array as $k => $v)
{
if (is_array($v))
{
$lines[] = "\n{$tab}'$k' => " . $this->format_array($v, $tab);
}
else if (is_int($v))
{
$lines[] = "\n{$tab}'$k' => $v";
}
else if (is_bool($v))
{
$lines[] = "\n{$tab}'$k' => " . (($v) ? 'true' : 'false');
}
else
{
$lines[] = "\n{$tab}'$k' => '" . str_replace("'", "\\'", str_replace('\\', '\\\\', $v)) . "'";
}
}
return 'array(' . implode(',', $lines) . ')';
}
/**
* Load cached sql query
*/
@@ -368,7 +354,6 @@ class acm
{
@flock($fp, LOCK_EX);
$lines = array();
$query_id = sizeof($this->sql_rowset);
$this->sql_rowset[$query_id] = array();
$this->sql_row_pointer[$query_id] = 0;
@@ -376,12 +361,13 @@ class acm
while ($row = $db->sql_fetchrow($query_result))
{
$this->sql_rowset[$query_id][] = $row;
$lines[] = "unserialize('" . str_replace("'", "\\'", str_replace('\\', '\\\\', serialize($row))) . "')";
}
$db->sql_freeresult($query_result);
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) . ') ?>');
$file = "<?php\n\n/*\n" . str_replace('*/', '*\/', $query) . "\n*/\n";
$file .= "\n\$expired = (time() > " . (time() + $ttl) . ") ? true : false;\nif (\$expired) { return; }\n";
fwrite($fp, $file . "\n\$this->sql_rowset[\$query_id] = " . var_export($this->sql_rowset[$query_id], true) . ";\n?>");
@flock($fp, LOCK_UN);
fclose($fp);

View File

@@ -56,8 +56,7 @@ class acp_attachments
$template->assign_vars(array(
'L_TITLE' => $user->lang[$l_title],
'L_TITLE_EXPLAIN' => $user->lang[$l_title . '_EXPLAIN'],
'U_ACTION' => $this->u_action,
)
'U_ACTION' => $this->u_action)
);
switch ($mode)
@@ -91,9 +90,9 @@ class acp_attachments
'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),
'attachment_quota' => array('lang' => 'ATTACH_QUOTA', 'validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
'max_filesize' => array('lang' => 'ATTACH_MAX_FILESIZE', 'validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
'max_filesize_pm' => array('lang' => 'ATTACH_MAX_PM_FILESIZE','validate' => 'string', '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),
@@ -106,8 +105,8 @@ class acp_attachments
'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),
'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' px'),
'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' px'),
)
);
@@ -181,8 +180,7 @@ class acp_attachments
$template->assign_vars(array(
'U_SEARCH_IMAGICK' => $this->u_action . '&amp;action=imgmagick',
'S_THUMBNAIL_SUPPORT' => (!$this->new_config['img_imagick'] && (!isset($supported_types['format']) || !sizeof($supported_types['format']))) ? false : true,
)
'S_THUMBNAIL_SUPPORT' => (!$this->new_config['img_imagick'] && (!isset($supported_types['format']) || !sizeof($supported_types['format']))) ? false : true)
);
// Secure Download Options - Same procedure as with banning
@@ -200,7 +198,7 @@ class acp_attachments
$value = ($row['site_ip']) ? $row['site_ip'] : $row['site_hostname'];
if ($value)
{
$defined_ips .= '<option' . (($row['ip_exclude']) ? ' class="sep"' : '') . ' value="' . $row['site_id'] . '">' . $value . '</option>';
$defined_ips .= '<option' . (($row['ip_exclude']) ? ' class="sep"' : '') . ' value="' . $row['site_id'] . '">' . $value . '</option>';
$ips[$row['site_id']] = $value;
}
}
@@ -216,8 +214,7 @@ class acp_attachments
'L_SECURE_TITLE' => $user->lang['DEFINE_' . $allow_deny . '_IPS'],
'L_IP_EXCLUDE' => $user->lang['EXCLUDE_FROM_' . $allow_deny . '_IP'],
'L_REMOVE_IPS' => $user->lang['REMOVE_' . $allow_deny . '_IPS'],
)
'L_REMOVE_IPS' => $user->lang['REMOVE_' . $allow_deny . '_IPS'])
);
// Output relevant options
@@ -271,8 +268,8 @@ class acp_attachments
if ($submit)
{
// Change Extensions ?
$extension_change_list = (isset($_POST['extension_change_list'])) ? array_map('intval', $_POST['extension_change_list']) : array();
$group_select_list = (isset($_POST['group_select'])) ? array_map('intval', $_POST['group_select']) : array();
$extension_change_list = request_var('extension_change_list', array(0));
$group_select_list = request_var('group_select', array(0));
// Generate correct Change List
$extensions = array();
@@ -294,7 +291,7 @@ class acp_attachments
$sql = 'UPDATE ' . EXTENSIONS_TABLE . '
SET group_id = ' . (int) $extensions[$row['extension_id']]['group_id'] . '
WHERE extension_id = ' . $row['extension_id'];
$db->sql_query($sql);
$db->sql_query($sql);
add_log('admin', 'LOG_ATTACH_EXT_UPDATE', $row['extension']);
}
@@ -302,7 +299,7 @@ class acp_attachments
$db->sql_freeresult($result);
// Delete Extension?
$extension_id_list = (isset($_POST['extension_id_list'])) ? array_map('intval', $_POST['extension_id_list']) : array();
$extension_id_list = request_var('extension_id_list', array(0));
if (sizeof($extension_id_list))
{
@@ -332,7 +329,7 @@ class acp_attachments
$add_extension_group = request_var('add_group_select', 0);
$add = (isset($_POST['add_extension_check'])) ? true : false;
if ($add_extension != '' && $add)
if ($add_extension && $add)
{
if (!sizeof($error))
{
@@ -353,7 +350,7 @@ class acp_attachments
'group_id' => $add_extension_group,
'extension' => $add_extension
);
$db->sql_query('INSERT INTO ' . EXTENSIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
add_log('admin', 'LOG_ATTACH_EXT_ADD', $add_extension);
}
@@ -364,7 +361,7 @@ class acp_attachments
{
$notify[] = $user->lang['EXTENSIONS_UPDATED'];
}
$cache->destroy('_extensions');
}
@@ -427,11 +424,17 @@ class acp_attachments
if ($group_id)
{
$sql = 'SELECT * FROM ' . EXTENSION_GROUPS_TABLE . "
$sql = 'SELECT *
FROM ' . EXTENSION_GROUPS_TABLE . "
WHERE group_id = $group_id";
$result = $db->sql_query($sql);
$ext_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$ext_row)
{
trigger_error($user->lang['NO_EXT_GROUP_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
else
{
@@ -467,11 +470,11 @@ class acp_attachments
$upload_icon = request_var('upload_icon', 'no_image');
$size_select = request_var('size_select', 'b');
$forum_select = request_var('forum_select', false);
$allowed_forums = isset($_POST['allowed_forums']) ? array_map('intval', array_values($_POST['allowed_forums'])) : array();
$allow_in_pm = isset($_POST['allow_in_pm']) ? true : false;
$allowed_forums = request_var('allowed_forums', array(0));
$allow_in_pm = (isset($_POST['allow_in_pm'])) ? true : false;
$max_filesize = request_var('max_filesize', 0);
$max_filesize = ($size_select == 'kb') ? round($max_filesize * 1024) : (($size_select == 'mb') ? round($max_filesize * 1048576) : $max_filesize);
$allow_group = (isset($_POST['allow_group'])) ? 1 : 0;
$allow_group = (isset($_POST['allow_group'])) ? true : false;
if ($max_filesize == $config['max_filesize'])
{
@@ -486,14 +489,18 @@ class acp_attachments
$group_ary = array(
'group_name' => $group_name,
'cat_id' => request_var('special_category', ATTACHMENT_CATEGORY_NONE),
'allow_group' => $allow_group,
'download_mode' => request_var('download_mode', INLINE_LINK),
'allow_group' => ($allow_group) ? 1 : 0,
'upload_icon' => ($upload_icon == 'no_image') ? '' : $upload_icon,
'max_filesize' => $max_filesize,
'allowed_forums'=> ($forum_select) ? serialize($allowed_forums) : '',
'allow_in_pm' => ($allow_in_pm) ? 1 : 0
'allow_in_pm' => ($allow_in_pm) ? 1 : 0,
);
if ($action == 'add')
{
$group_ary['download_mode'] = INLINE_LINK;
}
$sql = ($action == 'add') ? 'INSERT INTO ' . EXTENSION_GROUPS_TABLE . ' ' : 'UPDATE ' . EXTENSION_GROUPS_TABLE . ' SET ';
$sql .= $db->sql_build_array((($action == 'add') ? 'INSERT' : 'UPDATE'), $group_ary);
$sql .= ($action == 'edit') ? " WHERE group_id = $group_id" : '';
@@ -508,7 +515,7 @@ class acp_attachments
add_log('admin', 'LOG_ATTACH_EXTGROUP_' . strtoupper($action), $group_name);
}
$extension_list = isset($_REQUEST['extensions']) ? array_map('intval', array_values($_REQUEST['extensions'])) : array();
$extension_list = request_var('extensions', array(0));
if ($action == 'edit' && sizeof($extension_list))
{
@@ -526,14 +533,14 @@ class acp_attachments
$db->sql_query($sql);
}
$this->rewrite_extensions();
$cache->destroy('_extensions');
if (!sizeof($error))
{
$notify[] = $user->lang['SUCCESS_EXTENSION_GROUP_' . strtoupper($action)];
}
}
$cat_lang = array(
ATTACHMENT_CATEGORY_NONE => $user->lang['NO_FILE_CAT'],
ATTACHMENT_CATEGORY_IMAGE => $user->lang['CAT_IMAGES'],
@@ -572,7 +579,7 @@ class acp_attachments
add_log('admin', 'LOG_ATTACH_EXTGROUP_DEL', $group_name);
$this->rewrite_extensions();
$cache->destroy('_extensions');
trigger_error($user->lang['EXTENSION_GROUP_DELETED'] . adm_back_link($this->u_action));
}
@@ -581,7 +588,6 @@ class acp_attachments
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
'i' => $id,
'mode' => $mode,
'action' => $action,
'group_id' => $group_id,
'action' => 'delete',
)));
@@ -590,7 +596,7 @@ class acp_attachments
break;
case 'edit':
if (!$group_id)
{
trigger_error($user->lang['NO_EXT_GROUP_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
@@ -608,7 +614,7 @@ class acp_attachments
// no break;
case 'add':
if ($action == 'add')
{
$ext_group_row = array(
@@ -616,11 +622,10 @@ class acp_attachments
'cat_id' => 0,
'allow_group' => 1,
'allow_in_pm' => 1,
'download_mode' => 1,
'upload_icon' => '',
'max_filesize' => 0,
);
$forum_ids = array();
}
@@ -668,6 +673,11 @@ class acp_attachments
$selected = ($ext_group_row['upload_icon'] == $img) ? ' selected="selected"' : '';
}
if (strlen($img) > 255)
{
continue;
}
$filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . htmlspecialchars($img) . '</option>';
}
}
@@ -690,19 +700,18 @@ class acp_attachments
}
$template->assign_vars(array(
'PHPBB_ROOT_PATH' => $phpbb_root_path,
'IMG_PATH' => $img_path,
'ACTION' => $action,
'GROUP_ID' => $group_id,
'GROUP_NAME' => $ext_group_row['group_name'],
'ALLOW_GROUP' => $ext_group_row['allow_group'],
'ALLOW_IN_PM' => $ext_group_row['allow_in_pm'],
'UPLOAD_ICON_SRC' => $phpbb_root_path . $img_path . '/' . $ext_group_row['upload_icon'],
'EXTGROUP_FILESIZE' => $ext_group_row['max_filesize'],
'PHPBB_ROOT_PATH' => $phpbb_root_path,
'IMG_PATH' => $img_path,
'ACTION' => $action,
'GROUP_ID' => $group_id,
'GROUP_NAME' => $ext_group_row['group_name'],
'ALLOW_GROUP' => $ext_group_row['allow_group'],
'ALLOW_IN_PM' => $ext_group_row['allow_in_pm'],
'UPLOAD_ICON_SRC' => $phpbb_root_path . $img_path . '/' . $ext_group_row['upload_icon'],
'EXTGROUP_FILESIZE' => $ext_group_row['max_filesize'],
'ASSIGNED_EXTENSIONS' => $assigned_extensions,
'S_CATEGORY_SELECT' => $this->category_select('special_category', $group_id, 'category'),
'S_DOWNLOAD_SELECT' => $this->download_select('download_mode', $group_id, 'download_mode'),
'S_EXT_GROUP_SIZE_OPTIONS' => size_select_options($size_format),
'S_EXTENSION_OPTIONS' => $s_extension_options,
'S_FILENAME_LIST' => $filename_list,
@@ -711,9 +720,9 @@ class acp_attachments
'S_FORUM_IDS' => (sizeof($forum_ids)) ? true : false,
'U_EXTENSIONS' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&amp;mode=extensions"),
'U_BACK' => $this->u_action,
'L_LEGEND' => $user->lang[strtoupper($action) . '_EXTENSION_GROUP'],
)
'L_LEGEND' => $user->lang[strtoupper($action) . '_EXTENSION_GROUP'])
);
$s_forum_id_options = '';
@@ -721,11 +730,12 @@ class acp_attachments
$sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id
FROM ' . FORUMS_TABLE . '
ORDER BY left_id ASC';
$result = $db->sql_query($sql, 600);
$result = $db->sql_query($sql);
$right = $cat_right = $padding_inc = 0;
$padding = $forum_list = $holding = '';
$padding_store = array('0' => '');
while ($row = $db->sql_fetchrow($result))
{
if ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id']))
@@ -777,38 +787,19 @@ class acp_attachments
$template->assign_vars(array(
'S_FORUM_ID_OPTIONS' => $s_forum_id_options)
);
break;
case 'deactivate':
case 'activate':
if (!$group_id)
{
trigger_error($user->lang['NO_EXT_GROUP_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . '
SET allow_group = ' . (($action == 'activate') ? '1' : '0') . "
WHERE group_id = $group_id";
$db->sql_query($sql);
$this->rewrite_extensions();
break;
}
$sql = 'SELECT *
FROM ' . EXTENSION_GROUPS_TABLE . '
ORDER BY allow_group DESC, group_name';
ORDER BY allow_group DESC, allow_in_pm DESC, group_name';
$result = $db->sql_query($sql);
$act_deact = 'activate';
$old_allow_group = $old_allow_pm = 1;
while ($row = $db->sql_fetchrow($result))
{
$s_add_spacer = ($row['allow_group'] == 0 && $act_deact == 'deactivate') ? true : false;
$act_deact = ($row['allow_group']) ? 'deactivate' : 'activate';
$s_add_spacer = ($old_allow_group != $row['allow_group'] || $old_allow_pm != $row['allow_in_pm']) ? true : false;
$template->assign_block_vars('groups', array(
'S_ADD_SPACER' => $s_add_spacer,
@@ -817,14 +808,14 @@ class acp_attachments
'U_EDIT' => $this->u_action . "&amp;action=edit&amp;g={$row['group_id']}",
'U_DELETE' => $this->u_action . "&amp;action=delete&amp;g={$row['group_id']}",
'U_ACT_DEACT' => $this->u_action . "&amp;action=$act_deact&amp;g={$row['group_id']}",
'L_ACT_DEACT' => $user->lang[strtoupper($act_deact)],
'GROUP_NAME' => $row['group_name'],
'CATEGORY' => $cat_lang[$row['cat_id']],
)
);
$old_allow_group = $row['allow_group'];
$old_allow_pm = $row['allow_in_pm'];
}
$db->sql_freeresult($result);
@@ -849,7 +840,7 @@ class acp_attachments
$delete_files = array();
while ($row = $db->sql_fetchrow($result))
{
phpbb_unlink($row['physical_filename']);
phpbb_unlink($row['physical_filename'], 'file');
if ($row['thumbnail'])
{
@@ -1098,47 +1089,6 @@ class acp_attachments
return $group_select;
}
/**
* Build select for download modes
*/
function download_select($select_name, $group_id = false, $key = '')
{
global $db, $user;
$types = array(
INLINE_LINK => $user->lang['MODE_INLINE'],
PHYSICAL_LINK => $user->lang['MODE_PHYSICAL']
);
if ($group_id)
{
$sql = "SELECT download_mode
FROM " . EXTENSION_GROUPS_TABLE . "
WHERE group_id = " . (int) $group_id;
$result = $db->sql_query($sql);
$download_mode = (!($row = $db->sql_fetchrow($result))) ? INLINE_LINK : $row['download_mode'];
$db->sql_freeresult($result);
}
else
{
$download_mode = INLINE_LINK;
}
$group_select = '<select name="' . $select_name . '"' . (($key) ? ' id="' . $key . '"' : '') . '>';
foreach ($types as $type => $mode)
{
$selected = ($type == $download_mode) ? ' selected="selected"' : '';
$group_select .= '<option value="' . $type . '"' . $selected . '>' . $mode . '</option>';
}
$group_select .= '</select>';
return $group_select;
}
/**
* Search Imagick
*/
@@ -1321,10 +1271,20 @@ class acp_attachments
{
if ($row['site_ip'])
{
if (strlen($row['site_ip']) > 40)
{
continue;
}
$iplist_tmp[] = "'" . $row['site_ip'] . "'";
}
else if ($row['site_hostname'])
{
if (strlen($row['site_hostname']) > 255)
{
continue;
}
$hostlist_tmp[] = "'" . $row['site_hostname'] . "'";
}
// break;
@@ -1369,7 +1329,7 @@ class acp_attachments
}
else if (isset($_POST['unsecuresubmit']))
{
$unip_sql = array_map('intval', $_POST['unip']);
$unip_sql = request_var('unip', array(0));
if (sizeof($unip_sql))
{
@@ -1398,45 +1358,6 @@ class acp_attachments
}
}
/**
* Re-Write extensions cache file
*/
function rewrite_extensions()
{
global $db, $cache;
$sql = 'SELECT e.extension, g.*
FROM ' . EXTENSIONS_TABLE . ' e, ' . EXTENSION_GROUPS_TABLE . ' g
WHERE e.group_id = g.group_id
AND g.allow_group = 1';
$result = $db->sql_query($sql);
$extensions = array();
while ($row = $db->sql_fetchrow($result))
{
$extension = $row['extension'];
$extensions[$extension]['display_cat'] = (int) $row['cat_id'];
$extensions[$extension]['download_mode']= (int) $row['download_mode'];
$extensions[$extension]['upload_icon'] = (string) $row['upload_icon'];
$extensions[$extension]['max_filesize'] = (int) $row['max_filesize'];
$allowed_forums = ($row['allowed_forums']) ? unserialize(trim($row['allowed_forums'])) : array();
if ($row['allow_in_pm'])
{
$allowed_forums = array_merge($allowed_forums, array(0));
}
// Store allowed extensions forum wise
$extensions['_allowed_'][$extension] = (!sizeof($allowed_forums)) ? 0 : $allowed_forums;
}
$db->sql_freeresult($result);
$cache->destroy('_extensions');
$cache->put('_extensions', $extensions);
}
/**
* Write display_order config field
*/

View File

@@ -40,17 +40,23 @@ class acp_ban
$ban_reason = request_var('banreason', '', true);
$ban_give_reason = request_var('bangivereason', '', true);
user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
if ($ban)
{
user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . adm_back_link($this->u_action));
trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . adm_back_link($this->u_action));
}
}
else if ($unbansubmit)
{
$ban = request_var('unban', array(''));
user_unban($mode, $ban);
if ($ban)
{
user_unban($mode, $ban);
trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . adm_back_link($this->u_action));
trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . adm_back_link($this->u_action));
}
}
// Define language vars
@@ -119,7 +125,7 @@ class acp_ban
$field = 'username';
$l_ban_cell = $user->lang['USERNAME'];
$sql = 'SELECT b.*, u.user_id, u.username
$sql = 'SELECT b.*, u.user_id, u.username, u.username_clean
FROM ' . BANLIST_TABLE . ' b, ' . USERS_TABLE . ' u
WHERE (b.ban_end >= ' . time() . '
OR b.ban_end = 0)
@@ -160,7 +166,7 @@ class acp_ban
while ($row = $db->sql_fetchrow($result))
{
$banned_options .= '<option' . (($row['ban_exclude']) ? ' class="sep"' : '') . ' value="' . $row['ban_id'] . '">' . $row[$field] . '</option>';
$banned_options .= '<option' . (($row['ban_exclude']) ? ' class="sep"' : '') . ' value="' . $row['ban_id'] . '">' . $row[$field] . '</option>';
$time_length = ($row['ban_end']) ? ($row['ban_end'] - $row['ban_start']) / 60 : 0;
$ban_length[$row['ban_id']] = (isset($ban_end_text[$time_length])) ? $ban_end_text[$time_length] : $user->lang['UNTIL'] . ' -> ' . $user->format_date($row['ban_end']);

View File

@@ -134,11 +134,30 @@ class acp_bbcodes
}
}
if (!preg_match('#\[' . $data['bbcode_tag'] .'].*?\[/' . $data['bbcode_tag'] . ']#s', $bbcode_match))
if (substr($data['bbcode_tag'], -1) === '=')
{
$test = substr($data['bbcode_tag'], 0, -1);
}
else
{
$test = $data['bbcode_tag'];
}
if (!preg_match('%\\[' . $test . '[^]]*].*?\\[/' . $test . ']%s', $bbcode_match))
{
trigger_error($user->lang['BBCODE_OPEN_ENDED_TAG'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (strlen($data['bbcode_tag']) > 16)
{
trigger_error($user->lang['BBCODE_TAG_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (strlen($bbcode_match) > 4000)
{
trigger_error($user->lang['BBCODE_TAG_DEF_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql_ary = array(
'bbcode_tag' => $data['bbcode_tag'],
'bbcode_match' => $bbcode_match,

View File

@@ -27,7 +27,12 @@ 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)
/**
* Validation types are:
* string, int, bool,
* script_path (absolute path in url - beginning with / and no trailing slash),
* rpath (relative), rwpath (realtive, writeable), path (relative path, but able to escape the root), wpath (writeable)
*/
switch ($mode)
{
case 'settings':
@@ -148,7 +153,7 @@ class acp_board
'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),
'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true),
'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),
@@ -233,9 +238,9 @@ class acp_board
'vars' => array(
'legend1' => 'GENERAL_SETTINGS',
'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),
'session_length' => array('lang' => 'SESSION_LENGTH', 'validate' => 'int', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
'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),
'load_online_time' => array('lang' => 'ONLINE_LENGTH', 'validate' => 'int', 'type' => 'text:4:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'legend2' => 'GENERAL_OPTIONS',
'load_db_track' => array('lang' => 'YES_POST_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
@@ -273,7 +278,6 @@ class acp_board
'title' => 'ACP_SERVER_SETTINGS',
'vars' => array(
'legend1' => 'ACP_SERVER_SETTINGS',
'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',
@@ -283,10 +287,11 @@ class acp_board
'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', '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),
'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),
'script_path' => array('lang' => 'SCRIPT_PATH', 'validate' => 'script_path', 'type' => 'text::255', 'explain' => true),
)
);
break;
@@ -297,13 +302,14 @@ class acp_board
'vars' => array(
'legend1' => 'ACP_SECURITY_SETTINGS',
'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),
'max_autologin_time' => array('lang' => 'AUTOLOGIN_LENGTH', 'validate' => 'int', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
'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),
'forwarded_for_check' => array('lang' => 'FORWARDED_FOR_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),
'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
'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),
)
@@ -391,16 +397,21 @@ class acp_board
// Retrieve a list of auth plugins and check their config values
$auth_plugins = array();
$dp = opendir($phpbb_root_path . 'includes/auth');
while (($file = readdir($dp)) !== false)
{
if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
{
$auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file);
}
}
$dp = @opendir($phpbb_root_path . 'includes/auth');
sort($auth_plugins);
if ($dp)
{
while (($file = readdir($dp)) !== false)
{
if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
{
$auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file);
}
}
closedir($dp);
sort($auth_plugins);
}
$updated_auth_settings = false;
$old_auth_config = array();
@@ -569,7 +580,13 @@ class acp_board
$auth_plugins = array();
$dp = opendir($phpbb_root_path . 'includes/auth');
$dp = @opendir($phpbb_root_path . 'includes/auth');
if (!$dp)
{
return '';
}
while (($file = readdir($dp)) !== false)
{
if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
@@ -577,6 +594,7 @@ class acp_board
$auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file);
}
}
closedir($dp);
sort($auth_plugins);
@@ -661,7 +679,8 @@ class acp_board
{
global $user;
$user_char_ary = array('USERNAME_CHARS_ANY' => '.*', 'USERNAME_ALPHA_ONLY' => '[\w]+', 'USERNAME_ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+');
$user_char_ary = array('USERNAME_CHARS_ANY' => '.*', 'USERNAME_ALPHA_ONLY' => '[a-z]+', 'USERNAME_ALPHA_SPACERS' => '[-\]_+ [a-z]+', 'USERNAME_LETTER_NUM' => '\w+', 'USERNAME_LETTER_NUM_SPACERS' => '[-\]_+ [\w]+', 'USERNAME_ASCII' => '[\x01-\x7F]+');
$user_char_options = '';
foreach ($user_char_ary as $lang => $value)
{
@@ -689,12 +708,12 @@ class acp_board
{
global $user;
$pass_type_ary = array('PASS_TYPE_ANY' => '.*', 'PASS_TYPE_CASE' => '[a-zA-Z]', 'PASS_TYPE_ALPHA' => '[a-zA-Z0-9]', 'PASS_TYPE_SYMBOL' => '[a-zA-Z\W]');
$pass_type_ary = array('PASS_TYPE_ANY', 'PASS_TYPE_CASE', 'PASS_TYPE_ALPHA', 'PASS_TYPE_SYMBOL');
$pass_char_options = '';
foreach ($pass_type_ary as $lang => $value)
foreach ($pass_type_ary as $pass_type)
{
$selected = ($selected_value == $value) ? ' selected="selected"' : '';
$pass_char_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$lang] . '</option>';
$selected = ($selected_value == $pass_type) ? ' selected="selected"' : '';
$pass_char_options .= '<option value="' . $pass_type . '"' . $selected . '>' . $user->lang[$pass_type] . '</option>';
}
return $pass_char_options;
@@ -735,7 +754,14 @@ class acp_board
*/
function dateformat_select($value, $key)
{
global $user;
global $user, $config;
// Let the format_date function operate with the acp values
$old_tz = $user->timezone;
$old_dst = $user->dst;
$user->timezone = $config['board_timezone'];
$user->dst = $config['board_dst'];
$dateformat_options = '';
@@ -753,6 +779,10 @@ class acp_board
}
$dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
// Reset users date options
$user->timezone = $old_tz;
$user->dst = $old_dst;
return "<select name=\"dateoptions\" id=\"dateoptions\" onchange=\"if (this.value == 'custom') { document.getElementById('$key').value = '$value'; } else { document.getElementById('$key').value = this.value; }\">$dateformat_options</select>
<input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"30\" />";
}

View File

@@ -70,42 +70,54 @@ class acp_bots
case 'delete':
if ($bot_id || sizeof($mark))
{
// We need to delete the relevant user, usergroup and bot entries ...
$sql_id = ($bot_id) ? " = $bot_id" : ' IN (' . implode(', ', $mark) . ')';
$sql = 'SELECT bot_name, user_id
FROM ' . BOTS_TABLE . "
WHERE bot_id $sql_id";
$result = $db->sql_query($sql);
$user_id_ary = $bot_name_ary = array();
while ($row = $db->sql_fetchrow($result))
if (confirm_box(true))
{
$user_id_ary[] = (int) $row['user_id'];
$bot_name_ary[] = $row['bot_name'];
}
$db->sql_freeresult($result);
// We need to delete the relevant user, usergroup and bot entries ...
$sql_id = ($bot_id) ? " = $bot_id" : ' IN (' . implode(', ', $mark) . ')';
$db->sql_transaction('begin');
$sql = 'SELECT bot_name, user_id
FROM ' . BOTS_TABLE . "
WHERE bot_id $sql_id";
$result = $db->sql_query($sql);
$sql = 'DELETE FROM ' . BOTS_TABLE . "
WHERE bot_id $sql_id";
$db->sql_query($sql);
$user_id_ary = $bot_name_ary = array();
while ($row = $db->sql_fetchrow($result))
{
$user_id_ary[] = (int) $row['user_id'];
$bot_name_ary[] = $row['bot_name'];
}
$db->sql_freeresult($result);
$_tables = array(USERS_TABLE, USER_GROUP_TABLE);
foreach ($_tables as $table)
{
$sql = "DELETE FROM $table
WHERE " . $db->sql_in_set('user_id', $user_id_ary);
$db->sql_transaction('begin');
$sql = 'DELETE FROM ' . BOTS_TABLE . "
WHERE bot_id $sql_id";
$db->sql_query($sql);
$_tables = array(USERS_TABLE, USER_GROUP_TABLE);
foreach ($_tables as $table)
{
$sql = "DELETE FROM $table
WHERE " . $db->sql_in_set('user_id', $user_id_ary);
$db->sql_query($sql);
}
$db->sql_transaction('commit');
$cache->destroy('bots');
add_log('admin', 'LOG_BOT_DELETE', implode(', ', $bot_name_ary));
trigger_error($user->lang['BOT_DELETED'] . adm_back_link($this->u_action));
}
else
{
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
'mark' => $mark,
'id' => $bot_id,
'mode' => $mode,
'action' => $action))
);
}
$db->sql_transaction('commit');
$cache->destroy('bots');
add_log('admin', 'LOG_BOT_DELETE', implode(', ', $bot_name_ary));
trigger_error($user->lang['BOT_DELETED'] . adm_back_link($this->u_action));
}
break;
@@ -169,17 +181,17 @@ class acp_bots
}
$user_id = user_add(array(
'user_type' => (int) USER_IGNORE,
'group_id' => (int) $group_row['group_id'],
'username' => (string) $bot_row['bot_name'],
'user_regdate' => time(),
'user_password' => '',
'user_colour' => (string) $group_row['group_colour'],
'user_email' => '',
'user_lang' => (string) $bot_row['bot_lang'],
'user_style' => (int) $bot_row['bot_style'],
'user_options' => 0)
);
'user_type' => (int) USER_IGNORE,
'group_id' => (int) $group_row['group_id'],
'username' => (string) $bot_row['bot_name'],
'user_regdate' => time(),
'user_password' => '',
'user_colour' => (string) $group_row['group_colour'],
'user_email' => '',
'user_lang' => (string) $bot_row['bot_lang'],
'user_style' => (int) $bot_row['bot_style'],
'user_allow_massemail' => 0,
));
$sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'user_id' => (int) $user_id,
@@ -194,7 +206,7 @@ class acp_bots
}
else if ($bot_id)
{
$sql = 'SELECT user_id
$sql = 'SELECT user_id, bot_name
FROM ' . BOTS_TABLE . "
WHERE bot_id = $bot_id";
$result = $db->sql_query($sql);
@@ -206,10 +218,18 @@ class acp_bots
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(
$sql_ary = array(
'user_style' => (int) $bot_row['bot_style'],
'user_lang' => (string) $bot_row['bot_lang'])
) . " WHERE user_id = {$row['user_id']}";
'user_lang' => (string) $bot_row['bot_lang'],
);
if ($bot_row['bot_name'] !== $row['bot_name'])
{
$sql_ary['username'] = (string) $bot_row['bot_name'];
$sql_ary['username_clean'] = (string) utf8_clean_string($bot_row['bot_name']);
}
$sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE user_id = {$row['user_id']}";
$db->sql_query($sql);
$sql = 'UPDATE ' . BOTS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array(
@@ -220,6 +240,12 @@ class acp_bots
) . " WHERE bot_id = $bot_id";
$db->sql_query($sql);
// Updated username?
if ($bot_row['bot_name'] !== $row['bot_name'])
{
user_update_name($row['bot_name'], $bot_row['bot_name']);
}
$log = 'UPDATED';
}
@@ -302,7 +328,7 @@ class acp_bots
$sql = 'SELECT b.bot_id, b.bot_name, b.bot_active, u.user_lastvisit
FROM ' . BOTS_TABLE . ' b, ' . USERS_TABLE . ' u
WHERE u.user_id = b.user_id
ORDER BY u.user_lastvisit DESC';
ORDER BY u.user_lastvisit DESC, b.bot_name ASC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))

View File

@@ -36,6 +36,8 @@ class acp_database
{
case 'backup':
$this->page_title = 'ACP_BACKUP';
switch ($action)
{
case 'download':
@@ -70,7 +72,7 @@ class acp_database
$time = time();
$filename = 'backup_' . $time;
$filename = 'backup_' . $time . '_' . unique_id();
// We set up the info needed for our on-the-fly creation :D
switch ($format)
@@ -88,7 +90,6 @@ class acp_database
$open = 'bzopen';
$write = 'bzwrite';
$close = 'bzclose';
$oper = 'bzcompress';
$mimetype = 'application/x-bzip2';
break;
case 'gzip':
@@ -96,7 +97,6 @@ class acp_database
$open = 'gzopen';
$write = 'gzwrite';
$close = 'gzclose';
$oper = 'gzencode';
$mimetype = 'application/x-gzip';
break;
}
@@ -104,6 +104,25 @@ class acp_database
// We write the file to "store" first (and then compress the file) to not use too much
// memory. The server process can be easily killed by storing too much data at once.
if ($download == true)
{
$fh = fopen('php://output', 'wb');
switch ($format)
{
case 'bzip2':
ob_start('ob_bz2handler');
break;
case 'gzip':
ob_start('ob_gzhandler');
break;
}
$name = $filename . $ext;
header('Pragma: no-cache');
header("Content-Type: $mimetype; name=\"$name\"");
header("Content-disposition: attachment; filename=$name");
}
if ($store == true)
{
@@ -117,20 +136,12 @@ class acp_database
}
}
if ($download == true)
{
$name = $filename . $ext;
header('Pragma: no-cache');
header("Content-Type: $mimetype; name=\"$name\"");
header("Content-disposition: attachment; filename=$name");
}
// All of the generated queries go here
$sql_data = '';
$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", $time) . " GMT\n";
$sql_data .= "# DATE : " . gmdate("d-m-Y H:i:s", $time) . " GMT\n";
$sql_data .= "#\n";
switch ($db->sql_layer)
@@ -151,31 +162,6 @@ 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
@@ -238,14 +224,7 @@ class acp_database
if ($download == true)
{
if (!empty($oper))
{
echo $oper($sql_data);
}
else
{
echo $sql_data;
}
fwrite($fh, $sql_data);
}
$sql_data = '';
@@ -307,14 +286,7 @@ class acp_database
if ($download == true)
{
if (!empty($oper))
{
echo $oper($sql_data);
}
else
{
echo $sql_data;
}
fwrite($fh, $sql_data);
}
$sql_data = '';
@@ -381,14 +353,7 @@ class acp_database
if ($download == true)
{
if (!empty($oper))
{
echo $oper($sql_data);
}
else
{
echo $sql_data;
}
fwrite($fh, $sql_data);
}
$sql_data = '';
}
@@ -470,14 +435,7 @@ class acp_database
if ($download == true)
{
if (!empty($oper))
{
echo $oper($sql_data);
}
else
{
echo $sql_data;
}
fwrite($fh, $sql_data);
}
$sql_data = '';
@@ -571,14 +529,7 @@ class acp_database
if ($download == true)
{
if (!empty($oper))
{
echo $oper($sql_data);
}
else
{
echo $sql_data;
}
fwrite($fh, $sql_data);
}
$sql_data = '';
@@ -636,8 +587,8 @@ class acp_database
for ($i = 0; $i < $i_num_fields; $i++)
{
$ary_type[$i] = odbc_field_type($result, $i);
$ary_name[$i] = odbc_field_name($result, $i);
$ary_type[$i] = odbc_field_type($result, $i + 1);
$ary_name[$i] = odbc_field_name($result, $i + 1);
}
while ($row = $db->sql_fetchrow($result))
@@ -692,14 +643,7 @@ class acp_database
if ($download == true)
{
if (!empty($oper))
{
echo $oper($sql_data);
}
else
{
echo $sql_data;
}
fwrite($fh, $sql_data);
}
$sql_data = '';
@@ -803,14 +747,7 @@ class acp_database
if ($download == true)
{
if (!empty($oper))
{
echo $oper($sql_data);
}
else
{
echo $sql_data;
}
fwrite($fh, $sql_data);
}
$sql_data = '';
@@ -898,14 +835,7 @@ class acp_database
if ($download == true)
{
if (!empty($oper))
{
echo $oper($sql_data);
}
else
{
echo $sql_data;
}
fwrite($fh, $sql_data);
}
$sql_data = '';
@@ -926,8 +856,8 @@ class acp_database
for ($i = 0; $i < $i_num_fields; $i++)
{
$ary_type[$i] = ocicolumntype($result, $i);
$ary_name[$i] = ocicolumnname($result, $i);
$ary_type[$i] = ocicolumntype($result, $i + 1);
$ary_name[$i] = ocicolumnname($result, $i + 1);
}
while ($row = $db->sql_fetchrow($result))
@@ -982,14 +912,7 @@ class acp_database
if ($download == true)
{
if (!empty($oper))
{
echo $oper($sql_data);
}
else
{
echo $sql_data;
}
fwrite($fh, $sql_data);
}
$sql_data = '';
@@ -1022,14 +945,8 @@ class acp_database
if ($download == true)
{
if (!empty($oper))
{
echo $oper($sql_data);
}
else
{
echo $sql_data;
}
fwrite($fh, $sql_data);
fclose($fh);
exit;
}
@@ -1051,7 +968,7 @@ class acp_database
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if (strpos($row['name'], $table_prefix) === 0)
if (strlen($table_prefix) == 0 || strpos($row['name'], $table_prefix) === 0)
{
$tables[] = $row['name'];
}
@@ -1079,7 +996,7 @@ class acp_database
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if (strpos($row['relname'], $table_prefix) === 0)
if (strlen($table_prefix) == 0 || strpos($row['relname'], $table_prefix) === 0)
{
$tables[] = $row['relname'];
}
@@ -1096,7 +1013,7 @@ class acp_database
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if (strpos($row['TABLE_NAME'], $table_prefix) === 0)
if (strlen($table_prefix) == 0 || strpos($row['TABLE_NAME'], $table_prefix) === 0)
{
$tables[] = $row['TABLE_NAME'];
}
@@ -1112,7 +1029,7 @@ class acp_database
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if (stripos($row['table_name'], $table_prefix) === 0)
if (strlen($table_prefix) == 0 || stripos($row['table_name'], $table_prefix) === 0)
{
$tables[] = $row['table_name'];
}
@@ -1126,7 +1043,7 @@ class acp_database
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if (stripos($row['table_name'], $table_prefix) === 0)
if (strlen($table_prefix) == 0 || stripos($row['table_name'], $table_prefix) === 0)
{
$tables[] = $row['table_name'];
}
@@ -1168,13 +1085,16 @@ class acp_database
break;
case 'restore':
$this->page_title = 'ACP_RESTORE';
switch ($action)
{
case 'submit':
$delete = request_var('delete', '');
$file = request_var('file', '');
preg_match('#^(backup_\d{10,})\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches);
preg_match('#^backup_\d{10,}_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches);
$file_name = $phpbb_root_path . 'store/' . $matches[0];
if (!(file_exists($file_name) && is_readable($file_name)))
@@ -1190,7 +1110,7 @@ class acp_database
$data = file_get_contents($file_name);
switch ($matches[2])
switch ($matches[1])
{
case 'sql.bz2':
$data = bzdecompress($data);
@@ -1206,7 +1126,7 @@ class acp_database
{
$name = $matches[0];
switch ($matches[2])
switch ($matches[1])
{
case 'sql':
$mimetype = 'text/x-sql';
@@ -1256,14 +1176,14 @@ class acp_database
break;
case 'mssql':
case 'mssql-odbc':
case 'mssql_odbc':
$delim = 'GO';
break;
}
$pieces = split_sql_file($data, $delim);
$sql_count = count($pieces);
for($i = 0; $i < $sql_count; $i++)
for ($i = 0; $i < $sql_count; $i++)
{
$sql = trim($pieces[$i]);
@@ -1279,7 +1199,6 @@ class acp_database
break;
default:
$selected = false;
$methods = array('sql');
$available_methods = array('sql.gz' => 'zlib', 'sql.bz2' => 'bz2');
@@ -1293,29 +1212,27 @@ class acp_database
}
$dir = $phpbb_root_path . 'store/';
$dh = opendir($dir);
while (($file = readdir($dh)) !== false)
{
if (preg_match('#^backup_(\d{10,})\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
{
$supported = in_array($matches[2], $methods);
$dh = @opendir($dir);
if ($supported == 'true')
if ($dh)
{
while (($file = readdir($dh)) !== false)
{
if (preg_match('#^backup_(\d{10,})_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
{
$template->assign_block_vars('files', array(
'FILE' => $file,
'NAME' => gmdate("d-m-Y H:i:s", $matches[1]),
'SUPPORTED' => $supported
));
$selected = true;
$supported = in_array($matches[2], $methods);
if ($supported == 'true')
{
$template->assign_block_vars('files', array(
'FILE' => $file,
'NAME' => gmdate("d-m-Y H:i:s", $matches[1]),
'SUPPORTED' => $supported
));
}
}
}
}
closedir($dh);
if ($selected === true)
{
$template->assign_var('EXISTS', true);
closedir($dh);
}
$template->assign_vars(array(
@@ -1333,6 +1250,7 @@ class acp_database
function get_table_structure($table_name)
{
global $db, $domains_created;
static $has_index_type;
$sql_data = '';
@@ -1342,6 +1260,18 @@ class acp_database
case 'mysql4':
case 'mysql':
if ($has_index_type === null)
{
if ($db->sql_layer === 'mysqli' || version_compare($db->mysql_version, '4.0.2', '>='))
{
$has_index_type = true;
}
else
{
$has_index_type = false;
}
}
$sql_data .= "CREATE TABLE $table_name(\n";
$rows = array();
@@ -1384,7 +1314,7 @@ class acp_database
if ($kname != 'PRIMARY')
{
if ($row['Index_type'] == 'FULLTEXT')
if ($has_index_type && $row['Index_type'] == 'FULLTEXT')
{
$kname = "FULLTEXT|$kname";
}
@@ -1785,7 +1715,7 @@ class acp_database
$sql_data .= "\nCREATE TABLE $table_name (\n";
$sql = 'SELECT DISTINCT R.RDB$FIELD_NAME as FNAME, R.RDB$NULL_FLAG as NFLAG, R.RDB$DEFAULT_SOURCE as DSOURCE, F.RDB$FIELD_TYPE as FTYPE, F.RDB$FIELD_SUB_TYPE as STYPE, F.RDB$FIELD_LENGTH as FLEN
$sql = 'SELECT DISTINCT R.RDB$FIELD_NAME as FNAME, R.RDB$NULL_FLAG as NFLAG, R.RDB$DEFAULT_SOURCE as DSOURCE, F.RDB$FIELD_TYPE as FTYPE, F.RDB$FIELD_SUB_TYPE as STYPE, F.RDB$FIELD_LENGTH as FLEN
FROM RDB$RELATION_FIELDS R
JOIN RDB$FIELDS F ON R.RDB$FIELD_SOURCE=F.RDB$FIELD_NAME
LEFT JOIN RDB$FIELD_DIMENSIONS D ON R.RDB$FIELD_SOURCE = D.RDB$FIELD_NAME
@@ -1826,7 +1756,7 @@ class acp_database
$sql_data .= "\n);;\n";
$keys = array();
$sql = 'SELECT I.RDB$FIELD_NAME as NAME
$sql = 'SELECT I.RDB$FIELD_NAME as NAME
FROM RDB$RELATION_CONSTRAINTS RC, RDB$INDEX_SEGMENTS I, RDB$INDICES IDX
WHERE (I.RDB$INDEX_NAME = RC.RDB$INDEX_NAME)
AND (IDX.RDB$INDEX_NAME = RC.RDB$INDEX_NAME)
@@ -1919,7 +1849,7 @@ class acp_database
case 'oracle':
$sql_data .= "\nCREATE TABLE $table_name (\n";
$sql = "SELECT COLUMN_NAME, DATA_TYPE, DATA_PRECISION, DATA_LENGTH, NULLABLE, DATA_DEFAULT
$sql = "SELECT COLUMN_NAME, DATA_TYPE, DATA_PRECISION, DATA_LENGTH, NULLABLE, DATA_DEFAULT
FROM ALL_TAB_COLS
WHERE table_name = '{$table_name}'";
$result = $db->sql_query($sql);
@@ -2032,4 +1962,15 @@ class acp_database
}
}
// Internal handler for BZip2
function ob_bz2handler($data, $mode)
{
static $internal = '';
$internal .= $data;
if ($mode & PHP_OUTPUT_HANDLER_END)
{
return bzcompress($internal);
}
}
?>

View File

@@ -26,7 +26,7 @@ class acp_disallow
// Set up general vars
$this->tpl_name = 'acp_disallow';
$this->page_header = 'ACP_DISALLOW_USERNAMES';
$this->page_title = 'ACP_DISALLOW_USERNAMES';
$disallow = (isset($_POST['disallow'])) ? true : false;
$allow = (isset($_POST['allow'])) ? true : false;

View File

@@ -38,7 +38,7 @@ class acp_email
{
// Error checking needs to go here ... if no subject and/or no message then skip
// over the send and return to the form
$use_queue = (isset($_POST['send_immediatly'])) ? false : true;
$use_queue = (isset($_POST['send_immediately'])) ? false : true;
$priority = request_var('mail_priority_flag', MAIL_NORMAL_PRIORITY);
if (!$subject)
@@ -65,7 +65,7 @@ class acp_email
{
if ($group_id)
{
$sql = 'SELECT u.user_email, u.username, u.user_lang, u.user_jabber, u.user_notify_type
$sql = 'SELECT u.user_email, u.username, u.username_clean, u.user_lang, u.user_jabber, u.user_notify_type
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
WHERE ug.group_id = $group_id
AND ug.user_pending = 0
@@ -75,7 +75,7 @@ class acp_email
}
else
{
$sql = 'SELECT username, user_email, user_jabber, user_notify_type, user_lang
$sql = 'SELECT username, username_clean, user_email, user_jabber, user_notify_type, user_lang
FROM ' . USERS_TABLE . '
WHERE user_allow_massemail = 1
ORDER BY user_lang, user_notify_type';
@@ -107,7 +107,12 @@ class acp_email
if ($i == $max_chunk_size || $row['user_lang'] != $old_lang || $row['user_notify_type'] != $old_notify_type)
{
$i = 0;
$j++;
if (sizeof($email_list))
{
$j++;
}
$old_lang = $row['user_lang'];
$old_notify_type = $row['user_notify_type'];
}
@@ -151,7 +156,6 @@ class acp_email
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
$messenger->subject(htmlspecialchars_decode($subject));
$messenger->replyto($config['board_email']);
$messenger->set_mail_priority($priority);
$messenger->assign_vars(array(

View File

@@ -133,6 +133,12 @@ class acp_forums
'forum_password_confirm'=> request_var('forum_password_confirm', ''),
);
// Use link_display_on_index setting if forum type is link
if ($forum_data['forum_type'] == FORUM_LINK)
{
$forum_data['display_on_index'] = request_var('link_display_on_index', false);
}
$forum_data['show_active'] = ($forum_data['forum_type'] == FORUM_POST) ? request_var('display_recent', false) : request_var('display_active', false);
// Get data for forum rules if specified...
@@ -218,7 +224,7 @@ class acp_forums
$auth->acl_clear_prefetch();
$cache->destroy('sql', FORUMS_TABLE);
$acl_url = '&amp;mode=setting_forum_local&amp;forum_id[]=' . $forum_data['forum_id'] . '&amp;select_all_groups=1';
$acl_url = '&amp;mode=setting_forum_local&amp;forum_id[]=' . $forum_data['forum_id'];
$message = ($action == 'add') ? $user->lang['FORUM_CREATED'] : $user->lang['FORUM_UPDATED'];
@@ -390,19 +396,18 @@ class acp_forums
{
$forum_data = $row;
}
else
{
$forum_data['left_id'] = $row['left_id'];
$forum_data['right_id'] = $row['right_id'];
}
// Make sure there is no forum displayed for parents_list having the current forum id as a parent...
$sql = 'SELECT forum_id
FROM ' . FORUMS_TABLE . '
WHERE parent_id = ' . $forum_id;
$result = $db->sql_query($sql);
$exclude_forums = array($forum_id);
while ($row = $db->sql_fetchrow($result))
// Make sure no direct child forums are able to be selected as parents.
$exclude_forums = array();
foreach (get_forum_branch($forum_id, 'children') as $row)
{
$exclude_forums[] = $row['forum_id'];
}
$db->sql_freeresult($result);
$parents_list = make_forum_select($forum_data['parent_id'], $exclude_forums, false, false, false);
@@ -471,7 +476,7 @@ class acp_forums
$forum_data['forum_rules_bitfield'] = '';
$forum_data['forum_rules_options'] = 0;
generate_text_for_storage($forum_data['forum_rules'], $forum_data['forum_rules_uid'], $forum_data['forum_rules_bitfield'], $forum_data['forum_rules_options'], request_var('rules_allow_bbcode', false), request_var('rules_allow_urls', false), request_var('rules_allow_smiliess', false));
generate_text_for_storage($forum_data['forum_rules'], $forum_data['forum_rules_uid'], $forum_data['forum_rules_bitfield'], $forum_data['forum_rules_options'], request_var('rules_allow_bbcode', false), request_var('rules_allow_urls', false), request_var('rules_allow_smilies', false));
}
// Generate preview content
@@ -491,7 +496,7 @@ class acp_forums
$forum_data['forum_desc_bitfield'] = '';
$forum_data['forum_desc_options'] = 0;
generate_text_for_storage($forum_data['forum_desc'], $forum_data['forum_desc_uid'], $forum_data['forum_desc_bitfield'], $forum_data['forum_desc_options'], request_var('desc_allow_bbcode', false), request_var('desc_allow_urls', false), request_var('desc_allow_smiliess', false));
generate_text_for_storage($forum_data['forum_desc'], $forum_data['forum_desc_uid'], $forum_data['forum_desc_bitfield'], $forum_data['forum_desc_options'], request_var('desc_allow_bbcode', false), request_var('desc_allow_urls', false), request_var('desc_allow_smilies', false));
}
// decode...
@@ -668,7 +673,7 @@ class acp_forums
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???
'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $subforums_id, false, true)) // , false, true, false???
);
}
$db->sql_freeresult($result);
@@ -846,6 +851,16 @@ class acp_forums
$errors[] = $user->lang['FORUM_NAME_EMPTY'];
}
if (utf8_strlen($forum_data['forum_desc']) > 4000)
{
$errors[] = $user->lang['FORUM_DESC_TOO_LONG'];
}
if (utf8_strlen($forum_data['forum_rules']) > 4000)
{
$errors[] = $user->lang['FORUM_RULES_TOO_LONG'];
}
if ($forum_data['forum_password'] || $forum_data['forum_password_confirm'])
{
if ($forum_data['forum_password'] != $forum_data['forum_password_confirm'])
@@ -989,7 +1004,6 @@ class acp_forums
if ($action_subforums == 'delete')
{
$log_action_forums = 'FORUMS';
$rows = get_forum_branch($row['forum_id'], 'children', 'descending', false);
foreach ($rows as $_row)
@@ -1055,8 +1069,6 @@ class acp_forums
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;
@@ -1115,11 +1127,9 @@ class acp_forums
if ($row['forum_name'] != $forum_data_sql['forum_name'])
{
// the forum name has changed, clear the parents list of child forums
// the forum name has changed, clear the parents list of all forums (for safety)
$sql = 'UPDATE ' . FORUMS_TABLE . "
SET forum_parents = ''
WHERE left_id > " . $row['left_id'] . '
AND right_id < ' . $row['right_id'];
SET forum_parents = ''";
$db->sql_query($sql);
}
@@ -1374,6 +1384,9 @@ class acp_forums
}
$db->sql_freeresult($result);
// Grab new forum data for correct tree updating later
$forum_data = $this->get_forum_info($forum_id);
$sql = 'UPDATE ' . FORUMS_TABLE . "
SET parent_id = $subforums_to_id
WHERE parent_id = $forum_id";

View File

@@ -91,8 +91,6 @@ 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;
@@ -142,8 +140,6 @@ 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
@@ -265,7 +261,9 @@ class acp_groups
$allow_desc_smilies = request_var('desc_parse_smilies', false);
$data['uploadurl'] = request_var('uploadurl', '');
$data['remotelink'] = request_var('remotelink', '');
$data['remotelink'] = request_var('remotelink', '');
$data['width'] = request_var('width', '');
$data['height'] = request_var('height', '');
$delete = request_var('delete', '');
$submit_ary = array(
@@ -287,9 +285,6 @@ class acp_groups
if (!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl'] || $data['remotelink'])
{
$data['width'] = request_var('width', '');
$data['height'] = request_var('height', '');
// Avatar stuff
$var_ary = array(
'uploadurl' => array('string', true, 5, 255),
@@ -323,6 +318,34 @@ class acp_groups
$submit_ary['avatar'] = $category . '/' . $avatar_select;
}
}
else if ($data['width'] && $data['height'])
{
// Only update the dimensions?
if ($config['avatar_max_width'] || $config['avatar_max_height'])
{
if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
{
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
}
}
if (!sizeof($error))
{
if ($config['avatar_min_width'] || $config['avatar_min_height'])
{
if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
{
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
}
}
}
if (!sizeof($error))
{
$submit_ary['avatar_width'] = $data['width'];
$submit_ary['avatar_height'] = $data['height'];
}
}
else if ($delete)
{
$submit_ary['avatar'] = '';
@@ -358,35 +381,49 @@ class acp_groups
$group_perm_from = request_var('group_perm_from', 0);
// Copy permissions?
if ($group_perm_from && $action == 'add')
// If the user has the a_authgroups permission and at least one additional permission ability set the permissions are fully transferred.
// We do not limit on one auth category because this can lead to incomplete permissions being tricky to fix for the admin, roles being assigned or added non-default permissions.
// Since the user only has the option to copy permissions from non leader managed groups this seems to be a good compromise.
if ($group_perm_from && $action == 'add' && $auth->acl_get('a_authgroups') && $auth->acl_gets('a_aauth', 'a_fauth', 'a_mauth', 'a_uauth'))
{
// From the mysql documentation:
// Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14.
// Due to this we stay on the safe side if we do the insertion "the manual way"
// Copy permisisons from/to the acl groups table (only group_id gets changed)
$sql = 'SELECT forum_id, auth_option_id, auth_role_id, auth_setting
FROM ' . ACL_GROUPS_TABLE . '
$sql = 'SELECT group_founder_manage
FROM ' . GROUPS_TABLE . '
WHERE group_id = ' . $group_perm_from;
$result = $db->sql_query($sql);
$groups_sql_ary = array();
while ($row = $db->sql_fetchrow($result))
{
$groups_sql_ary[] = array(
'group_id' => (int) $group_id,
'forum_id' => (int) $row['forum_id'],
'auth_option_id' => (int) $row['auth_option_id'],
'auth_role_id' => (int) $row['auth_role_id'],
'auth_setting' => (int) $row['auth_setting']
);
}
$check_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
// Now insert the data
$db->sql_multi_insert(ACL_GROUPS_TABLE, $groups_sql_ary);
// Check the group if non-founder
if ($check_row && ($user->data['user_type'] == USER_FOUNDER || $check_row['group_founder_manage'] == 0))
{
// From the mysql documentation:
// Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14.
// Due to this we stay on the safe side if we do the insertion "the manual way"
$auth->acl_clear_prefetch();
// Copy permisisons from/to the acl groups table (only group_id gets changed)
$sql = 'SELECT forum_id, auth_option_id, auth_role_id, auth_setting
FROM ' . ACL_GROUPS_TABLE . '
WHERE group_id = ' . $group_perm_from;
$result = $db->sql_query($sql);
$groups_sql_ary = array();
while ($row = $db->sql_fetchrow($result))
{
$groups_sql_ary[] = array(
'group_id' => (int) $group_id,
'forum_id' => (int) $row['forum_id'],
'auth_option_id' => (int) $row['auth_option_id'],
'auth_role_id' => (int) $row['auth_role_id'],
'auth_setting' => (int) $row['auth_setting']
);
}
$db->sql_freeresult($result);
// Now insert the data
$db->sql_multi_insert(ACL_GROUPS_TABLE, $groups_sql_ary);
$auth->acl_clear_prefetch();
}
}
$cache->destroy('sql', GROUPS_TABLE);
@@ -494,6 +531,7 @@ class acp_groups
$template->assign_vars(array(
'S_EDIT' => true,
'S_ADD_GROUP' => ($action == 'add') ? true : false,
'S_GROUP_PERM' => ($action == 'add' && $auth->acl_get('a_authgroups') && $auth->acl_gets('a_aauth', 'a_fauth', 'a_mauth', 'a_uauth')) ? true : false,
'S_INCLUDE_SWATCH' => true,
'S_CAN_UPLOAD' => $can_upload,
'S_ERROR' => (sizeof($error)) ? true : false,
@@ -518,7 +556,7 @@ class acp_groups
'S_DESC_SMILIES_CHECKED'=> $group_desc_data['allow_smilies'],
'S_RANK_OPTIONS' => $rank_options,
'S_GROUP_OPTIONS' => group_select_options(0),
'S_GROUP_OPTIONS' => group_select_options(false, false, (($user->data['user_type'] == USER_FOUNDER) ? false : 0)),
'AVATAR_IMAGE' => $avatar_img,
'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'],
'GROUP_AVATAR_WIDTH' => (isset($group_row['group_avatar_width'])) ? $group_row['group_avatar_width'] : '',
@@ -574,11 +612,11 @@ class acp_groups
$db->sql_freeresult($result);
// Grab the members
$sql = 'SELECT u.user_id, u.username, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
WHERE ug.group_id = $group_id
AND u.user_id = ug.user_id
ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username";
ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username_clean";
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
$leader = $member = 0;

View File

@@ -67,7 +67,7 @@ class acp_icons
{
$img_size = @getimagesize($phpbb_root_path . $img_path . '/' . $path . $img);
if (!$img_size[0] || !$img_size[1])
if (!$img_size[0] || !$img_size[1] || strlen($img) > 255)
{
continue;
}
@@ -203,14 +203,14 @@ class acp_icons
$images = (isset($_POST['image'])) ? array_keys(request_var('image', array('' => 0))) : array();
// Now really get the items
$image_id = (isset($_POST['id'])) ? array_map('intval', $_POST['id']) : array();
$image_order = (isset($_POST['order'])) ? array_map('intval', $_POST['order']) : array();
$image_width = (isset($_POST['width'])) ? array_map('intval', $_POST['width']) : array();
$image_height = (isset($_POST['height'])) ? array_map('intval', $_POST['height']) : array();
$image_add = (isset($_POST['add_img'])) ? array_map('intval', $_POST['add_img']) : array();
$image_id = (isset($_POST['id'])) ? request_var('id', array('' => 0)) : array();
$image_order = (isset($_POST['order'])) ? request_var('order', array('' => 0)) : array();
$image_width = (isset($_POST['width'])) ? request_var('width', array('' => 0)) : array();
$image_height = (isset($_POST['height'])) ? request_var('height', array('' => 0)) : array();
$image_add = (isset($_POST['add_img'])) ? request_var('add_img', array('' => 0)) : array();
$image_emotion = request_var('emotion', array('' => ''));
$image_code = request_var('code', array('' => ''));
$image_display_on_posting = (isset($_POST['display_on_posting'])) ? array_map('intval', $_POST['display_on_posting']) : array();
$image_display_on_posting = (isset($_POST['display_on_posting'])) ? request_var('display_on_posting', array('' => 0)) : array();
foreach ($images as $image)
{
@@ -308,6 +308,29 @@ class acp_icons
{
$order = 0;
if (!($pak_ary = @file($phpbb_root_path . $img_path . '/' . $pak)))
{
trigger_error($user->lang['PAK_FILE_NOT_READABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Make sure the pak_ary is valid
foreach ($pak_ary as $pak_entry)
{
if (preg_match_all("#'(.*?)', #", $pak_entry, $data))
{
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), E_USER_WARNING);
}
}
else
{
trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
// The user has already selected a smilies_pak file
if ($current == 'delete')
{
@@ -343,11 +366,6 @@ class acp_icons
$db->sql_freeresult($result);
}
if (!($pak_ary = @file($phpbb_root_path . $img_path . '/' . $pak)))
{
trigger_error($user->lang['PAK_FILE_NOT_READABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
foreach ($pak_ary as $pak_entry)
{
$data = array();
@@ -512,32 +530,43 @@ class acp_icons
case 'delete':
$sql = "DELETE FROM $table
WHERE {$fields}_id = $icon_id";
$db->sql_query($sql);
switch ($mode)
if (confirm_box(true))
{
case 'smilies':
break;
$sql = "DELETE FROM $table
WHERE {$fields}_id = $icon_id";
$db->sql_query($sql);
case 'icons':
// Reset appropriate icon_ids
$db->sql_query('UPDATE ' . TOPICS_TABLE . "
SET icon_id = 0
WHERE icon_id = $icon_id");
switch ($mode)
{
case 'smilies':
break;
$db->sql_query('UPDATE ' . POSTS_TABLE . "
SET icon_id = 0
WHERE icon_id = $icon_id");
case 'icons':
// Reset appropriate icon_ids
$db->sql_query('UPDATE ' . TOPICS_TABLE . "
SET icon_id = 0
WHERE icon_id = $icon_id");
break;
$db->sql_query('UPDATE ' . POSTS_TABLE . "
SET icon_id = 0
WHERE icon_id = $icon_id");
break;
}
$notice = $user->lang[$lang . '_DELETED'];
$cache->destroy('icons');
$cache->destroy('sql', $table);
}
else
{
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
'i' => $id,
'mode' => $mode,
'id' => $icon_id,
'action' => 'delete',
)));
}
$notice = $user->lang[$lang . '_DELETED'];
$cache->destroy('icons');
$cache->destroy('sql', $table);
break;

View File

@@ -26,6 +26,8 @@ class acp_inactive
global $config, $db, $user, $auth, $template;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
$user->add_lang('memberlist');
$action = request_var('action', '');
@@ -43,7 +45,8 @@ class acp_inactive
{
case 'activate':
case 'delete':
$sql = 'SELECT username
$sql = 'SELECT user_id, username
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $mark);
$result = $db->sql_query($sql);
@@ -51,13 +54,12 @@ class acp_inactive
$user_affected = array();
while ($row = $db->sql_fetchrow($result))
{
$user_affected[] = $row['username'];
$user_affected[$row['user_id']] = $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')
@@ -67,14 +69,14 @@ class acp_inactive
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));
foreach ($mark as $user_id)
{
user_delete('retain', $user_id, $user_affected[$user_id]);
}
}
add_log('admin', 'LOG_INACTIVE_' . strtoupper($action), implode(', ', $user_affected));
break;
case 'remind':
@@ -94,22 +96,19 @@ class acp_inactive
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'])
'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey'])
);
$messenger->send($row['user_notify_type']);

View File

@@ -58,7 +58,7 @@ class acp_jabber
{
if (!$jabber->connect())
{
trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action), E_USER_WARNING);
trigger_error($user->lang['ERR_JAB_CONNECT'] . $jabber->get_log() . 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.
@@ -87,16 +87,16 @@ class acp_jabber
{
if (!$jabber->connect())
{
trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action), E_USER_WARNING);
trigger_error($user->lang['ERR_JAB_CONNECT'] . $jabber->get_log() . 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), E_USER_WARNING);
trigger_error($user->lang['ERR_JAB_AUTH'] . $jabber->get_log() . adm_back_link($this->u_action), E_USER_WARNING);
}
$jabber->send_presence(NULL, NULL, 'online');
if (($result = $jabber->change_password($jab_password)) <> 2)
if (($result = $jabber->change_password($jab_password)) <> 2)
{
$error[] = ($result == 1) ? $user->lang['ERR_JAB_PASSCHG'] : sprintf($user->lang['ERR_JAB_PASSFAIL'], $result);
}

View File

@@ -116,6 +116,7 @@ class acp_language
'S_UPLOAD' => true,
'NAME' => $method,
'U_ACTION' => $this->u_action . "&amp;id=$lang_id&amp;action=upload_data",
'U_BACK' => $this->u_action . "&amp;id=$lang_id&amp;action=details&amp;language_file=" . urlencode($selected_lang_file),
'HIDDEN' => $hidden_data,
'S_CONNECTION_SUCCESS' => (request_var('test_connection', '') && $test_connection === true) ? true : false,
@@ -203,7 +204,7 @@ class acp_language
if (!$fp)
{
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);
trigger_error(sprintf($user->lang['UNABLE_TO_WRITE_FILE'], $filename) . adm_back_link($this->u_action . '&amp;id=' . $lang_id . '&amp;action=details&amp;language_file=' . urlencode($selected_lang_file)), E_USER_WARNING);
}
if ($this->language_directory == 'email')
@@ -240,6 +241,9 @@ class acp_language
$entry .= "\t),\n";
fwrite($fp, $entry);
}
$footer = ");\n\n?>";
fwrite($fp, $footer);
}
else
{
@@ -252,10 +256,10 @@ class acp_language
$entry = $this->format_lang_array($key, $value);
fwrite($fp, $entry);
}
}
$footer = "));\n\n?>";
fwrite($fp, $footer);
$footer = "));\n\n?>";
fwrite($fp, $footer);
}
}
fclose($fp);
@@ -316,7 +320,17 @@ class acp_language
}
$transfer->rename($lang_path . $file, $lang_path . $file . '.bak');
$transfer->copy_file('store/' . $lang_path . $file, $lang_path . $file);
$result = $transfer->copy_file('store/' . $lang_path . $file, $lang_path . $file);
if ($result === false)
{
// If failed, try to rename again and print error out...
$transfer->delete_file($lang_path . $file);
$transfer->rename($lang_path . $file . '.bak', $lang_path . $file);
trigger_error($user->lang['UPLOAD_FAILED'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id . '&amp;language_file=' . urlencode($selected_lang_file)), E_USER_WARNING);
}
$transfer->close_session();
// Remove from storage folder
@@ -621,16 +635,15 @@ class acp_language
if (!$is_email_file)
{
$method = ($is_help_file) ? 'print_help_entries' : 'print_language_entries';
$tpl = '';
$name = (($this->language_directory) ? $this->language_directory . '/' : '') . $this->language_file;
if (isset($missing_vars[$name]) && sizeof($missing_vars[$name]))
{
$tpl .= $this->$method($missing_vars[$name], '* ');
$tpl .= $this->print_language_entries($missing_vars[$name], '* ');
}
$tpl .= $this->$method($lang);
$tpl .= $this->print_language_entries($lang);
$template->assign_var('TPL', $tpl);
unset($tpl);
@@ -674,6 +687,13 @@ class acp_language
WHERE user_lang = '" . $db->sql_escape($row['lang_iso']) . "'";
$db->sql_query($sql);
// We also need to remove the translated entries for custom profile fields - we want clean tables, don't we?
$sql = 'DELETE FROM ' . PROFILE_LANG_TABLE . ' WHERE lang_id = ' . $lang_id;
$db->sql_query($sql);
$sql = 'DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . ' WHERE lang_id = ' . $lang_id;
$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));
@@ -725,6 +745,43 @@ class acp_language
);
$db->sql_query('INSERT INTO ' . LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
$lang_id = $db->sql_nextid();
// Now let's copy the default language entries for custom profile fields for this new language - makes admin's life easier.
$sql = 'SELECT lang_id
FROM ' . LANG_TABLE . "
WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'";
$result = $db->sql_query($sql);
$default_lang_id = (int) $db->sql_fetchfield('lang_id');
$db->sql_freeresult($result);
// From the mysql documentation:
// Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14.
// Due to this we stay on the safe side if we do the insertion "the manual way"
$sql = 'SELECT field_id, lang_name, lang_explain, lang_default_value
FROM ' . PROFILE_LANG_TABLE . '
WHERE lang_id = ' . $default_lang_id;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$row['lang_id'] = $lang_id;
$db->sql_query('INSERT INTO ' . PROFILE_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $row));
}
$db->sql_freeresult($result);
$sql = 'SELECT field_id, option_id, field_type, lang_value
FROM ' . PROFILE_FIELDS_LANG_TABLE . '
WHERE lang_id = ' . $default_lang_id;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$row['lang_id'] = $lang_id;
$db->sql_query('INSERT INTO ' . PROFILE_FIELDS_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $row));
}
$db->sql_freeresult($result);
add_log('admin', 'LOG_LANGUAGE_PACK_INSTALLED', $lang_pack['name']);
@@ -866,7 +923,7 @@ class acp_language
}
$db->sql_freeresult($result);
$sql = 'SELECT *
$sql = 'SELECT *
FROM ' . LANG_TABLE . '
ORDER BY lang_english_name';
$result = $db->sql_query($sql);
@@ -893,31 +950,35 @@ class acp_language
$db->sql_freeresult($result);
$new_ary = $iso = array();
$dp = opendir("{$phpbb_root_path}language");
$dp = @opendir("{$phpbb_root_path}language");
while (($file = readdir($dp)) !== false)
if ($dp)
{
if ($file[0] != '.' && file_exists("{$phpbb_root_path}language/$file/iso.txt"))
while (($file = readdir($dp)) !== false)
{
if (!in_array($file, $installed))
if ($file[0] != '.' && file_exists("{$phpbb_root_path}language/$file/iso.txt"))
{
if ($iso = file("{$phpbb_root_path}language/$file/iso.txt"))
if (!in_array($file, $installed))
{
if (sizeof($iso) == 3)
if ($iso = file("{$phpbb_root_path}language/$file/iso.txt"))
{
$new_ary[$file] = array(
'iso' => $file,
'name' => trim($iso[0]),
'local_name'=> trim($iso[1]),
'author' => trim($iso[2])
);
if (sizeof($iso) == 3)
{
$new_ary[$file] = array(
'iso' => $file,
'name' => trim($iso[0]),
'local_name'=> trim($iso[1]),
'author' => trim($iso[2])
);
}
}
}
}
}
closedir($dp);
}
unset($installed);
@closedir($dp);
if (sizeof($new_ary))
{
@@ -949,7 +1010,7 @@ class acp_language
* {FILENAME} [{LANG_NAME}]
*
* @package language
* @copyright (c) 2006 phpBB Group
* @copyright (c) ' . date('Y') . ' phpBB Group
* @author {CHANGED} - {AUTHOR}
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
@@ -1028,6 +1089,35 @@ $lang = array_merge($lang, array(
}
}
/**
* Little helper to add some hardcoded template bits
*/
function add_input_field()
{
$keys = func_get_args();
$non_static = array_shift($keys);
$value = array_shift($keys);
if (!$non_static)
{
return '<strong>' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '</strong>';
}
// If more then 270 characters, then we present a textarea, else an input field
$textarea = (utf8_strlen($value) > 270) ? true : false;
$tpl = '';
$tpl .= ($textarea) ? '<textarea name="' : '<input type="text" name="';
$tpl .= 'entry[' . implode('][', array_map('utf8_htmlspecialchars', $keys)) . ']"';
$tpl .= ($textarea) ? ' cols="80" rows="5" class="langvalue">' : ' class="langvalue" value="';
$tpl .= htmlspecialchars($value, ENT_COMPAT, 'UTF-8');
$tpl .= ($textarea) ? '</textarea>' : '" />';
return $tpl;
}
/**
* Print language entries
*/
@@ -1039,56 +1129,46 @@ $lang = array_merge($lang, array(
{
if (is_array($value))
{
// Write key
$tpl .= '
<tr>
<td class="row3" colspan="2">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<b>' . htmlspecialchars($key, ENT_COMPAT, 'UTF-8') . '</b></td>
<td class="row3" colspan="2">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<strong>' . htmlspecialchars($key, ENT_COMPAT, 'UTF-8') . '</strong></td>
</tr>';
foreach ($value as $_key => $_value)
{
if (is_array($_value))
{
// Write key
$tpl .= '
<tr>
<td class="row3" colspan="2">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '&nbsp; &nbsp;<b>' . htmlspecialchars($_key, ENT_COMPAT, 'UTF-8') . '</b></td>
<td class="row3" colspan="2">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '&nbsp; &nbsp;<strong>' . htmlspecialchars($_key, ENT_COMPAT, 'UTF-8') . '</strong></td>
</tr>';
foreach ($_value as $__key => $__value)
{
// Write key
$tpl .= '
<tr>
<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="row1" style="white-space: nowrap;">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<strong>' . htmlspecialchars($__key, ENT_COMPAT, 'UTF-8') . '</strong></td>
<td class="row2">';
if ($input_field)
{
$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, ENT_COMPAT, 'UTF-8') . '</b>';
}
$tpl .= $this->add_input_field($input_field, $__value, $key, $_key, $__key);
$tpl .= '</td>
</tr>';
}
}
else
{
// Write key
$tpl .= '
<tr>
<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="row1" style="white-space: nowrap;">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<strong>' . htmlspecialchars($_key, ENT_COMPAT, 'UTF-8') . '</strong></td>
<td class="row2">';
if ($input_field)
{
$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, ENT_COMPAT, 'UTF-8') . '</b>';
}
$tpl .= $this->add_input_field($input_field, $_value, $key, $_key);
$tpl .= '</td>
</tr>';
}
@@ -1101,84 +1181,13 @@ $lang = array_merge($lang, array(
}
else
{
// Write key
$tpl .= '
<tr>
<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="row1" style="white-space: nowrap;">' . htmlspecialchars($key_prefix, ENT_COMPAT, 'UTF-8') . '<strong>' . htmlspecialchars($key, ENT_COMPAT, 'UTF-8') . '</strong></td>
<td class="row2">';
if ($input_field)
{
$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, ENT_COMPAT, 'UTF-8') . '</b>';
}
$tpl .= '</td>
</tr>';
}
}
return $tpl;
}
/**
* Print help entries
*/
function print_help_entries(&$lang_ary, $key_prefix = '', $text_field = true)
{
$tpl = '';
foreach ($lang_ary as $key => $value)
{
if (is_array($value))
{
$tpl .= '
<tr>
<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;">' . 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[' . 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, ENT_COMPAT, 'UTF-8') . '</b>';
}
$tpl .= '</td>
</tr>';
}
$tpl .= '
<tr>
<td class="spacer" colspan="2">&nbsp;</td>
</tr>';
}
else
{
$tpl .= '
<tr>
<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[' . 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, ENT_COMPAT, 'UTF-8') . '</b>';
}
$tpl .= $this->add_input_field($input_field, $value, $key);
$tpl .= '</td>
</tr>';

View File

@@ -43,7 +43,7 @@ class acp_main
'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')),
'L_PERMISSIONS_TRANSFERRED_EXPLAIN' => sprintf($user->lang['PERMISSIONS_TRANSFERRED_EXPLAIN'], $perm_from, append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm')),
));
return;

View File

@@ -67,6 +67,17 @@ class acp_modules
if (confirm_box(true))
{
// Make sure we are not directly within a module
if ($module_id == $this->parent_id)
{
$sql = 'SELECT parent_id
FROM ' . MODULES_TABLE . '
WHERE module_id = ' . $module_id;
$result = $db->sql_query($sql);
$this->parent_id = (int) $db->sql_fetchfield('parent_id');
$db->sql_freeresult($result);
}
$errors = $this->delete_module($module_id);
if (!sizeof($errors))
@@ -501,7 +512,13 @@ class acp_modules
if (!$module)
{
$dh = opendir($directory);
$dh = @opendir($directory);
if (!$dh)
{
return $fileinfo;
}
while (($file = readdir($dh)) !== false)
{
// Is module?
@@ -1008,14 +1025,6 @@ 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

@@ -142,6 +142,11 @@ class acp_permission_roles
trigger_error($user->lang['NO_ROLE_NAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (utf8_strlen($role_description) > 4000)
{
trigger_error($user->lang['ROLE_DESCRIPTION_LONG'] . 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 . "
@@ -325,9 +330,11 @@ class acp_permission_roles
if (sizeof($hold_ary))
{
$role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name'];
$template->assign_var(array(
'S_DISPLAY_ROLE_MASK' => true,
'L_ROLE_ASSIGNED_TO' => sprintf($user->lang['ROLE_ASSIGNED_TO'], $role_row['role_name']))
'L_ROLE_ASSIGNED_TO' => sprintf($user->lang['ROLE_ASSIGNED_TO'], $role_name))
);
$auth_admin->display_role_mask($hold_ary);
@@ -344,7 +351,7 @@ class acp_permission_roles
$order_total = $order * 2 + (($action == 'move_up') ? -1 : 1);
$sql = 'UPDATE ' . ACL_ROLES_TABLE . '
SET role_order = ' . $order_total . " - role_order
SET role_order = ' . $order_total . " - role_order
WHERE role_type = '" . $db->sql_escape($permission_type) . "'
AND role_order IN ($order, " . (($action == 'move_up') ? $order - 1 : $order + 1) . ')';
$db->sql_query($sql);
@@ -387,8 +394,10 @@ class acp_permission_roles
$s_role_options = '';
while ($row = $db->sql_fetchrow($result))
{
$role_name = (!empty($user->lang[$row['role_name']])) ? $user->lang[$row['role_name']] : $row['role_name'];
$template->assign_block_vars('roles', array(
'ROLE_NAME' => $row['role_name'],
'ROLE_NAME' => $role_name,
'ROLE_DESCRIPTION' => (!empty($user->lang[$row['role_description']])) ? $user->lang[$row['role_description']] : nl2br($row['role_description']),
'U_EDIT' => $this->u_action . '&amp;action=edit&amp;role_id=' . $row['role_id'],
@@ -398,12 +407,12 @@ class acp_permission_roles
'U_DISPLAY_ITEMS' => ($row['role_id'] == $display_item) ? '' : $this->u_action . '&amp;display_item=' . $row['role_id'] . '#assigned_to')
);
$s_role_options .= '<option value="' . $row['role_id'] . '">' . $row['role_name'] . '</option>';
$s_role_options .= '<option value="' . $row['role_id'] . '">' . $role_name . '</option>';
if ($display_item == $row['role_id'])
{
$template->assign_vars(array(
'L_ROLE_ASSIGNED_TO' => sprintf($user->lang['ROLE_ASSIGNED_TO'], $row['role_name']))
'L_ROLE_ASSIGNED_TO' => sprintf($user->lang['ROLE_ASSIGNED_TO'], $role_name))
);
}
}

View File

@@ -305,7 +305,7 @@ class acp_permissions
$s_forum_options = '';
foreach ($forum_list as $f_id => $f_row)
{
$s_forum_options .= '<option value="' . $f_id . '"' . $f_row['selected'] . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
$s_forum_options .= '<option value="' . $f_id . '"' . (($f_row['selected']) ? ' selected="selected"' : '') . (($f_row['disabled']) ? ' disabled="disabled"' : '') . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
}
// Build subforum options
@@ -331,8 +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'),
'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=select_victim&field=username', false))
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=select_victim&amp;field=username&amp;select_single=true'),
'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=select_victim&field=username&select_single=true', false))
);
break;
@@ -347,7 +347,7 @@ class acp_permissions
$template->assign_vars(array(
'S_SELECT_GROUP' => true,
'S_GROUP_OPTIONS' => group_select_options(false))
'S_GROUP_OPTIONS' => group_select_options(false, false, (($user->data['user_type'] == USER_FOUNDER) ? false : 0)))
);
break;
@@ -393,9 +393,9 @@ class acp_permissions
'S_SELECT_USERGROUP_VIEW' => ($victim == 'usergroup_view') ? true : false,
'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'),
'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=add_user&field=username', false))
'S_ADD_GROUP_OPTIONS' => group_select_options(false, $items['group_ids'], (($user->data['user_type'] == USER_FOUNDER) ? false : 0)),
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=add_user&amp;field=username&amp;select_single=true'),
'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=add_user&field=username&select_single=true', false))
);
break;
@@ -488,7 +488,12 @@ class acp_permissions
foreach ($forum_list as $key => $row)
{
$s_options .= '<option value="' . $row['forum_id'] . '"' . $row['selected'] . '>' . $row['padding'] . $row['forum_name'];
if ($row['disabled'])
{
continue;
}
$s_options .= '<option value="' . $row['forum_id'] . '"' . (($row['selected']) ? ' selected="selected"' : '') . '>' . $row['padding'] . $row['forum_name'];
// We check if a branch is there...
$branch_there = false;
@@ -812,7 +817,7 @@ class acp_permissions
// Logging ... first grab user or groupnames ...
$sql = ($ug_type == 'group') ? 'SELECT group_name as name, group_type FROM ' . GROUPS_TABLE . ' WHERE ' : 'SELECT username as name FROM ' . USERS_TABLE . ' WHERE ';
$sql .= $db->sql_in_set(($ug_type == 'group') ? 'group_id' : 'user_id', array_map('intval', $ug_id));
$sql .= $db->sql_in_set(($ug_type == 'group') ? 'group_id' : 'user_id', array_map('intval', $ug_id));
$result = $db->sql_query($sql);
$l_ug_list = '';
@@ -831,7 +836,7 @@ class acp_permissions
else
{
// Grab the forum details if non-zero forum_id
$sql = 'SELECT forum_name
$sql = 'SELECT forum_name
FROM ' . FORUMS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_id);
$result = $db->sql_query($sql);
@@ -1064,7 +1069,7 @@ class acp_permissions
$sql_permission_option = "AND o.auth_option LIKE '" . $db->sql_escape($permission_type) . "%'";
$sql = $db->sql_build_query('SELECT_DISTINCT', array(
'SELECT' => 'u.username, u.user_regdate, u.user_id',
'SELECT' => 'u.username, u.username_clean, u.user_regdate, u.user_id',
'FROM' => array(
USERS_TABLE => 'u',
@@ -1084,7 +1089,7 @@ class acp_permissions
$sql_forum_id
AND u.user_id = a.user_id",
'ORDER_BY' => 'u.username, u.user_regdate ASC'
'ORDER_BY' => 'u.username_clean, u.user_regdate ASC'
));
$result = $db->sql_query($sql);

View File

@@ -29,15 +29,21 @@ class acp_php_info
$this->page_title = 'ACP_PHP_INFO';
ob_start();
phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_VARIABLES);
$phpinfo = ob_get_contents();
ob_end_clean();
@phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_VARIABLES);
$phpinfo = ob_get_clean();
$phpinfo = trim($phpinfo);
// Here we play around a little with the PHP Info HTML to try and stylise
// it along phpBB's lines ... hopefully without breaking anything. The idea
// for this was nabbed from the PHP annotated manual
preg_match_all('#<body[^>]*>(.*)</body>#si', $phpinfo, $output);
if (empty($phpinfo) || empty($output))
{
trigger_error('NO_PHPINFO_AVAILABLE', E_USER_WARNING);
}
$output = $output[1][0];
$output = preg_replace('#<tr class="v"><td>(.*?<a[^>]*><img[^>]*></a>)(.*?)</td></tr>#s', '<tr class="row1"><td><table class="type2"><tr><td>\2</td><td>\1</td></tr></table></td></tr>', $output);
$output = preg_replace('#<table[^>]+>#i', '<table>', $output);

View File

@@ -15,6 +15,9 @@ class acp_profile
{
var $u_action;
var $edit_lang_id;
var $lang_defs;
function main($id, $mode)
{
global $config, $db, $user, $auth, $template, $cache;
@@ -47,7 +50,7 @@ class acp_profile
// Build Language array
// Based on this, we decide which elements need to be edited later and which language items are missing
$lang_defs = array();
$this->lang_defs = array();
$sql = 'SELECT lang_id, lang_iso
FROM ' . LANG_TABLE . '
@@ -57,8 +60,8 @@ class acp_profile
while ($row = $db->sql_fetchrow($result))
{
// Make some arrays with all available languages
$lang_defs['id'][] = $row['lang_id'];
$lang_defs['iso'][$row['lang_iso']] = $row['lang_id'];
$this->lang_defs['id'][$row['lang_id']] = $row['lang_iso'];
$this->lang_defs['iso'][$row['lang_iso']] = $row['lang_id'];
}
$db->sql_freeresult($result);
@@ -70,17 +73,17 @@ class acp_profile
while ($row = $db->sql_fetchrow($result))
{
// Which languages are available for each item
$lang_defs['entry'][$row['field_id']][] = $row['lang_id'];
$this->lang_defs['entry'][$row['field_id']][] = $row['lang_id'];
}
$db->sql_freeresult($result);
// Have some fields been defined?
if (isset($lang_defs['entry']))
if (isset($this->lang_defs['entry']))
{
foreach ($lang_defs['entry'] as $field_id => $field_ary)
foreach ($this->lang_defs['entry'] as $field_id => $field_ary)
{
// Fill an array with the languages that are missing for each field
$lang_defs['diff'][$field_id] = array_diff($lang_defs['id'], $field_ary);
$this->lang_defs['diff'][$field_id] = array_diff(array_values($this->lang_defs['iso']), $field_ary);
}
}
@@ -103,6 +106,8 @@ class acp_profile
$field_ident = (string) $db->sql_fetchfield('field_ident');
$db->sql_freeresult($result);
$db->sql_transaction('begin');
$db->sql_query('DELETE FROM ' . PROFILE_FIELDS_TABLE . " WHERE field_id = $field_id");
$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");
@@ -119,8 +124,6 @@ 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);
@@ -149,12 +152,10 @@ class acp_profile
$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 pf_$field_ident");
$db->sql_query('ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " DROP COLUMN pf_$field_ident");
}
$order = 0;
@@ -177,6 +178,8 @@ class acp_profile
}
$db->sql_freeresult($result);
$db->sql_transaction('commit');
add_log('admin', 'LOG_PROFILE_FIELD_REMOVED', $field_ident);
trigger_error($user->lang['REMOVED_PROFILE_FIELD'] . adm_back_link($this->u_action));
}
@@ -207,7 +210,7 @@ class acp_profile
$default_lang_id = (int) $db->sql_fetchfield('lang_id');
$db->sql_freeresult($result);
if (!in_array($default_lang_id, $lang_defs['entry'][$field_id]))
if (!in_array($default_lang_id, $this->lang_defs['entry'][$field_id]))
{
trigger_error($user->lang['DEFAULT_LANGUAGE_NOT_FILLED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -275,6 +278,9 @@ class acp_profile
$submit = (isset($_REQUEST['next']) || isset($_REQUEST['prev'])) ? true : false;
$save = (isset($_REQUEST['save'])) ? true : false;
// The language id of default language
$this->edit_lang_id = $this->lang_defs['iso'][$config['default_lang']];
// We are editing... we need to grab basic things
if ($action == 'edit')
{
@@ -285,7 +291,7 @@ class acp_profile
$sql = 'SELECT l.*, f.*
FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f
WHERE l.lang_id = ' . $lang_defs['iso'][$config['default_lang']] . "
WHERE l.lang_id = ' . $this->edit_lang_id . "
AND f.field_id = $field_id
AND l.field_id = f.field_id";
$result = $db->sql_query($sql);
@@ -294,14 +300,29 @@ class acp_profile
if (!$field_row)
{
trigger_error($user->lang['FIELD_NOT_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
// Some admin changed the default language?
$sql = 'SELECT l.*, f.*
FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f
WHERE l.lang_id <> ' . $this->edit_lang_id . "
AND f.field_id = $field_id
AND l.field_id = f.field_id";
$result = $db->sql_query($sql);
$field_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$field_row)
{
trigger_error($user->lang['FIELD_NOT_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->edit_lang_id = $field_row['lang_id'];
}
$field_type = $field_row['field_type'];
// Get language entries
$sql = 'SELECT *
FROM ' . PROFILE_FIELDS_LANG_TABLE . '
WHERE lang_id = ' . $lang_defs['iso'][$config['default_lang']] . "
WHERE lang_id = ' . $this->edit_lang_id . "
AND field_id = $field_id
ORDER BY option_id ASC";
$result = $db->sql_query($sql);
@@ -404,17 +425,17 @@ class acp_profile
{
// The number of options in the field is equal to the number of options already in the database
// Or we are creating a new dropdown list.
$cp->vars['lang_options'] = $exploded_options;
$cp->vars['lang_options'] = $exploded_options;
}
else if ($action == 'edit')
{
// Changing the number of options? (We remove and re-create the option fields)
$cp->vars['lang_options'] = $exploded_options;
$cp->vars['lang_options'] = $exploded_options;
}
}
else
{
$cp->vars['lang_options'] = $lang_options;
$cp->vars['lang_options'] = $lang_options;
}
// step 2
@@ -483,7 +504,7 @@ class acp_profile
// Get language entries
$sql = 'SELECT *
FROM ' . PROFILE_FIELDS_LANG_TABLE . '
WHERE lang_id <> ' . $lang_defs['iso'][$config['default_lang']] . "
WHERE lang_id <> ' . $this->edit_lang_id . "
AND field_id = $field_id
ORDER BY option_id ASC";
$result = $db->sql_query($sql);
@@ -498,7 +519,7 @@ class acp_profile
$sql = 'SELECT lang_id, lang_name, lang_explain, lang_default_value
FROM ' . PROFILE_LANG_TABLE . '
WHERE lang_id <> ' . $lang_defs['iso'][$config['default_lang']] . "
WHERE lang_id <> ' . $this->edit_lang_id . "
AND field_id = $field_id
ORDER BY lang_id ASC";
$result = $db->sql_query($sql);
@@ -616,13 +637,13 @@ class acp_profile
if (!sizeof($error))
{
if ($step == 3 && (sizeof($lang_defs['iso']) == 1 || $save))
if ($step == 3 && (sizeof($this->lang_defs['iso']) == 1 || $save))
{
$this->save_profile_field($cp, $field_type, $lang_defs, $action);
$this->save_profile_field($cp, $field_type, $action);
}
else if ($action == 'edit' && $save)
{
$this->save_profile_field($cp, $field_type, $lang_defs, $action);
$this->save_profile_field($cp, $field_type, $action);
}
}
@@ -706,7 +727,7 @@ class acp_profile
$template->assign_vars(array(
'S_STEP_TWO' => true,
'L_NEXT' => (sizeof($lang_defs['iso']) == 1) ? $user->lang['SAVE'] : $user->lang['PROFILE_LANG_OPTIONS'])
'L_NEXT' => (sizeof($this->lang_defs['iso']) == 1) ? $user->lang['SAVE'] : $user->lang['PROFILE_LANG_OPTIONS'])
);
// Build options based on profile type
@@ -729,7 +750,7 @@ class acp_profile
foreach ($options as $lang_id => $lang_ary)
{
$template->assign_block_vars('options', array(
'LANGUAGE' => ($lang_ary['lang_iso'] == $config['default_lang']) ? sprintf($user->lang['DEFAULT_ISO_LANGUAGE'], $config['default_lang']) : sprintf($user->lang['ISO_LANGUAGE'], $lang_ary['lang_iso']))
'LANGUAGE' => sprintf($user->lang[(($lang_id == $this->edit_lang_id) ? 'DEFAULT_' : '') . 'ISO_LANGUAGE'], $lang_ary['lang_iso']))
);
foreach ($lang_ary['fields'] as $field_ident => $field_ary)
@@ -766,7 +787,7 @@ class acp_profile
$active_value = (!$row['field_active']) ? 'activate' : 'deactivate';
$id = $row['field_id'];
$s_need_edit = (sizeof($lang_defs['diff'][$row['field_id']])) ? true : false;
$s_need_edit = (sizeof($this->lang_defs['diff'][$row['field_id']])) ? true : false;
if ($s_need_edit)
{
@@ -815,10 +836,12 @@ class acp_profile
{
global $user, $config, $db;
$default_lang_id = (!empty($this->edit_lang_id)) ? $this->edit_lang_id : $this->lang_defs['iso'][$config['default_lang']];
$sql = 'SELECT lang_id, lang_iso
FROM ' . LANG_TABLE . "
WHERE lang_iso <> '" . $config['default_lang'] . "'
ORDER BY lang_english_name";
FROM ' . LANG_TABLE . '
WHERE lang_id <> ' . (int) $default_lang_id . '
ORDER BY lang_english_name';
$result = $db->sql_query($sql);
$languages = array();
@@ -858,7 +881,7 @@ class acp_profile
foreach ($options as $field => $field_type)
{
$lang_options[1]['lang_iso'] = $config['default_lang'];
$lang_options[1]['lang_iso'] = $this->lang_defs['id'][$default_lang_id];
$lang_options[1]['fields'][$field] = array(
'TITLE' => $user->lang['CP_' . strtoupper($field)],
'FIELD' => '<dd>' . ((is_array($cp->vars[$field])) ? implode('<br />', $cp->vars[$field]) : str_replace("\n", '<br />', $cp->vars[$field])) . '</dd>'
@@ -930,7 +953,7 @@ class acp_profile
/**
* Save Profile Field
*/
function save_profile_field(&$cp, $field_type, &$lang_defs, $action = 'create')
function save_profile_field(&$cp, $field_type, $action = 'create')
{
global $db, $config, $user;
@@ -939,7 +962,7 @@ class acp_profile
// 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']];
$default_lang_id = (!empty($this->edit_lang_id)) ? $this->edit_lang_id : $this->lang_defs['iso'][$config['default_lang']];
if ($action == 'create')
{

View File

@@ -53,7 +53,7 @@ class acp_prune
{
$prune_posted = request_var('prune_days', 0);
$prune_viewed = request_var('prune_vieweddays', 0);
$prune_all = !$prune_posted && !$prune_viewed;
$prune_all = (!$prune_posted && !$prune_viewed) ? true : false;
$prune_flags = 0;
$prune_flags += (request_var('prune_old_polls', 0)) ? 2 : 0;

View File

@@ -62,11 +62,15 @@ class acp_ranks
{
$sql = 'UPDATE ' . RANKS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE rank_id = $rank_id";
$message = $user->lang['RANK_UPDATED'];
add_log('admin', 'LOG_RANK_UPDATED', $rank_title);
}
else
{
$sql = 'INSERT INTO ' . RANKS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$message = $user->lang['RANK_ADDED'];
add_log('admin', 'LOG_RANK_ADDED', $rank_title);
}
$db->sql_query($sql);
@@ -78,9 +82,20 @@ class acp_ranks
case 'delete':
// Ok, they want to delete their rank
if ($rank_id)
if (!$rank_id)
{
trigger_error($user->lang['MUST_SELECT_RANK'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
{
$sql = 'SELECT rank_title
FROM ' . RANKS_TABLE . '
WHERE rank_id = ' . $rank_id;
$result = $db->sql_query($sql);
$rank_title = (string) $db->sql_fetchfield('rank_title');
$db->sql_freeresult($result);
$sql = 'DELETE FROM ' . RANKS_TABLE . "
WHERE rank_id = $rank_id";
$db->sql_query($sql);
@@ -92,11 +107,16 @@ class acp_ranks
$cache->destroy('ranks');
trigger_error($user->lang['RANK_REMOVED'] . adm_back_link($this->u_action));
add_log('admin', 'LOG_RANK_REMOVED', $rank_title);
}
else
{
trigger_error($user->lang['MUST_SELECT_RANK'] . adm_back_link($this->u_action), E_USER_WARNING);
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
'i' => $id,
'mode' => $mode,
'rank_id' => $rank_id,
'action' => 'delete',
)));
}
break;
@@ -144,6 +164,11 @@ class acp_ranks
$selected = '';
}
if (strlen($img) > 255)
{
continue;
}
$filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . '</option>';
}
}

View File

@@ -214,7 +214,7 @@ class acp_reasons
WHERE reason_id = $reason_id";
break;
// Nearly standard, not quite
// Standard? What's that?
case 'mssql':
case 'mssql_odbc':
// Change the reports using this reason to 'other'
@@ -268,7 +268,7 @@ class acp_reasons
$order_total = $order * 2 + (($action == 'move_up') ? -1 : 1);
$sql = 'UPDATE ' . REPORTS_REASONS_TABLE . '
SET reason_order = ' . $order_total . ' - reason_order
SET reason_order = ' . $order_total . ' - reason_order
WHERE reason_order IN (' . $order . ', ' . (($action == 'move_up') ? $order - 1 : $order + 1) . ')';
$db->sql_query($sql);

View File

@@ -17,7 +17,7 @@ class acp_search
var $state;
var $search;
var $max_post_id;
var $batch_size = 4000;
var $batch_size = 5000;
function main($id, $mode)
{
@@ -320,6 +320,16 @@ class acp_search
}
else
{
$sql = 'SELECT forum_id, enable_indexing
FROM ' . FORUMS_TABLE;
$result = $db->sql_query($sql, 3600);
while ($row = $db->sql_fetchrow($result))
{
$forums[$row['forum_id']] = (bool) $row['enable_indexing'];
}
$db->sql_freeresult($result);
$sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id
FROM ' . POSTS_TABLE . '
WHERE post_id >= ' . (int) ($post_counter + 1) . '
@@ -328,7 +338,12 @@ class acp_search
while ($row = $db->sql_fetchrow($result))
{
$this->search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['poster_id'], $row['forum_id']);
// Indexing enabled for this forum or global announcement?
// Global announcements get indexed by default.
if (!$row['forum_id'] || (isset($forums[$row['forum_id']]) && $forums[$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);
@@ -470,15 +485,21 @@ class acp_search
$search_types = array();
$dp = opendir($phpbb_root_path . 'includes/search');
while (($file = readdir($dp)) !== false)
$dp = @opendir($phpbb_root_path . 'includes/search');
if ($dp)
{
if ((preg_match('#\.' . $phpEx . '$#', $file)) && ($file != "search.$phpEx"))
while (($file = readdir($dp)) !== false)
{
$search_types[] = preg_replace('#^(.*?)\.' . $phpEx . '$#', '\1', $file);
if ((preg_match('#\.' . $phpEx . '$#', $file)) && ($file != "search.$phpEx"))
{
$search_types[] = preg_replace('#^(.*?)\.' . $phpEx . '$#', '\1', $file);
}
}
closedir($dp);
sort($search_types);
}
sort($search_types);
return $search_types;
}
@@ -511,7 +532,7 @@ class acp_search
/**
* Initialises a search backend object
*
* @return false if no error occured else an error message
* @return false if no error occurred else an error message
*/
function init_search($type, &$search, &$error)
{

View File

@@ -35,6 +35,7 @@ class acp_styles
$bitfield->set(11);
$bitfield->set(12);
define('TEMPLATE_BITFIELD', $bitfield->get_base64());
unset($bitfield);
$user->add_lang('acp/styles');
@@ -82,11 +83,6 @@ version = {VERSION}
# images within your css file.
#
parse_css_file = {PARSE_CSS_FILE}
#
# This option defines the pagination seperator in templates.
#
pagination_sep = \'{PAGINATION_SEP}\'
';
$this->imageset_keys = array(
@@ -262,7 +258,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
}
else
{
$filelist[substr($row['template_filename'], 0, $slash_pos + 1)] = substr($row['template_filename'], $slash_pos + 1, strlen($row['template_filename']) - $slashpos - 1);
$filelist[substr($row['template_filename'], 0, $slash_pos + 1)] = substr($row['template_filename'], $slash_pos + 1, strlen($row['template_filename']) - $slash_pos - 1);
}
}
}
@@ -532,30 +528,35 @@ pagination_sep = \'{PAGINATION_SEP}\'
// Grab uninstalled items
$new_ary = $cfg = array();
$dp = opendir("{$phpbb_root_path}styles");
while (($file = readdir($dp)) !== false)
{
$subpath = ($mode != 'style') ? "$mode/" : '';
if ($file[0] != '.' && file_exists("{$phpbb_root_path}styles/$file/$subpath$mode.cfg"))
{
if ($cfg = file("{$phpbb_root_path}styles/$file/$subpath$mode.cfg"))
{
$items = parse_cfg_file('', $cfg);
$name = (isset($items['name'])) ? trim($items['name']) : false;
$dp = @opendir("{$phpbb_root_path}styles");
if ($name && !in_array($name, $installed))
if ($dp)
{
while (($file = readdir($dp)) !== false)
{
$subpath = ($mode != 'style') ? "$mode/" : '';
if ($file[0] != '.' && file_exists("{$phpbb_root_path}styles/$file/$subpath$mode.cfg"))
{
if ($cfg = file("{$phpbb_root_path}styles/$file/$subpath$mode.cfg"))
{
$new_ary[] = array(
'path' => $file,
'name' => $name,
'copyright' => $items['copyright'],
);
$items = parse_cfg_file('', $cfg);
$name = (isset($items['name'])) ? trim($items['name']) : false;
if ($name && !in_array($name, $installed))
{
$new_ary[] = array(
'path' => $file,
'name' => $name,
'copyright' => $items['copyright'],
);
}
}
}
}
@closedir($dp);
}
unset($installed);
@closedir($dp);
if (sizeof($new_ary))
{
@@ -853,7 +854,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
$str_to = array('<span class="', '<span class="syntax', '</span>', '', '', '&#91;', '&#93;', '&#46;', '&#58;');
$code = str_replace($str_from, $str_to, $code);
$code = preg_replace('#^(<span class="[a-z_]+">)\n?(.*?)\n?(</span>)$#is', '$1$2$3', $code);
$code = preg_replace('#^(<span class="[a-z_]+">)\n?(.*?)\n?(</span>)$#ism', '$1$2$3', $code);
$code = explode("\n", $code);
@@ -966,7 +967,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];
}
@@ -1121,7 +1122,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
$s_units = '<option value=""' . (($unit == '') ? ' selected="selected"' : '') . '>' . $user->lang['NO_UNIT'] . '</option>' . $s_units;
$template->assign_vars(array(
strtoupper($var) => $value,
strtoupper($var) => htmlspecialchars($value),
'S_' . strtoupper($var) . '_UNITS' => $s_units)
);
break;
@@ -1162,7 +1163,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
default:
$template->assign_vars(array(
strtoupper($var) => $value)
strtoupper($var) => htmlspecialchars($value))
);
}
}
@@ -1178,7 +1179,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
}
// else if we are showing raw css or the user submitted data from the simple view
// then we need to turn the given information into raw css
elseif (!$css_data && !$add_custom)
else if (!$css_data && !$add_custom)
{
foreach ($match_elements as $type => $match_ary)
{
@@ -1226,7 +1227,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
break;
default:
$value = request_var($var, '');
$value = htmlspecialchars_decode(request_var($var, ''));
}
// use the element mapping to create raw css code
@@ -1245,7 +1246,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
}
}
// make sure we have $show_css set, so we can link to the show_css page if we need to
elseif (!$hide_css)
else if (!$hide_css)
{
$show_css = true;
}
@@ -1265,14 +1266,14 @@ pagination_sep = \'{PAGINATION_SEP}\'
else
{
// check whether the custom class name is valid
if (!preg_match('/^[a-z0-9#:.\- ]+$/i', $add_custom))
if (!preg_match('/^[a-z0-9\.,:#_\->*]+$/i', $custom_class))
{
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
{
// append an empty class definition to the stylesheet
$stylesheet .= "\n$custom_class\n{\n}";
$stylesheet .= "\n$custom_class {\n\t\n}";
$message = $user->lang['THEME_CLASS_ADDED'];
}
}
@@ -1436,28 +1437,38 @@ pagination_sep = \'{PAGINATION_SEP}\'
$imagesetlist = array('nolang' => array(), 'lang' => array());
$dir = "{$phpbb_root_path}styles/$imageset_path/imageset";
$dp = opendir($dir);
while (($file = readdir($dp)) !== false)
$dp = @opendir($dir);
if ($dp)
{
if (!is_file($dir . '/' . $file) && !is_link($dir . '/' . $file) && $file[0] != '.' && strtoupper($file) != 'CVS' && !sizeof($imagesetlist['lang']))
while (($file = readdir($dp)) !== false)
{
$dp2 = opendir("$dir/$file");
while (($file2 = readdir($dp2)) !== false)
if (!is_file($dir . '/' . $file) && !is_link($dir . '/' . $file) && $file[0] != '.' && strtoupper($file) != 'CVS' && !sizeof($imagesetlist['lang']))
{
$imglang = $file;
if (preg_match('#\.(?:gif|jpg|png)$#', $file2))
$dp2 = @opendir("$dir/$file");
if (!$dp2)
{
$imagesetlist['lang'][] = "$file/$file2";
continue;
}
while (($file2 = readdir($dp2)) !== false)
{
$imglang = $file;
if (preg_match('#\.(?:gif|jpg|png)$#', $file2))
{
$imagesetlist['lang'][] = "$file/$file2";
}
}
closedir($dp2);
}
else if (preg_match('#\.(?:gif|jpg|png)$#', $file))
{
$imagesetlist['nolang'][] = $file;
}
closedir($dp2);
}
else if (preg_match('#\.(?:gif|jpg|png)$#', $file))
{
$imagesetlist['nolang'][] = $file;
}
closedir($dp);
}
closedir($dp);
// Make sure the list of possible images is sorted alphabetically
sort($imagesetlist['nolang']);
@@ -1812,12 +1823,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
$items['parse_css_file'] = 'off';
}
if (!isset($items['pagination_sep']))
{
$items['pagination_sep'] = ', ';
}
$theme_cfg = str_replace(array('{PARSE_CSS_FILE}', '{PAGINATION_SEP}'), array($items['parse_css_file'], $items['pagination_sep']), $theme_cfg);
$theme_cfg = str_replace(array('{PARSE_CSS_FILE}'), array($items['parse_css_file']), $theme_cfg);
$files[] = array(
'src' => "styles/{$style_row['theme_path']}/theme/",
@@ -2090,7 +2096,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
);
}
// User has submitted form and no errors have occured
// User has submitted form and no errors have occurred
if ($update && !sizeof($error))
{
$sql_ary = array(
@@ -2553,7 +2559,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
$style_row['style_active'] = request_var('style_active', 1);
$style_row['style_default'] = request_var('style_default', 0);
// User has submitted form and no errors have occured
// User has submitted form and no errors have occurred
if ($update && !sizeof($error))
{
if ($mode == 'style')
@@ -2688,7 +2694,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
}
}
// User has submitted form and no errors have occured
// User has submitted form and no errors have occurred
if ($update && !sizeof($error))
{
if ($mode == 'style')
@@ -2890,7 +2896,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
);
$sql = 'INSERT INTO ' . STYLES_TABLE . '
' . $db->sql_build_array('INSERT', $sql_ary);
' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);
$id = $db->sql_nextid();

View File

@@ -23,7 +23,7 @@ class acp_update
$user->add_lang('install');
$this->tpl_name = 'acp_update';
$this->page_title = 'ACP_UPDATE';
$this->page_title = 'ACP_VERSION_CHECK';
// Get current and latest version
$errstr = '';
@@ -53,7 +53,7 @@ class acp_update
'LATEST_VERSION' => $latest_version,
'CURRENT_VERSION' => $config['version'],
'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $announcement_url, $update_archive_link, $update_link),
'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $announcement_url, $update_link),
));
}
}

View File

@@ -74,8 +74,8 @@ class acp_users
'ANONYMOUS_USER_ID' => ANONYMOUS,
'S_SELECT_USER' => true,
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=select_user&amp;field=username'),
'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=select_user&field=username', false),
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=select_user&amp;field=username&amp;select_single=true'),
'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=select_user&field=username&select_single=true', false),
)
);
@@ -127,7 +127,7 @@ class acp_users
}
$selected = ($mode == $value) ? ' selected="selected"' : '';
$s_form_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang['ACP_USER_' . strtoupper($value)] . '</option>';
$s_form_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang['ACP_USER_' . strtoupper($value)] . '</option>';
}
$template->assign_vars(array(
@@ -296,7 +296,6 @@ class acp_users
$messenger->template('user_resend_inactive', $user_row['user_lang']);
$messenger->replyto($config['board_contact']);
$messenger->to($user_row['user_email'], $user_row['username']);
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
@@ -624,7 +623,6 @@ class acp_users
'email_confirm' => strtolower(request_var('email_confirm', '')),
'user_password' => request_var('user_password', '', true),
'password_confirm' => request_var('password_confirm', '', true),
'warnings' => request_var('warnings', $user_row['user_warnings']),
);
// Validation data - we do not check the password complexity setting here
@@ -633,7 +631,6 @@ class acp_users
array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
array('password')),
'password_confirm' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
'warnings' => array('num'),
);
// Check username if altered
@@ -642,7 +639,8 @@ class acp_users
$check_ary += array(
'username' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('username', $user_row['username'])),
array('username', $user_row['username'])
),
);
}
@@ -653,7 +651,7 @@ class acp_users
'email' => array(
array('string', false, 6, 60),
array('email', $user_row['user_email'])
),
),
'email_confirm' => array('string', true, 6, 60)
);
}
@@ -671,7 +669,6 @@ class acp_users
}
// Which updates do we need to do?
$update_warning = ($user_row['user_warnings'] != $data['warnings']) ? true : false;
$update_username = ($user_row['username'] != $data['username']) ? $data['username'] : false;
$update_password = ($data['user_password'] && $user_row['user_password'] != md5($data['user_password'])) ? true : false;
$update_email = ($data['email'] != $user_row['user_email']) ? $data['email'] : false;
@@ -682,11 +679,6 @@ class acp_users
if ($user_row['user_type'] != USER_FOUNDER || $user->data['user_type'] == USER_FOUNDER)
{
if ($update_warning)
{
$sql_ary['user_warnings'] = $data['warnings'];
}
// Only allow founders updating the founder status...
if ($user->data['user_type'] == USER_FOUNDER)
{
@@ -741,7 +733,7 @@ class acp_users
{
$sql_ary += array(
'user_email' => $update_email,
'user_email_hash' => crc32(strtolower($update_email)) . strlen($update_email)
'user_email_hash' => crc32($update_email) . strlen($update_email)
);
add_log('user', $user_id, 'LOG_USER_UPDATE_EMAIL', $user_row['username'], $user_row['user_email'], $update_email);
@@ -766,13 +758,6 @@ class acp_users
$db->sql_query($sql);
}
/**
* @todo adjust every data based in the number of user warnings
*/
if ($update_warning)
{
}
if ($update_username)
{
user_update_name($user_row['username'], $update_username);
@@ -790,8 +775,7 @@ class acp_users
$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
}
$user_char_ary = array('.*' => 'USERNAME_CHARS_ANY', '[\w]+' => 'USERNAME_ALPHA_ONLY', '[\w_\+\. \-\[\]]+' => 'USERNAME_ALPHA_SPACERS');
$pass_char_ary = array('.*' => 'PASS_TYPE_ANY', '[a-zA-Z]' => 'PASS_TYPE_CASE', '[a-zA-Z0-9]' => 'PASS_TYPE_ALPHA', '[a-zA-Z\W]' => 'PASS_TYPE_SYMBOL');
$user_char_ary = array('.*' => 'USERNAME_CHARS_ANY', '[a-z]+' => 'USERNAME_ALPHA_ONLY', '[-\]_+ [a-z]+' => 'USERNAME_ALPHA_SPACERS', '\w+' => 'USERNAME_LETTER_NUM', '[-\]_+ [\w]+' => 'USERNAME_LETTER_NUM_SPACERS', '[\x01-\x7F]+' => 'USERNAME_ASCII');
if ($user_id == $user->data['user_id'])
{
@@ -822,7 +806,7 @@ class acp_users
$s_action_options = '<option class="sep" value="">' . $user->lang['SELECT_OPTION'] . '</option>';
foreach ($quick_tool_ary as $value => $lang)
{
$s_action_options .= '<option value="' . $value . '">' . $user->lang['USER_ADMIN_' . $lang] . '</option>';
$s_action_options .= '<option value="' . $value . '">' . $user->lang['USER_ADMIN_' . $lang] . '</option>';
}
if ($config['load_onlinetrack'])
@@ -868,7 +852,7 @@ class acp_users
$template->assign_vars(array(
'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[$user_char_ary[str_replace('\\\\', '\\', $config['allow_name_chars'])] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$pass_char_ary[str_replace('\\\\', '\\', $config['pass_complex'])] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
'S_OVERVIEW' => true,
@@ -941,6 +925,7 @@ class acp_users
if ($submit && $message)
{
add_log('admin', 'LOG_USER_FEEDBACK', $user_row['username']);
add_log('mod', 0, 0, 'LOG_USER_FEEDBACK', $user_row['username']);
add_log('user', $user_id, 'LOG_USER_GENERAL', $message);
trigger_error($user->lang['USER_FEEDBACK_ADDED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
@@ -1032,7 +1017,7 @@ class acp_users
'icq' => array(
array('string', true, 3, 15),
array('match', true, '#^[0-9]+$#i')),
'aim' => array('string', true, 3, 17),
'aim' => array('string', true, 3, 255),
'msn' => array('string', true, 5, 255),
'jabber' => array(
array('string', true, 5, 255),
@@ -1388,95 +1373,13 @@ class acp_users
case 'avatar':
$avatar_select = basename(request_var('avatar_select', ''));
$category = basename(request_var('category', ''));
$can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false;
$data = array();
if ($submit)
{
$delete = request_var('delete', '');
$data = array(
'uploadurl' => request_var('uploadurl', ''),
'remotelink' => request_var('remotelink', ''),
'width' => request_var('width', ''),
'height' => request_var('height', ''),
);
$error = validate_data($data, array(
'uploadurl' => array('string', true, 5, 255),
'remotelink' => array('string', true, 5, 255),
'width' => array('string', true, 1, 3),
'height' => array('string', true, 1, 3),
));
if (!sizeof($error))
if (avatar_process_user($error, $user_row))
{
$data['user_id'] = $user_id;
if ((!empty($_FILES['uploadfile']['name']) || $data['uploadurl']) && $can_upload && $config['allow_avatar_upload'])
{
list($type, $filename, $width, $height) = avatar_upload($data, $error);
}
else if ($data['remotelink'] && $config['allow_avatar_remote'])
{
list($type, $filename, $width, $height) = avatar_remote($data, $error);
}
else if ($avatar_select && $config['allow_avatar_local'])
{
$type = AVATAR_GALLERY;
$filename = $avatar_select;
// check avatar gallery
if (!is_dir($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category))
{
$type = $width = $height = 0;
$filename = '';
}
else
{
list($width, $height) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . $filename);
$filename = $category . '/' . $filename;
}
}
else if ($delete)
{
$filename = '';
$type = $width = $height = 0;
}
else
{
$data = array();
}
}
if (!sizeof($error))
{
// Do we actually have any data to update?
if (sizeof($data))
{
$sql_ary = array(
'user_avatar' => $filename,
'user_avatar_type' => $type,
'user_avatar_width' => $width,
'user_avatar_height' => $height,
);
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user_id;
$db->sql_query($sql);
// Delete old avatar if present
if ($user_row['user_avatar'] && $filename != $user_row['user_avatar'] && $user_row['user_avatar_type'] != AVATAR_GALLERY)
{
avatar_delete('user', $user_row);
}
}
trigger_error($user->lang['USER_AVATAR_UPDATED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
trigger_error($user->lang['USER_AVATAR_UPDATED'] . adm_back_link($this->u_action . '&amp;u=' . $user_row['user_id']));
}
// Replace "error" strings with their real, localised form
@@ -1508,6 +1411,8 @@ class acp_users
}
$display_gallery = (isset($_POST['display_gallery'])) ? true : false;
$avatar_select = basename(request_var('avatar_select', ''));
$category = basename(request_var('category', ''));
if ($config['allow_avatar_local'] && $display_gallery)
{
@@ -1572,10 +1477,10 @@ class acp_users
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx);
$enable_bbcode = ($config['allow_sig_bbcode']) ? request_var('enable_bbcode', $this->optionget($user_row, 'bbcode')) : false;
$enable_smilies = ($config['allow_sig_smilies']) ? request_var('enable_smilies', $this->optionget($user_row, 'smilies')) : false;
$enable_urls = request_var('enable_urls', true);
$signature = utf8_normalize_nfc(request_var('signature', $user_row['user_sig'], true));
$enable_bbcode = ($config['allow_sig_bbcode']) ? ((request_var('disable_bbcode', !$user->optionget('bbcode'))) ? false : true) : false;
$enable_smilies = ($config['allow_sig_smilies']) ? ((request_var('disable_smilies', !$user->optionget('smilies'))) ? false : true) : false;
$enable_urls = ($config['allow_sig_links']) ? ((request_var('disable_magic_url', false)) ? false : true) : false;
$signature = utf8_normalize_nfc(request_var('signature', (string) $user_row['user_sig'], true));
$preview = (isset($_POST['preview'])) ? true : false;
@@ -1586,7 +1491,7 @@ class acp_users
$message_parser = new parse_message($signature);
// Allowing Quote BBCode
$message_parser->parse($enable_bbcode, ($config['allow_sig_links']) ? $enable_urls : false, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig');
$message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig');
if (sizeof($message_parser->warn_msg))
{
@@ -1630,9 +1535,9 @@ class acp_users
'SIGNATURE' => $signature,
'SIGNATURE_PREVIEW' => $signature_preview,
'S_BBCODE_CHECKED' => (!$enable_bbcode) ? 'checked="checked"' : '',
'S_SMILIES_CHECKED' => (!$enable_smilies) ? 'checked="checked"' : '',
'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? 'checked="checked"' : '',
'S_BBCODE_CHECKED' => (!$enable_bbcode) ? ' checked="checked"' : '',
'S_SMILIES_CHECKED' => (!$enable_smilies) ? ' checked="checked"' : '',
'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? ' checked="checked"' : '',
'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>'),
'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
@@ -1782,7 +1687,7 @@ class acp_users
'S_SORT_KEY' => $s_sort_key,
'S_SORT_DIR' => $s_sort_dir,
'PAGINATION' => generate_pagination($this->u_action . "&amp;sk=$sort_key&amp;sd=$sort_dir", $num_attachments, $config['topics_per_page'], $start, true))
'PAGINATION' => generate_pagination($this->u_action . "&amp;u=$user_id&amp;sk=$sort_key&amp;sd=$sort_dir", $num_attachments, $config['topics_per_page'], $start, true))
);
break;
@@ -1959,49 +1864,68 @@ class acp_users
$user->add_lang('acp/permissions');
add_permission_language();
// Select auth options
$sql = 'SELECT auth_option, is_local, is_global
FROM ' . ACL_OPTIONS_TABLE . "
WHERE auth_option LIKE '%\_'";
$forum_id = request_var('f', 0);
if ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc')
// Global Permissions
if (!$forum_id)
{
$sql .= " ESCAPE '\\' ";
// Select auth options
$sql = 'SELECT auth_option, is_local, is_global
FROM ' . ACL_OPTIONS_TABLE . "
WHERE auth_option LIKE '%\_'";
if ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc')
{
$sql .= " ESCAPE '\\' ";
}
$sql .= 'AND is_global = 1
ORDER BY auth_option';
$result = $db->sql_query($sql);
$hold_ary = array();
while ($row = $db->sql_fetchrow($result))
{
$hold_ary = $auth_admin->get_mask('view', $user_id, false, false, $row['auth_option'], 'global', ACL_NEVER);
$auth_admin->display_mask('view', $row['auth_option'], $hold_ary, 'user', false, false);
}
$db->sql_freeresult($result);
unset($hold_ary);
}
else
{
$sql = 'SELECT auth_option, is_local, is_global
FROM ' . ACL_OPTIONS_TABLE . "
WHERE auth_option LIKE '%\_'";
if ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc')
{
$sql .= " ESCAPE '\\' ";
}
$sql .= 'AND is_local = 1
ORDER BY is_global DESC, auth_option';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$hold_ary = $auth_admin->get_mask('view', $user_id, false, $forum_id, $row['auth_option'], 'local', ACL_NEVER);
$auth_admin->display_mask('view', $row['auth_option'], $hold_ary, 'user', true, false);
}
$db->sql_freeresult($result);
}
$sql .= 'AND is_global = 1
ORDER BY auth_option';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$hold_ary = $auth_admin->get_mask('view', $user_id, false, false, $row['auth_option'], 'global', ACL_NEVER);
$auth_admin->display_mask('view', $row['auth_option'], $hold_ary, 'user', false, false);
}
$db->sql_freeresult($result);
$sql = 'SELECT auth_option, is_local, is_global
FROM ' . ACL_OPTIONS_TABLE . "
WHERE auth_option LIKE '%\_'";
if ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc')
{
$sql .= " ESCAPE '\\' ";
}
$sql .= 'AND is_local = 1
ORDER BY is_global DESC, auth_option';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$hold_ary = $auth_admin->get_mask('view', $user_id, false, false, $row['auth_option'], 'local', ACL_NEVER);
$auth_admin->display_mask('view', $row['auth_option'], $hold_ary, 'user', true, false);
}
$db->sql_freeresult($result);
$s_forum_options = '<option value="0"' . ((!$forum_id) ? ' selected="selected"' : '') . '>' . $user->lang['VIEW_GLOBAL_PERMS'] . '</option>';
$s_forum_options .= make_forum_select($forum_id, false, true, false, false, false);
$template->assign_vars(array(
'S_PERMISSIONS' => true,
'S_GLOBAL' => (!$forum_id) ? true : false,
'S_FORUM_OPTIONS' => $s_forum_options,
'U_ACTION' => $this->u_action . '&amp;u=' . $user_id,
'U_USER_PERMISSIONS' => append_sid("{$phpbb_admin_path}index.$phpEx" ,'i=permissions&amp;mode=setting_user_global&amp;user_id[]=' . $user_id),
'U_USER_FORUM_PERMISSIONS' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions&amp;mode=setting_user_local&amp;user_id[]=' . $user_id))
);

View File

@@ -110,23 +110,35 @@ class acp_words
trigger_error($user->lang['NO_WORD'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT word
FROM ' . WORDS_TABLE . "
WHERE word_id = $word_id";
$result = $db->sql_query($sql);
$deleted_word = $db->sql_fetchfield('word');
$db->sql_freeresult($result);
if (confirm_box(true))
{
$sql = 'SELECT word
FROM ' . WORDS_TABLE . "
WHERE word_id = $word_id";
$result = $db->sql_query($sql);
$deleted_word = $db->sql_fetchfield('word');
$db->sql_freeresult($result);
$sql = 'DELETE FROM ' . WORDS_TABLE . "
WHERE word_id = $word_id";
$db->sql_query($sql);
$sql = 'DELETE FROM ' . WORDS_TABLE . "
WHERE word_id = $word_id";
$db->sql_query($sql);
$cache->destroy('word_censors');
$cache->destroy('word_censors');
add_log('admin', 'LOG_WORD_DELETE', $deleted_word);
add_log('admin', 'LOG_WORD_DELETE', $deleted_word);
trigger_error($user->lang['WORD_REMOVED'] . adm_back_link($this->u_action));
}
else
{
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
'i' => $id,
'mode' => $mode,
'id' => $word_id,
'action' => 'delete',
)));
}
trigger_error($user->lang['WORD_REMOVED'] . adm_back_link($this->u_action));
break;
}

View File

@@ -323,6 +323,16 @@ class auth_admin extends auth
if ($local)
{
$forum_names_ary = make_forum_select(false, false, true, false, false, false, true);
// Remove the disabled ones, since we do not create an option field here...
foreach ($forum_names_ary as $key => $value)
{
if (!$value['disabled'])
{
continue;
}
unset($forum_names_ary[$key]);
}
}
else
{
@@ -380,6 +390,7 @@ class auth_admin extends auth
}
$template->assign_var('S_ROLE_JS_ARRAY', $s_role_js_array);
unset($s_role_js_array);
// Now obtain memberships
$user_groups_default = $user_groups_custom = array();
@@ -462,8 +473,10 @@ class auth_admin extends auth
foreach ($roles as $role_id => $role_row)
{
$role_description = (!empty($user->lang[$role_row['role_description']])) ? $user->lang[$role_row['role_description']] : nl2br($role_row['role_description']);
$role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name'];
$title = ($role_description) ? ' title="' . $role_description . '"' : '';
$s_role_options .= '<option value="' . $role_id . '"' . (($role_id == $current_role_id) ? ' selected="selected"' : '') . $title . '>' . $role_row['role_name'] . '</option>';
$s_role_options .= '<option value="' . $role_id . '"' . (($role_id == $current_role_id) ? ' selected="selected"' : '') . $title . '>' . $role_name . '</option>';
}
if ($s_role_options)
@@ -478,8 +491,12 @@ class auth_admin extends auth
'FORUM_ID' => $forum_id)
);
$this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace);
$this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
unset($content_array[$ug_id]);
}
unset($hold_ary[$forum_id]);
}
}
else
@@ -511,17 +528,22 @@ class auth_admin extends auth
'S_GROUP_MODE' => ($user_mode == 'group') ? true : false)
);
foreach ($content_array as $forum_id => $forum_array)
@reset($content_array);
while (list($forum_id, $forum_array) = each($content_array))
{
// Build role dropdown options
$current_role_id = (isset($cur_roles[$ug_id][$forum_id])) ? $cur_roles[$ug_id][$forum_id] : 0;
$s_role_options = '';
foreach ($roles as $role_id => $role_row)
@reset($roles);
while (list($role_id, $role_row) = each($roles))
{
$role_description = (!empty($user->lang[$role_row['role_description']])) ? $user->lang[$role_row['role_description']] : nl2br($role_row['role_description']);
$role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name'];
$title = ($role_description) ? ' title="' . $role_description . '"' : '';
$s_role_options .= '<option value="' . $role_id . '"' . (($role_id == $current_role_id) ? ' selected="selected"' : '') . $title . '>' . $role_row['role_name'] . '</option>';
$s_role_options .= '<option value="' . $role_id . '"' . (($role_id == $current_role_id) ? ' selected="selected"' : '') . $title . '>' . $role_name . '</option>';
}
if ($s_role_options)
@@ -563,8 +585,10 @@ class auth_admin extends auth
'FORUM_ID' => $forum_id)
);
$this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace);
$this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
}
unset($hold_ary[$ug_id], $ug_names_ary[$ug_id]);
}
}
}
@@ -942,7 +966,7 @@ class auth_admin extends auth
$option_id_ary = array();
$table = ($mode == 'user') ? ACL_USERS_TABLE : ACL_GROUPS_TABLE;
$id_field = $mode . '_id';
$id_field = $mode . '_id';
$where_sql = array();
@@ -1041,11 +1065,12 @@ class auth_admin extends auth
* Assign category to template
* used by display_mask()
*/
function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $show_trace = false)
function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $show_trace = false, $s_view)
{
global $template, $user, $phpbb_admin_path, $phpEx;
foreach ($category_array as $cat => $cat_array)
@reset($category_array);
while (list($cat, $cat_array) = each($category_array))
{
$template->assign_block_vars($tpl_cat, array(
'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NEVER'] && !$cat_array['S_NO']) ? true : false,
@@ -1055,23 +1080,57 @@ class auth_admin extends auth
'CAT_NAME' => $user->lang['permission_cat'][$cat])
);
foreach ($cat_array['permissions'] as $permission => $allowed)
// Sort array
$key_array = array_intersect(array_keys($user->lang), array_map(create_function('$a', 'return "acl_" . $a;'), array_keys($cat_array['permissions'])));
$values_array = $cat_array['permissions'];
$cat_array['permissions'] = array();
foreach ($key_array as $key)
{
$template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array(
'S_YES' => ($allowed == ACL_YES) ? true : false,
'S_NEVER' => ($allowed == ACL_NEVER) ? true : false,
'S_NO' => ($allowed == ACL_NO) ? true : false,
$key = str_replace('acl_', '', $key);
$cat_array['permissions'][$key] = $values_array[$key];
}
unset($key_array, $values_array);
'UG_ID' => $ug_id,
'FORUM_ID' => $forum_id,
'FIELD_NAME' => $permission,
'S_FIELD_NAME' => 'setting[' . $ug_id . '][' . $forum_id . '][' . $permission . ']',
@reset($cat_array['permissions']);
while (list($permission, $allowed) = each($cat_array['permissions']))
{
if ($s_view)
{
$template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array(
'S_YES' => ($allowed == ACL_YES) ? true : false,
'S_NEVER' => ($allowed == ACL_NEVER) ? true : false,
'U_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&amp;mode=trace&amp;u=$ug_id&amp;f=$forum_id&amp;auth=$permission") : '',
'UA_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&mode=trace&u=$ug_id&f=$forum_id&auth=$permission", false) : '',
'UG_ID' => $ug_id,
'FORUM_ID' => $forum_id,
'FIELD_NAME' => $permission,
'S_FIELD_NAME' => 'setting[' . $ug_id . '][' . $forum_id . '][' . $permission . ']',
'PERMISSION' => $user->lang['acl_' . $permission]['lang'])
);
'U_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&amp;mode=trace&amp;u=$ug_id&amp;f=$forum_id&amp;auth=$permission") : '',
'UA_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&mode=trace&u=$ug_id&f=$forum_id&auth=$permission", false) : '',
'PERMISSION' => $user->lang['acl_' . $permission]['lang'])
);
}
else
{
$template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array(
'S_YES' => ($allowed == ACL_YES) ? true : false,
'S_NEVER' => ($allowed == ACL_NEVER) ? true : false,
'S_NO' => ($allowed == ACL_NO) ? true : false,
'UG_ID' => $ug_id,
'FORUM_ID' => $forum_id,
'FIELD_NAME' => $permission,
'S_FIELD_NAME' => 'setting[' . $ug_id . '][' . $forum_id . '][' . $permission . ']',
'U_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&amp;mode=trace&amp;u=$ug_id&amp;f=$forum_id&amp;auth=$permission") : '',
'UA_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&mode=trace&u=$ug_id&f=$forum_id&auth=$permission", false) : '',
'PERMISSION' => $user->lang['acl_' . $permission]['lang'])
);
}
}
}
}
@@ -1094,7 +1153,8 @@ class auth_admin extends auth
$permissions = $permission_row[$forum_id];
ksort($permissions);
foreach ($permissions as $permission => $auth_setting)
@reset($permissions);
while (list($permission, $auth_setting) = each($permissions))
{
if (!isset($user->lang['acl_' . $permission]))
{

View File

@@ -20,7 +20,7 @@ class acp_update_info
'title' => 'ACP_UPDATE',
'version' => '1.0.0',
'modes' => array(
'version_check' => array('title' => 'ACP_VERSION_CHECK', 'auth' => 'acl_a_', 'cat' => array('ACP_AUTOMATION')),
'version_check' => array('title' => 'ACP_VERSION_CHECK', 'auth' => 'acl_a_board', 'cat' => array('ACP_AUTOMATION')),
),
);
}

View File

@@ -113,7 +113,7 @@ class auth
{
if (isset($this->acl[0]))
{
$this->cache[$f][$opt] = $this->acl[0]{$this->acl_options['global'][$opt]};
$this->cache[$f][$opt] = $this->acl[0][$this->acl_options['global'][$opt]];
}
}
@@ -123,7 +123,7 @@ class auth
{
if (isset($this->acl[$f]))
{
$this->cache[$f][$opt] |= $this->acl[$f]{$this->acl_options['local'][$opt]};
$this->cache[$f][$opt] |= $this->acl[$f][$this->acl_options['local'][$opt]];
}
}
}
@@ -221,7 +221,19 @@ class auth
*/
function acl_getf_global($opt)
{
$allowed = false;
if (is_array($opt))
{
// evaluates to true as soon as acl_getf_global is true for one option
foreach ($opt as $check_option)
{
if ($this->acl_getf_global($check_option))
{
return true;
}
}
return false;
}
if (isset($this->acl_options['local'][$opt]))
{
@@ -233,20 +245,19 @@ class auth
continue;
}
$allowed = (!isset($this->cache[$f][$opt])) ? $this->acl_get($opt, $f) : $this->cache[$f][$opt];
if ($allowed)
// as soon as the user has any permission we're done so return true
if ((!isset($this->cache[$f][$opt])) ? $this->acl_get($opt, $f) : $this->cache[$f][$opt])
{
break;
return true;
}
}
}
else if (isset($this->acl_options['global'][$opt]))
{
$allowed = $this->acl_get($opt);
return $this->acl_get($opt);
}
return $allowed;
return false;
}
/**

View File

@@ -34,6 +34,14 @@ function init_ldap()
@ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
@ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
if ($config['ldap_user'] || $config['ldap_password'])
{
if (!@ldap_bind($ldap, htmlspecialchars_decode($config['ldap_user']), htmlspecialchars_decode($config['ldap_password'])))
{
return $user->lang['LDAP_INCORRECT_USER_PASSWORD'];
}
}
// ldap_connect only checks whether the specified server is valid, so the connection might still fail
$search = @ldap_search(
$ldap,
@@ -95,6 +103,14 @@ function login_ldap(&$username, &$password)
@ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
@ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
if ($config['ldap_user'] || $config['ldap_password'])
{
if (!@ldap_bind($ldap, $config['ldap_user'], htmlspecialchars_decode($config['ldap_password'])))
{
return $user->lang['LDAP_NO_SERVER_CONNECTION'];
}
}
$search = @ldap_search(
$ldap,
$config['ldap_base_dn'],
@@ -221,6 +237,14 @@ function acp_ldap(&$new)
<dt><label for="ldap_server">' . $user->lang['LDAP_SERVER'] . ':</label><br /><span>' . $user->lang['LDAP_SERVER_EXPLAIN'] . '</span></dt>
<dd><input type="text" id="ldap_server" size="40" name="config[ldap_server]" value="' . $new['ldap_server'] . '" /></dd>
</dl>
<dl>
<dt><label for="ldap_user">' . $user->lang['LDAP_USER'] . ':</label><br /><span>' . $user->lang['LDAP_USER_EXPLAIN'] . '</span></dt>
<dd><input type="text" id="ldap_user" size="40" name="config[ldap_user]" value="' . $new['ldap_user'] . '" /></dd>
</dl>
<dl>
<dt><label for="ldap_password">' . $user->lang['LDAP_PASSWORD'] . ':</label><br /><span>' . $user->lang['LDAP_PASSWORD_EXPLAIN'] . '</span></dt>
<dd><input type="password" id="ldap_password" size="40" name="config[ldap_password]" value="' . $new['ldap_password'] . '" /></dd>
</dl>
<dl>
<dt><label for="ldap_dn">' . $user->lang['LDAP_DN'] . ':</label><br /><span>' . $user->lang['LDAP_DN_EXPLAIN'] . '</span></dt>
<dd><input type="text" id="ldap_dn" size="40" name="config[ldap_base_dn]" value="' . $new['ldap_base_dn'] . '" /></dd>
@@ -238,7 +262,7 @@ function acp_ldap(&$new)
// These are fields required in the config table
return array(
'tpl' => $tpl,
'config' => array('ldap_server', 'ldap_base_dn', 'ldap_uid', 'ldap_email')
'config' => array('ldap_server', 'ldap_user', 'ldap_password', 'ldap_base_dn', 'ldap_uid', 'ldap_email')
);
}

View File

@@ -21,7 +21,7 @@ class bbcode
var $bbcodes = array();
var $template_bitfield = 0;
var $template_bitfield;
var $template_filename = '';
/**
@@ -115,7 +115,7 @@ class bbcode
if (empty($this->template_filename))
{
$this->template_bitfield = $user->theme['bbcode_bitfield'];
$this->template_bitfield = new bitfield($user->theme['bbcode_bitfield']);
$this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/bbcode.html';
if (!@file_exists($this->template_filename))
@@ -238,7 +238,7 @@ class bbcode
case 6:
$this->bbcode_cache[$bbcode_id] = array(
'preg' => array(
'!\[color=(#[0-9a-fA-F]{6}|[a-z\-]+):$uid\](.*?)\[/color:$uid\]!s' => $this->bbcode_tpl('color', $bbcode_id),
'!\[color=(#[0-9a-f]{6}|[a-z\-]+):$uid\](.*?)\[/color:$uid\]!is' => $this->bbcode_tpl('color', $bbcode_id),
)
);
break;
@@ -318,13 +318,9 @@ class bbcode
break;
default:
if (!isset($template_bitfield))
{
$template_bitfield = new bitfield($this->template_bitfield);
}
if (isset($rowset[$bbcode_id]))
{
if ($template_bitfield->get($bbcode_id))
if ($this->template_bitfield->get($bbcode_id))
{
// The bbcode requires a custom template to be loaded
if (!$bbcode_tpl = $this->bbcode_tpl($rowset[$bbcode_id]['bbcode_tag'], $bbcode_id))
@@ -383,10 +379,10 @@ class bbcode
*/
function bbcode_tpl($tpl_name, $bbcode_id = -1, $skip_bitfield_check = false)
{
static $bbcode_hardtpl = array();
if (empty($bbcode_hardtpl))
{
global $user;
static $bbcode_hardtpl = array();
$bbcode_hardtpl = array(
'b_open' => '<span style="font-weight: bold">',
@@ -400,10 +396,9 @@ class bbcode
'color' => '<span style="color: $1">$2</span>',
'email' => '<a href="mailto:$1">$2</a>'
);
$template_bitfield = new bitfield($this->template_bitfield);
}
if ($bbcode_id != -1 && !$template_bitfield->get($bbcode_id) && !$skip_bitfield_check)
if ($bbcode_id != -1 && !$skip_bitfield_check && !$this->template_bitfield->get($bbcode_id))
{
return (isset($bbcode_hardtpl[$tpl_name])) ? $bbcode_hardtpl[$tpl_name] : false;
}
@@ -477,49 +472,41 @@ class bbcode
{
$tpl = 'ulist_open_default';
$type = 'default';
$start = 0;
}
else if ($type == 'i')
{
$tpl = 'olist_open';
$type = 'lower-roman';
$start = 1;
}
else if ($type == 'I')
{
$tpl = 'olist_open';
$type = 'upper-roman';
$start = 1;
}
else if (preg_match('#^(disc|circle|square)$#i', $type))
{
$tpl = 'ulist_open';
$type = strtolower($type);
$start = 1;
}
else if (preg_match('#^[a-z]$#', $type))
{
$tpl = 'olist_open';
$type = 'lower-alpha';
$start = ord($type) - 96;
}
else if (preg_match('#[A-Z]#', $type))
{
$tpl = 'olist_open';
$type = 'upper-alpha';
$start = ord($type) - 64;
}
else if (is_numeric($type))
{
$tpl = 'olist_open';
$type = 'arabic-numbers';
$start = intval($type);
}
else
{
$tpl = 'olist_open';
$type = 'arabic-numbers';
$start = 1;
}
return str_replace('{LIST_TYPE}', $type, $this->bbcode_tpl($tpl));

View File

@@ -82,7 +82,7 @@ class cache extends acm
if (($censors = $this->get('word_censors')) === false)
{
$sql = 'SELECT word, replacement
FROM ' . WORDS_TABLE;
FROM ' . WORDS_TABLE;
$result = $db->sql_query($sql);
$censors = array();
@@ -173,21 +173,29 @@ class cache extends acm
/**
* Obtain allowed extensions
*
* @param mixed $forum_id If false then check for private messaging, if int then check for forum id. If true, then only return extension informations.
*
* @return array allowed extensions array.
*/
function obtain_attach_extensions($forum_id = false)
function obtain_attach_extensions($forum_id)
{
if (($extensions = $this->get('_extensions')) === false)
{
global $db;
$extensions = array(
'_allowed_post' => array(),
'_allowed_pm' => array(),
);
// The rule is to only allow those extensions defined. ;)
$sql = 'SELECT e.extension, g.*
FROM ' . EXTENSIONS_TABLE . ' e, ' . EXTENSION_GROUPS_TABLE . ' g
WHERE e.group_id = g.group_id
AND g.allow_group = 1';
AND (g.allow_group = 1 OR g.allow_in_pm = 1)';
$result = $db->sql_query($sql);
$extensions = array('_allowed_' => array());
while ($row = $db->sql_fetchrow($result))
{
$extension = strtolower(trim($row['extension']));
@@ -196,47 +204,62 @@ class cache extends acm
'display_cat' => (int) $row['cat_id'],
'download_mode' => (int) $row['download_mode'],
'upload_icon' => trim($row['upload_icon']),
'max_filesize' => (int) $row['max_filesize']
'max_filesize' => (int) $row['max_filesize'],
'allow_group' => $row['allow_group'],
'allow_in_pm' => $row['allow_in_pm'],
);
$allowed_forums = ($row['allowed_forums']) ? unserialize(trim($row['allowed_forums'])) : array();
if ($row['allow_in_pm'])
// Store allowed extensions forum wise
if ($row['allow_group'])
{
$allowed_forums = array_merge($allowed_forums, array(0));
$extensions['_allowed_post'][$extension] = (!sizeof($allowed_forums)) ? 0 : $allowed_forums;
}
// Store allowed extensions forum wise
$extensions['_allowed_'][$extension] = (!sizeof($allowed_forums)) ? 0 : $allowed_forums;
if ($row['allow_in_pm'])
{
$extensions['_allowed_pm'][$extension] = 0;
}
}
$db->sql_freeresult($result);
$this->put('_extensions', $extensions);
}
if ($forum_id !== false)
// Forum post
if ($forum_id === false)
{
$return = array();
// We are checking for private messages, therefore we only need to get the pm extensions...
$return = array('_allowed_' => array());
foreach ($extensions['_allowed_'] as $extension => $check)
foreach ($extensions['_allowed_pm'] as $extension => $check)
{
$allowed = false;
$return['_allowed_'][$extension] = 0;
$return[$extension] = $extensions[$extension];
}
$extensions = $return;
}
else if ($forum_id === true)
{
return $extensions;
}
else
{
$forum_id = (int) $forum_id;
$return = array('_allowed_' => array());
foreach ($extensions['_allowed_post'] as $extension => $check)
{
// Check for allowed forums
if (is_array($check))
{
// Check for private messaging AND all forums allowed
if (sizeof($check) == 1 && $check[0] == 0)
{
$allowed = true;
}
else
{
$allowed = (!in_array($forum_id, $check)) ? false : true;
}
$allowed = (!in_array($forum_id, $check)) ? false : true;
}
else
{
$allowed = ($forum_id === 0) ? false : true;
$allowed = true;
}
if ($allowed)
@@ -365,7 +388,7 @@ class cache extends acm
global $db;
$sql = 'SELECT disallow_username
FROM ' . DISALLOW_TABLE;
FROM ' . DISALLOW_TABLE;
$result = $db->sql_query($sql);
$usernames = array();

View File

@@ -19,7 +19,7 @@ class captcha
var $width = 360;
var $height = 96;
function execute($code)
function execute($code, $seed)
{
global $config;
$stats = gd_info();
@@ -48,8 +48,11 @@ class captcha
imageantialias($image, true);
}
// seed the random generator
mt_srand($seed);
// set background color
$back = imagecolorallocate($image, mt_rand(224, 255), mt_rand(224, 255), mt_rand(224, 255));
$back = imagecolorallocate($image, mt_rand(224, 255), mt_rand(224, 255), mt_rand(224, 255));
imagefilledrectangle($image, 0, 0, $this->width, $this->height, $back);
// allocates the 216 websafe color palette to the image
@@ -70,6 +73,7 @@ class captcha
// fill with noise or grid
if ($config['captcha_gd_noise'])
{
$chars_allowed = array_merge(range('1', '9'), range('A', 'Z'));
// random characters in background with random position, angle, color
for ($i = 0 ; $i < 72; $i++)
{
@@ -78,9 +82,10 @@ class captcha
$x = mt_rand(0, 360);
$y = mt_rand(0, (int)($this->height - ($size / 5)));
$color = $func2($image, mt_rand(160, 224), mt_rand(160, 224), mt_rand(160, 224));
$text = chr(mt_rand(45, 250));
$text = $chars_allowed[mt_rand(0, sizeof($chars_allowed) - 1)];
imagettftext($image, $size, $angle, $x, $y, $color, $this->get_font(), $text);
}
unset($chars_allowed);
}
else
{
@@ -132,7 +137,13 @@ class captcha
{
global $phpbb_root_path;
$dr = opendir($phpbb_root_path . 'includes/captcha/fonts');
$dr = @opendir($phpbb_root_path . 'includes/captcha/fonts');
if (!$dr)
{
trigger_error('Unable to open includes/captcha/fonts directory.', E_USER_ERROR);
}
while (false !== ($entry = readdir($dr)))
{
if (strtolower(pathinfo($entry, PATHINFO_EXTENSION)) == 'ttf')
@@ -143,7 +154,7 @@ class captcha
closedir($dr);
}
return $fonts[array_rand($fonts)];
return $fonts[mt_rand(0, sizeof($fonts) - 1)];
}
}

View File

@@ -30,15 +30,14 @@ class captcha
}
/**
* Create the image containing $code
* Create the image containing $code with a seed of $seed
*/
function execute($code)
function execute($code, $seed)
{
$img_height = $this->height - 10;
$img_width = 0;
list($usec, $sec) = explode(' ', microtime());
mt_srand($sec * $usec);
mt_srand($seed);
$char_widths = $hold_chars = array();
$code_len = strlen($code);

View File

@@ -117,6 +117,7 @@ define('FULL_FOLDER_HOLD', -1);
// Download Modes - Attachments
define('INLINE_LINK', 1);
// This mode is only used internally to allow modders extending the attachment functionality
define('PHYSICAL_LINK', 2);
// Confirm types

View File

@@ -114,6 +114,24 @@ class dbal
return $this->_sql_close();
}
/**
* Build LIMIT query
* Doing some validation here.
*/
function sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
{
if (empty($query))
{
return false;
}
// Never use a negative total or offset
$total = ($total < 0) ? 0 : $total;
$offset = ($offset < 0) ? 0 : $offset;
return $this->_sql_query_limit($query, $total, $offset, $cache_ttl);
}
/**
* Fetch all rows
*/
@@ -282,15 +300,36 @@ class dbal
}
/**
* Build IN, NOT IN, = and <> sql comparison string.
* Build IN or NOT IN sql comparison string, uses <> or = on single element
* arrays to improve comparison speed
* @access public
* @param string $field name of the sql column that shall be compared
* @param array $array array of values that are allowed (IN) or not allowed (NOT IN)
* @param bool $negate true for IN (), false for NOT IN ()
* @param bool $allow_empty_set Allow $array to be empty, this function will return 1=1 or 1=0 then
*/
function sql_in_set($field, $array, $negate = false)
function sql_in_set($field, $array, $negate = false, $allow_empty_set = false)
{
if (!sizeof($array))
{
// Not optimal, but at least the backtrace should help in identifying where the problem lies.
$this->sql_error('No values specified for SQL IN comparison');
if (!$allow_empty_set)
{
// Print the backtrace to help identifying the location of the problematic code
$this->sql_error('No values specified for SQL IN comparison');
}
else
{
// NOT IN () actually means everything so use a tautology
if ($negate)
{
return '1=1';
}
// IN () actually means nothing so use a contradiction
else
{
return '1=0';
}
}
}
if (!is_array($array))
@@ -438,7 +477,7 @@ class dbal
*/
function sql_error($sql = '')
{
global $auth, $user;
global $auth, $user, $config;
// Set var to retrieve errored status
$this->sql_error_triggered = true;
@@ -459,7 +498,7 @@ class dbal
$backtrace = get_backtrace();
$message .= ($sql) ? '<br /><br /><u>SQL</u><br /><br />' . htmlspecialchars($sql) : '';
$message .= ($backtrace) ? '<br /><br /><u>BACKTRACE</u><br />' . $backtrace : '';
$message .= ($backtrace) ? '<br /><br /><u>BACKTRACE</u><br />' . $backtrace : '';
$message .= '<br />';
}
else
@@ -472,7 +511,14 @@ class dbal
}
else
{
$message .= '<br /><br />' . $user->lang['SQL_ERROR_OCCURRED'];
if (!empty($config['board_contact']))
{
$message .= '<br /><br />' . sprintf($user->lang['SQL_ERROR_OCCURRED'], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
}
else
{
$message .= '<br /><br />' . sprintf($user->lang['SQL_ERROR_OCCURRED'], '', '');
}
}
}

View File

@@ -97,6 +97,12 @@ class dbal_firebird extends dbal
{
global $cache;
// EXPLAIN only in extra debug mode
if (defined('DEBUG_EXTRA'))
{
$this->sql_report('start', $query);
}
$this->last_query_text = $query;
$this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
@@ -108,6 +114,11 @@ class dbal_firebird extends dbal
$this->sql_error($query);
}
if (defined('DEBUG_EXTRA'))
{
$this->sql_report('stop', $query);
}
if (!$this->transaction)
{
if (function_exists('ibase_commit_ret'))
@@ -131,6 +142,10 @@ class dbal_firebird extends dbal
$this->open_queries[(int) $this->query_result] = $this->query_result;
}
}
else if (defined('DEBUG_EXTRA'))
{
$this->sql_report('fromcache', $query);
}
}
else
{
@@ -143,20 +158,13 @@ class dbal_firebird extends dbal
/**
* Build LIMIT query
*/
function sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
{
if ($query != '')
{
$this->query_result = false;
$this->query_result = false;
$query = 'SELECT FIRST ' . $total . ((!empty($offset)) ? ' SKIP ' . $offset : '') . substr($query, 6);
$query = 'SELECT FIRST ' . $total . ((!empty($offset)) ? ' SKIP ' . $offset : '') . substr($query, 6);
return $this->sql_query($query, $cache_ttl);
}
else
{
return false;
}
return $this->sql_query($query, $cache_ttl);
}
/**
@@ -269,7 +277,7 @@ class dbal_firebird extends dbal
{
$sql = "SELECT GEN_ID(" . $tablename[1] . "_gen, 0) AS new_id FROM RDB\$DATABASE";
if (!($temp_q_id = @ibase_query($this->db_connect_id, $sql)))
if (!($temp_q_id = @ibase_query($this->db_connect_id, $sql)))
{
return false;
}

View File

@@ -35,6 +35,8 @@ class dbal_mssql extends dbal
$this->server = $sqlserver . (($port) ? ':' . $port : '');
$this->dbname = $database;
ini_set('mssql.charset', 'UTF-8');
$this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword) : @mssql_connect($this->server, $this->user, $sqlpassword);
if ($this->db_connect_id && $this->dbname != '')
@@ -157,40 +159,33 @@ class dbal_mssql extends dbal
/**
* Build LIMIT query
*/
function sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
{
if ($query != '')
$this->query_result = false;
// Since TOP is only returning a set number of rows we won't need it if total is set to 0 (return all rows)
if ($total)
{
$this->query_result = false;
// Since TOP is only returning a set number of rows we won't need it if total is set to 0 (return all rows)
if ($total)
// We need to grab the total number of rows + the offset number of rows to get the correct result
if (strpos($query, 'SELECT DISTINCT') === 0)
{
// We need to grab the total number of rows + the offset number of rows to get the correct result
if (strpos($query, 'SELECT DISTINCT') === 0)
{
$query = 'SELECT DISTINCT TOP ' . ($total + $offset) . ' ' . substr($query, 15);
}
else
{
$query = 'SELECT TOP ' . ($total + $offset) . ' ' . substr($query, 6);
}
$query = 'SELECT DISTINCT TOP ' . ($total + $offset) . ' ' . substr($query, 15);
}
$result = $this->sql_query($query, $cache_ttl);
// Seek by $offset rows
if ($offset)
else
{
$this->sql_rowseek($offset, $result);
$query = 'SELECT TOP ' . ($total + $offset) . ' ' . substr($query, 6);
}
return $result;
}
else
$result = $this->sql_query($query, $cache_ttl);
// Seek by $offset rows
if ($offset)
{
return false;
$this->sql_rowseek($offset, $result);
}
return $result;
}
/**

View File

@@ -156,40 +156,33 @@ class dbal_mssql_odbc extends dbal
/**
* Build LIMIT query
*/
function sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
{
if ($query != '')
$this->query_result = false;
// Since TOP is only returning a set number of rows we won't need it if total is set to 0 (return all rows)
if ($total)
{
$this->query_result = false;
// Since TOP is only returning a set number of rows we won't need it if total is set to 0 (return all rows)
if ($total)
// We need to grab the total number of rows + the offset number of rows to get the correct result
if (strpos($query, 'SELECT DISTINCT') === 0)
{
// We need to grab the total number of rows + the offset number of rows to get the correct result
if (strpos($query, 'SELECT DISTINCT') === 0)
{
$query = 'SELECT DISTINCT TOP ' . ($total + $offset) . ' ' . substr($query, 15);
}
else
{
$query = 'SELECT TOP ' . ($total + $offset) . ' ' . substr($query, 6);
}
$query = 'SELECT DISTINCT TOP ' . ($total + $offset) . ' ' . substr($query, 15);
}
$result = $this->sql_query($query, $cache_ttl);
// Seek by $offset rows
if ($offset)
else
{
$this->sql_rowseek($offset, $result);
$query = 'SELECT TOP ' . ($total + $offset) . ' ' . substr($query, 6);
}
return $result;
}
else
$result = $this->sql_query($query, $cache_ttl);
// Seek by $offset rows
if ($offset)
{
return false;
$this->sql_rowseek($offset, $result);
}
return $result;
}
/**

View File

@@ -163,27 +163,20 @@ class dbal_mysql extends dbal
/**
* Build LIMIT query
*/
function sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
{
if ($query != '')
$this->query_result = false;
// if $total is set to 0 we do not want to limit the number of rows
if ($total == 0)
{
$this->query_result = false;
// if $total is set to 0 we do not want to limit the number of rows
if ($total == 0)
{
// Having a value of -1 was always a bug
$total = '18446744073709551615';
}
$query .= "\n LIMIT " . ((!empty($offset)) ? $offset . ', ' . $total : $total);
return $this->sql_query($query, $cache_ttl);
}
else
{
return false;
// Having a value of -1 was always a bug
$total = '18446744073709551615';
}
$query .= "\n LIMIT " . ((!empty($offset)) ? $offset . ', ' . $total : $total);
return $this->sql_query($query, $cache_ttl);
}
/**

View File

@@ -142,27 +142,20 @@ class dbal_mysqli extends dbal
/**
* Build LIMIT query
*/
function sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
{
if ($query != '')
$this->query_result = false;
// if $total is set to 0 we do not want to limit the number of rows
if ($total == 0)
{
$this->query_result = false;
// if $total is set to 0 we do not want to limit the number of rows
if ($total == 0)
{
// MySQL 4.1+ no longer supports -1 in limit queries
$total = '18446744073709551615';
}
$query .= "\n LIMIT " . ((!empty($offset)) ? $offset . ', ' . $total : $total);
return $this->sql_query($query, $cache_ttl);
}
else
{
return false;
// MySQL 4.1+ no longer supports -1 in limit queries
$total = '18446744073709551615';
}
$query .= "\n LIMIT " . ((!empty($offset)) ? $offset . ', ' . $total : $total);
return $this->sql_query($query, $cache_ttl);
}
/**

View File

@@ -46,7 +46,7 @@ class dbal_oracle extends dbal
*/
function sql_server_info()
{
return 'Oracle ' . @ociserverversion($this->db_connect_id);
return @ociserverversion($this->db_connect_id);
}
/**
@@ -213,20 +213,13 @@ class dbal_oracle extends dbal
/**
* Build LIMIT query
*/
function sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
{
if ($query != '')
{
$this->query_result = false;
$this->query_result = false;
$query = 'SELECT * FROM (SELECT /*+ FIRST_ROWS */ rownum AS xrownum, a.* FROM (' . $query . ') a WHERE rownum <= ' . ($offset + $total) . ') WHERE xrownum >= ' . $offset;
$query = 'SELECT * FROM (SELECT /*+ FIRST_ROWS */ rownum AS xrownum, a.* FROM (' . $query . ') a WHERE rownum <= ' . ($offset + $total) . ') WHERE xrownum >= ' . $offset;
return $this->sql_query($query, $cache_ttl);
}
else
{
return false;
}
return $this->sql_query($query, $cache_ttl);
}
/**

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