diff --git a/change_logs/.DS_Store b/change_logs/.DS_Store new file mode 100644 index 00000000..7845ccc2 Binary files /dev/null and b/change_logs/.DS_Store differ diff --git a/change_logs/1-0_to_1-0-1.txt b/change_logs/1-0_to_1-0-1.txt new file mode 100644 index 00000000..72876df7 --- /dev/null +++ b/change_logs/1-0_to_1-0-1.txt @@ -0,0 +1,28 @@ +Upgrading from 1.0.0 to 1.0.1 +----------------------------- + + +Files to update +---------------- + +index.php + +sources/Boards.php +sources/Forums.php +sources/post.php + +sources/lib/post_reply_post.php +sources/lib/post_q_reply_post.php +sources/search.php + +sources/Admin/ad_member.php + + +Bugs Fixed +---------- + +Various Posting bugs fixed +Tighter permission checking when posting +ICQ number not being saved when editing a profile via the ACP +Incorrect error displayed when attempting to access a forum you don't have permission for +Shortened topic titles in board view display showing partial HTML entities (credit Chrisken) diff --git a/change_logs/RC1_to_RC2.txt b/change_logs/RC1_to_RC2.txt new file mode 100644 index 00000000..36d7e52a --- /dev/null +++ b/change_logs/RC1_to_RC2.txt @@ -0,0 +1,89 @@ +Upgrading from RC1 to RC2 +------------------------- + +UPGRADE SCRIPT +-------------- + +Upload the script 'upgade3.php' to your root IBF installation (the same directory that index.php is in). +Run it via your web browser by typing the URL to the script in the address bar. +When the script has completed, remove it from your server. + + +Files to update +---------------- + +index.php +admin.php + +skin/s1/skin_global.php +skin/s1/skin_online.php +skin/s1/skin_ucp.php +skin/s1/skin_msg.php + +lang/en/email_content.php +lang/en/lang_mod.php +lang/en/lang_msg.php +lang/en/lang_search.php +lang/en/lang_ucp.php + +sources/Admin/ad_forums.php +sources/Admin/ad_groups.php +sources/Admin/ad_languages.php +sources/Admin/ad_settings.php +sources/Admin/ad_skin_import.php +sources/Admin/admin_skin.php +sources/Admin/admin_functions.php + +sources/lib/emailer.php +sources/lib/usercp_functions.php +sources/lib/post_parser.php +sources/lib/post_poll.php + +sources/Boards.php +sources/functions.php +sources/Memberlist.php +sources/Messenger.php +sources/Online.php +sources/Post.php +sources/Search.php +sources/Topics.php +sources/Usercp.php + + +Bugs Fixed +---------- + +Moderator viewing IP addresses bug fix (credit: Josh) +ACP:User Groups: List users in group error on guests and validating groups fix +Post uploads register_globals off bug fix (PHP 4.2+ fix) +Avatar uploads register_globals off bug fix (PHP 4.2+ fix) +ASCII code in emails removed +Next newest/oldest links picking moved topics bug fix +UserCP email address change email subject empty bug fix +Editing poll "no new replies" language fix +Fix to stop silly people removing all language packs +"bad arguments to implode" when importing skin packs on old PHP versions fix +Ability to set number of replies to be "hot" bug fix +Page numbers "missing" from online page at the bottom fix +Changed: Move topics with attachments show attachment regardless of forum settings +Changed: Date generation accounts for Daylight Savings Time +Messenger: Sent items entries show wrong profile when clicking on sent to name +Banned members receive blank page w/error bug fix +Messenger: Bugs in archiving messages fixed +Single quote in redirect screen title escaped bug fix +Unable to use FTP:// in an image tag fix +Redirect screens not centered bug fix +Correct sub cat new post icon used in boards view +Correct last post date used with sub categories +Using three spaces to create a blank post bug fix +Topic Tracker post icon bug fix +Search: Highlighted words fixer upper +Rouge spaces when editing post with quotes fix + + + +DB changes (upgrade3.php will do these changes for you, shown here +for those who want to manually update, etc) + +ALTER TABLE ibf_topics CHANGE forum_id forum_id SMALLINT (5) DEFAULT '0' NOT NULL +ALTER TABLE ibf_members ADD dst_in_use TINYINT (1) DEFAULT '0' \ No newline at end of file diff --git a/change_logs/RC2_to_FINAL.txt b/change_logs/RC2_to_FINAL.txt new file mode 100644 index 00000000..edecf765 --- /dev/null +++ b/change_logs/RC2_to_FINAL.txt @@ -0,0 +1,41 @@ +Upgrading from RC1 to FINAL (s6) +------------------------- + + +Files to update +---------------- + +index.php +admin.php + +sources/Admin/ad_groups.php +sources/Admin/ad_settings.php +sources/Admin/ad_templates.php + +sources/Driver/mySQL.php + +sources/lib/usercp_functions.php +sources/lib/post_new_post.php +sources/lib/post_poll.php +sources/lib/post_reply_post.php + +sources/misc/stats.php + + +sources/Boards.php +sources/Post.php +sources/Messenger.php +sources/mod_cp.php + + + +Bugs Fixed +---------- + +Marking all as read in a subcat forum doesn't update board index post marker fix +Post & Avatar uploads (safe mode w/open basedir) bug fix +ACP: Date and times settings description typo fix +Read reciept not containing date bug fix +Viewing "The Moderating Team" displays mods in forums user cannot see fix +ACP max width/height of flash movies missing fix +Post new topic: Stop shouting bug fix diff --git a/change_logs/beta_1_to_beta_2.txt b/change_logs/beta_1_to_beta_2.txt new file mode 100644 index 00000000..4478c567 --- /dev/null +++ b/change_logs/beta_1_to_beta_2.txt @@ -0,0 +1,59 @@ +Upgrading from BETA 1 to BETA 2 +------------------------------- + +Simply upload the following files from this zip archive (found in the 'uploads' directory) to +your server, replacing them. + +admin.php +index.php + +lang/en/lang_search.php + +Skin/s1/skin_search.php + +style_templates/1/skin_search.html + +sources/Admin/*.php (this means all the files in the Admin directory) + +sources/lib/emailer.php +sources/lib/post_parser.php +sources/lib/usercp_functions.php +sources/lib/post_q_reply_post.php + +sources/misc/forward_page.php + +sources/Boards.php +sources/functions.php +sources/Messenger.php +sources/Moderate.php +sources/Profile.php +sources/Register.php +sources/Search.php +sources/Usercp.php + + + + + +Bugs Fixed +---------- + +PHP 4.0.3 regex errors ($1 $2 $3 errors) +mysql 3.23.22 query errors (emoticons and bad words) +No forum == no profile error +Forward page link generation error +No languages showing in ACP +Wrong topics/posts showing in ACP +Wrong number of members counted via reset stats in ACP +AOL/Yahoo input wrongly labelled as incorrect +Avatar/Img extensions wrongly labelled as incorrect (PHP 4.0.3) +Logged in as incorrect user fixed +Moderators can't close/open own topics +HTML in signatures / posts fixed +Last registered info not updating via ACP approval +Editing quoted post not reflected in preview +Guests not seeing signatures/avatars and images fix +Searching in password protected forums when not logged into them fixed +Search "highlite" attribute not passing to page spans +Added: Ability to turn off GZIP encoding in ACP and on board +Added: Ability to use a windows savvy auto redirect header \ No newline at end of file diff --git a/change_logs/beta_2_to_3.txt b/change_logs/beta_2_to_3.txt new file mode 100644 index 00000000..5061b949 --- /dev/null +++ b/change_logs/beta_2_to_3.txt @@ -0,0 +1,113 @@ +Upgrading from BETA 2 to BETA 3 +------------------------------- + +STEP ONE: +--------- + +You must move your post icons from the "PostIcons" directory into the root images +directory. +Example: + +If your post icons are in 'style_images/1/PostIcons' move them to 'style_images/1/' + +################################################################## + +STEP TWO: +--------- + +Upload the script 'upgade1.php' to your root IBF installation (the same directory that index.php is in). +Run it via your webbrowser. When the script has completed, remove it from your server + +################################################################## + +STEP THREE: +----------- + +Simply upload the following files from this zip archive (found in the 'uploads' directory) to +your server, replacing them. + + +Files to update +---------------- + +index.php +admin.php + +lang/en/lang_global.php +lang/en/lang_ucp.php +lang/en/lang_post.php + +Skin/s1/skin_ucp.php +Skin/s1/skin_post.php +Skin/s1/skin_boards.php (HTML fix) + +sources/Admin/ad_forums.php +sources/Admin/ad_member.php +sources/Admin/ad_settings.php +sources/Admin/ad_templates.php +sources/Admin/ad_imagemacros.php + +sources/misc/attach.php +sources/misc/contact_member.php +sources/misc/forward_page.php +sources/misc/print_page.php +sources/misc/stats.php + +sources/Login.php +sources/Forums.php +sources/functions.php +sources/Memberlist.php +sources/Moderate.php +sources/mod_cp.php +sources/Online.php +sources/Profile.php +sources/Search.php +sources/Topics.php +sources/Usercp.php + +sources/lib/*.* (All files) + +sources/Driver/mySQL.php + + +Bugs Fixed +---------- + +HTML not allowed in forum descriptions +Time zone problems fixed +Mulitple categories showing up when position duplicated +Sub forums not showing (PHP 4.0.3 fix only) +DB query count showing (PHP 4.0.3 fix only) +UserCP: wrong number of closing table tags called +Wrong messenger folders created when pre-reg via ACP +GZIP status wrongly shown +Custom member title not showing in UCP +AIM console breaks on AIM with spaces +Resynch forum counts wrong +Added: Ability to hide the session id in links +Reworked session management +HTML bug fixes +Editing posts with embedded tags +Forum log in cookies not being removed on log out +JS check added for empty messenger titles +Template tags parsing in preview bug fix +Post icon not updating in topic when first post edited +Languages not shown when forwarding topics +Topic images still showing when turned off from UCP +Wrong filename used when attempting to download files sent via upload +Links to moved topics not removed when topic deleted. +Search not returning all results bug fix +Timezones with 30min increments fix +URLs that don't begin with http:// show HTML code in edits +Wrong posts showing up in MCP post queues +Wrong reply count showing when approving moderated posts +Safe mode "catch" for creating/removing images and macros +Safe mode "catch" for creating/removing and editing templates +Viewing Profile: users time not updated with board offsets +Searching for username w/exact match returns matches inc. partial +Uploaded avatars not changing dimensions +Clicking "delete all cookies" creates new guest sessions fixed +Admins that are global moderators showing in both sections in 'View Moderating Team' +Sub categories not working on some mySQL versions fix +Print Page: Incorrect tag parsing +Print Page: Not all topics shown \ No newline at end of file diff --git a/change_logs/beta_3_to_RC1.txt b/change_logs/beta_3_to_RC1.txt new file mode 100644 index 00000000..94e1c9ec --- /dev/null +++ b/change_logs/beta_3_to_RC1.txt @@ -0,0 +1,51 @@ +Upgrading from BETA 3 to RC1 +---------------------------- + +UPGRADE SCRIPT +-------------- + +Upload the script 'upgade2.php' to your root IBF installation (the same directory that index.php is in). +Run it via your web browser by typing the URL to the script in the address bar. +When the script has completed, remove it from your server. + + + +Files to update +---------------- + +index.php +admin.php + + +Skin/s1/skin_ucp.php + + +sources/Admin/ad_forums.php +sources/Admin/ad_settings.php + +sources/lib/post_parser.php + +sources/Boards.php +sources/functions.php +sources/Forums.php +sources/mod_cp.php +sources/Profile.php +sources/Search.php + + +Bugs Fixed +---------- + +ACP spelling error on log in +Personal Photo field removed +Wrong tool bar tip for the HTML button (yes, we are getting picky aren't we) +Forum rules being switched off when editing a forums settings +Tighter control on forum and topic IDs +Wrong post marker icon showing in sub cat forums +Links auto parse even when IBF Code is switched off +Skins not remaining hidden if they have an ID of '0' +Mass move/prune fails when choosing "any type of topic" +Search enabled even if member group permission denied +Profile viewing enabled even if member group permission denied +Addition: ability to reset Most Online data via ACP +Multiple guest sessions created if IP address changes often \ No newline at end of file diff --git a/install_guide/data/file.gif b/install_guide/data/file.gif new file mode 100644 index 00000000..77bc3abd Binary files /dev/null and b/install_guide/data/file.gif differ diff --git a/install_guide/data/folder.gif b/install_guide/data/folder.gif new file mode 100644 index 00000000..c73dabb0 Binary files /dev/null and b/install_guide/data/folder.gif differ diff --git a/install_guide/data/help.html b/install_guide/data/help.html new file mode 100644 index 00000000..ffa241f1 --- /dev/null +++ b/install_guide/data/help.html @@ -0,0 +1,163 @@ + + + + + Invision Install Guide: Help & FAQ + + + + + + + + + + +
+ Sections: Installation Problems | Admin CP Problems | Board Problems | Getting Further Help +
+ +
+ + + + + + + + +
Installation Problems
+ When I run the installer, I get a page of code. +
+ If when accessing the installer via your web browser you receive a page of code and not the installation start screen, this means that either PHP has + not been installed or has not been configured properly. Please consult with your web host to see if this is the case. +

+ I get an error like this 'access denied for user@localhost using password YES' when I submit the main form. +
+ If you receive this error from mySQL it means that either the mySQL database name, mySQL username, mySQL password or mySQL host information is wrong. Please double check the information you + entered making sure that passwords are typed correctly. In some cases, this information is case sensitive. If this error persists, please consult with your web host to check that the information + you have is correct. +

+ After installing, I get this error 'Warning: fopen("/.install.lock", "w") - Permission denied ...' +
+ After installing, Invision Board attempts to create a "lock" file which disables the installation script. If you receive this error, the installer + has not been able to create this file. After you have logged into the Admin Center for the first time, you should remove the "sm_install.php" script + from your server and only re-upload it if you wish to make a fresh install. You can then safely ignore this warning. +

+ When installing I get an error like this: 'WARNING! Could not locate 'conf_global.php' +
+ This error means that the installer could not "guess" the location of the file 'conf_global.php'. Make sure you have uploaded this file into the same directory that you + uploaded 'sm_install.php' into. If you have this file already uploaded and the CHMOD value has been set, then you can tell the installer where to look for this file by simply + opening 'sm_install.php' in your favourite text editor. Look near the top for "$root = "./";". Edit this to reflect your "real" path. Note, this is a path - not a URL, entering "http://www.domain.com" or similar will + result in an error. A path is literally the file path from the server root to the current directory (such as '/home/site/public_html/forums/'). More information is provided in the script near the top. When you have completed + the edit, simply save the file and re-upload to your server and re-run through your web browser. +
+ +
+ + + + + + + + +
Admin CP Problems
+ No matter what I do, I can't stay logged into the Admin CP. +
+ For extra security, the Admin CP checks your IP address as part of the admin session validation. In some cases your IP address will change with each page request (especially if you are using a dial up ISP). You can + stop the Admin CP checking your IP address which will solve the problem. +
To do this, open up "admin.php" in your text editor. Near the top of the script change $check_ip = 1; to $check_ip = 0;. Save the file and re-upload to your + server. +
Although there is no immediate security risk to doing this, you should not disclose your admin session ID to anyone or post the link you are using for that admin CP session to anyone. +

+ When I try to access the Admin CP, the page is completely blank +
+ This problem could be the result of a few things.
+ Firstly, open up "admin.php" in a text editor and near the top change: $use_gzip = 1; to $use_gzip = 0;. Save the file and re-upload to your + server. +
+ If that doesn't solve the problem, check the CHMOD values on the directories you created during the installation process. If in doubt, CHMOD them to 0777 and any directories contained within. +
+ +
+ + + + + + + + +
General Board Problems
+ Every time I try to access a page on the forums it loads a blank page. +
+ Can you log into the Admin CP? If you do not know the url, enter the following into your web browser address bar http://www.your-domain-here.com/forums/admin.php (obviously using the correct URL to your board!). +
If the Admin CP loads first time, try the following: +
Click on "Board Settings" to expand the sub-menu. Click on "Basic Config". When the page has loaded, turn off the following: Print HTTP headers? and DISABLE GZIP encoding?. When complete, submit the form + and try to access your board again. +
+ If it still loads a blank page, check the CHMOD values on the directories you created during the installation including any directories contained within. If in doubt, CHMOD to 0777. +

+ I am on a Windows server and I get an Internal Server Error when trying to access my board +
+ There is an option to disable the headers that Invision Board prints by default. +
Log into your Admin Control Panel, click on "Board Settings" to expand the sub-menu. Click on "Basic Config". When the page has loaded, turn off Print HTTP headers? and submit the form + and try to access your board again. +

+ I am on a Windows server and when I make a post I am taken to a blank page +
+ Some Windows based servers require a different HTTP protocol when redirecting HTTP requests, there is an option in the Admin Control Panel to overcome this. +
+ Log into your Admin Control Panel, click on "Board Settings" to expand the sub-menu. Click on "Basic Config". Choose "Refresh (Windows Savvy) from the "Type of auto-redirect?" option. Submit the form. +
+ +
+ + + + + + + + + +
Getting further help
+ If you have a problem outside the ones solved in this guide, then don't panic!
+ We have a large team of trained support professionals that will be able to provide a solution to your problems.
+ Your first stop would be to open a new support ticket. The FREE ticket system is available from the Invision Board Member Center. When starting a new ticket, please + be as thorough as you can in your error reporting, it will save our team time in responding to you. We pride ourselves on quality, professional support and aim to answer your request as promptly as possible. +
+ You can also post a problem on our "Support and Community Boards". We have a large active community who have experience in maintaining their Invision Board who may be able to give you a prompt reply - our support professionals also moderate these forums and + will read your posts. We do recommend that you make use of the search facility on the board to avoid posting problems that have already been posted - there is also a good chance that it's already been reported, discussed and solved. +
+ +
You may wish to consider our "Priority Support" option. A once only fee will cover you for all support requests for a period of one year (12 months). +
Priority support entitles you to the following benefits: +
    +
  • Your support tickets will be marked priority and only Invision Board administrators will have access to those tickets. +
  • You will be given a password to access the private support forum on our Community Forums. +
  • If you are in the United States you will receive telephone support if desired. +
  • In most cases we will login to your account and address problems for you. +
  • We can install the software for you if desired.
+
+For more information on our priority support service, please visit our Invision Board Member Center. +

+If you wish to contact us, please visit our Contact Page which includes a handy email form, mailing address and telephone number. +
+ + + + + diff --git a/install_guide/data/install.html b/install_guide/data/install.html new file mode 100644 index 00000000..7dd3162d --- /dev/null +++ b/install_guide/data/install.html @@ -0,0 +1,320 @@ + + + + + Invision Install Guide: Installing + + + + + + + + + + + + + + +
Installing: Step 1 - Uploading
+
At this point, you should have the zip archive "unzipped" and the contents similar to those shown in the structure and CHMOD guide. If you + do not have a similar structure, check to make sure you have your zip program preferences set to allow creation of directories and to preserve case and long filenames. +

+ If you haven't done so already, create a new directory on your server named appropriately (if you wanted to access the forums via 'http://www.domain.com/forums/', create a directory called 'forums' in the + 'public_html' or 'www' directory on your webserver. +

+ Using your FTP client, move into the directory you wish to upload to (if you followed the above advice, move into the newly created 'forums' directory.) +

+ Using your FTP client, create the following directories "archive_in", "archive_out", "html", "lang", "Skin", "sources", "ssi_templates", "style_images", + "style_sheets", "style_templates" and "uploads" (TIP: If your FTP client supports "Drag n' Drop" which most modern clients do, you can save yourself some time and effort by + simply selecting all the files from the "unzipped" zip archive and drag them into your FTP client window, this will then copy all the files, creating the directories as it goes. If you choose + to do this, you can safely ignore most of the following instruction, just remember to CHMOD as outlined in the stucture and CHMOD guide). +

+ Once the directories have been created, CHMOD "archive_in", "archive_out" and "uploads" to 0755 (if you get permissions errors later on, you can CHMOD these to + "0777"). Now, upload the contents of the files in your local folders (from the zip file) into the corresponding directories you've just created on your server. Some folders will contain other + files and folders, upload them all - preserving the structure you have in your zip file (for example, upload the entire contents of the "html" folder on your computer to the "html" directory on the server). +

+ Once you have finished uploading into the directories, upload the rest of the files "admin.php", "conf_global.php", "conf_mime_types.php", "index.php", + "phpinfo.php", "sm_install.php", "ssi.php" to the same place as you created the directories earlier (into "forums" for our example). +
+ CHMOD "conf_global.php" to 0666 (if you get permission denied errors later on, you can CHMOD this to 0777). +

+ That's it, the hard work is now done! You can proceed to the next step. +
+ +
+ + + + + + + + +
Installing: Step 2 - Using the Installer
+ An installer is provided to assist you in entering the information Invision Board needs to connect to your mySQL database and to create your new + administrators account. +

+ Run the "sm_install.php" file through your web browser by entering the URL to it into your browser address bar (if you have followed our example, type in + http://www.domain.com/forums/sm_install.php, naturally subsituting 'domain.com' for your web address.) +

+ You will be presented with a short information screen, if you receive an error telling you that "conf_global.php" does not have suitable permissions, CHMOD "conf_global.php" to + 0777 via your FTP client. +

+ Clicking on proceed will present you with a simple information form. You will need to know your mySQL username and password at this point. If you do not know it, please ask your web host - in most + cases it is different from the FTP log in information. +

The form is very straightfoward, with only the following points needing closer examination. If you do not know what your mySQL "host" is, try "localhost" (without the quotes). if the mySQL server + is on the same server as your website (and in most cases it is) this will suffice. +
+ If you have created a new database for Invision Board, or wish to use an existing database, enter the name of the database in the appropriate field.

Unless you intend to install multiple copies of + Invision Board into the same database, you can leave the "table prefix" blank. If you do not have a mySQL password (if you are installing Invision Board on your local server) this can be left blank. +
+ After submitting the form, you will be informed of any errors - if you do get an error similar to "permission denied for user@localhost using password YES" - the chances are you have either your mySQL username, mySQL password + or mySQL database name wrong. Consult with your webhost for the correct information and resubmit the form. +

+ If the installation was successful, you will receive notification to that effect. +
+ Follow the link to finish off the installation and to log into your newly installed board. When the log in page loads, enter in the information you chose for your administrator account. +
+ Once you are logged into the board, click on the "Admin CP" link found in the navigation bar to access the Administration Control Panel. +
+ + +
+ + + + + + + + +
Installing: Step 3 - Admin CP First Steps
+ The Invision Board administration control panel is a very sophisticated tool. This is where you can create new categories and forums for your board, as well + as set bad word filters, edit emoticons, change the board colours and so on. We recommend you browse the documentation at Invision Board before getting attempting some of the more complex operations. +

+ Lets get stuck in! +
+ The first thing you will need to do is remove the "sm_install.php" file from your server; although Invision Board locks the installer after a successful install, it's always a good idea to remove the installer as re-running it + will delete your database tables. +

+ Before anyone can post, we need some forums! +
+ If you wish to get stuck in straight away, now would be a good time to create some forums for your members to post in. +
+ In the Administrators CP, click on the "Forum Control" expanding menu in the left menu frame. When it loads, click on "New Category". +
If your website was about computers, you could enter "PC Software" as the category name. Submit the form by clicking the button at the bottom of the page. +
Now we have a category to "group" the forums, lets create a forum or two. +

Click on "New Forum" found in the same expandable menu. Choose "Normal Forum" from the drop down box and proceed. +
There are many options here, which are outside the scope of this guide, for more information see the documentation at Invision Board. We can + create a new forum without knowing what all the options do. Using our example, you might want a forum dedicated to "Games" - if so, enter "Games" as the forum title, and a suitable description for the new forum. When you have done this + scroll down and submit the form by clicking the button at the bottom of the page. +

+ If you now go back to your board, and refresh the page, you will see the new category and forum. Try a little test post to make sure the system is running perfectly. +

+ Congratulations! You have installed and set up your new Invision Board. If you ran into trouble, please click on the "Help!" link in the top menu bar for the FAQ and how to get support. +

+ Thank you for supporting Invision Board +
+ +
+
+
+
+ + + + + + + + + + + + +
File Structure and CHMOD values
Below is a table showing the file structure and recommended CHMOD values for the file (and in the case of directories, the CHMOD + values for the contents of the directories).
The CHMOD values are not needed for Windows based servers and can be safely ignored. The CHMOD + values may vary from system to system, if in doubt, CHMOD everything to 0777.
Most systems will not need to CHMOD everything to install successfully, + use the table below to determine what needs CHMOD'ding for installation, and what can be left until later. +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 File/Folder NameItem CHMOD ValueContents CHMOD ValueCHMOD for installCan CHMOD later
PHP fileadmin.php- + - + - + - +
folderarchive_in0755 + - + X + - +
folderarchive_out0755 + - + X + - +
PHP fileconf_global.php0666 + - + X + - +
PHP fileconf_mime_types.php- + - + - + - +
folderhtml- + - + - + - +
PHP fileindex.php- + - + - + - +
folderlang0755 + 0755 + - + X +
PHP filephpinfo.php- + - + - + - +
folderSkin0755 + 0755 + - + X +
PHP filesm_install.php- + - + - + - +
foldersources- + - + - + - +
PHP filessi.php- + - + - + - +
folderssi_templates- + - + - + - +
folderstyle_images0755 + 0755 + - + X +
folderstyle_sheets0755 + 0755 + - + X +
folderstyle_templates0755 + 0755 + - + X +
folderuploads0777 + - + X + - +
+
+
+ + + + + diff --git a/install_guide/data/menu.html b/install_guide/data/menu.html new file mode 100644 index 00000000..49d4465b --- /dev/null +++ b/install_guide/data/menu.html @@ -0,0 +1,31 @@ + + + + + + Invision Board Menu Bar + + + + + + + + + + + + +
Invision Board Installation and Help Guide
+ + + diff --git a/install_guide/data/tile_back.gif b/install_guide/data/tile_back.gif new file mode 100644 index 00000000..1286a915 Binary files /dev/null and b/install_guide/data/tile_back.gif differ diff --git a/install_guide/data/welcome.html b/install_guide/data/welcome.html new file mode 100644 index 00000000..1ac5d79c --- /dev/null +++ b/install_guide/data/welcome.html @@ -0,0 +1,92 @@ + + + + + Invision Install Guide: Welcome + + + + + + + + + + + + + +
Welcome to Invision Board!
+
Welcome to Invision Board, a fast, efficient, scalable community solution written in PHP and using mySQL for database storage. +

+ This guide will help you through the installation process and get you on your way to setting up your own Invision Board. +
+ Installation is very straight forward, only taking about 15 minutes from uploading the files to logging into your administration center. +
+
+ You will need an FTP (File Transfer Protocol) client, if you do not have one you can download Smart FTP for Windows or + InterArchy for Macintosh. At the time of writing both websites have freeware or free trial versions available for download. +
You do not need an indepth knowledge of PHP programming to install Invision Board, but a working knowledge of FTP functions is a plus. +
+
This guide assumes that you have successfully downloaded the latest release from Invision Board and have the Zip file "unzipped" and ready to go. +
The instructions will term the zip file you downloaded as "the zip archive", the directories created by the unzipping process as "the local folders" and the directories on your website as + "website directories" - this is to prevent confusion. +

+ If you don't know your FTP from your PHP and your CHMOD from your CHOWN, then you might wish to consider our Installation Service. For a low cost, once only fee + - one of our installation professionals will install and set up your board for you. For more information, please visit our advanced services page. +
+ +
+ + + + + + + + + +
Requirements
The exact requirements will depend on many factors, your estimated board traffic being one. +

Server Requirements +
+ You must have a webserver that has PHP 4.0.3 (or better) and mySQL 3.22 (or better) installed. If you are unsure whether your server has these + programs installed, please check with your web host now. If you are capable, you can always download PHP + and download mySQL and install it yourself. +
Invision Board works best on an Apache server, and is Apache 1 and Apache 2 savvy. +

+ General Requirements +
+ You do not need a new mySQL database as Invision Board supports table prefixes to prevent tables being overwritten. +
You will also need the mySQL username and mySQL password for a mySQL user that has permission to "CREATE", "DROP" and "ALTER" tables. +
You will need about 2mb of free web space and roughly 3mb of mySQL database space to allow installation and a moderately sized community. +
If you are unsure on any of these points, please ask your webhost before proceeding. +

+ >> Enough chit chat, lets get installing! +
+ +

+ + + + + +
+ + + + + diff --git a/install_guide/install_guide.html b/install_guide/install_guide.html new file mode 100644 index 00000000..a82e8d15 --- /dev/null +++ b/install_guide/install_guide.html @@ -0,0 +1,16 @@ + + + + + Invision Board Installation + + + + + + +Sorry, you need a frames enabled browser to view this page- and why are you still living in the dark ages, +Internet Explorer 2 isn't cool anymore! + + diff --git a/schematic/inserts.sql b/schematic/inserts.sql new file mode 100644 index 00000000..52114d40 --- /dev/null +++ b/schematic/inserts.sql @@ -0,0 +1 @@ +INSERT INTO ibf_categories (id, position, state, name, description, image, url) VALUES (-1, NULL, NULL, '-', NULL, NULL, NULL); INSERT INTO ibf_css (cssid, css_name, css_text) VALUES (1, 'Invision Style Sheet', NULL); INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (1, ':)', 'smile.gif', 1); INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (2, ':(', 'sad.gif', 1); INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (3, ':D', 'biggrin.gif', 1); INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (5, ':o', 'ohno.gif', 1); INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (6, ':crazy:', 'crazy.gif', 1); INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (7, ':laugh:', 'laugh.gif', 1); INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (8, ':hmmm:', 'hmmm.gif', 1); INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (9, ':rolleyes:', 'rolleyes.gif', 1); INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (10, ';)', 'wink.gif', 1); INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (11, ':p', 'tongue.gif', 1); INSERT INTO ibf_faq (id, title, text, description) VALUES (1, 'Registration benefits', 'To be able to use all the features on this board, the administrator will probably require that you register for a member account. Registration is free and only takes a moment to complete.\r
\r
During registration, the adminstrator requires that you supply a valid email address. This is important as the administrator may require that you validate your registration via an email. If this is the case, you will be notified when registering.\r
In some cases, the administrator will need to approve your regsitration before you can use your member account fully. If this is the case you will be notified during registration.\r
\r
Once you have registered and logged in, you will have access to your private messenger and your control panel.\r
\r
For more information on these items, please see the relevant sections in this documentation.', 'How to register and the added benefits of being a registered member.'); INSERT INTO ibf_faq (id, title, text, description) VALUES (2, 'Cookies and cookie usage', 'Using cookies is optional, but strongly recommended. Cookies are used to track topics, showing you which topics have new replies since your last visit and to automatically log you in when you return.\r
\r
This board will also allow you to remove the long session id\'s found in the URL\'s. You can do this by entering your control panel (click the link at the top of the board) and entering the \'Board Settings\' section. It is recommended that you enable this feature because you may experience problems if your internet connection shares a proxy and you share a link with another user. If in doubt, choose to hide the session id.\r
\r
Clearing Cookies\r
\r
You can clear the cookies at any time by clicking on the link found at the bottom of the main board page (the first page you see when returning to the board). If this does not work for you, you may need to remove the cookies manually.\r
\r
Removing Cookies in Internet Explorer for Windows\r
\r
\r
\r
Removing Cookies in Internet Explorer for Macintosh\r
\r
\r
\r
Your cookies should now be removed. In some cases you may need to restart your computer for the changes to take effect.', 'The benefits of using cookies and how to remove cookies set by this board.'); INSERT INTO ibf_faq (id, title, text, description) VALUES (3, 'Recovering lost or forgotten passwords', 'Security is a big feature on this board, and to that end, all passwords are encrypted when you register.\r
This means that we cannot email your password to you as we hold no record of your \'uncrypted\' password. You can however, apply to have your password reset.\r
\r
To do this, click on the Lost Password link found on the log in page.\r
\r
Further instruction is available from there.', 'How to reset your password if you\'ve forgotton it.'); INSERT INTO ibf_faq (id, title, text, description) VALUES (4, 'Your Control Panel', 'Your control panel is your own private board console. You can change how the board looks and feels as well as your own information from here.\r
\r
Edit Profile Info\r
\r
This section allows you to add or edit your contact information and enter some personal information if you choose. All of this information is optional and can be omitted.\r
\r
Edit Signature\r
\r
A board \'signature\' is very similar to an email signature. This signature is attached to the foot of every message you post unless you choose to check the box that allows you to ommit the signature in the message you are posting. You may use BB Code if available and in some cases, pure HTML (if the board administrator allows it).\r
\r
Edit Avatar Settings\r
\r
An avatar is a little image that appears under your username when you view a topic or post you authored. If the administrator allows, you may either choose from the board gallery, enter a URL to an avatar stored on your server or upload an avatar to use. You may also set the width of the avatar to ensure that it\'s sized in proportion.\r
\r
Email Settings\r
\r
Hide my email address allows you to deny the ability for other users to send you an email from the board.\r
Send me updates sent by the board administrator will allow the administrator to include your email address in any mailings they send out - this is used mostly for important updates and community information.\r
Include a copy of the post when emailing me from a subscribed topic, this allows you to have the new post included in any reply to topic notifications.\r
\r
Board Settings\r
\r
From this section, you can set your timezone, choose to not see users signatures, avatars and posted images.\r
You can choose to get a pop up window informing you when you have a new message and hide the long session ID in links (see the \'Cookies\' help file for more infomation on this).\r
\r
Skins and Languages\r
\r
If available, you can choose a skin style and language choice. This affects how the board is displayed so you may wish to preview the skin before submitting the form.\r
\r
Change Email Address\r
\r
At any time, you can change the email address that is registered to your account. In some cases, you will need to revalidate your account after changing your email address. If this is the case, you will be notified before your email address change is processed.\r
\r
Change Password\r
\r
You may change your password from this section. Please note that you will need to know your current password before you can change your password.\r
\r
View Subsciptions\r
\r
This is where you manage your topic subscriptions. Please see the help file \'Email Notification of new messages\' for more information on how to subscribe to topics.', 'Editing contact information, personal information, avatars, signatures, board settings, languages and style choices.'); INSERT INTO ibf_faq (id, title, text, description) VALUES (5, 'Email Notification of new messages', 'This board can notify you when a new reply is added to a topic. Many users find this useful to keep up to date on topics without the need to view the board to check for new messages.\r
\r
To do this, simply click on the \'Track This Topic\' link found at the top and bottom of any topic. When you click this link, the topic will be added to your subscriptions that are managed from your control panel.\r
\r
Please note that to avoid multiple emails being sent to your email address, you will only get notified once per day of new replies.', 'How to get emailed when a new reply is added to a topic.'); INSERT INTO ibf_faq (id, title, text, description) VALUES (6, 'Your Personal Messenger', 'Your personal messenger acts much like an email account in that you can send and receive messages and store messages in folders.\r
\r
Send a new PM\r
\r
This will allow you to send a message to another member. If you have names in your contact list, you can choose a name from it - or you may choose to enter a name in the relevant form field. This will be automatically filled in if you clicked a \'PM\' button on the board (from the memberlist or a post).\r
If the administrator allows, you may use BB Code and HTML in your private message. If you choose to check the \'Add a copy of this message to you sent items folder\' box, a copy of the message will be saved for you for later reference. If you check the \'Get notified when this message is read\' box, you will receive a PM informing you when the message was read for your records.\r
\r
Contact List\r
\r
You may add in users names in this section, or edit any saved entries. You can also use this as a ban list, denying the named member the ability to message you.\r
Names entered in this section will appear in the drop down list when sending a new PM, allowing you to quickly choose the members name when sending a message.\r
\r
Edit Folders\r
\r
You may rename, add or remove folders to store messages is, allowing you to organise your messages to your preference. You cannot remove \'Sent Items\' or \'Inbox\'.\r
\r
Go to Inbox\r
\r
Your inbox is where all new messages are sent to. Clicking on the message title will show you the message in a similar format to the board topic view. You can also delete or move messages from your inbox.\r
\r
Archive Messages\r
\r
If your messenger folders are full and you are unable to receive new messages, you can archive them off. This compiles the messages into a single HTML page or Microsoft © Excel Format. This page is then emailed to your registered email address for your convenience.\r
\r
', 'How to send personal messages, edit your messenger folders and archive stored messages.'); INSERT INTO ibf_faq (id, title, text, description) VALUES (7, 'Contacting the moderating team', 'If you need to contact a moderator or simply wish to view the complete administration team, you can click the link \'The moderating team\' found at the top of the main board page (the first page you see when visiting the board).\r
\r
This list will show you administrators (those who have administration control panel access), global moderators (those who can moderate in all forums) and the moderators of the individual forums.\r
\r
If you wish to contact someone about your member account, then contact an administrator - if you wish to contact someone about a post or topic, contact either a global moderator or the forum moderator.', 'Where to find a list of the board moderators and administrators.'); INSERT INTO ibf_faq (id, title, text, description) VALUES (8, 'Viewing members profile information', 'You can view a members profile at any time by clicking on their name when it is underlined (as a link) or by clicking on their name in a post within a topic.\r
\r
This will show you their profile page which contains their contact information (if they have entered some) and their \'active stats\'.', 'How to view members contact information.'); INSERT INTO ibf_faq (id, title, text, description) VALUES (9, 'Viewing todays active topics', 'You can view which new topics have new replies today by clicking on the \'Todays Active Topics\' link found on the main board page (the first page you see when visiting the board).\r
\r
You can set your own date critera, choosing to view all topics with new replies during several date choices.', 'How to view all the topics which have a new reply today'); INSERT INTO ibf_faq (id, title, text, description) VALUES (10, 'Searching Topics and Posts', 'The search feature is designed to allow you to quickly find topics and posts that contain the keywords you enter.\r
\r
The \'Simple Search\' option from the drop down box allows you to enter a single keyword or phrase to search by - the advanced option allows you to join keywords with \'AND\', \'OR\' to fine tune the search. Using this option will make the search slightly slower.\r
\r
The bottom section of the form allows you to further fine tune the search. You can choose a category to search in, or a forum - or choose all forums to search in.\r
\r
If you enter a name into the \'Search by member name\' section, all posts started or replied in by this member are returned.', 'How to use the search feature.'); INSERT INTO ibf_faq (id, title, text, description) VALUES (11, 'Logging in and out', 'If you have chosen not to remember your log in details in cookies, or you are accessing the board on another computer, you will need to log into the board to access your member profile and post with your registered name.\r
\r
When you log in, you have the choice to save cookies that will log you in automatically when you return. Do not use this option on a shared computer for security.\r
\r
You can also choose to hide - this will keep your name from appearing in the active users list.\r
\r
Logging out is simply a matter of clicking on the \'Log Out\' link that is displayed when you are logged in. If you find that you are not logged out, you may need to manually remove your cookies. See the \'Cookies\' help file for more information.', 'How to log in and out from the board and how to remain anonymous and not be shown on the active users list.'); INSERT INTO ibf_groups (g_id, g_view_board, g_mem_info, g_other_topics, g_use_search, g_email_friend, g_invite_friend, g_edit_profile, g_post_new_topics, g_reply_own_topics, g_reply_other_topics, g_edit_posts, g_delete_own_posts, g_open_close_posts, g_delete_own_topics, g_post_polls, g_vote_polls, g_use_pm, g_is_supmod, g_access_cp, g_title, g_can_remove, g_append_edit, g_access_offline, g_avoid_q, g_avoid_flood, g_icon, g_attach_max, g_avatar_upload, g_calendar_post, prefix, suffix) VALUES (4, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 'Admin', 0, 1, 1, 1, 1, '', 5000, 1, 1, '', ''); INSERT INTO ibf_groups (g_id, g_view_board, g_mem_info, g_other_topics, g_use_search, g_email_friend, g_invite_friend, g_edit_profile, g_post_new_topics, g_reply_own_topics, g_reply_other_topics, g_edit_posts, g_delete_own_posts, g_open_close_posts, g_delete_own_topics, g_post_polls, g_vote_polls, g_use_pm, g_is_supmod, g_access_cp, g_title, g_can_remove, g_append_edit, g_access_offline, g_avoid_q, g_avoid_flood, g_icon, g_attach_max, g_avatar_upload, g_calendar_post, prefix, suffix) VALUES (2, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, 'Guests', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL); INSERT INTO ibf_groups (g_id, g_view_board, g_mem_info, g_other_topics, g_use_search, g_email_friend, g_invite_friend, g_edit_profile, g_post_new_topics, g_reply_own_topics, g_reply_other_topics, g_edit_posts, g_delete_own_posts, g_open_close_posts, g_delete_own_topics, g_post_polls, g_vote_polls, g_use_pm, g_is_supmod, g_access_cp, g_title, g_can_remove, g_append_edit, g_access_offline, g_avoid_q, g_avoid_flood, g_icon, g_attach_max, g_avatar_upload, g_calendar_post, prefix, suffix) VALUES (3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, NULL, NULL, NULL, 1, 1, 1, 0, 0, 'Members', 0, 1, 0, 0, 0, NULL, NULL, 1, 0, NULL, NULL); INSERT INTO ibf_groups (g_id, g_view_board, g_mem_info, g_other_topics, g_use_search, g_email_friend, g_invite_friend, g_edit_profile, g_post_new_topics, g_reply_own_topics, g_reply_other_topics, g_edit_posts, g_delete_own_posts, g_open_close_posts, g_delete_own_topics, g_post_polls, g_vote_polls, g_use_pm, g_is_supmod, g_access_cp, g_title, g_can_remove, g_append_edit, g_access_offline, g_avoid_q, g_avoid_flood, g_icon, g_attach_max, g_avatar_upload, g_calendar_post, prefix, suffix) VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Validating', 0, 1, 0, 0, 0, NULL, 0, 0, 0, NULL, NULL); INSERT INTO ibf_images (imid, setname, A_LOCKED_B, A_MOVED_B, A_POLL, A_POLLONLY_B, A_POST, A_REPLY, A_STAR, B_HOT, B_HOT_NN, B_LOCKED, B_MOVED, B_NEW, B_NORM, B_PIN, B_POLL, B_POLL_NN, C_LOCKED, C_OFF, C_OFF_CAT, C_OFF_RES, C_ON, C_ON_CAT, C_ON_RES, F_ACTIVE, F_NAV_SEP, F_NAV, F_STATS, GO_LAST_ON, GO_LAST_OFF, M_ADDMEM, M_DELETE, M_READ, M_REPLY, M_UNREAD, P_AOL, P_DELETE, P_EDIT, P_EMAIL, P_ICQ, P_MSG, P_PROFILE, P_QUOTE, P_WEBSITE, CAT_IMG, B_HOT_DOT, B_NEW_DOT, B_HOT_NN_DOT, B_NORM_DOT, B_POLL_DOT, B_POLL_NN_DOT, NEW_POST) VALUES (1, 'Invision Board Image Set', '\'\'', '\'\'', '\'\'', '[ Poll Only ]', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', ' ->', '\'\'', '\'\'', '', '', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '[ Profile ]', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'Goto'); INSERT INTO ibf_members (id, name, mgroup, password, email, joined, ip_address, avatar, avatar_size, posts, photo, aim_name, icq_number, location, signature, website, yahoo, title, allow_admin_mails, time_offset, interests, hide_email, email_pm, email_full, skin, warn_level, language, msnname, last_post, allow_post, view_sigs, view_img, view_avs, view_pop, bday_day, bday_month, bday_year, new_msg, msg_from_id, msg_msg_id, msg_total, vdirs, show_popup, validate_key, prev_group, new_pass, misc, last_visit, last_activity) VALUES (0, 'Guest', 2, '', 'guest@ibforums.com', 0, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 1, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, 0); INSERT INTO ibf_skins (uid, sname, sid, set_id, tmpl_id, img_id, css_id, tbl_width, tbl_border, hidden, default_set) VALUES (1, 'Invision Board', 0, 1, 1, 1, 1, '95%', '#999999', 0, 1); INSERT INTO ibf_stats (TOTAL_REPLIES, TOTAL_TOPICS, LAST_MEM_NAME, LAST_MEM_ID, MOST_DATE, MOST_COUNT, MEM_COUNT) VALUES (0, 0, NULL, '0', '0', '0', '0' ); INSERT INTO ibf_templates (tmid, template, name) VALUES (1, ' <% TITLE %> <% GENERATOR %> <% CSS %> <% JAVASCRIPT %> <% BOARD HEADER %><% NAVIGATION %><% BOARD %><% STATS %><% COPYRIGHT %>', 'Invision Board Standard'); INSERT INTO ibf_titles (id, posts, title, pips) VALUES (1, 0, 'Newbie', '1'); INSERT INTO ibf_titles (id, posts, title, pips) VALUES (2, 10, 'Member', '2'); INSERT INTO ibf_titles (id, posts, title, pips) VALUES (4, 30, 'Advanced Member', '3'); INSERT INTO ibf_tmpl_names (skid, skname, author, email, url) VALUES (1, 'Invision Board Templates', 'Invision Board', 'skins@invisionboard.com', 'http://www.invisionboard.com'); INSERT INTO ibf_languages (`lid`, `ldir`, `lname`, `lauthor`, `lemail`) VALUES ('', 'en', 'English', 'Invision Board', 'languages@invisionboard.com'); \ No newline at end of file diff --git a/schematic/tables.sql b/schematic/tables.sql new file mode 100644 index 00000000..140ee7cf --- /dev/null +++ b/schematic/tables.sql @@ -0,0 +1 @@ +CREATE TABLE ibf_admin_sessions ( ID varchar(32) NOT NULL default '', IP_ADDRESS varchar(32) NOT NULL default '', MEMBER_NAME varchar(32) NOT NULL default '', MEMBER_ID varchar(32) NOT NULL default '', SESSION_KEY varchar(32) NOT NULL default '', LOCATION varchar(64) default 'index', LOG_IN_TIME int(10) NOT NULL default '0', RUNNING_TIME int(10) NOT NULL default '0', PRIMARY KEY (ID) ); CREATE TABLE ibf_attachments ( id bigint(20) NOT NULL auto_increment, mime_type varchar(128) default NULL, file_name varchar(64) default NULL, PRIMARY KEY (id) ); CREATE TABLE ibf_badwords ( wid int(3) NOT NULL auto_increment, type varchar(250) NOT NULL default '', swop varchar(250) default NULL, m_exact tinyint(1) default '0', PRIMARY KEY (wid) ); CREATE TABLE ibf_categories ( id tinyint(3) NOT NULL default '0', position tinyint(3) default NULL, state varchar(10) default NULL, name varchar(128) NOT NULL default '', description text, image varchar(128) default NULL, url varchar(128) default NULL, PRIMARY KEY (id) ); CREATE TABLE ibf_contacts ( id bigint(20) NOT NULL auto_increment, contact_id varchar(32) NOT NULL default '', member_id varchar(32) NOT NULL default '', contact_name varchar(32) NOT NULL default '', allow_msg tinyint(1) default NULL, contact_desc varchar(50) default NULL, PRIMARY KEY (id) ); CREATE TABLE ibf_css ( cssid int(10) NOT NULL auto_increment, css_name varchar(128) NOT NULL default '', css_text text, PRIMARY KEY (cssid) ); CREATE TABLE ibf_emoticons ( id smallint(3) NOT NULL auto_increment, typed varchar(32) NOT NULL default '', image varchar(128) NOT NULL default '', clickable smallint(2) NOT NULL default '1', PRIMARY KEY (id) ); CREATE TABLE ibf_faq ( id bigint(20) NOT NULL auto_increment, title varchar(128) NOT NULL default '', text text, description text NOT NULL, PRIMARY KEY (id) ); CREATE TABLE ibf_forums ( id smallint(5) NOT NULL default '0', topics mediumint(6) default NULL, posts mediumint(6) default NULL, last_post int(10) default NULL, last_poster_id varchar(32) default NULL, last_poster_name varchar(32) default NULL, name varchar(128) NOT NULL default '', description text, position tinyint(2) default NULL, use_ibc tinyint(1) default NULL, use_html tinyint(1) default NULL, status varchar(10) default NULL, start_perms varchar(200) default NULL, reply_perms varchar(200) default NULL, read_perms varchar(200) default NULL, password varchar(32) default NULL, category tinyint(2) NOT NULL default '0', last_title varchar(128) default NULL, last_id smallint(5) default NULL, sort_key varchar(32) default NULL, sort_order varchar(32) default NULL, prune tinyint(3) default NULL, show_rules tinyint(1) default NULL, use_attach tinyint(1) default NULL, preview_posts tinyint(1) default NULL, allow_poll tinyint(1) NOT NULL default '1', allow_pollbump tinyint(1) NOT NULL default '0', inc_postcount tinyint(1) NOT NULL default '1', skin_id int(10) default NULL, parent_id mediumint(5) default '-1', subwrap tinyint(1) default '0', PRIMARY KEY (id), KEY category (category) ); CREATE TABLE ibf_groups ( g_id int(3) unsigned NOT NULL auto_increment, g_view_board tinyint(1) default NULL, g_mem_info tinyint(1) default NULL, g_other_topics tinyint(1) default NULL, g_use_search tinyint(1) default NULL, g_email_friend tinyint(1) default NULL, g_invite_friend tinyint(1) default NULL, g_edit_profile tinyint(1) default NULL, g_post_new_topics tinyint(1) default NULL, g_reply_own_topics tinyint(1) default NULL, g_reply_other_topics tinyint(1) default NULL, g_edit_posts tinyint(1) default NULL, g_delete_own_posts tinyint(1) default NULL, g_open_close_posts tinyint(1) default NULL, g_delete_own_topics tinyint(1) default NULL, g_post_polls tinyint(1) default NULL, g_vote_polls tinyint(1) default NULL, g_use_pm tinyint(1) default NULL, g_is_supmod tinyint(1) default NULL, g_access_cp tinyint(1) default NULL, g_title varchar(32) NOT NULL default '', g_can_remove tinyint(1) default NULL, g_append_edit tinyint(1) default NULL, g_access_offline tinyint(1) default NULL, g_avoid_q tinyint(1) default NULL, g_avoid_flood tinyint(1) default NULL, g_icon varchar(64) default NULL, g_attach_max bigint(20) default NULL, g_avatar_upload tinyint(1) default '0', g_calendar_post tinyint(1) default '0', prefix varchar(250) default NULL, suffix varchar(250) default NULL, PRIMARY KEY (g_id) ); CREATE TABLE ibf_images ( imid int(10) NOT NULL auto_increment, setname varchar(125) NOT NULL default '', A_LOCKED_B varchar(250) default NULL, A_MOVED_B varchar(250) default NULL, A_POLL varchar(250) default NULL, A_POLLONLY_B varchar(250) default NULL, A_POST varchar(250) default NULL, A_REPLY varchar(250) default NULL, A_STAR varchar(250) default NULL, B_HOT varchar(250) default NULL, B_HOT_NN varchar(250) default NULL, B_LOCKED varchar(250) default NULL, B_MOVED varchar(250) default NULL, B_NEW varchar(250) default NULL, B_NORM varchar(250) default NULL, B_PIN varchar(250) default NULL, B_POLL varchar(250) default NULL, B_POLL_NN varchar(250) default NULL, C_LOCKED varchar(250) default NULL, C_OFF varchar(250) default NULL, C_OFF_CAT varchar(250) default NULL, C_OFF_RES varchar(250) default NULL, C_ON varchar(250) default NULL, C_ON_CAT varchar(250) default NULL, C_ON_RES varchar(250) default NULL, F_ACTIVE varchar(250) default NULL, F_NAV_SEP varchar(250) default NULL, F_NAV varchar(250) default NULL, F_STATS varchar(250) default NULL, GO_LAST_ON varchar(250) default NULL, GO_LAST_OFF varchar(250) default NULL, M_ADDMEM varchar(250) default NULL, M_DELETE varchar(250) default NULL, M_READ varchar(250) default NULL, M_REPLY varchar(250) default NULL, M_UNREAD varchar(250) default NULL, P_AOL varchar(250) default NULL, P_DELETE varchar(250) default NULL, P_EDIT varchar(250) default NULL, P_EMAIL varchar(250) default NULL, P_ICQ varchar(250) default NULL, P_MSG varchar(250) default NULL, P_PROFILE varchar(250) default NULL, P_QUOTE varchar(250) default NULL, P_WEBSITE varchar(250) default NULL, CAT_IMG varchar(250) default NULL, B_HOT_DOT varchar(250) default NULL, B_NEW_DOT varchar(250) default NULL, B_HOT_NN_DOT varchar(250) default NULL, B_NORM_DOT varchar(250) default NULL, B_POLL_DOT varchar(250) default NULL, B_POLL_NN_DOT varchar(250) default NULL, NEW_POST varchar(250) default NULL, PRIMARY KEY (imid) ); CREATE TABLE ibf_member_extra ( id bigint(20) NOT NULL default '0', notes text, links text, bio text, ta_size char(3) default NULL, PRIMARY KEY (id) ); CREATE TABLE ibf_members ( id bigint(10) NOT NULL default '0', name varchar(32) NOT NULL default '', mgroup tinyint(2) NOT NULL default '0', password varchar(32) NOT NULL default '', email varchar(60) NOT NULL default '', joined int(10) NOT NULL default '0', ip_address varchar(16) NOT NULL default '', avatar varchar(128) default NULL, avatar_size varchar(9) default NULL, posts mediumint(7) default '0', photo varchar(70) default NULL, aim_name varchar(40) default NULL, icq_number varchar(40) default NULL, location varchar(128) default NULL, signature text, website varchar(70) default NULL, yahoo varchar(32) default NULL, title varchar(64) default NULL, allow_admin_mails tinyint(1) default NULL, time_offset varchar(10) default NULL, interests text, hide_email varchar(8) default NULL, email_pm tinyint(1) default NULL, email_full tinyint(1) default NULL, skin smallint(5) default NULL, warn_level int(10) default NULL, language varchar(32) default NULL, msnname varchar(64) default NULL, last_post int(10) default NULL, allow_post tinyint(1) default '1', view_sigs tinyint(1) default '1', view_img tinyint(1) default '1', view_avs tinyint(1) default '1', view_pop tinyint(1) default '1', bday_day int(2) default NULL, bday_month int(2) default NULL, bday_year int(4) default NULL, new_msg tinyint(2) default NULL, msg_from_id varchar(32) default NULL, msg_msg_id int(10) default NULL, msg_total smallint(5) default NULL, vdirs text, show_popup tinyint(1) default NULL, validate_key varchar(32) default NULL, prev_group smallint(3) default '0', new_pass varchar(32) default NULL, misc varchar(128) default NULL, last_visit int(10) default '0', last_activity int(10) default '0', dst_in_use tinyint(1) default '0', PRIMARY KEY (id), KEY name (name), KEY mgroup (mgroup) ); CREATE TABLE ibf_messages ( msg_id bigint(20) NOT NULL auto_increment, msg_date int(10) default NULL, read_state tinyint(1) default NULL, title varchar(128) default NULL, message text, from_id varchar(32) default NULL, vid varchar(32) default NULL, member_id varchar(32) NOT NULL default '0', recipient_id varchar(32) default NULL, attach_type tinyint(128) default NULL, attach_file tinyint(128) default NULL, PRIMARY KEY (msg_id), KEY member_id (member_id) ); CREATE TABLE ibf_moderator_logs ( id bigint(20) NOT NULL auto_increment, forum_id int(5) default '0', topic_id bigint(20) default '0', post_id bigint(20) default '0', member_id varchar(32) NOT NULL default '', member_name varchar(32) NOT NULL default '', ip_address varchar(32) default NULL, http_referer varchar(255) default NULL, ctime int(10) default NULL, topic_title varchar(128) default NULL, action varchar(128) default NULL, query_string varchar(128) default NULL, PRIMARY KEY (id) ); CREATE TABLE ibf_moderators ( mid bigint(20) NOT NULL auto_increment, forum_id int(5) NOT NULL default '0', member_name varchar(32) NOT NULL default '', member_id varchar(32) NOT NULL default '0', edit_post tinyint(1) default NULL, edit_topic tinyint(1) default NULL, delete_post tinyint(1) default NULL, delete_topic tinyint(1) default NULL, view_ip tinyint(1) default NULL, open_topic tinyint(1) default NULL, close_topic tinyint(1) default NULL, mass_move tinyint(1) default NULL, mass_prune tinyint(1) default NULL, move_topic tinyint(1) default NULL, pin_topic tinyint(1) default NULL, unpin_topic tinyint(1) default NULL, post_q tinyint(1) default NULL, topic_q tinyint(1) default NULL, allow_warn tinyint(1) default NULL, edit_user tinyint(1) NOT NULL default '0', PRIMARY KEY (mid) ); CREATE TABLE ibf_polls ( pid bigint(20) NOT NULL auto_increment, tid bigint(20) NOT NULL default '0', start_date int(10) default NULL, choices text, starter_id varchar(32) default NULL, votes bigint(20) default NULL, forum_id bigint(20) default NULL, PRIMARY KEY (pid) ); CREATE TABLE ibf_posts ( pid bigint(20) NOT NULL auto_increment, author_id int(10) default NULL, author_name varchar(32) default NULL, use_sig varchar(8) default NULL, use_emo varchar(8) default NULL, ip_address varchar(32) default NULL, post_date int(10) default NULL, icon_id smallint(3) default NULL, post text, queued tinyint(1) default NULL, topic_id bigint(20) default NULL, forum_id int(10) default NULL, attach_id varchar(64) default NULL, attach_hits int(10) default NULL, attach_type varchar(128) default NULL, attach_file varchar(255) default NULL, post_title varchar(255) default NULL, new_topic tinyint(1) default '0', PRIMARY KEY (pid), KEY forum_id (forum_id), KEY topic_id (topic_id,author_id), KEY author_id (author_id) ); CREATE TABLE ibf_rules ( fid mediumint(6) NOT NULL default '0', title varchar(128) NOT NULL default '', body text, updated int(10) default NULL, show_all tinyint(1) default NULL, PRIMARY KEY (fid) ); CREATE TABLE ibf_search_results ( id varchar(32) NOT NULL default '', topics text NOT NULL, search_date int(12) NOT NULL default '0', max_hits int(3) NOT NULL default '0', sort_key varchar(32) NOT NULL default 'last_post', sort_order varchar(4) NOT NULL default 'desc' ); CREATE TABLE ibf_sessions ( id varchar(32) NOT NULL default '0', member_name varchar(64) default NULL, member_pass varchar(32) default NULL, member_id varchar(32) default NULL, ip_address varchar(16) default NULL, start_session int(10) default NULL, browser varchar(64) default NULL, running_time int(10) default NULL, login_type tinyint(1) default NULL, location varchar(40) default NULL, member_group smallint(3) default NULL, PRIMARY KEY (id) ); CREATE TABLE ibf_skins ( uid int(10) NOT NULL auto_increment, sname varchar(100) NOT NULL default '', sid int(10) NOT NULL default '0', set_id int(5) NOT NULL default '0', tmpl_id int(10) NOT NULL default '0', img_id int(10) NOT NULL default '1', css_id int(10) NOT NULL default '1', tbl_width varchar(250) default NULL, tbl_border varchar(250) default NULL, hidden tinyint(1) NOT NULL default '0', default_set tinyint(1) NOT NULL default '0', PRIMARY KEY (uid) ); CREATE TABLE ibf_stats ( TOTAL_REPLIES bigint(20) NOT NULL default '0', TOTAL_TOPICS bigint(20) NOT NULL default '0', LAST_MEM_NAME varchar(32) default NULL, LAST_MEM_ID varchar(32) default NULL, MOST_DATE int(10) default NULL, MOST_COUNT int(10) default '0', MEM_COUNT bigint(20) default '0' ); CREATE TABLE ibf_templates ( tmid int(10) NOT NULL auto_increment, template mediumtext, name varchar(128) default NULL, PRIMARY KEY (tmid) ); CREATE TABLE ibf_titles ( id smallint(5) NOT NULL auto_increment, posts int(10) default NULL, title varchar(128) default NULL, pips varchar(128) default NULL, PRIMARY KEY (id) ); CREATE TABLE ibf_tmpl_names ( skid int(10) NOT NULL auto_increment, skname varchar(60) NOT NULL default 'Invision Board', author varchar(250) default '', email varchar(250) default '', url varchar(250) default '', PRIMARY KEY (skid) ); CREATE TABLE ibf_topics ( tid bigint(20) NOT NULL auto_increment, title varchar(70) NOT NULL default '', description varchar(70) default NULL, state varchar(8) default NULL, posts smallint(4) default NULL, starter_id varchar(32) default NULL, start_date int(10) default NULL, last_poster_id varchar(32) default NULL, last_post int(10) default NULL, icon_id tinyint(2) default NULL, starter_name varchar(32) default NULL, last_poster_name varchar(32) default NULL, poll_state varchar(8) default NULL, last_vote int(10) default NULL, views smallint(5) default NULL, forum_id smallint(5) default NULL, approved tinyint(1) default NULL, author_mode tinyint(1) default NULL, pinned tinyint(1) default NULL, moved_to varchar(64) default NULL, rating text, total_votes int(5) NOT NULL default '0', PRIMARY KEY (tid), KEY forum_id (forum_id) ); CREATE TABLE ibf_tracker ( trid bigint(20) NOT NULL auto_increment, member_id varchar(32) NOT NULL default '', topic_id bigint(20) NOT NULL default '0', start_date int(10) default NULL, last_sent int(10) NOT NULL default '0', PRIMARY KEY (trid) ); CREATE TABLE ibf_voters ( vid bigint(20) NOT NULL auto_increment, ip_address varchar(16) NOT NULL default '', vote_date int(10) NOT NULL default '0', tid bigint(20) NOT NULL default '0', member_id varchar(32) default NULL, forum_id bigint(20) default NULL, PRIMARY KEY (vid) ); CREATE TABLE ibf_languages ( lid bigint(20) NOT NULL auto_increment, ldir varchar(64) NOT NULL, lname varchar(250) NOT NULL, lauthor varchar(250) default NULL, lemail varchar(250) default NULL, PRIMARY KEY (lid) ); \ No newline at end of file diff --git a/upload/Skin/s1/ModCPView.php b/upload/Skin/s1/ModCPView.php new file mode 100644 index 00000000..1c46c9d9 --- /dev/null +++ b/upload/Skin/s1/ModCPView.php @@ -0,0 +1,664 @@ + + {$ibforums->lang['q_t_n']} + +EOF; +} + +function endcp() { +global $ibforums; +return << + + + + + +EOF; +} + +function post_none() { +global $ibforums; +return << + {$ibforums->lang['q_p_n']} + +EOF; +} + +function end_forum_splash() { +global $ibforums; +return << + + + +EOF; +} + +function post_form_header($count) { +global $ibforums; +return << + {$ibforums->lang['q_posts']} $count + +EOF; +} + +function prune_form_header() { +global $ibforums; +return << + {$ibforums->lang['search_prune']} + + + + {$ibforums->lang['define_search']} +
+ + + + + + + + {$ibforums->lang['s_prune_cutoff']} + + + + {$ibforums->lang['s_prune_perpage']} + + + +
+ +EOF; +} + +function show_post_results($data) { +global $ibforums; +return << + + {$ibforums->lang['a_topic_results']}
+ {$ibforums->lang['a_topic_deleted']} {$data[DELETED]}

+ {$ibforums->lang['a_topic_approved']} {$data[APPROVED]}

+ {$ibforums->lang['a_topic_left']} {$data[LEFT]}

+ + +EOF; +} + +function topic_header($data) { +global $ibforums; +return << + {$ibforums->lang['f_moderate']} {$data[FORUM_NAME]}
{$ibforums->lang['f_moderate_t']} +
+ + + + + + + + + + + + + + +
+ + + + + + + +EOF; +} + +function open_form_header() { +global $ibforums; +return << + + + + + + + + + + + + + + + + + + + + +EOF; +} + +function render_topic_post($data) { +global $ibforums; +return << + + + +EOF; +} + +function online_menu() { +global $ibforums; +return << + + + + + + + + + + + + + + + + + + +EOF; +} + +function show_topic_results($data) { +global $ibforums; +return << + + +EOF; +} + +function main_splash() { +global $ibforums; +return << + + + + + +EOF; +} + +function search_header($data) { +global $ibforums; +return << + + + + + +
{$ibforums->lang['tt_action']}{$ibforums->lang['st_topic']}{$ibforums->lang['st_posts']}{$ibforums->lang['st_last']}
{$ibforums->lang['search_openclose']} $count
+ {$ibforums->lang['define_search']} + + + + + +
{$ibforums->lang['s_topics_cutoff']}
{$ibforums->lang['s_sort']}
{$ibforums->lang['s_limit']}
+ + + + + +
{$data[POST]}->{'MEMBER_NAME'}{$ibforums->lang['ss_posted_on']} {$data[POST]}->{'POST_DATE'}
{$data[POST]}->{'POST'} ( {$ibforums->lang['ss_read_more']} )
+
{$ibforums->lang['m_moderate']}
vars['php_ext']}?s={$ibforums->session_id}&act=ModCP&f=$iB::IN{'f'}'>{$ibforums->lang['m_approve']}
vars['php_ext']}?s={$ibforums->session_id}&act=ModCP&f=$iB::IN{'f'};CODE=prune'>{$ibforums->lang['m_prune']}
vars['php_ext']}?s={$ibforums->session_id}&act=ModCP&f=$iB::IN{'f'};CODE=delete'>{$ibforums->lang['m_delete']}
vars['php_ext']}?s={$ibforums->session_id}&act=ModCP&f=$iB::IN{'f'};CODE=open'>{$ibforums->lang['m_open']}
vars['php_ext']}?s={$ibforums->session_id}&act=ModCP&f=$iB::IN{'f'};CODE=move'>{$ibforums->lang['m_move']}
+ {$ibforums->lang['a_post_results']}
+ {$ibforums->lang['a_post_deleted']} {$data[DELETED]}

+ {$ibforums->lang['a_post_approved']} {$data[APPROVED]}

+ {$ibforums->lang['a_post_left']} {$data[LEFT]}

+
{$ibforums->lang['mod_forum_t']}
{$ibforums->lang['mod_forum']}
+ + + + +
+ + + + + + + +EOF; +} + +function move_form_header() { +global $ibforums; +return << + + + + + + + + + + + + + + + + + + + + +EOF; +} + +function delete_form_header() { +global $ibforums; +return << + + + + + + + + + + + + + + + + + + + + +EOF; +} + +function render_cat($data) { +global $ibforums; +return << + + +EOF; +} + +function topic_footer() { +global $ibforums; +return << + + +
{$ibforums->lang['forum_name']}{$ibforums->lang['forum_topics']}{$ibforums->lang['forum_posts']}{$ibforums->lang['last_post']}
{$ibforums->lang['search_move']}
+ {$ibforums->lang['define_search']} +
+ + + + +
{$ibforums->lang['s_topics_cutoff']}
{$ibforums->lang['s_sort']}
{$ibforums->lang['s_limit']}
{$ibforums->lang['search_delete']} $count
+ {$ibforums->lang['define_search']} +
+ + + + +
{$ibforums->lang['s_topics_cutoff']}
{$ibforums->lang['s_sort']}
{$ibforums->lang['s_limit']}
{$data[CAT_NAME]}
+
+EOF; +} + +function show_move_results($data) { +global $ibforums; +return << +
+ {$ibforums->lang['a_topic_results']}
+ {$ibforums->lang['a_topic_d_left']} {$data[leave]}

+ {$ibforums->lang['a_topic_moved']} {$data[move]}

+
{$ibforums->lang['f_moderate']} {$data[FORUM_NAME]}
{$ibforums->lang['f_moderate_t']} +
+ + + + +
+ + + + + + + + +EOF; +} + +function foot() { +global $ibforums; +return << + +
+ + + + + +EOF; +} + +function move_ops($html, $forum_name) { +global $ibforums; +return << + + +EOF; +} + +function read_post($data) { +global $ibforums; +return << + + + +
{$ibforums->lang['tt_action']}{$ibforums->lang['tt_details']}
+ + + + + + + + +
{$ibforums->lang['move_topics_from']} $forum_name {$ibforums->lang['to']}: + + + + + + $html
{$ibforums->lang['delete_old']} + +
+
+ + + + +
{$data[POST]}
+
+EOF; +} + +function forum_splash($data) { +global $ibforums; +return << +
{$ibforums->lang['f_moderate']} {$data[FORUM_NAME]}
{$ibforums->lang['f_moderate_t']}
+ + + + +EOF; +} + +function offline_menu() { +global $ibforums; +return << + + +EOF; +} + +function end_main_splash() { +global $ibforums; +return << + + +
+ +EOF; +} + +function show_open_results($data) { +global $ibforums; +return << + + +EOF; +} + +function render_topic_title($data) { +global $ibforums; +return << + + +EOF; +} + +function render_forum($data) { +global $ibforums; +return << + + + + +EOF; +} + +function render_newtopic($data) { +global $ibforums; +return << + + + + + +EOF; +} + +function topic_form() { +global $ibforums; +return << + + + + + + + + + + + + + + + + + +EOF; +} + +function render_opentopic($data) { +global $ibforums; +return << + + + + + +EOF; +} + +function post_form() { +global $ibforums; +return << + + + + + + + + + + + + + + + + + +EOF; +} + +function startcp() { +global $ibforums; +return << + + +
+ {$ibforums->lang['a_topic_results']}
+ {$ibforums->lang['a_topic_open']} {$data[open]}

+ {$ibforums->lang['a_topic_close']} {$data[closed]}

+
{$ibforums->lang['ss_topic_title']} {$data[TOPIC_TITLE]}
{$data[FORUM_NAME]}
{$ibforums->lang['topic_to_mod']} {$data[TOPICS_NOT_APPROVED]}
{$data[FORUM_TOPICS]}{$data[FORUM_POSTS]}{$data[FORUM_LAST_POST]} +
{$ibforums->lang['ss_topic_title']} {$data[TOPIC]}->{'TOPIC_TITLE'}
+ + + + + +
{$data[TOPIC]}->{'TOPIC_STARTER_N'}{$ibforums->lang['ss_posted_on']} {$data[TOPIC]}->{'TOPIC_START_DATE'}
{$data[POST]}->{'POST'} ( {$ibforums->lang['ss_read_more']} )
+
+ {$ibforums->lang['define_search']} + + + + + +
{$ibforums->lang['s_topics_cutoff']}
{$ibforums->lang['s_sort']}
{$ibforums->lang['s_limit']}
{$data[SELECT]}{$data[TOPIC_TITLE]}
{$data[TOPIC_DESC]}
{$data[TOPIC_POSTS]}{$data[TOPIC_LAST_DATE]}
{$ibforums->lang['st_by']} {$data[LAST_POSTER]}
+ {$ibforums->lang['define_search']} +
+ + + + +
{$ibforums->lang['s_posts_cutoff']}
{$ibforums->lang['s_sort']}
{$ibforums->lang['s_limit']}
+ + + + +
+ + + + + +
{$ibforums->lang['menu']}
+
+ + + + + +EOF; +} + +function show_delete_results($data) { +global $ibforums; +return << + + +EOF; +} + +function search_footer() { +global $ibforums; +return << + + +
{$ibforums->lang['display']}
+ {$ibforums->lang['a_topic_results']}
+ {$ibforums->lang['a_topic_d_delete']} {$data[delete]}

+
+
+EOF; +} + +function topic_form_header($count) { +global $ibforums; +return << +
{$ibforums->lang['q_topics']} $count
{$ibforums->lang['menu_off']}
+EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/ReportView.php b/upload/Skin/s1/ReportView.php new file mode 100644 index 00000000..bb31baf3 --- /dev/null +++ b/upload/Skin/s1/ReportView.php @@ -0,0 +1,101 @@ + +
{$ibforums->lang['message']}

{$ibforums->lang['warn']}
+ +
+
+ +EOF; +} + +function header($data) { +global $ibforums; +return << + + + + + + + + + + + + + + + +EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_boards.php b/upload/Skin/s1/skin_boards.php new file mode 100644 index 00000000..e96ba238 --- /dev/null +++ b/upload/Skin/s1/skin_boards.php @@ -0,0 +1,201 @@ + +
+
+ + + + + + + + + + + + +EOF; +} + +function sent_screen($member_name) { +global $ibforums; +return << + + + +
{$ibforums->lang['title']}
{$ibforums->lang['in_forum']}{$data[FORUM]}->{'FORUM_NAME'}
{$ibforums->lang['in_topic']}{$data[TOPIC]}->{'TOPIC_TITLE'}
+ + + + + + + + + + + + +
{$ibforums->lang['email_sent']}
{$ibforums->lang['email_sent']}
{$ibforums->lang['email_sent_txt']} $member_name
+
+EOF; +} + +function guest() { +global $ibforums; +return << +
{$ibforums->lang['name']}
{$ibforums->lang['email']}
+ + + + + + + +
+ + + + + +
+ + + + +EOF; +} + +function ActiveUsers($active) { +global $ibforums; +return << + + + + + + +EOF; +} + +function ShowStats($text) { +global $ibforums; +return << + + + + + + +EOF; +} + +function birthdays($birthusers="", $total="", $birth_lang="") { +global $ibforums; +return << + + + + + + +EOF; +} + +function stats_footer() { +global $ibforums; +return << + + +
{$ibforums->lang['board_stats']}
$active[TOTAL] {$ibforums->lang['active_users']}
{$ibforums->skin['F_ACTIVE']}{$active[GUESTS]} {$ibforums->lang['guests']}, $active[MEMBERS] {$ibforums->lang['public_members']} $active[ANON] {$ibforums->lang['anon_members']} {$active[LINK]}
{$active[NAMES]}
{$ibforums->lang['board_stats']}
{$ibforums->skin['F_STATS']}$text
{$ibforums->lang['most_online']}
{$ibforums->lang['birthday_header']}
{$ibforums->skin['F_ACTIVE']}$total $birth_lang
$birthusers
+ +
+ +EOF; +} + +function BoardInformation() { +global $ibforums; +return << + + + + +
[ {$ibforums->lang['d_delete_cookies']} ] :: [ {$ibforums->lang['d_post_read']} ]
+EOF; +} + +function CatHeader_Expanded($Data) { +global $ibforums; +return << +
+ + + + + +
{$ibforums->skin['CAT_IMG']}{$Data['name']}
+
+ + + + + + + + +EOF; +} + +function subheader() { +global $ibforums; +return << + + + +
{$ibforums->lang['cat_name']}{$ibforums->lang['topics']}{$ibforums->lang['replies']}{$ibforums->lang['last_post_info']}
+ + + + + + + + +EOF; +} + +function end_this_cat() { +global $ibforums; +return << + + +
{$ibforums->lang['cat_name']}{$ibforums->lang['topics']}{$ibforums->lang['replies']}{$ibforums->lang['last_post_info']}
 
+
+
+EOF; +} + +function end_all_cats() { +global $ibforums; +return << +
--> +EOF; +} + +function newslink( $fid="", $title="", $tid="" ) { +global $ibforums; +return <<{$ibforums->vars['board_name']} {$ibforums->lang['newslink']} $title
+EOF; +} + +function PageTop($lastvisit) { +global $ibforums; +return << +
{$ibforums->lang['welcome_back_text']} $lastvisit + {$ibforums->lang['sm_forum_leaders']} | + {$ibforums->lang['sm_todays_posts']}
+ {$ibforums->lang['sm_today_posters']} | + {$ibforums->lang['sm_all_posters']} +
+EOF; +} + +function ForumRow($info) { +global $ibforums; +return << + + {$info['img_new_post']} + {$info['name']}
{$info['description']}
{$info['moderator']} + {$info['topics']} + {$info['posts']} + {$info['last_post']}
{$ibforums->lang['in']}: {$info['last_topic']}
{$ibforums->lang['by']}: {$info['last_poster']} + + +EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_emails.php b/upload/Skin/s1/skin_emails.php new file mode 100644 index 00000000..75d0be32 --- /dev/null +++ b/upload/Skin/s1/skin_emails.php @@ -0,0 +1,214 @@ + + + + + {$ibforums->lang['name']} + + + + {$ibforums->lang['email']} + + + + {$ibforums->lang['msg']} + + + + + + +EOF; +} + +function end_table() { +global $ibforums; +return << + + + + +   + + +EOF; +} + +function pager_header($data) { +global $ibforums; +return << + + + + + +EOF; +} + +function aol_body($data) { +global $ibforums; +return << +
{$data[TITLE]}
+
Download AIMAIM Remote
Send me an Instant Message
Add me to Your Buddy List
Add Remote to Your Page
Download AOL Instant Messenger

+ +EOF; +} + +function forward_form($title, $text, $lang) { +global $ibforums; +return << + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
{$ibforums->lang['title']}
{$ibforums->lang['send_lang']}$lang
{$ibforums->lang['to_name']}
{$ibforums->lang['to_email']}
{$ibforums->lang['subject']}
{$ibforums->lang['message']} +
+ +
+
+ +EOF; +} + +function show_address($data) { +global $ibforums; +return << + + + + + + + + + + + +
{$ibforums->lang['send_email_to']} {$data[NAME]}
{$ibforums->lang['show_address_text']}
>>{$ibforums->lang['send_email_to']} {$data[NAME]}
+ + + +EOF; +} + +function send_form($data) { +global $ibforums; +return << + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
{$ibforums->lang['send_title']}
{$ibforums->lang['send_email_to']} {$data[NAME]}
{$ibforums->lang['subject']} +
{$ibforums->lang['message']}

{$ibforums->lang['msg_txt']}
+
+ +
+
+ +EOF; +} + +function sent_screen($member_name) { +global $ibforums; +return << + + + + + + + + + + +
{$ibforums->lang['email_sent']}
{$ibforums->lang['email_sent_txt']} $member_name
+ + + +EOF; +} + +function forum_jump($data) { +global $ibforums; +return << + + $data + + +EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_forum.php b/upload/Skin/s1/skin_forum.php new file mode 100644 index 00000000..d7fb24f5 --- /dev/null +++ b/upload/Skin/s1/skin_forum.php @@ -0,0 +1,280 @@ +vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id};act=SF&f=$Data' method='post'> + + + + + + + + +
+ + + + + + + + + + + + + + +
{$ibforums->lang['need_password']}
{$ibforums->lang['need_password_txt']}
{$ibforums->lang['enter_pass']}
+
+ +EOF; +} + +function Mod_Panel($data) { +global $ibforums; +return << + + + + +
vars['php_ext']}?s={$ibforums->session_id}&act=ModCP&f=$data'>{$ibforums->lang['mod_cp']}
+EOF; +} + +function show_rules_full($rules) { +global $ibforums; +return << +
+ + + + +
{$rules['title']}

{$rules['body']}
+
+ +EOF; +} + +function show_rules_link($rules) { +global $ibforums; +return << +
+ + + + +
>>vars['php_ext']}?s={$ibforums->session_id}&act=SR&f={$rules['fid']}'>{$rules['title']}
+
+ +EOF; +} + +function TableEnd($Data) { +global $ibforums; +return << + + + + + + + + +
+ + + + + +
{$ibforums->lang['showing_text']}{$ibforums->lang['sort_text']} 
+
+ + + + + + + + + +
{$Data[SHOW_PAGES]}vars['php_ext']}?s={$ibforums->session_id}&act=Post&CODE=00&f={$Data['id']}'>{$ibforums->skin['A_POST']}{$Data[POLL_BUTTON]}
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
{$ibforums->skin['B_NEW']}{$ibforums->lang['pm_open_new']} {$ibforums->skin['B_POLL']}{$ibforums->lang['pm_poll']}  + + + vars['php_ext']}' name='search'> + + + + + + + + + +
{$ibforums->lang['search_forum']} 
+
+ {$Data[FORUM_JUMP]} +
{$ibforums->skin['B_NORM']}{$ibforums->lang['pm_open_no']} {$ibforums->skin['B_POLL_NN']}{$ibforums->lang['pm_poll_no']} 
{$ibforums->skin['B_HOT']}{$ibforums->lang['pm_hot_new']} {$ibforums->skin['B_LOCKED']}{$ibforums->lang['pm_locked']} 
{$ibforums->skin['B_HOT_NN']}{$ibforums->lang['pm_hot_no']} {$ibforums->skin['B_MOVED']}{$ibforums->lang['pm_moved']} 
+EOF; +} + +function show_rules($rules) { +global $ibforums; +return << +
+ + + + +
+ + + + + + + + + + +
{$rules['title']}
{$rules['body']}
>>{$ibforums->lang['back_to_forum']}
+
+
+ +EOF; +} + +function page_title($title="", $pages="") { +global $ibforums; +return << + + $title$pages + + +EOF; +} + +function PageTop($info) { +global $ibforums; +return << + + + + + +
{$info['SHOW_PAGES']}vars['php_ext']}?s={$ibforums->session_id}&act=Post&CODE=00&f={$info['id']}'>{$ibforums->skin['A_POST']}{$info[POLL_BUTTON]}
+ + + vars['php_ext']}?s={$ibforums->session_id}' method='POST'> + + + + + + +
+ + + + + +
{$info['name']}
+
+ + + + + + + + + + + +EOF; +} + +function show_no_matches() { +global $ibforums; +return << + + +EOF; +} + +function RenderRow($Data) { +global $ibforums; +return << + + + + + + + + + + +EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_global.php b/upload/Skin/s1/skin_global.php new file mode 100644 index 00000000..2fbf0f4e --- /dev/null +++ b/upload/Skin/s1/skin_global.php @@ -0,0 +1,273 @@ +lang['logged_in_as']} {$ibforums->member['name']} ( vars['php_ext']}?s={$ibforums->session_id}&act=UserCP&CODE=00'>{$ibforums->lang['your_cp']} | vars['php_ext']}?s={$ibforums->session_id}&act=Login&CODE=03'>{$ibforums->lang['log_out']} | vars['php_ext']}?s={$ibforums->session_id}&act=Msg&CODE=01'>{$msg[TEXT]} ) +EOF; +} + +function BoardHeader($time="") { +global $ibforums; +return << + + + + + + + +
+ + + + + + + {$ibforums->lang['h_topic_title']} ( vars['php_ext']}?s={$ibforums->session_id}&act=Login&CODE=04&f={$info['id']}'>{$ibforums->lang['mark_as_read']} ){$ibforums->lang['h_topic_starter']}{$ibforums->lang['h_replies']}{$ibforums->lang['h_hits']}{$ibforums->lang['h_last_action']}
+
+ {$ibforums->lang['no_topics']} +

+
{$Data['folder_img']}{$Data['topic_icon']} + + + + + +
{$Data['go_new_post']}{$Data['prefix']} vars['php_ext']}?act=ST&f={$Data['forum_id']}&t={$Data['tid']}&s={$ibforums->session_id}' id='linkthru' title='{$ibforums->lang['topic_started_on']} {$Data['start_date']}'>{$Data['title']} {$Data[PAGES]}
+ {$Data['description']}
{$Data['starter']}{$Data['posts']}{$Data['views']}{$Data['last_post']}
vars['php_ext']}?s={$ibforums->session_id}&act=ST&f={$Data['forum_id']}&t={$Data['tid']}&view=getlastpost'>{$Data['last_text']} {$Data['last_poster']}
Powered by IBForums
+ + + + + +
+ <% MEMBER BAR %> + vars['php_ext']}?s={$ibforums->session_id}&act=Search&f={$ibforums->input['f']}' style='text-decoration:none'> Search | vars['php_ext']}?s={$ibforums->session_id}&act=Members' style='text-decoration:none'> Member List | vars['php_ext']}?s={$ibforums->session_id}&act=Help' style='text-decoration:none'> Help
+
+
+EOF; +} + +function start_nav() { +global $ibforums; +return << +
{$ibforums->skin['F_NAV']}
+EOF; +} + +function Redirect($Text, $Url) { +global $ibforums; +return << + +{$ibforums->lang['stand_by']} +vars['php_ext']}$Url'> + + + + + + + + +
+ + + + +
+ + + + +
+ {$ibforums->lang['thanks']}, + $Text

+ {$ibforums->lang['transfer_you']}

+ (vars['php_ext']}$Url'>{$ibforums->lang['dont_wait']})
+
+
+ + +EOF; +} + +function PM_popup() { +global $ibforums; +return << + + +EOF; +} + +function Guest_bar() { +global $ibforums; +return <<lang['guest_stuff']} ( vars['php_ext']}?s={$ibforums->session_id}&act=Login&CODE=00'>{$ibforums->lang['log_in']} | vars['php_ext']}?s={$ibforums->session_id}&act=Reg&CODE=00'>{$ibforums->lang['register']} ) +EOF; +} + +function admin_link() { +global $ibforums; +return <<vars['php_ext']}' target='_blank'>{$ibforums->lang['admin_cp']} ) +EOF; +} + +function error_log_in($q_string) { +global $ibforums; +return <<vars['php_ext']}' method='post'> + + + + + + + + + +
+ + + + + + + + + + + + + + +
{$ibforums->lang['er_log_in_title']}
{$ibforums->lang['erl_enter_name']}
{$ibforums->lang['erl_enter_pass']}
+ +
+
+ +EOF; +} + +function board_offline($message = "") { +global $ibforums; +return << + + + + + + + +
{$ibforums->lang['offline_title']}
+ + + + + + + + + + + + + vars['php_ext']}' method='post'> + + + + + + + + + + + + + + + + +

$message

{$ibforums->lang['offline_login']}
{$ibforums->lang['erl_enter_name']}
{$ibforums->lang['erl_enter_pass']}
+ + +EOF; +} + +function Error($message, $ad_email_one="", $ad_email_two="") { +global $ibforums; +return << + + + + + + + + + + +
+ + + + + +
{$ibforums->lang['error_title']}
+
+ + + + + + + +
+ {$ibforums->lang['exp_text']}

+ {$ibforums->lang['msg_head']} +

+ $message +

+ +

+ Useful Links: +

+ • {$ibforums->lang['er_lost_pass']}
+ • {$ibforums->lang['er_register']}
+ • {$ibforums->lang['er_help_files']}
+ • {$ibforums->lang['er_contact_admin']}

+
< {$ibforums->lang['error_back']}
+
+EOF; +} + +function Member_no_usepm_bar() { +global $ibforums; +return <<lang['logged_in_as']} {$ibforums->member['name']} ( vars['php_ext']}?s={$ibforums->session_id}&act=UserCP&CODE=00'>{$ibforums->lang['your_cp']} | vars['php_ext']}?s={$ibforums->session_id}&act=Login&CODE=03'>{$ibforums->lang['log_out']} ) +EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_help.php b/upload/Skin/s1/skin_help.php new file mode 100644 index 00000000..1ac7583c --- /dev/null +++ b/upload/Skin/s1/skin_help.php @@ -0,0 +1,89 @@ + + + vars['php_ext']}?act=Help&s={$ibforums->session_id}&CODE=01&HID={$entry['id']}'>{$entry['title']}
{$entry['description']} + + +EOF; +} + +function display($text) { +global $ibforums; +return << + + $text + + +EOF; +} + +function end() { +global $ibforums; +return << + + + +EOF; +} + +function no_results() { +global $ibforums; +return << + {$ibforums->lang['no_results']} + +EOF; +} + +function start($one_text, $two_text, $three_text) { +global $ibforums; +return << + $two_text + + + + + + +
+ + + + + + + +
$one_text
+
+ + + + {$ibforums->lang['search_txt']}    +
+
+
+
+ + + + +
+ + + + +EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_legends.php b/upload/Skin/s1/skin_legends.php new file mode 100644 index 00000000..098a1ce2 --- /dev/null +++ b/upload/Skin/s1/skin_legends.php @@ -0,0 +1,73 @@ + + + +EOF; +} + + +function page_header( $title, $row1, $row2 ) { +global $ibforums; +return << + + + + +
$three_text
+ + + + + + + + + + +EOF; + +} + +function emoticons_row($code, $image) { +global $ibforums; +return << + + + + + +EOF; + +} + +function page_footer() { + +return << + + +
$title
$row1$row2
$code$image
+ +EOF; + +} + + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_login.php b/upload/Skin/s1/skin_login.php new file mode 100644 index 00000000..bba4048d --- /dev/null +++ b/upload/Skin/s1/skin_login.php @@ -0,0 +1,132 @@ + +
+ + + + + +
+ + + + + + + + +
{$ibforums->lang['log_out']}

{$ibforums->lang['log_out_txt']}
+ +
+
+
+EOF; +} + +function errors($data) { +global $ibforums; +return << +
+ + + + +
{$ibforums->lang['errors_found']}
$data
+
+
+EOF; +} + +function ShowForm($message) { +global $ibforums; +return << + + +
+ + + + + + + +
{$ibforums->lang['login_text']}
{$ibforums->lang['forgot_pass']} vars['php_ext']}?act=Reg&CODE=10'>{$ibforums->lang['pass_link']}
+
+ + + + + + + + +
+ + + + + + + + + + + + +
$message
{$ibforums->lang['enter_name']}
{$ibforums->lang['enter_pass']}
+
+
+ + +
+ + + + + + + + + + + + + +
{$ibforums->lang['options']}
{$ibforums->lang['cookies']}{$ibforums->lang['cookie_yes']}
{$ibforums->lang['cookie_no']}
{$ibforums->lang['privacy']}{$ibforums->lang['anon_name']}
+ +
+
+
+EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_mlist.php b/upload/Skin/s1/skin_mlist.php new file mode 100644 index 00000000..6ac42971 --- /dev/null +++ b/upload/Skin/s1/skin_mlist.php @@ -0,0 +1,122 @@ + + + + + + + + +
{$links[SHOW_PAGES]}
+ + + + + + + + + + +
+   +
+ + + + + + + + + + + +EOF; +} + +function end($links) { +global $ibforums; +return << + + + +
{$ibforums->lang['member_name']}{$ibforums->lang['member_level']}{$ibforums->lang['member_group']}{$ibforums->lang['member_joined']}{$ibforums->lang['member_posts']}{$ibforums->lang['member_email']}{$ibforums->lang['member_aol']}{$ibforums->lang['member_icq']}
{$links[SHOW_PAGES]}
+EOF; +} + +function no_results() { +global $ibforums; +return << +EOF; +} + +function Page_end() { +global $ibforums; +return << + +
vars['php_ext']}?s={$ibforums->session_id};act=Members' method='POST'> + + +
{$ibforums->lang['sorting_text']} 
+
+EOF; +} + +function show_row($member) { +global $ibforums; +return << + + {$member[MEMBER_NAME]} + {$member[MEMBER_PIPS_IMG]} + {$member[MEMBER_GROUP]} + {$member[MEMBER_JOINED]} + {$member[MEMBER_POSTS]} + {$member[MEMBER_EMAIL]} + {$member[AOLNAME]} + {$member[ICQNUMBER]} + + +EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_mod.php b/upload/Skin/s1/skin_mod.php new file mode 100644 index 00000000..9904f458 --- /dev/null +++ b/upload/Skin/s1/skin_mod.php @@ -0,0 +1,678 @@ +base_url}' method='POST'> + + + + + + + + + + + + + + + + + +EOF; +} + + + +function pm_popup($text) { +global $ibforums; +return << + + + +
{$ibforums->lang['cp_mod_posts_title2']} $forumname +
$pages +
+ + + + + +EOF; +} + + +function modpost_topicstart($forumname, $fid) { +global $ibforums; +return << + + + + + + + + + +EOF; +} + +function delete_js() { +global $ibforums; +return << + + + +EOF; +} + +function topictitle_fields($title, $desc) { +global $ibforums; +return << + + + + + + + + + +EOF; +} + +function poll_entry($id, $entry) { +global $ibforums; + +return << + + + + +EOF; + +} + + +function poll_select_form() { +global $ibforums; + +return << + + + + +EOF; + +} + + +function table_top($posting_title) { +global $ibforums; +return << + + + + + + + +EOF; +} + + + } // end class + +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_msg.php b/upload/Skin/s1/skin_msg.php new file mode 100644 index 00000000..e4d5e1fc --- /dev/null +++ b/upload/Skin/s1/skin_msg.php @@ -0,0 +1,521 @@ + +
$title
+ + + + + + + + +EOF; +} + + + +function modtopics_start($pages,$forumname, $fid) { +global $ibforums; +return << + + + + + + + + + + +EOF; +} + + +function mod_topic_title($title, $topic_id) { +global $ibforums; +return << +
{$ibforums->lang['cp_mod_posts_title2']} $forumname +
+ + + + + + + + +EOF; +} + +function modpost_topicentry($title, $tid, $replies, $fid) { +global $ibforums; +return << + + + + + + +EOF; +} + +function modpost_topicend() { +global $ibforums; +return << + + +
{$ibforums->lang['cp_3_title']}{$ibforums->lang['cp_3_replies']}{$ibforums->lang['cp_3_approveall']}{$ibforums->lang['cp_3_viewall']}
$title$replies{$ibforums->lang['cp_3_approveall']}{$ibforums->lang['cp_3_viewall']}
+
+ + + + + +EOF; +} + +function modtopics_end() { +global $ibforums; +return << + + +
{$ibforums->lang['cp_mod_topics_title2']} $forumname +
$pages +
  {$ibforums->lang['cp_1_selected']}  
+
+ + + + + +EOF; +} + + +function mod_postentry($data) { +global $ibforums; +return << + + + + + +EOF; +} + +function mod_postentry_checkbox($pid) { +global $ibforums; +return << + + + +EOF; +} + + +function mod_topic_spacer() { +global $ibforums; +return << + + + + + + +EOF; +} + +function results($text) { +global $ibforums; +return << + + + +EOF; +} + + +function prune_confirm($tcount, $count, $link, $link_text) { +global $ibforums; +return << + + + +EOF; +} + +function prune_splash($forum, $forums, $select) { +global $ibforums; +return << + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EOF; +} + + + + +function edit_user_form($profile) { +global $ibforums; +return << + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EOF; +} + + +function find_two($select) { +global $ibforums; +return << + + + + + + + + + + + + + + + + +EOF; +} + + +function find_user() { +global $ibforums; +return << + + + + + + + + + + + + + + + + +EOF; +} + + +function splash($tcount, $pcount, $forum) { +global $ibforums; +return << + + + + + + + + + +EOF; +} + + + + + + + +function mod_exp($words) { +global $ibforums; +return << + + + + +EOF; +} + +function end_form($action) { +global $ibforums; +return << +
   $title
{$data['member']['name']}

{$data['member']['avatar']}
{$data['member']['MEMBER_GROUP']}
{$data['member']['MEMBER_POSTS']}
{$data['member']['MEMBER_JOINED']}
+ {$ibforums->lang['posted_on']} {$data['msg']['post_date']}

+ + {$data['msg']['post']} + +
  {$ibforums->lang['cp_3_postno']} $pid
+   +
+ + + + + + + +
{$ibforums->lang['cp_results']} +
$text
+
+ + + + + + + + + + + + + + + +
{$ibforums->lang['cp_check_result']} +
{$ibforums->lang['cp_check_text']} +
{$ibforums->lang['cp_total_topics']}$tcount
{$ibforums->lang['cp_total_match']}$count
$link_text
+
{$ibforums->lang['cp_prune']} {$forum['name']}
{$ibforums->lang['cp_prune_text']}
{$ibforums->lang['cp_action']}
{$ibforums->lang['cp_prune_days']}
{$ibforums->lang['cp_prune_type']}$select
{$ibforums->lang['cp_prune_replies']}
{$ibforums->lang['cp_prune_member']}
{$ibforums->lang['cp_edit_user']}: {$profile['name']}
{$ibforums->lang['cp_remove_av']}
{$ibforums->lang['cp_edit_website']}
{$ibforums->lang['cp_edit_location']}
{$ibforums->lang['cp_edit_interests']}
{$ibforums->lang['cp_edit_signature']}
{$ibforums->lang['cp_edit_user']}
{$ibforums->lang['cp_find_2_user']}$select
{$ibforums->lang['cp_edit_user']}
{$ibforums->lang['cp_find_user']}
{$ibforums->lang['cp_welcome']}
{$ibforums->lang['cp_welcome_text']}
+ + + + + + + + + + + + + +
{$ibforums->lang['cp_mod_in']}$forum
{$ibforums->lang['cp_topics_wait']}$tcount
{$ibforums->lang['cp_posts_wait']}$pcount
+
$words
+ +
+
+ + + +EOF; +} + +function move_form($jhtml, $forum_name) { +global $ibforums; +return << +
{$ibforums->lang[move_from]} $forum_name {$ibforums->lang[to]}:
{$ibforums->lang['leave_link']} + +
{$ibforums->lang[edit_f_title]}
{$ibforums->lang[edit_f_desc]}
{$ibforums->lang['pe_option']} $id
{$ibforums->lang['pe_pollonly']} $id
+ + + + + + +EOF; +} + + +function forum_jump($data, $menu_extra="") { + +global $ibforums; +return << +
$posting_title
+ + + +
{$data}
+
+EOF; + +} + +function Menu_bar($base_url, $fid) { +global $ibforums; +return << + + +
+ + + + + + + + +
  
+ + + + + + + + + + + + +
{$ibforums->lang['cp_mod_topics_title']}
{$ibforums->lang['cp_mod_topics']}
{$ibforums->lang['cp_mod_posts']}
+ + + +
+ + + + + + + + +
{$ibforums->lang['cp_manage_posts']}
{$ibforums->lang['cp_prune_posts']}
+ + + +
+ + + + + + + + +
{$ibforums->lang['cp_mod_users_title']}
{$ibforums->lang['cp_user_edit']}
+ +
+ + + + + +EOF; +} + + +function CP_end() { +global $ibforums; +return << +
+
+ + + +EOF; +} + +function mod_error($msg="") { +global $ibforums; +return << +
{$ibforums->lang['cp_error']}
$msg
+ + + +
+ + + + + + + +
{$ibforums->lang['pm_preview']}
$data
+
+
+ + + + + + + + + +
{$ibforums->lang['pmp_title']}
$text
{$ibforums->lang['pmp_go_inbox']} ( {$ibforums->lang['pmp_thiswindow']} )

{$ibforums->lang['pmp_ignore']}
+EOF; +} + +function archive_html_header() { +global $ibforums; +return << + + Private Message Archive + + +EOF; +} + +function archive_html_entry($info) { +global $ibforums; +return << + + + + + + + + + + + + +
{$info['msg_title']}
{$info['msg_content']}
Sent by {$info['msg_sender']} on {$info['msg_date']}
+ + + +
+EOF; +} + +function archive_html_footer() { +global $ibforums; +return << + +EOF; +} + +function archive_complete() { +global $ibforums; +return <<{$ibforums->lang['arc_comp_title']}
{$ibforums->lang['arc_complete']} + +EOF; +} + +function archive_form($jump_html="") { +global $ibforums; +return <<{$ibforums->lang['archive_title']}
{$ibforums->lang['archive_text']} + + + +
+ + + + + + + {$ibforums->lang['arc_folders']} + $jump_html + + + {$ibforums->lang['arc_dateline']} +   {$ibforums->lang['arc_days']} + + + {$ibforums->lang['arc_max']} + + + + {$ibforums->lang['arc_delete']} + + + + {$ibforums->lang['arc_type']} + + + + + +
+EOF; +} + +function No_msg_inbox() { +global $ibforums; +return << + {$ibforums->lang['inbox_no_msg']} + +EOF; +} + +function prefs_add_dirs() { +global $ibforums; +return << + {$ibforums->lang['prefs_new']} + + + {$ibforums->lang['prefs_text_b']} + +EOF; +} + +function end_address_table() { +global $ibforums; +return << +EOF; +} + +function Address_header() { +global $ibforums; +return <<{$ibforums->lang['address_current']} + +EOF; +} + +function Address_none() { +global $ibforums; +return << + {$ibforums->lang['address_none']} + +EOF; +} + +function address_edit($data) { +global $ibforums; +return <<{$ibforums->lang['member_edit']} + + + + + + + + + + + + + + + + + + +
{$data[MEMBER]['contact_name']}{$ibforums->lang['enter_desc']}
{$ibforums->lang['allow_msg']}
{$data[SELECT]}
+ + +EOF; +} + +function render_address_row($entry) { +global $ibforums; +return << + vars['php_ext']}?s={$ibforums->session_id}&act=Profile&CODE=03&MID={$entry['contact_id']}'>{$entry['contact_name']}    [ {$entry['contact_desc']} ] + + [ vars['php_ext']}?s={$ibforums->session_id}&act=Msg&CODE=11&MID={$entry['contact_id']}' class='misc'>{$ibforums->lang['edit']} ] :: [ vars['php_ext']}?s={$ibforums->session_id}&act=Msg&CODE=10&MID={$entry['contact_id']}'>{$ibforums->lang['delete']} ] +   ( {$entry['text']} ) + + +EOF; +} + +function address_add($mem_to_add) { +global $ibforums; +return << + {$ibforums->lang['member_add']} + + + + + + + + + + + + + + + + + +
{$ibforums->lang['enter_a_name']}
{$ibforums->lang['enter_desc']}
{$ibforums->lang['allow_msg']}
+ + +EOF; +} + +function prefs_footer() { +global $ibforums; +return << + + +EOF; +} + +function prefs_row($data) { +global $ibforums; +return << + {$data[EXTRA]} + +EOF; +} + +function Address_table_header() { +global $ibforums; +return << + + + + + + +EOF; +} + +function Render_msg($data) { +global $ibforums; +return <<{$data['msg']['title']}
{$data['msg']['msg_date']} +
+ + + + + + + + + + +EOF; +} + +function inbox_table_header($dirname, $info) { +global $ibforums; +return << + + +
+ + + +
+ + + + + + + + + + + +EOF; +} + +function send_form_footer() { +global $ibforums; +return << + + + + + + + + + + +EOF; +} + +function Send_form($data) { +global $ibforums; +return << + + + + + + + + + + + + + + + + + + + + + + +EOF; +} + +function prefs_header() { +global $ibforums; +return <<{$ibforums->lang['prefs_current']} + + + + + + + + +EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_online.php b/upload/Skin/s1/skin_online.php new file mode 100644 index 00000000..b8ef56eb --- /dev/null +++ b/upload/Skin/s1/skin_online.php @@ -0,0 +1,98 @@ + +
{$ibforums->lang['member_name']}{$ibforums->lang['enter_block']}
+ vars['php_ext']}?s={$ibforums->session_id}&CODE=04&act=Msg&MID={$data['member']['id']}&MSID={$data['msg']['msg_id']}'>{$ibforums->skin[M_REPLY]} +   + vars['php_ext']}?s={$ibforums->session_id}&CODE=02&act=Msg&MID={$data['member']['id']}'>{$ibforums->skin[M_ADDMEM]} +   + vars['php_ext']}?s={$ibforums->session_id}&CODE=05&act=Msg&MSID={$data['msg']['msg_id']}&VID={$data['member']['VID']}'>{$ibforums->skin[M_DELETE]} +
+ + + + + + + + + + + + +
{$ibforums->lang['author']}{$ibforums->lang['m_pmessage']}
{$data['member']['name']}
{$data['member']['avatar']}
{$data['member']['title']}
{$data['member']['MEMBER_GROUP']}
{$data['member']['MEMBER_POSTS']}
{$data['member']['MEMBER_JOINED']}
+ + {$data['msg']['message']} + {$data['member']['signature']} + +
{$data['member']['MESSAGE_ICON']}{$data['member']['EMAIL_ICON']}{$data['member']['WEBSITE_ICON']}{$data['member']['ICQ_ICON']}{$data['member']['AOL_ICON']}{$data['member']['YAHOO_ICON']}
+
+
+ + + + {$ibforums->lang[goto_folder]}:  {$data['jump']} + + +
$dirname
{$ibforums->lang['total_messages']}: {$info['total_messages']} {$info['full_percent']}
{$ibforums->lang['messages_left']} {$info['space_free']} {$info['full_messenger']}
+ + + + + + + + +EOF; +} + +function inbox_row($data) { +global $ibforums; +return << + + + + + + +EOF; +} + +function end_inbox($vdi_html) { +global $ibforums; +return << + + +
 {$ibforums->lang['message_title']}{$ibforums->lang['message_from']}{$ibforums->lang['message_date']}
{$data['msg']['icon']}vars['php_ext']}?s={$ibforums->session_id}&act=Msg&CODE=03&VID={$data['stat']['current_id']}&MSID={$data['msg']['msg_id']}'>{$data['msg']['title']}vars['php_ext']}?s={$ibforums->session_id}&act=Profile&MID={$data['msg']['from_id']}'>{$data['msg']['from_name']} {$data['msg']['add_to_contacts']}{$data['msg']['date']}
+ $vdi_html {$ibforums->lang['move_or_delete']} {$ibforums->lang['selected_msg']} +
+ +
+ {$ibforums->skin['M_READ']} {$ibforums->lang['icon_read']} +  {$ibforums->skin['M_UNREAD']} {$ibforums->lang['icon_unread']} + +
+ + + + {$ibforums->lang['goto_folder']}:   $vdi_html + +
+
{$ibforums->lang['msg_options']}
  +  {$ibforums->lang['auto_sent_add']} +
 {$ibforums->lang['read_rec_notify']} +
+ + +
{$ibforums->lang['to_whom']}
{$ibforums->lang['address_list']}{$data[CONTACTS]}
{$ibforums->lang['enter_name']}
{$ibforums->lang['enter_message']}
{$ibforums->lang['msg_title']}
{$ibforums->lang['prefs_text_a']}
+ + + +
{$links[SHOW_PAGES]}
+EOF; +} + +function show_row($session) { +global $ibforums; +return << + + {$session['member_name']} + {$session['where_line']} + {$session['running_time']} + {$session['msg_icon']} + + +EOF; +} + +function Page_end($links) { +global $ibforums; +return << + +   + + + + + +
+ + + + +
$links
+EOF; +} + +function Page_header($links) { +global $ibforums; +return << + + + + + + + + +
$links
+
+ + + + + + +EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_post.php b/upload/Skin/s1/skin_post.php new file mode 100644 index 00000000..bd75b4af --- /dev/null +++ b/upload/Skin/s1/skin_post.php @@ -0,0 +1,430 @@ + + + + + + + + + + +EOF; +} + +function table_top($data) { +global $ibforums; +return << + + +
+ + + + + + + +EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_poll.php b/upload/Skin/s1/skin_poll.php new file mode 100644 index 00000000..7f0cbfdf --- /dev/null +++ b/upload/Skin/s1/skin_poll.php @@ -0,0 +1,77 @@ +base_url}&act=Mod&CODE=20&f=$fid&t=$tid">{$ibforums->lang['ba_edit']} ] +EOF; +} + +function delete_link($tid, $fid) { +global $ibforums; +return <<{$ibforums->lang['ba_delete']} ] +EOF; +} + +function Render_row_form($votes, $id, $answer) { +global $ibforums; +return << + + +EOF; +} + +function ShowPoll_header($tid, $edit, $delete) { +global $ibforums; +return << + + + +
+
{$ibforums->lang['member_name']}{$ibforums->lang['where']}{$ibforums->lang['time']} 
 $answer
+ +
+ + + + + + + + +EOF; +} + +function ShowPoll_footer($vote_button) { +global $ibforums; +return << +
$edit   $delete
{$ibforums->lang['poll_s_choices']}{$ibforums->lang['poll_s_votes']}{$ibforums->lang['poll_s_stats']} + $vote_button +
+
+ +EOF; +} + +function Render_row_results($votes, $id, $answer, $percentage, $width) { +global $ibforums; +return << +
$answer$votes [$percentage%]
+ + + + + + + +
+   +
+ + + + +EOF; +} + +function EndForm($data) { +global $ibforums; +return << + + +
$data
  +
+
+EOF; +} + +function smilie_table() { +global $ibforums; +return << + + {$ibforums->lang['click_smilie']} + + + + {$ibforums->lang['all_emoticons']} + + +EOF; +} + +function TopicSummary_bottom() { +global $ibforums; +return << + + {$ibforums->lang['review_topic']} + + + + + + +EOF; +} + +function PostIcons() { +global $ibforums; +return << + {$ibforums->lang['post_icon']} + +                                    
+                                     +
+   [ Use None ] + + +EOF; +} + +function errors($data) { +global $ibforums; +return << + + + + + + +
{$ibforums->lang['errors_found']}
$data
+ + + +
+EOF; +} + +function Upload_field($data) { +global $ibforums; +return << + {$ibforums->lang['upload_title']} + + + {$ibforums->lang['upload_text']} $data + + +EOF; +} + +function topictitle_fields($data) { +global $ibforums; +return << + {$ibforums->lang['tt_topic_settings']} + + + {$ibforums->lang['topic_title']} + + + + {$ibforums->lang['topic_desc']} + + +EOF; +} + +function TopicSummary_body($data) { +global $ibforums; +return << + {$data['author']} + {$ibforums->lang['posted_on']} {$data['date']}
{$data['post']} + +EOF; +} + +function preview($data) { +global $ibforums; +return << + + + + + + +
{$ibforums->lang['post_preview']}
$data
+ + + +
+EOF; +} + +function TopicSummary_top() { +global $ibforums; +return << + +
+ + + + + +
+ + + + + +EOF; +} + +function nameField_reg() { +global $ibforums; +return << +EOF; +} + +function mod_options($jump) { +global $ibforums; +return << + + + + + + +EOF; +} + +function quote_box($data) { +global $ibforums; +return << + + + + + + +EOF; +} + +function postbox_buttons($data) { +global $ibforums; +return << + + + + + + + + + + + + + + + + + + +EOF; +} + +function nameField_unreg($data) { +global $ibforums; +return << + + + + + + +EOF; +} + +function poll_box($data) { +global $ibforums; +return << + + + + + + +EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_printpage.php b/upload/Skin/s1/skin_printpage.php new file mode 100644 index 00000000..97a53065 --- /dev/null +++ b/upload/Skin/s1/skin_printpage.php @@ -0,0 +1,52 @@ +{$ibforums->lang['by']}: {$entry['author_name']} {$this->class['LANG']['on']} {$entry['post_date']} +

+ {$entry['post']} +
+EOF; +} + +function pp_end() { +global $ibforums; +return <<{$ibforums->lang['end']} + + +
{$ibforums->lang['last_posts']}
{$ibforums->lang['tt_options']}
{$ibforums->lang['mod_options']}$jump
{$ibforums->lang['post_to_quote']}
{$ibforums->lang['post_to_quote_txt']} +
{$ibforums->lang['ib_code_buttons']}
{$ibforums->lang['ibf_code_txt']} + + + + + + + + + +
+ + + + + + Close Current Tag
+ + + + + + + + + Close All Tags +
+
{$ibforums->lang['post']}
({$ibforums->lang['check_length']})

+ + + + + + + + +
{$ibforums->lang['enable_emo']}
{$ibforums->lang['enable_sig']}
{$ibforums->lang['unreg_namestuff']}
{$ibforums->lang['guest_name']}
{$ibforums->lang['tt_poll_settings']}
{$ibforums->lang['poll_choices']} + + + + + +
{$ibforums->lang['poll_only']}
+EOF; +} + +function pp_header($forum_name, $topic_title, $topic_starter) { +global $ibforums; +return << + + {$ibforums->vars['board_name']} [Powered by IB Forums] + + + + + + +EOF; +} + +function show_profile($info) { +global $ibforums; +return << + + + + + + + +
+ + {$ibforums->lang['title']} +

+ -{$ibforums->vars['board_name']}
+ +--{$ibforums->lang['forum']}: $forum_name
+ +---{$ibforums->lang['topic']}: $topic_title {$ibforums->lang['start']} $topic_starter +
+
+
+EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_profile.php b/upload/Skin/s1/skin_profile.php new file mode 100644 index 00000000..d02de745 --- /dev/null +++ b/upload/Skin/s1/skin_profile.php @@ -0,0 +1,166 @@ + +
{$ibforums->lang['edit_my_sig']} | + {$ibforums->lang['edit_avatar']} | + {$ibforums->lang['edit_profile']}
{$info['name']}
{$ibforums->lang['find_posts']} | + {$ibforums->lang['add_to_contact']}
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
{$ibforums->lang['active_stats']}
{$ibforums->lang['total_posts']}{$info['posts']}
( {$info['total_pct']}% {$ibforums->lang['total_percent']} )
{$ibforums->lang['posts_per_day']}{$info['posts_day']}
{$ibforums->lang['joined']}{$info['joined']}
{$ibforums->lang['fav_forum']}{$info['fav_forum']}
{$info['fav_posts']} {$ibforums->lang['fav_posts']}
( {$info['percent']}% {$ibforums->lang['fav_percent']} )
{$ibforums->lang['user_local_time']}{$info['local_time']}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{$ibforums->lang['communicate']}
{$ibforums->lang['email']}{$info['email']}
{$ibforums->lang['aim']}{$info['aim_name']}
{$ibforums->lang['icq']}{$info['icq_number']}
{$ibforums->lang['yahoo']}{$info['yahoo']}
{$ibforums->lang['msn']}{$info['msn_name']}
{$ibforums->lang['pm']}{$ibforums->lang['click_here']}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{$ibforums->lang['info']}
{$ibforums->lang['mgroup']}{$info['group_title']}
{$ibforums->lang['mtitle']}{$info['member_title']}
{$ibforums->lang['homepage']}{$info['homepage']}
{$ibforums->lang['birthday']}{$info['birthday']}
{$ibforums->lang['location']}{$info['location']}
{$ibforums->lang['interests']}{$info['interests']}
+
+ + + + + + + + + + + + +
{$ibforums->lang['post_detail']}
{$ibforums->lang['avatar']}{$info['avatar']}
{$ibforums->lang['siggie']}{$info['signature']}
+
<( {$ibforums->lang['back']} )
+
+EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_register.php b/upload/Skin/s1/skin_register.php new file mode 100644 index 00000000..e1075b82 --- /dev/null +++ b/upload/Skin/s1/skin_register.php @@ -0,0 +1,219 @@ + +
+ + + + + + +
{$ibforums->lang['lp_header']}

{$ibforums->lang['lp_text']}
+
+ + +
+ + + + + + + + + +
{$ibforums->lang['complete_form']}
{$ibforums->lang['lp_user_name']}
+ +
+
+
+EOF; +} + +function show_authorise($member) { +global $ibforums; +return << +
+ + + + + + + +
{$ibforums->lang['registration_process']}
{$ibforums->lang['thank_you']} {$member['name']}. {$ibforums->lang['auth_text']} {$member['email']}
+
+EOF; +} + +function show_preview($member) { +global $ibforums; +return << + + + + + + + + + +
{$ibforums->lang['registration_process']}
{$ibforums->lang['thank_you']} {$member['name']}. {$ibforums->lang['preview_reg_text']}
+ + + +EOF; +} + +function show_dumb_form($type="reg") { +global $ibforums; +return << + + +
+
+ + + + + + + +
{$ibforums->lang['dumb_header']}

{$ibforums->lang['dumb_text']}
+
+ + +
+ + + + + + + + + + + + + +
{$ibforums->lang['complete_form']}
{$ibforums->lang['user_id']}
{$ibforums->lang['val_key']}
+ +
+
+
+EOF; +} + +function ShowForm($data) { +global $ibforums; +return << + + +
+
+ + + + + + +
{$ibforums->lang['reg_header']}

{$data['TEXT']}
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
{$ibforums->lang['complete_form']}
{$ibforums->lang['user_name']}
{$ibforums->lang['pass_word']}
{$ibforums->lang['re_enter_pass']}
{$ibforums->lang['email_address']}
{$ibforums->lang['email_address_two']}
+
+
+ + +
+ + + + + + + + +
{$ibforums->lang['terms_service']}
{$ibforums->lang['terms_service_text']}
+ +

{$ibforums->lang['agree_submit']}  +
+ +
+
+
+EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_search.php b/upload/Skin/s1/skin_search.php new file mode 100644 index 00000000..597fc050 --- /dev/null +++ b/upload/Skin/s1/skin_search.php @@ -0,0 +1,292 @@ + + + {$Data['folder_img']} + {$Data['topic_icon']} + + + + + + +
{$Data['go_new_post']}{$Data['prefix']} vars['php_ext']}?act=ST&f={$Data['forum_id']}&t={$Data['tid']}&hl={$Data['keywords']}&s={$ibforums->session_id}' id='linkthru'>{$Data['title']} {$Data[PAGES]}
+ {$Data['description']} + {$Data['forum_name']} + {$Data['starter']} + {$Data['posts']} + {$Data['views']} + {$Data['last_post']}
vars['php_ext']}?s={$ibforums->session_id}&act=ST&f={$Data['forum_id']}&t={$Data['tid']}&view=getlastpost'>{$Data['last_text']} {$Data['last_poster']} + + +EOF; +} + +function end($Data) { +global $ibforums; +return <<  + + + + + + + + + + + +
{$Data[SHOW_PAGES]}
+ + + + + + + + + + + + + +
{$ibforums->skin['B_NEW']} {$ibforums->lang['pm_open_new']}{$ibforums->skin['B_HOT']} {$ibforums->lang['pm_hot_new']}{$ibforums->skin['B_POLL']} {$ibforums->lang['pm_poll']}{$ibforums->skin['B_LOCKED']} {$ibforums->lang['pm_locked']}
{$ibforums->skin['B_NORM']} {$ibforums->lang['pm_open_no']}{$ibforums->skin['B_HOT_NN']} {$ibforums->lang['pm_hot_no']}{$ibforums->skin['B_POLL_NN']} {$ibforums->lang['pm_poll_no']}{$ibforums->skin['B_MOVED']} {$ibforums->lang['pm_moved']}
+EOF; +} + +function Form($forums, $cats) { +global $ibforums; +return << +
+ + + + $hidden_fields +
+ + + + +
+ + + + + + + + + + + + +
{$ibforums->lang['keywords_title']}
{$ibforums->lang['key_search']}{$ibforums->lang['mem_search']}
 

{$ibforums->lang['keysearch_text']}


 {$ibforums->lang['match_name_ex']}
 {$ibforums->lang['match_name_pa']}
+
+ + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + +
{$ibforums->lang['search_options']}
{$ibforums->lang['search_where']}{$ibforums->lang['search_refine']}
+ + + + + + + + + + + + + +
 {$ibforums->lang['search_cats']}$cats
 {$ibforums->lang['search_forums']}$forums
 {$ibforums->lang['in_posts']} {$ibforums->lang['in_topics']}
+
+ + + + + +
+ {$ibforums->lang['search_from']} +
+ +
{$ibforums->lang['and']}  {$ibforums->lang['older']}  {$ibforums->lang['newer']} +
+ {$ibforums->lang['sort_results']}
+ +
{$ibforums->lang['descending']} +
{$ibforums->lang['ascending']} +
+
+
+
+ +EOF; +} + +function active_start($Data) { +global $ibforums; +return << + + +
+ + + + + +
{$ibforums->lang['active_topics']}
{$Data[SHOW_PAGES]}
+
vars['php_ext']}' method='POST' name='dateline' onSubmit='return checkvalues();'> + + + +
+ + + + + + + + + + + + + + + + + + + + + +EOF; +} + +function PageTop($data) { +global $ibforums; +return << + + + + +
+ {$ibforums->lang['active_st_text']} + +   {$ibforums->lang['active_end_text']}   + +    +
+ + + + + + + +
+ + + + + + + + + + +EOF; +} + +function start($Data) { +global $ibforums; +return << +
 {$ibforums->lang['h_topic_title']}{$ibforums->lang['h_forum_name']}{$ibforums->lang['h_topic_starter']}{$ibforums->lang['h_replies']}{$ibforums->lang['h_hits']}{$ibforums->lang['h_last_action']}
+ + + +
{$Data[SHOW_PAGES]}
+ + + + +EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_topic.php b/upload/Skin/s1/skin_topic.php new file mode 100644 index 00000000..5e4f6685 --- /dev/null +++ b/upload/Skin/s1/skin_topic.php @@ -0,0 +1,258 @@ +vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}&act=ModCP&f=$data'>{$ibforums->lang['mod_cp']} ) +EOF; +} + +function report_link($data) { +global $ibforums; +return <<vars['php_ext']}?s={$ibforums->session_id}&act=Report&f={$data[FORUM_ID]}&t={$data[TOPIC_ID]}&p={$data[POST_ID]}'>{$ibforums->lang['snitch_geezer_to_a_copper']} +EOF; +} + +function ip_show($data) { +global $ibforums; +return <<lang['ip']}: $data +EOF; +} + +function golastpost_link($fid, $tid) { +global $ibforums; +return <<{$ibforums->lang['go_new_post']} ) +EOF; +} + +function Mod_Panel($data, $fid, $tid, $modcp=" ") { +global $ibforums; +return << +
+ + + + + + +
+ + + + + + + + + + +EOF; +} + +function active_none() { +global $ibforums; +return << +EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_stats.php b/upload/Skin/s1/skin_stats.php new file mode 100644 index 00000000..aaca7842 --- /dev/null +++ b/upload/Skin/s1/skin_stats.php @@ -0,0 +1,114 @@ +skin['tbl_width']}' align='center'> + + + +
 {$ibforums->lang['h_topic_title']}{$ibforums->lang['h_forum_name']}{$ibforums->lang['h_topic_starter']}{$ibforums->lang['h_replies']}{$ibforums->lang['h_hits']}{$ibforums->lang['h_last_action']}
{$ibforums->lang['active_no_topics']}
{$title}
+EOF; +} + +function group_strip( $group ) { +global $ibforums; +return << +
+ + + + + + + + + + +EOF; +} + +function leader_row($info, $forums) { +global $ibforums; +return << + + + + + +EOF; +} + +function close_strip() { +global $ibforums; +return << + + +
$group
{$ibforums->lang['leader_name']}{$ibforums->lang['leader_forums']}{$ibforums->lang['leader_location']} 
{$info['name']}$forums{$info['location']}{$info['msg_icon']}
+
+EOF; +} + +function top_poster_header() { +global $ibforums; +return << +
+ + + + + + + + +EOF; +} + +function top_poster_row($info) { +global $ibforums; +return << + + + + + + +EOF; +} + +function top_poster_footer($info) { +global $ibforums; +return << + + +
{$ibforums->lang['member']}{$ibforums->lang['member_joined']}{$ibforums->lang['member_posts']}{$ibforums->lang['member_today']}{$ibforums->lang['member_percent']}
{$info['name']}{$info['joined']}{$info['posts']}{$info['tpost']}{$info['today_pct']}%
{$ibforums->lang['total_today']} $info
+
+EOF; +} + +function top_poster_no_info() { +global $ibforums; +return << +
{$ibforums->lang['no_info']}
+ + + + +
$modcp +
vars['php_ext']}'> + + + + + +   +
+
+EOF; +} + +function mod_wrapper($id="", $text="") { +global $ibforums; +return <<$text +EOF; +} + +function TableFooter($data) { +global $ibforums; +return <<
+ + + + +
+ + + + + +
{$ibforums->lang['topic_stats']}vars['php_ext']}?s={$ibforums->session_id}&act=Track&f={$data['FORUM']['id']}&t={$data['TOPIC']['tid']}'>{$ibforums->lang['track_topic']} | + vars['php_ext']}?s={$ibforums->session_id}&act=Forward&f={$data['FORUM']['id']}&t={$data['TOPIC']['tid']}'>{$ibforums->lang['forward']} | + vars['php_ext']}?s={$ibforums->session_id}&act=Print&f={$data['FORUM']['id']}&t={$data['TOPIC']['tid']}'>{$ibforums->lang['print']}
+
+
+ + + + + +
{$data[TOPIC][SHOW_PAGES]}
vars['php_ext']}?s={$ibforums->session_id}&act=SF&f={$data['FORUM']['id']}'>Back to {$data['FORUM']['name']}
{$data[TOPIC][REPLY_BUTTON]}vars['php_ext']}?s={$ibforums->session_id}&act=Post&CODE=00&f={$data[FORUM]['id']}' title='{$ibforums->lang['start_new_topic']}'>{$ibforums->skin['A_POST']}{$data[TOPIC][POLL_BUTTON]}
+
+ + + + +
{$data[FORUM]['JUMP']}
+
+EOF; +} + +function RenderRow($data) { +global $ibforums; +return << +
{$data[POSTER]['name']} + + + + + +
{$data[POST]['post_icon']}{$ibforums->lang['posted_on']} {$data[POST]['post_date']}{$data[POST]['delete_button']}{$data[POST]['edit_button']}vars['php_ext']}?s={$ibforums->session_id}&act=Post&CODE=06&f={$ibforums->input[f]}&t={$ibforums->input[t]}&p={$data[POST]['pid']}'>{$ibforums->skin['P_QUOTE']}
+
+ {$data[POSTER]['avatar']}

+ {$data[POSTER]['title']}
+ {$data[POSTER]['member_rank_img']}

+ {$data[POSTER]['member_group']}
+ {$data[POSTER]['member_posts']}
+ {$data[POSTER]['member_number']}
+ {$data[POSTER]['member_joined']}
+ {$data[POSTER][WARN_GFX]}

+
+
{$data[POST]['post']} {$data[POST]['attachment']} {$data[POST]['signature']}
  + + + + + + +
{$data[POSTER]['message_icon']}{$data[POSTER]['email_icon']}{$data[POSTER]['website_icon']}{$data[POSTER]['icq_icon']}{$data[POSTER]['aol_icon']}{$data[POSTER]['yahoo_icon']}{$data[POSTER]['msn_icon']}{$data[POST]['ip_address']}{$data[POST]['report_link']}Top
+
+ + + + +
{$data['TOPIC']['SHOW_PAGES']} {$data['TOPIC']['go_new']}{$data[TOPIC][REPLY_BUTTON]}vars['php_ext']}?s={$ibforums->session_id}&act=Post&CODE=00&f={$data[FORUM]['id']}' title='{$ibforums->lang['start_new_topic']}'>{$ibforums->skin['A_POST']}{$data[TOPIC][POLL_BUTTON]}
+ + + + + + + + +EOF; +} + +function email_change($txt="") { +global $ibforums; +return <<{$ibforums->lang['change_email_title']} + + +
+ + + +
+ + + + + + + + + + + + + + +EOF; +} + +function pass_change() { +global $ibforums; +return << + + + + + + + + + + + + + + + + + + + + + + + + + +EOF; +} + +function personal_splash() { +global $ibforums; +return <<{$ibforums->lang['personal_ops']} + + + + + + + +EOF; +} + +function member_title($title) { +global $ibforums; +return << + + + +EOF; +} + +function personal_avatar($data, $formextra="", $hidden_field="") { +global $ibforums; +return << + + + +
vars['php_ext']}' method='post' onload='checkTheBox' $formextra name='creator'> + + + + $hidden_field + +
+ + + + + + + + + + + +EOF; +} + +function avatar_upload_field($text="") { +global $ibforums; +return << + + + +EOF; +} + +function personal_avatar_URL($Profile, $avatar, $allowed_ext) { +global $ibforums; +return << + + + + + + + + + + + +EOF; +} + +function personal_avatar_end() { +global $ibforums; +return << + + + + + + + + + +EOF; +} + +function personal_splash_av() { +global $ibforums; +return << + + +EOF; +} + +function signature($sig, $t_sig) { +global $ibforums; +return << + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + +EOF; +} + +function personal_panel($Profile) { +global $ibforums; +return << + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EOF; +} + +function Menu_bar($base_url) { +global $ibforums; +return << +
+ + + + + +
{$data['TOPIC']['title']}{$data['TOPIC']['description']}
+
+ + + + + + +EOF; +} + +function Show_attachments_img($data) { +global $ibforums; +return <<
{$ibforums->lang['pic_attach']}

+
+ + + + + +
« vars['php_ext']}?s={$ibforums->session_id}&act=ST&f={$data[FORUM]['id']}&t={$data[TOPIC]['tid']}&view=old'>{$ibforums->lang['t_old']} | vars['php_ext']}?s={$ibforums->session_id}&act=ST&f={$data[FORUM]['id']}&t={$data[TOPIC]['tid']}&view=new'>{$ibforums->lang['t_new']} » + vars['php_ext']}?s={$ibforums->session_id}&act=Track&f={$data['FORUM']['id']}&t={$data['TOPIC']['tid']}'>{$ibforums->lang['track_topic']} | + vars['php_ext']}?s={$ibforums->session_id}&act=Forward&f={$data['FORUM']['id']}&t={$data['TOPIC']['tid']}'>{$ibforums->lang['forward']} | + vars['php_ext']}?s={$ibforums->session_id}&act=Print&f={$data['FORUM']['id']}&t={$data['TOPIC']['tid']}'>{$ibforums->lang['print']}
+
+ + + +
{$ibforums->lang[
+

+EOF; +} + +function Show_attachments($data) { +global $ibforums; +return <<
+ + + + + + + + +
User Attached Imagevars['php_ext']}?s={$ibforums->session_id}&act=Attach&type=post&id={$data['pid']}' target='_blank'>{$ibforums->lang['attach_dl']}
{$data['name']} ( {$ibforums->lang['attach_hits']}: {$data['hits']} )
+

+EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/Skin/s1/skin_ucp.php b/upload/Skin/s1/skin_ucp.php new file mode 100644 index 00000000..3f095e69 --- /dev/null +++ b/upload/Skin/s1/skin_ucp.php @@ -0,0 +1,919 @@ + +

{$ibforums->lang['birthday']} + + + +
$txt
{$ibforums->lang['ce_new_email']}
{$ibforums->lang['ce_new_email2']}
{$ibforums->lang['account_pass_title']}
{$ibforums->lang['pass_change_text']}
{$ibforums->lang['account_pass_old']}
{$ibforums->lang['account_pass_new']}
{$ibforums->lang['account_pass_new2']}
{$ibforums->member['name']}, {$ibforums->lang['personal_ops_txt']}
vars['php_ext']}?s={$ibforums->session_id}&act=UserCP&CODE=01&MODE=2'>{$ibforums->lang['edit_profile']}

{$ibforums->lang['edit_profile_txt']}
{$ibforums->lang['member_title']}
{$ibforums->lang['av_current']}
{$ibforums->lang['this_avatar']}{$data[CUR_AV]}
{$ibforums->lang['avatar_pre_title']}
{$ibforums->lang['avatar_pre_txt']}{$data[AVATARS]}     {$data[SHOW_AVS]}
{$ibforums->lang['upload_avatar']}
$text
{$ibforums->lang['avatar_url_title']}
{$ibforums->lang['avatar']}
{$ibforums->lang['avatar_url_ext']}
$allowed_ext
{$ibforums->lang['avatar_dims']}
{$ibforums->lang['maximum']} {$ibforums->lang['width']} = {$ibforums->vars['av_width']} {$ibforums->lang['pixels']}
{$ibforums->lang['maximum']} {$ibforums->lang['height']} = {$ibforums->vars['av_height']} {$ibforums->lang['pixels']})
{$ibforums->lang['width']}     x   {$ibforums->lang['height']}  
{$ibforums->lang['av_tt_one']}
{$ibforums->lang['av_tt_two']}
vars['php_ext']}?s={$ibforums->session_id}&act=UserCP&CODE=01&MODE=1'>{$ibforums->lang['avatar_ops']}

{$ibforums->lang['avatar_ops_txt']}
{$ibforums->lang['cp_current_sig']}
+ + + + +
$sig
+
{$ibforums->lang['cp_edit_sig']}
+ + + + + + + + + +
+ + + + + + Close Current Tag
+ + + + + + + + + Close All Tags +
+

({$ibforums->lang['check_length']})
{$ibforums->lang['profile_title']}
{$ibforums->lang['website']}
{$ibforums->lang['icq']}
{$ibforums->lang['aol']}
{$ibforums->lang['yahoo']}
{$ibforums->lang['msn']}
{$ibforums->lang['location']}
({$ibforums->lang['check_length']})
{$ibforums->lang['interests']}
({$ibforums->lang['check_length']})
+ +
+ + + + + + +
+   +
+ + + + + + + + + +
  
+ + + + +
+ + + {$ibforums->lang['m_messenger']}
+
+ • {$ibforums->lang['mess_new']}
+ • {$ibforums->lang['mess_contact']}
+ • {$ibforums->lang['mess_folders']}
+ • {$ibforums->lang['mess_inbox']}
+ • {$ibforums->lang['mess_archive']}
+
+ + + {$ibforums->lang['m_personal']}
+
+ • {$ibforums->lang['m_contact_info']}
+ + • {$ibforums->lang['m_sig_info']}
+ • {$ibforums->lang['m_avatar_info']}
+ + + +
+ {$ibforums->lang['m_options']}
+
+ • {$ibforums->lang['m_email_opt']}
+ • {$ibforums->lang['m_board_opt']}
+ • {$ibforums->lang['m_skin_lang']}
+ • {$ibforums->lang['m_email_change']}
+ • {$ibforums->lang['m_passy_opt']}
+ + +
+ {$ibforums->lang['m_tracker']}
+
+ • {$ibforums->lang['m_view_subs']} +
+
+ + + + +EOF; +} + +function CP_end() { +global $ibforums; +return << + +
+
+
+EOF; +} + +function splash($member) { +global $ibforums; +return <<{$ibforums->lang['stats_header']} + + + + + + + + + + + + + + + + + + + + +
{$ibforums->lang['email_address']}{$member[MEMBER_EMAIL]}
{$ibforums->lang['number_posts']}{$member[MEMBER_POSTS]}
{$ibforums->lang['registered']}{$member[DATE_REGISTERED]}
{$ibforums->lang['daily_average']}{$member[DAILY_AVERAGE]}
+ + + + {$ibforums->lang['messenger_summary']} + + + + + + + + + + + + +
{$ibforums->lang['total_messages']}{$member['total_messages']} {$member['full_percent']}
{$ibforums->lang['messages_left']}{$member['space_free']} {$member['full_messenger']}
+ + + + {$ibforums->lang['note_pad']} + + + +
+ + + + + + + +
+ +
+
+ + + + + +
{$ibforums->lang['ta_size']}  + + +
+
+ + +EOF; +} + +function settings_header($Profile, $time_select, $time, $dst_check) { +global $ibforums; +return << + + + + + + {$ibforums->lang['settings_time']} + + + {$ibforums->lang['settings_time_txt']}
$time + + + $time_select + + + {$ibforums->lang['dst_box']} + + +EOF; +} + +function skin_lang_header($lang_select) { +global $ibforums; +return << + + + +
+ + + + + {$ibforums->lang['settings_title']} + + + {$ibforums->lang['settings_lang_txt']} + $lang_select + +EOF; +} + +function settings_skin($skin) { +global $ibforums; +return << + {$ibforums->lang['settings_skin']} + + + {$ibforums->lang['settings_skin_txt']} + $skin    + +EOF; +} + +function skin_lang_end() { +global $ibforums; +return << + + +EOF; +} + +function settings_end($data) { +global $ibforums; +return << + {$ibforums->lang['settings_display']} + + + {$ibforums->lang['settings_viewsig']} + {$data[SIG]} + + + {$ibforums->lang['settings_viewimg']} + {$data[IMG]} + + + {$ibforums->lang['settings_viewava']} + {$data[AVA]} + + + {$ibforums->lang['settings_dopopup']} + {$data[POP]} + + + {$ibforums->lang['hide_session_txt']} + {$data[SESS]} + + + + +EOF; +} + +function email($Profile) { +global $ibforums; +return << + + + + {$ibforums->lang['privacy_settings']} + + + + {$ibforums->lang['hide_email']} + + + + {$ibforums->lang['admin_send']} + + + {$ibforums->lang['board_prefs']} + + + + {$ibforums->lang['send_full_msg']} + + + + + + + +EOF; +} + +function subs_header() { +global $ibforums; +return << + + + {$ibforums->lang['subs_header']} + +
+ + + + + + + + + + + + + + + + +EOF; +} + +function subs_row($data) { +global $ibforums; +return << + + + + + + + +EOF; +} + +function subs_end() { +global $ibforums; +return << + + + +
 {$ibforums->lang['subs_topic']}{$ibforums->lang['subs_replies']}{$ibforums->lang['subs_view']}{$ibforums->lang['subs_last_post']}
{$data['folder_icon']}vars['php_ext']}?s={$ibforums->session_id}&act=ST&f={$data['forum_id']}&t={$data['tid']}'>{$data['title']} ( vars['php_ext']}?s={$ibforums->session_id}&act=ST&f={$data['forum_id']}&t={$data['tid']}' target='_blank'>{$ibforums->lang['new_window']} )
{$data['description']}{$ibforums->lang['subs_start']} {$data['start_date']}
{$data['posts']}{$data['views']}{$data['last_post_date']}
{$ibforums->lang['subs_by']} {$data['last_poster']}
  {$ibforums->lang['with_selected']}
+EOF; +} + +function forum_jump($data, $menu_extra="") { +global $ibforums; +return << + + +
+ + + + + +
+
+ +
+
{$data}
+
+EOF; +} + + +} +?> \ No newline at end of file diff --git a/upload/admin.php b/upload/admin.php new file mode 100644 index 00000000..d1eb6952 --- /dev/null +++ b/upload/admin.php @@ -0,0 +1,614 @@ + Admin wrapper script +| > Script written by Matt Mecham +| > Date started: 1st March 2002 +| ++-------------------------------------------------------------------------- +*/ + +/*----------------------------------------------- + USER CONFIGURABLE ELEMENTS + ------------------------------------------------*/ + +// Root path + +$root_path = "./"; + +// Check IP address to see if they match? +// this may cause problems for users on proxies +// where the IP address changes during a session + +$check_ip = 1; + +// Use GZIP content encoding for fast page generation +// in the admin center? + +$use_gzip = 1; + + +/*----------------------------------------------- + NO USER EDITABLE SECTIONS BELOW + ------------------------------------------------*/ + +error_reporting (E_ERROR | E_WARNING | E_PARSE); +set_magic_quotes_runtime(0); + +if (function_exists('ini_get')) +{ + $safe_switch = ini_get("safe_mode") ? 1 : 0; +} +else +{ + $safe_switch = 1; +} + +define( 'SAFE_MODE_ON', $safe_switch ); + +if (function_exists("set_time_limit") == 1 and SAFE_MODE_ON == 0) +{ + @set_time_limit(0); +} + + +class Debug { + function startTimer() { + global $starttime; + $mtime = microtime (); + $mtime = explode (' ', $mtime); + $mtime = $mtime[1] + $mtime[0]; + $starttime = $mtime; + } + function endTimer() { + global $starttime; + $mtime = microtime (); + $mtime = explode (' ', $mtime); + $mtime = $mtime[1] + $mtime[0]; + $endtime = $mtime; + $totaltime = round (($endtime - $starttime), 5); + return $totaltime; + } +} + +class info { + + var $vars = ""; + var $version = '1.0'; + + + function info($INFO) + { + //global $INFO; + $this->vars = $INFO; + } +} + + + +/*----------------------------------------------- + Import $INFO + ------------------------------------------------*/ + +require $root_path."conf_global.php"; + +$ibforums = new info($INFO); + +$Debug = new Debug; +$Debug->startTimer(); + +/*----------------------------------------------- + Make sure our data is reset on each invocation + ------------------------------------------------*/ +$MEMBER = array(); +$SESSION_ID = ""; +$SKIN = ""; + +// Put an end to insane thoughs before they begin +$MEMBER_NAME = ""; +$MEMBER_PASSWORD = ""; +$MEMBER_EMAIL = ""; +$UserName = ""; +$PassWord = ""; + + +/*----------------------------------------------- + Load up our classes (compiled into one package) + ------------------------------------------------*/ + +require $root_path."sources/functions.php"; + +$std = new FUNC; + +/*----------------------------------------------- + Steralize our FORM and GET input + ------------------------------------------------*/ + +$IN = $std->parse_incoming(); + +$IN['AD_SESS'] = $HTTP_POST_VARS['adsess'] ? $HTTP_POST_VARS['adsess'] : $HTTP_GET_VARS['adsess']; + +/*----------------------------------------------- + Import $PAGES and $CATS + ------------------------------------------------*/ + +require $root_path."sources/Admin/admin_pages.php"; + + +/*----------------------------------------------- + Import Skinable elements + ------------------------------------------------*/ + +require $root_path."sources/Admin/admin_skin.php"; + +$SKIN = new admin_skin(); + +/*----------------------------------------------- + Import Admin Functions + ------------------------------------------------*/ + +require $root_path."sources/Admin/admin_functions.php"; + +$ADMIN = new admin_functions(); + +/*----------------------------------------------- + Load up our database library + ------------------------------------------------*/ + +$INFO['sql_driver'] = !$INFO['sql_driver'] ? 'mySQL' : $INFO['sql_driver']; + +$to_require = $root_path."sources/Drivers/".$INFO['sql_driver'].".php"; +require ($to_require); + +$DB = new db_driver; + +$DB->obj['sql_database'] = $INFO['sql_database']; +$DB->obj['sql_user'] = $INFO['sql_user']; +$DB->obj['sql_pass'] = $INFO['sql_pass']; +$DB->obj['sql_host'] = $INFO['sql_host']; +$DB->obj['sql_tbl_prefix'] = $INFO['sql_tbl_prefix']; + +// Get a DB connection +$DB->connect(); + +//------------------------------------------------ +// Fix up the "show" ID's for the menu tree... +// +// show=1,4,5 holds the current ID's, clicking on a +// collapse link creates out=4 - "4" is then removed +// from the show link. +// +// Good eh? +//------------------------------------------------ + +if ($IN['show'] == 'none') +{ + $IN['show'] = ""; +} +else if ($IN['show'] == 'all') +{ + $IN['show'] = ""; + + foreach($CATS as $cid => $name) + { + $IN['show'] .= $cid.','; + } +} +else +{ + $IN['show'] = preg_replace( "/(?:^|,)".$IN['out']."(?:,|$)/", ",", $IN['show'] ); + $IN['show'] = preg_replace( "/,,/" , "" , $IN['show'] ); + $IN['show'] = preg_replace( "/,$/" , "" , $IN['show'] ); + $IN['show'] = preg_replace( "/^,/" , "" , $IN['show'] ); +} + + +//------------------------------------------------ +// Admin.php Rules: +// +// No adsess number? +// ----------------- +// +// Then we log into the admin CP +// +// Got adsess number? +// ------------------ +// +// Then we check the cookie "ad_login" for a session key. +// +// If this session key matches the one stored in the admin_sessions +// table, then we check the data against the data stored in the +// profiles table. +// +// The session key and ad_sess keys are generated each time we log in. +// +// If we don't have a valid adsess in the URL, then we ask for a log in. +// +//------------------------------------------------ + +$session_validated = 0; +$this_session = array(); + +$validate_login = 0; + +if ($IN['login'] != 'yes') { + + if ( (!$IN['adsess']) or (empty($IN['adsess'])) or (!isset($IN['adsess'])) or ($IN['adsess'] == "") ) + { + //---------------------------------- + // No URL adsess found, lets log in. + //---------------------------------- + + do_login("No administration session found"); + } + else + { + //---------------------------------- + // We have a URL adsess, lets verify... + //---------------------------------- + + $DB->query("SELECT * FROM ibf_admin_sessions WHERE ID='".$IN['adsess']."'"); + $row = $DB->fetch_row(); + + if ($row['ID'] == "") + { + //---------------------------------- + // Fail-safe, no DB record found, lets log in.. + //---------------------------------- + + do_login("Could not retrieve session record"); + } + else if ($row['MEMBER_ID'] == "") + { + + //---------------------------------- + // No member ID is stored, log in! + //---------------------------------- + + do_login("Could not retrieve a valid member id"); + + } + else + { + //---------------------------------- + // Key is good, check the member details + //---------------------------------- + + $DB->query("SELECT * FROM ibf_members WHERE id='".$row['MEMBER_ID']."'"); + $MEMBER = $DB->fetch_row(); + + if ($MEMBER['id'] == "") + { + + //---------------------------------- + // Ut-oh, no such member, log in! + //---------------------------------- + + do_login("Member ID invalid"); + + } + else + { + //---------------------------------- + // Member found, check passy + //---------------------------------- + + if ($row['SESSION_KEY'] != $MEMBER['password']) + { + //---------------------------------- + // Passys don't match.. + //---------------------------------- + + do_login("Session member password mismatch"); + + } + else + { + //---------------------------------- + // Do we have admin access? + //---------------------------------- + + $DB->query("SELECT * FROM ibf_groups WHERE g_id='".$MEMBER['mgroup']."'"); + + $GROUP = $DB->fetch_row(); + + if ($GROUP['g_access_cp'] != 1) + { + do_login("You do not have access to the administrative CP"); + } + else + { + $session_validated = 1; + $this_session = $row; + } + } + } + } + } +} +else +{ + //---------------------------------- + // We must have submitted the form + // time to check some details. + //---------------------------------- + + if ( empty($IN['username']) ) + { + do_login("You must enter a username before proceeding"); + } + + if ( empty($IN['password']) ) + { + do_login("You must enter a password before proceeding"); + } + + //---------------------------------- + // Attempt to get the details from the + // DB + //---------------------------------- + + $DB->query("SELECT name, password, id, mgroup FROM ibf_members WHERE LOWER(name)='".strtolower($IN['username'])."'"); + $mem = $DB->fetch_row(); + + if ( empty($mem['id']) ) + { + do_login("Could not find a record matching that username, please check the spelling"); + } + + $pass = md5( $IN['password'] ); + + if ($pass != $mem['password']) + { + do_login("The password entered did not match the one in our records"); + } + else + { + $DB->query("SELECT * FROM ibf_groups WHERE g_id='".$mem['mgroup']."'"); + + $GROUP = $DB->fetch_row(); + + if ($GROUP['g_access_cp'] != 1) + { + do_login("You do not have access to the administrative CP"); + } + else + { + + //---------------------------------- + // All is good, rejoice as we set a + // session for this user + //---------------------------------- + + $sess_id = md5( uniqid( microtime() ) ); + + $db_string = $DB->compile_db_insert_string( array ( + 'ID' => $sess_id, + 'IP_ADDRESS' => $IN['IP_ADDRESS'], + 'MEMBER_NAME' => $mem['name'], + 'MEMBER_ID' => $mem['id'], + 'SESSION_KEY' => $pass, + 'LOCATION' => 'index', + 'LOG_IN_TIME' => time(), + 'RUNNING_TIME' => time(), + ) ); + + $DB->query("INSERT INTO ibf_admin_sessions (".$db_string['FIELD_NAMES'].") VALUES (".$db_string['FIELD_VALUES'].")"); + + $IN['AD_SESS'] = $sess_id; + + // Print the "well done page" + + $ADMIN->page_title = "Log in successful"; + + $ADMIN->page_detail = "You may now proceed to the administrative control panel"; + + $ADMIN->html .= $SKIN->start_table("Proceed"); + + $ADMIN->html .= "Take me to administrative control panel"; + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + } + + } + +} + + +//---------------------------------- +// Ok, so far so good. If we have a +// validate session, check the running +// time. if it's older than 2 hours, +// ask for a log in +//---------------------------------- + + +if ($session_validated == 1) +{ + if ($this_session['RUNNING_TIME'] < ( time() - 60*60*2) ) + { + $session_validated = 0; + do_login("This administration session has expired"); + } + + //------------------------------ + // Are we checking IP's? + //------------------------------ + + else if ($check_ip == 1) + { + if ($this_session['IP_ADDRESS'] != $IN['IP_ADDRESS']) + { + $session_validated = 0; + do_login("Your current IP address does not match the one in our records"); + } + } +} + +if ($session_validated == 1 ) +{ + //------------------------------ + // If we get this far, we're good to go.. + //------------------------------ + + $IN['AD_SESS'] = $IN['adsess']; + + //------------------------------ + // Lets update the sessions table: + //------------------------------ + + $DB->query("UPDATE ibf_admin_sessions SET RUNNING_TIME='".time()."', LOCATION='".$IN['act']."' WHERE MEMBER_ID='".$MEMBER['id']."' AND ID='".$IN['AD_SESS']."'"); + + do_admin_stuff(); + +} +else +{ + //------------------------------ + // Session is not validated... + //------------------------------ + + do_login("Session not validated - please attempt to log in again"); + +} + + + +function do_login($message="") { + global $IN, $DB, $ADMIN, $SKIN; + + //------------------------------------------------------- + // Remove all out of date sessions, like a good boy. Woof. + //------------------------------------------------------- + + $cut_off_stamp = time() - 60*60*2; + + $DB->query("DELETE FROM ibf_admin_sessions WHERE RUNNING_TIME < $cut_off_stamp"); + + //+------------------------------------------------------ + + $ADMIN->page_detail = "You must have administrative access to successfully log into the Invision Board Admin CP.
Please enter your forums username and password below"; + + if ($message != "") + { + $ADMIN->page_detail .= "

$message"; + } + + $ADMIN->html .= " + "; + + $ADMIN->html .= $SKIN->start_form( array( 1 => array('login', 'yes') ) ); + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + $ADMIN->html .= $SKIN->start_table( "Verification Required" ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Your Forums Username:", + "", + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Your Forums Password:", + "", + ) ); + + $ADMIN->html .= $SKIN->end_form("Log in"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + +} + + + + + +function do_admin_stuff() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $ibforums; + + + /*---------------------------------- + What do you want to require today? + ------------------------------------*/ + + $choice = array( + "idx" => "doframes", + "menu" => "menu", + "index" => "index", + "cat" => "categories", + "forum" => "forums", + "mem" => "member", + 'group' => "groups", + 'mod' => 'moderator', + 'op' => 'settings', + 'help' => 'help', + 'skin' => 'skins', + 'wrap' => 'wrappers', + 'style' => 'stylesheets', + 'image' => 'imagemacros', + 'sets' => 'stylesets', + 'templ' => 'templates', + 'lang' => 'languages', + 'import' => 'skin_import', + 'modlog' => 'modlogs', + ); + + + /***************************************************/ + + $IN['act'] = $IN['act'] == '' ? "idx" : $IN['act']; + + // Check to make sure the array key exits.. + if (! isset($choice[$IN['act']]) ) { + $IN['act'] = 'idx'; + } + + // Require and run + + if ($IN['act'] == 'idx') + { + print $SKIN->frame_set(); + exit; + } + else if ($IN['act'] == 'menu') + { + $ADMIN->menu(); + } + else + { + require $root_path."sources/Admin/ad_".$choice[$IN['act']].".php"; + } + +} + + + +//+------------------------------------------------- +// GLOBAL ROUTINES +//+------------------------------------------------- + +function fatal_error($message="", $help="") { + echo("$message

$help"); + exit; +} +?> diff --git a/upload/archive_in/index.html b/upload/archive_in/index.html new file mode 100644 index 00000000..7a0e71b5 --- /dev/null +++ b/upload/archive_in/index.html @@ -0,0 +1 @@ + IBForums - Bulletin Board System

403: IBForums-> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Get your free download of IBForums now! \ No newline at end of file diff --git a/upload/archive_out/index.html b/upload/archive_out/index.html new file mode 100644 index 00000000..7a0e71b5 --- /dev/null +++ b/upload/archive_out/index.html @@ -0,0 +1 @@ + IBForums - Bulletin Board System

403: IBForums-> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Get your free download of IBForums now! \ No newline at end of file diff --git a/upload/conf_global.php b/upload/conf_global.php new file mode 100644 index 00000000..dfcc6bc6 --- /dev/null +++ b/upload/conf_global.php @@ -0,0 +1,102 @@ + \ No newline at end of file diff --git a/upload/conf_mime_types.php b/upload/conf_mime_types.php new file mode 100644 index 00000000..f2dce851 --- /dev/null +++ b/upload/conf_mime_types.php @@ -0,0 +1,41 @@ + array( 1, 'pdf.gif' , 'PDF Document' ) , + "image/x-png" => array( 1, 'quicktime.gif' , 'PNG Image' ) , + "video/vivo" => array( 1, 'win_player.gif', 'VIVO Movie' ) , + "application/x-compress" => array( 1, 'zip.gif' , 'Compressed File') , + "video/x-msvideo" => array( 1, 'win_player.gif' , 'MS Video' ) , + "text/html" => array( 1, 'html.gif' , 'HTML Page' ) , + "audio/x-pn-realaudio" => array( 1, 'real_audio.gif', 'Real Audio File') , + "image/gif" => array( 1, 'gif.gif' , 'GIF Image' ,1 ) , + "video/mpeg" => array( 1, 'quicktime.gif' , 'MPEG Video' ) , + "image/ico" => array( 1, 'gif.gif' , 'Icon File' ) , + "application/x-tar" => array( 1, 'zip.gif' , 'TAR Ball' ) , + "image/x-MS-bmp" => array( 1, 'bmp.gif' , 'BMP Image' ) , + "image/tiff" => array( 1, 'quicktime.gif' , 'TIFF Image' ) , + "text/richtext" => array( 1, 'txt.gif' , 'Rich Text' ) , + "audio/x-realaudio" => array( 1, 'realaudio.gif' , 'Real Audio' ) , + "application/mac-binhex40" => array( 1, 'stuffit.gif' , 'Mac Binary' ) , + "audio/x-aiff" => array( 1, 'quicktime.gif' , 'AIFF File' ) , + "application/x-gzip" => array( 1, 'zip.gif' , 'GZIP File' ) , + "application/zip" => array( 1, 'zip.gif' , 'ZIP File' ) , + "application/postscript" => array( 1, 'postscript.gif', 'Postscript' ) , + "application/msword" => array( 1, 'word.gif' , 'MS Word doc' ) , + "video/quicktime" => array( 1, 'quicktime.gif' , 'QuickTime Movie') , + "application/powerpoint" => array( 1, 'apps.gif' , 'PowerPoint Doc' ) , + "audio/x-wav" => array( 1, 'sound.gif' , 'WAV File' ) , + "audio/x-mpeg" => array( 1, 'mp3.gif' , 'MPEG Audio' ) , + "image/jpeg" => array( 1, 'jpeg.gif' , 'JPEG Image' ,1) , + "application/x-zip-compressed" => array( 1, 'zip.gif' , 'ZIP File' ) , + "application/octet-stream" => array( 1, 'quicktime.gif' , 'OCTET Stream' ) , + "text/plain" => array( 1, 'text.gif' , 'Text File' ) , + "image/pjpeg" => array( 1, 'jpeg.gif' , 'JPEG Image' ,1) , +); + + +?> \ No newline at end of file diff --git a/upload/html/avatars/Abu.gif b/upload/html/avatars/Abu.gif new file mode 100644 index 00000000..2736c621 Binary files /dev/null and b/upload/html/avatars/Abu.gif differ diff --git a/upload/html/avatars/Aladdin.gif b/upload/html/avatars/Aladdin.gif new file mode 100644 index 00000000..7e1885fe Binary files /dev/null and b/upload/html/avatars/Aladdin.gif differ diff --git a/upload/html/avatars/Alfred.gif b/upload/html/avatars/Alfred.gif new file mode 100644 index 00000000..22ce51f4 Binary files /dev/null and b/upload/html/avatars/Alfred.gif differ diff --git a/upload/html/avatars/Ares.gif b/upload/html/avatars/Ares.gif new file mode 100644 index 00000000..f27884b2 Binary files /dev/null and b/upload/html/avatars/Ares.gif differ diff --git a/upload/html/avatars/ArmondoGuitierrez.gif b/upload/html/avatars/ArmondoGuitierrez.gif new file mode 100644 index 00000000..e9e70df4 Binary files /dev/null and b/upload/html/avatars/ArmondoGuitierrez.gif differ diff --git a/upload/html/avatars/Arthur.gif b/upload/html/avatars/Arthur.gif new file mode 100644 index 00000000..43f97129 Binary files /dev/null and b/upload/html/avatars/Arthur.gif differ diff --git a/upload/html/avatars/Atta.gif b/upload/html/avatars/Atta.gif new file mode 100644 index 00000000..76f6d86a Binary files /dev/null and b/upload/html/avatars/Atta.gif differ diff --git a/upload/html/avatars/Batman.gif b/upload/html/avatars/Batman.gif new file mode 100644 index 00000000..66249c5d Binary files /dev/null and b/upload/html/avatars/Batman.gif differ diff --git a/upload/html/avatars/Batman2.gif b/upload/html/avatars/Batman2.gif new file mode 100644 index 00000000..2f300d5e Binary files /dev/null and b/upload/html/avatars/Batman2.gif differ diff --git a/upload/html/avatars/BlackWidow.gif b/upload/html/avatars/BlackWidow.gif new file mode 100644 index 00000000..174f58e3 Binary files /dev/null and b/upload/html/avatars/BlackWidow.gif differ diff --git a/upload/html/avatars/BruceWayne.gif b/upload/html/avatars/BruceWayne.gif new file mode 100644 index 00000000..2de1be11 Binary files /dev/null and b/upload/html/avatars/BruceWayne.gif differ diff --git a/upload/html/avatars/Catwoman2.gif b/upload/html/avatars/Catwoman2.gif new file mode 100644 index 00000000..3e3f1dda Binary files /dev/null and b/upload/html/avatars/Catwoman2.gif differ diff --git a/upload/html/avatars/Flik.gif b/upload/html/avatars/Flik.gif new file mode 100644 index 00000000..699b7bf7 Binary files /dev/null and b/upload/html/avatars/Flik.gif differ diff --git a/upload/html/avatars/abra.gif b/upload/html/avatars/abra.gif new file mode 100644 index 00000000..af0b51b6 Binary files /dev/null and b/upload/html/avatars/abra.gif differ diff --git a/upload/html/avatars/arbok.gif b/upload/html/avatars/arbok.gif new file mode 100644 index 00000000..08b356c3 Binary files /dev/null and b/upload/html/avatars/arbok.gif differ diff --git a/upload/html/avatars/artistbirdie.gif b/upload/html/avatars/artistbirdie.gif new file mode 100644 index 00000000..72ba5a7c Binary files /dev/null and b/upload/html/avatars/artistbirdie.gif differ diff --git a/upload/html/avatars/avengers.gif b/upload/html/avatars/avengers.gif new file mode 100644 index 00000000..210ee45e Binary files /dev/null and b/upload/html/avatars/avengers.gif differ diff --git a/upload/html/avatars/index.html b/upload/html/avatars/index.html new file mode 100644 index 00000000..7a0e71b5 --- /dev/null +++ b/upload/html/avatars/index.html @@ -0,0 +1 @@ + IBForums - Bulletin Board System

403: IBForums-> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Get your free download of IBForums now! \ No newline at end of file diff --git a/upload/html/avatars/noavatar.gif b/upload/html/avatars/noavatar.gif new file mode 100644 index 00000000..37a31910 Binary files /dev/null and b/upload/html/avatars/noavatar.gif differ diff --git a/upload/html/avatars/smiley-aloof.gif b/upload/html/avatars/smiley-aloof.gif new file mode 100644 index 00000000..a5725b73 Binary files /dev/null and b/upload/html/avatars/smiley-aloof.gif differ diff --git a/upload/html/avatars/smiley-biggrin.gif b/upload/html/avatars/smiley-biggrin.gif new file mode 100644 index 00000000..59fe710f Binary files /dev/null and b/upload/html/avatars/smiley-biggrin.gif differ diff --git a/upload/html/avatars/smiley-blunder.gif b/upload/html/avatars/smiley-blunder.gif new file mode 100644 index 00000000..54aa293e Binary files /dev/null and b/upload/html/avatars/smiley-blunder.gif differ diff --git a/upload/html/avatars/smiley-evil.gif b/upload/html/avatars/smiley-evil.gif new file mode 100644 index 00000000..1309713a Binary files /dev/null and b/upload/html/avatars/smiley-evil.gif differ diff --git a/upload/html/avatars/smiley-grimmace.gif b/upload/html/avatars/smiley-grimmace.gif new file mode 100644 index 00000000..112ec02e Binary files /dev/null and b/upload/html/avatars/smiley-grimmace.gif differ diff --git a/upload/html/avatars/smiley-punched.gif b/upload/html/avatars/smiley-punched.gif new file mode 100644 index 00000000..21268038 Binary files /dev/null and b/upload/html/avatars/smiley-punched.gif differ diff --git a/upload/html/emoticons/angry.gif b/upload/html/emoticons/angry.gif new file mode 100644 index 00000000..e68c5c51 Binary files /dev/null and b/upload/html/emoticons/angry.gif differ diff --git a/upload/html/emoticons/biggrin.gif b/upload/html/emoticons/biggrin.gif new file mode 100644 index 00000000..ad040319 Binary files /dev/null and b/upload/html/emoticons/biggrin.gif differ diff --git a/upload/html/emoticons/blink.gif b/upload/html/emoticons/blink.gif new file mode 100644 index 00000000..40651db7 Binary files /dev/null and b/upload/html/emoticons/blink.gif differ diff --git a/upload/html/emoticons/blush.gif b/upload/html/emoticons/blush.gif new file mode 100644 index 00000000..a41542d3 Binary files /dev/null and b/upload/html/emoticons/blush.gif differ diff --git a/upload/html/emoticons/closedeyes.gif b/upload/html/emoticons/closedeyes.gif new file mode 100644 index 00000000..aa1d95e8 Binary files /dev/null and b/upload/html/emoticons/closedeyes.gif differ diff --git a/upload/html/emoticons/cool.gif b/upload/html/emoticons/cool.gif new file mode 100644 index 00000000..42e72109 Binary files /dev/null and b/upload/html/emoticons/cool.gif differ diff --git a/upload/html/emoticons/dry.gif b/upload/html/emoticons/dry.gif new file mode 100644 index 00000000..e3861e3e Binary files /dev/null and b/upload/html/emoticons/dry.gif differ diff --git a/upload/html/emoticons/excl.gif b/upload/html/emoticons/excl.gif new file mode 100644 index 00000000..6e95b7d5 Binary files /dev/null and b/upload/html/emoticons/excl.gif differ diff --git a/upload/html/emoticons/glare.gif b/upload/html/emoticons/glare.gif new file mode 100644 index 00000000..dc309244 Binary files /dev/null and b/upload/html/emoticons/glare.gif differ diff --git a/upload/html/emoticons/happy.gif b/upload/html/emoticons/happy.gif new file mode 100644 index 00000000..c64472f6 Binary files /dev/null and b/upload/html/emoticons/happy.gif differ diff --git a/upload/html/emoticons/huh.gif b/upload/html/emoticons/huh.gif new file mode 100644 index 00000000..044edc01 Binary files /dev/null and b/upload/html/emoticons/huh.gif differ diff --git a/upload/html/emoticons/laugh.gif b/upload/html/emoticons/laugh.gif new file mode 100644 index 00000000..ffaf6a5b Binary files /dev/null and b/upload/html/emoticons/laugh.gif differ diff --git a/upload/html/emoticons/mad.gif b/upload/html/emoticons/mad.gif new file mode 100644 index 00000000..178f8f8a Binary files /dev/null and b/upload/html/emoticons/mad.gif differ diff --git a/upload/html/emoticons/mellow.gif b/upload/html/emoticons/mellow.gif new file mode 100644 index 00000000..2582b3a4 Binary files /dev/null and b/upload/html/emoticons/mellow.gif differ diff --git a/upload/html/emoticons/ninja.gif b/upload/html/emoticons/ninja.gif new file mode 100644 index 00000000..d422a255 Binary files /dev/null and b/upload/html/emoticons/ninja.gif differ diff --git a/upload/html/emoticons/ohmy.gif b/upload/html/emoticons/ohmy.gif new file mode 100644 index 00000000..1bb07ba9 Binary files /dev/null and b/upload/html/emoticons/ohmy.gif differ diff --git a/upload/html/emoticons/ph34r.gif b/upload/html/emoticons/ph34r.gif new file mode 100644 index 00000000..b6da0623 Binary files /dev/null and b/upload/html/emoticons/ph34r.gif differ diff --git a/upload/html/emoticons/rolleyes.gif b/upload/html/emoticons/rolleyes.gif new file mode 100644 index 00000000..def8a49d Binary files /dev/null and b/upload/html/emoticons/rolleyes.gif differ diff --git a/upload/html/emoticons/sad.gif b/upload/html/emoticons/sad.gif new file mode 100644 index 00000000..6aca3107 Binary files /dev/null and b/upload/html/emoticons/sad.gif differ diff --git a/upload/html/emoticons/sleep.gif b/upload/html/emoticons/sleep.gif new file mode 100644 index 00000000..9fe5cce8 Binary files /dev/null and b/upload/html/emoticons/sleep.gif differ diff --git a/upload/html/emoticons/smile.gif b/upload/html/emoticons/smile.gif new file mode 100644 index 00000000..f8dc2782 Binary files /dev/null and b/upload/html/emoticons/smile.gif differ diff --git a/upload/html/emoticons/tongue.gif b/upload/html/emoticons/tongue.gif new file mode 100644 index 00000000..fe77df2f Binary files /dev/null and b/upload/html/emoticons/tongue.gif differ diff --git a/upload/html/emoticons/unsure.gif b/upload/html/emoticons/unsure.gif new file mode 100644 index 00000000..049cfc17 Binary files /dev/null and b/upload/html/emoticons/unsure.gif differ diff --git a/upload/html/emoticons/wacko.gif b/upload/html/emoticons/wacko.gif new file mode 100644 index 00000000..c293c4c8 Binary files /dev/null and b/upload/html/emoticons/wacko.gif differ diff --git a/upload/html/emoticons/wink.gif b/upload/html/emoticons/wink.gif new file mode 100644 index 00000000..ff8c1dce Binary files /dev/null and b/upload/html/emoticons/wink.gif differ diff --git a/upload/html/emoticons/wub.gif b/upload/html/emoticons/wub.gif new file mode 100644 index 00000000..754fa21c Binary files /dev/null and b/upload/html/emoticons/wub.gif differ diff --git a/upload/html/ibfcode.js b/upload/html/ibfcode.js new file mode 100644 index 00000000..82b872de --- /dev/null +++ b/upload/html/ibfcode.js @@ -0,0 +1 @@ +bbtags = new Array(); //-------------------------------------------- // Get stack size //-------------------------------------------- function stacksize(thearray) { for (i = 0 ; i < thearray.length; i++ ) { if ( (thearray[i] == "") || (thearray[i] == null) || (thearray == 'undefined') ) { return i; } } return thearray.length; } //-------------------------------------------- // Push stack //-------------------------------------------- function pushstack(thearray, newval) { arraysize = stacksize(thearray); thearray[arraysize] = newval; } //-------------------------------------------- // Pop stack //-------------------------------------------- function popstack(thearray) { arraysize = stacksize(thearray); theval = thearray[arraysize - 1]; delete thearray[arraysize - 1]; return theval; } //-------------------------------------------- // Close current open tag //-------------------------------------------- function closelast() { if (bbtags[0]) { document.REPLIER.Post.value += "[/" + popstack(bbtags) + "]"; } document.REPLIER.Post.focus(); } //-------------------------------------------- // Close all tags //-------------------------------------------- function closeall() { if (bbtags[0]) { while (bbtags[0]) { document.REPLIER.Post.value += "[/" + popstack(bbtags) + "]"; } document.REPLIER.Post.value += " "; } document.REPLIER.Post.focus(); } //-------------------------------------------- // EMOTICONS //-------------------------------------------- function emoticon(theSmilie) { if (document.REPLIER.Post.caretPos && document.REPLIER.Post.createTextRange) { var caretPos = document.REPLIER.Post.caretPos; caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? theSmilie + ' ' : theSmilie; } else { document.REPLIER.Post.value += ' ' + theSmilie + ' '; } document.REPLIER.Post.focus(); } //-------------------------------------------- // ADD CODE //-------------------------------------------- function add_code(NewCode) { document.REPLIER.Post.value += NewCode; document.REPLIER.Post.focus(); return; } //-------------------------------------------- // ALTER FONT //-------------------------------------------- function alterfont(theval, thetag) { if (theval == 0) { return; } else { document.REPLIER.Post.value += "[" + thetag + "=" + theval + "]"; pushstack(bbtags, thetag); } document.REPLIER.ffont.selectedIndex = 0; document.REPLIER.fsize.selectedIndex = 0; document.REPLIER.fcolor.selectedIndex = 0; document.REPLIER.Post.focus(); } //-------------------------------------------- // SIMPLE TAGS (such as B, I U, etc) //-------------------------------------------- function simpletag(thetag) { document.REPLIER.Post.value += "[" + thetag + "]"; pushstack(bbtags, thetag); document.REPLIER.Post.focus(); } function tag_url() { var FoundErrors = ''; var enterURL = prompt(text_enter_url, "http://"); var enterTITLE = prompt(text_enter_url_name, "My Webpage"); if (!enterURL) { FoundErrors += " " + error_no_url; } if (!enterTITLE) { FoundErrors += " " + error_no_title; } if (FoundErrors) { alert("Error!"+FoundErrors); return; } var ToAdd = "[URL="+enterURL+"]"+enterTITLE+"[/URL]"; document.REPLIER.Post.value+=ToAdd; document.REPLIER.Post.focus(); } function tag_image() { var FoundErrors = ''; var enterURL = prompt(text_enter_image, "http://"); if (!enterURL) { FoundErrors += " " + error_no_url; } if (FoundErrors) { alert("Error!"+FoundErrors); return; } var ToAdd = "[IMG]"+enterURL+"[/IMG]"; document.REPLIER.Post.value+=ToAdd; document.REPLIER.Post.focus(); } function tag_email() { var emailAddress = prompt(text_enter_email,""); if (!emailAddress) { alert(error_no_email); return; } var ToAdd = "[EMAIL]"+emailAddress+"[/EMAIL]"; document.REPLIER.Post.value+=ToAdd; document.REPLIER.Post.focus(); } \ No newline at end of file diff --git a/upload/html/index.html b/upload/html/index.html new file mode 100644 index 00000000..7a0e71b5 --- /dev/null +++ b/upload/html/index.html @@ -0,0 +1 @@ + IBForums - Bulletin Board System

403: IBForums-> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Get your free download of IBForums now! \ No newline at end of file diff --git a/upload/html/mime_types/apps.gif b/upload/html/mime_types/apps.gif new file mode 100644 index 00000000..036af52e Binary files /dev/null and b/upload/html/mime_types/apps.gif differ diff --git a/upload/html/mime_types/bmp.gif b/upload/html/mime_types/bmp.gif new file mode 100644 index 00000000..38da29d3 Binary files /dev/null and b/upload/html/mime_types/bmp.gif differ diff --git a/upload/html/mime_types/gif.gif b/upload/html/mime_types/gif.gif new file mode 100644 index 00000000..38da29d3 Binary files /dev/null and b/upload/html/mime_types/gif.gif differ diff --git a/upload/html/mime_types/html.gif b/upload/html/mime_types/html.gif new file mode 100644 index 00000000..419604df Binary files /dev/null and b/upload/html/mime_types/html.gif differ diff --git a/upload/html/mime_types/jpeg.gif b/upload/html/mime_types/jpeg.gif new file mode 100644 index 00000000..38da29d3 Binary files /dev/null and b/upload/html/mime_types/jpeg.gif differ diff --git a/upload/html/mime_types/jpg.gif b/upload/html/mime_types/jpg.gif new file mode 100644 index 00000000..38da29d3 Binary files /dev/null and b/upload/html/mime_types/jpg.gif differ diff --git a/upload/html/mime_types/mp3.gif b/upload/html/mime_types/mp3.gif new file mode 100644 index 00000000..c3229233 Binary files /dev/null and b/upload/html/mime_types/mp3.gif differ diff --git a/upload/html/mime_types/parent.gif b/upload/html/mime_types/parent.gif new file mode 100644 index 00000000..a694ae1e Binary files /dev/null and b/upload/html/mime_types/parent.gif differ diff --git a/upload/html/mime_types/pdf.gif b/upload/html/mime_types/pdf.gif new file mode 100644 index 00000000..62854cd9 Binary files /dev/null and b/upload/html/mime_types/pdf.gif differ diff --git a/upload/html/mime_types/png.gif b/upload/html/mime_types/png.gif new file mode 100644 index 00000000..4190f9ae Binary files /dev/null and b/upload/html/mime_types/png.gif differ diff --git a/upload/html/mime_types/postscript.gif b/upload/html/mime_types/postscript.gif new file mode 100644 index 00000000..cfb05b8d Binary files /dev/null and b/upload/html/mime_types/postscript.gif differ diff --git a/upload/html/mime_types/quicktime.gif b/upload/html/mime_types/quicktime.gif new file mode 100644 index 00000000..8afa427f Binary files /dev/null and b/upload/html/mime_types/quicktime.gif differ diff --git a/upload/html/mime_types/real_audio.gif b/upload/html/mime_types/real_audio.gif new file mode 100644 index 00000000..06dd2779 Binary files /dev/null and b/upload/html/mime_types/real_audio.gif differ diff --git a/upload/html/mime_types/sound.gif b/upload/html/mime_types/sound.gif new file mode 100644 index 00000000..528782b1 Binary files /dev/null and b/upload/html/mime_types/sound.gif differ diff --git a/upload/html/mime_types/stuffit.gif b/upload/html/mime_types/stuffit.gif new file mode 100644 index 00000000..754abea1 Binary files /dev/null and b/upload/html/mime_types/stuffit.gif differ diff --git a/upload/html/mime_types/text.gif b/upload/html/mime_types/text.gif new file mode 100644 index 00000000..aa0b11e9 Binary files /dev/null and b/upload/html/mime_types/text.gif differ diff --git a/upload/html/mime_types/txt.gif b/upload/html/mime_types/txt.gif new file mode 100644 index 00000000..b57b1e8f Binary files /dev/null and b/upload/html/mime_types/txt.gif differ diff --git a/upload/html/mime_types/win_player.gif b/upload/html/mime_types/win_player.gif new file mode 100644 index 00000000..2d08f6a6 Binary files /dev/null and b/upload/html/mime_types/win_player.gif differ diff --git a/upload/html/mime_types/word.gif b/upload/html/mime_types/word.gif new file mode 100644 index 00000000..09d9b91b Binary files /dev/null and b/upload/html/mime_types/word.gif differ diff --git a/upload/html/mime_types/zip.gif b/upload/html/mime_types/zip.gif new file mode 100644 index 00000000..68a22d6d Binary files /dev/null and b/upload/html/mime_types/zip.gif differ diff --git a/upload/html/sys-img/.DS_Store b/upload/html/sys-img/.DS_Store new file mode 100644 index 00000000..c7c6790c Binary files /dev/null and b/upload/html/sys-img/.DS_Store differ diff --git a/upload/html/sys-img/acp_check.gif b/upload/html/sys-img/acp_check.gif new file mode 100644 index 00000000..807ebce1 Binary files /dev/null and b/upload/html/sys-img/acp_check.gif differ diff --git a/upload/html/sys-img/acp_delete.gif b/upload/html/sys-img/acp_delete.gif new file mode 100644 index 00000000..747f17aa Binary files /dev/null and b/upload/html/sys-img/acp_delete.gif differ diff --git a/upload/html/sys-img/acp_edit.gif b/upload/html/sys-img/acp_edit.gif new file mode 100644 index 00000000..dc671b83 Binary files /dev/null and b/upload/html/sys-img/acp_edit.gif differ diff --git a/upload/html/sys-img/acp_resync.gif b/upload/html/sys-img/acp_resync.gif new file mode 100644 index 00000000..86c3c03f Binary files /dev/null and b/upload/html/sys-img/acp_resync.gif differ diff --git a/upload/html/sys-img/acp_rules.gif b/upload/html/sys-img/acp_rules.gif new file mode 100644 index 00000000..4c8b1dbf Binary files /dev/null and b/upload/html/sys-img/acp_rules.gif differ diff --git a/upload/html/sys-img/ad-logo.jpg b/upload/html/sys-img/ad-logo.jpg new file mode 100644 index 00000000..a1ad4ba1 Binary files /dev/null and b/upload/html/sys-img/ad-logo.jpg differ diff --git a/upload/html/sys-img/add.gif b/upload/html/sys-img/add.gif new file mode 100644 index 00000000..dc6212e5 Binary files /dev/null and b/upload/html/sys-img/add.gif differ diff --git a/upload/html/sys-img/blank.gif b/upload/html/sys-img/blank.gif new file mode 100644 index 00000000..1d11fa9a Binary files /dev/null and b/upload/html/sys-img/blank.gif differ diff --git a/upload/html/sys-img/colours.gif b/upload/html/sys-img/colours.gif new file mode 100644 index 00000000..424d286d Binary files /dev/null and b/upload/html/sys-img/colours.gif differ diff --git a/upload/html/sys-img/colours.html b/upload/html/sys-img/colours.html new file mode 100644 index 00000000..993b4030 --- /dev/null +++ b/upload/html/sys-img/colours.html @@ -0,0 +1 @@ + Invision Board Colour Picker
Invision Board Color Picker

Simply roll your mouse over the desired colour to get the Hex value and a colour preview




The Hexidecimal Value



Colour Preview



Clicking on any of the colour segments enters the Hex value here

\ No newline at end of file diff --git a/upload/html/sys-img/css.html b/upload/html/sys-img/css.html new file mode 100644 index 00000000..70224e1d --- /dev/null +++ b/upload/html/sys-img/css.html @@ -0,0 +1 @@ + CSS Generator Simple CSS Generator

This is designed to generate a simple CSS definition. It does not contain all the CSS attributes, just the most commonly used ones.

CSS ID Definition name?
Font name (seperate many with a comma)
Font size  
Font Weight
Font Colour
Background Colour
Border... Weight (in pixels or leave blank) Colour
Line Spacing  
Letter Spacing  point



Your CSS will appear below once generated.
\ No newline at end of file diff --git a/upload/html/sys-img/index.html b/upload/html/sys-img/index.html new file mode 100644 index 00000000..7a0e71b5 --- /dev/null +++ b/upload/html/sys-img/index.html @@ -0,0 +1 @@ + IBForums - Bulletin Board System

403: IBForums-> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Get your free download of IBForums now! \ No newline at end of file diff --git a/upload/html/sys-img/item.gif b/upload/html/sys-img/item.gif new file mode 100644 index 00000000..1943de48 Binary files /dev/null and b/upload/html/sys-img/item.gif differ diff --git a/upload/html/sys-img/minus.gif b/upload/html/sys-img/minus.gif new file mode 100644 index 00000000..393038bb Binary files /dev/null and b/upload/html/sys-img/minus.gif differ diff --git a/upload/html/sys-img/plus.gif b/upload/html/sys-img/plus.gif new file mode 100644 index 00000000..41a0266f Binary files /dev/null and b/upload/html/sys-img/plus.gif differ diff --git a/upload/html/sys-img/remove.gif b/upload/html/sys-img/remove.gif new file mode 100644 index 00000000..dbfe939f Binary files /dev/null and b/upload/html/sys-img/remove.gif differ diff --git a/upload/html/sys-img/tile_back.gif b/upload/html/sys-img/tile_back.gif new file mode 100644 index 00000000..1286a915 Binary files /dev/null and b/upload/html/sys-img/tile_back.gif differ diff --git a/upload/html/sys-img/tile_sub.gif b/upload/html/sys-img/tile_sub.gif new file mode 100644 index 00000000..0b79b4c3 Binary files /dev/null and b/upload/html/sys-img/tile_sub.gif differ diff --git a/upload/html/sys-img/title.gif b/upload/html/sys-img/title.gif new file mode 100644 index 00000000..93404220 Binary files /dev/null and b/upload/html/sys-img/title.gif differ diff --git a/upload/html/sys-img/top_cell.gif b/upload/html/sys-img/top_cell.gif new file mode 100644 index 00000000..7b01867e Binary files /dev/null and b/upload/html/sys-img/top_cell.gif differ diff --git a/upload/html/team_icons/admin.gif b/upload/html/team_icons/admin.gif new file mode 100644 index 00000000..52028884 Binary files /dev/null and b/upload/html/team_icons/admin.gif differ diff --git a/upload/html/team_icons/index.html b/upload/html/team_icons/index.html new file mode 100644 index 00000000..7a0e71b5 --- /dev/null +++ b/upload/html/team_icons/index.html @@ -0,0 +1 @@ + IBForums - Bulletin Board System

403: IBForums-> Forbidden


You have reached this Page in error, please use your back button to return to Invision Board.
Get your free download of IBForums now! \ No newline at end of file diff --git a/upload/index.php b/upload/index.php new file mode 100644 index 00000000..e902741c --- /dev/null +++ b/upload/index.php @@ -0,0 +1,285 @@ + Wrapper script +| > Script written by Matt Mecham +| > Date started: 14th February 2002 +| ++-------------------------------------------------------------------------- +*/ + +//----------------------------------------------- +// USER CONFIGURABLE ELEMENTS +//----------------------------------------------- + +// Root path + +$root_path = "./"; + +//----------------------------------------------- +// NO USER EDITABLE SECTIONS BELOW +//----------------------------------------------- + +error_reporting (E_ERROR | E_WARNING | E_PARSE); +set_magic_quotes_runtime(0); + +class Debug { + function startTimer() { + global $starttime; + $mtime = microtime (); + $mtime = explode (' ', $mtime); + $mtime = $mtime[1] + $mtime[0]; + $starttime = $mtime; + } + function endTimer() { + global $starttime; + $mtime = microtime (); + $mtime = explode (' ', $mtime); + $mtime = $mtime[1] + $mtime[0]; + $endtime = $mtime; + $totaltime = round (($endtime - $starttime), 5); + return $totaltime; + } +} + +class info { + + var $member = array(); + var $input = array(); + var $session_id = ""; + var $base_url = ""; + var $vars = ""; + var $skin_id = "0"; // Skin Dir name + var $skin_rid = ""; // Real skin id (numerical only) + var $lang_id = "en"; + var $skin = ""; + var $lang = ""; + var $server_load = 0; + var $version = "v1.0.1"; + var $lastclick = ""; + var $location = ""; + + function info() { + global $sess, $std, $DB, $root_path, $INFO; + + $this->vars = &$INFO; + + $this->vars['TEAM_ICON_URL'] = $INFO['html_url'] . '/team_icons'; + $this->vars['AVATARS_URL'] = $INFO['html_url'] . '/avatars'; + $this->vars['EMOTICONS_URL'] = $INFO['html_url'] . '/emoticons'; + $this->vars['mime_img'] = $INFO['html_url'] . '/mime_types'; + + } +} + +//-------------------------------- +// Import $INFO, now! +//-------------------------------- + +require $root_path."conf_global.php"; + +//-------------------------------- +// The clocks a' tickin' +//-------------------------------- + +$Debug = new Debug; +$Debug->startTimer(); + +//-------------------------------- +// Require our global functions +//-------------------------------- + +require $root_path."sources/functions.php"; + +$std = new FUNC; +$print = new display(); +$sess = new session(); + +//-------------------------------- +// Load the DB driver and such +//-------------------------------- + +$INFO['sql_driver'] = !$INFO['sql_driver'] ? 'mySQL' : $INFO['sql_driver']; + +$to_require = $root_path."sources/Drivers/".$INFO['sql_driver'].".php"; +require ($to_require); + +$DB = new db_driver; + +$DB->obj['sql_database'] = $INFO['sql_database']; +$DB->obj['sql_user'] = $INFO['sql_user']; +$DB->obj['sql_pass'] = $INFO['sql_pass']; +$DB->obj['sql_host'] = $INFO['sql_host']; +$DB->obj['sql_tbl_prefix'] = $INFO['sql_tbl_prefix']; + +// Get a DB connection + +$DB->connect(); + +//-------------------------------- +// Wrap it all up in a nice easy to +// transport super class +//-------------------------------- + +$ibforums = new info(); + +//-------------------------------- +// Set up our vars +//-------------------------------- + +$ibforums->input = $std->parse_incoming(); +$ibforums->member = $sess->authorise(); +$ibforums->skin = $std->load_skin(); +$ibforums->lastclick = $sess->last_click; +$ibforums->location = $sess->location; +$ibforums->session_id = $sess->session_id; + +if ($ibforums->member['id'] and ( $std->my_getcookie('hide_sess') ) ) +{ + $ibforums->session_id = ""; +} + +$ibforums->base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext'].'?s='.$ibforums->session_id; + +$ibforums->skin_rid = $ibforums->skin['set_id']; +$ibforums->skin_id = 's'.$ibforums->skin['set_id']; + +$ibforums->vars['img_url'] = 'style_images/' . $ibforums->skin['img_id']; + +//-------------------------------- +// Set up our language choice +//-------------------------------- + +$ibforums->lang_id = $ibforums->member['language'] ? $ibforums->member['language'] : 'en'; + +if ( ($ibforums->lang_id != 'en') and (! is_dir( $root_path."lang/".$ibforums->lang_id ) ) ) +{ + $ibforums->lang_id = 'en'; +} + +require $root_path."lang/".$ibforums->lang_id."/lang_global.php"; + +$ibforums->lang = $lang; + +unset($lang); + +//-------------------------------- + +require $root_path."Skin/".$ibforums->skin_id."/skin_global.php"; + +$skin_universal = new skin_global(); + +//-------------------------------- + +if ($ibforums->input['act'] != 'Login' and $ibforums->input['act'] != 'Reg' and $ibforums->input['act'] != 'Attach') +{ + + //-------------------------------- + // Do we have permission to view + // the board? + //-------------------------------- + + if ($ibforums->member['g_view_board'] != 1) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_view_board') ); + } + + //-------------------------------- + // Is the board offline? + //-------------------------------- + + if ($ibforums->vars['board_offline'] == 1) + { + if ($ibforums->member['g_access_offline'] != 1) + { + $std->board_offline(); + } + + } + + //-------------------------------- + // Is log in enforced? + //-------------------------------- + + if ( (! $ibforums->member['id']) and ($ibforums->vars['force_login'] == 1) ) + { + require $root_path."sources/Login.php"; + + } + +} + +//-------------------------------- +// Decide what to do +//-------------------------------- + +$choice = array( + "idx" => "Boards", + "SF" => "Forums", + "SR" => "Forums", + "ST" => "Topics", + "Login" => "Login", + "Post" => "Post", + "Poll" => "lib/add_poll", + "Reg" => "Register", + "Online" => "Online", + "Members" => "Memberlist", + "Help" => "Help", + "Search" => "Search", + "Mod" => "Moderate", + "Print" => "misc/print_page", + "Forward" => "misc/forward_page", + "Mail" => "misc/contact_member", + "Invite" => "misc/contact_member", + "ICQ" => "misc/contact_member", + "AOL" => "misc/contact_member", + "Msg" => "Messenger", + "UserCP" => "Usercp", + "Profile" => "Profile", + "Track" => "misc/tracker", + "Stats" => "misc/stats", + "Attach" => "misc/attach", + 'ib3' => 'misc/ib3', + 'legends' => 'misc/legends', + 'ModCP' => 'mod_cp', + ); + + +/***************************************************/ + +$ibforums->input['act'] = $ibforums->input['act'] == '' ? "idx" : $ibforums->input['act']; + +// Check to make sure the array key exits.. + +if (! isset($choice[ $ibforums->input['act'] ]) ) +{ + $ibforums->input['act'] = 'idx'; +} + +// Require and run + +require $root_path."sources/".$choice[ $ibforums->input['act'] ].".php"; + + + +//+------------------------------------------------- +// GLOBAL ROUTINES +//+------------------------------------------------- + +function fatal_error($message="", $help="") { + echo("$message

$help"); + exit; +} +?> diff --git a/upload/lang/en/ReportWords.php b/upload/lang/en/ReportWords.php new file mode 100644 index 00000000..7c57e601 --- /dev/null +++ b/upload/lang/en/ReportWords.php @@ -0,0 +1,17 @@ + "Send report now", +message => "Your message", +title => "Report a post to a moderator", +redirect => "Report sent, returning you to the topic you came from", +in_topic => "Topic Title", +subject => "Mailer from Invision Board: Reporting post", +in_forum => "Reported in forum", +ibauto => "Invision Board Bot", +warn => "This form is for reporting abusive behaviour (spamming, rude posts, etc) ONLY.
DO NOT use this form just to contact a moderator - these messages will be ignored!", +email => "Your email", +name => "Your name", +); +?> \ No newline at end of file diff --git a/upload/lang/en/email_content.php b/upload/lang/en/email_content.php new file mode 100644 index 00000000..2e87e1f8 --- /dev/null +++ b/upload/lang/en/email_content.php @@ -0,0 +1,283 @@ + + +From, + +<#USER NAME#> + +EOF; + +$EMAIL['pm_archive'] = <<, +This email has been sent from <#BOARD_ADDRESS#>. + +Your archived messages have been compiled into a single +file and has been attached to this message. + +EOF; + +$EMAIL['reg_validate'] = <<, +This email has been sent from <#BOARD_ADDRESS#>. + +You have received this email because this email address +was used during registration for our forums. +If you did not register at our forums, please disregard this +email. You do not need to unsubscribe or take any further action. + +------------------------------------------------ + ACTIVATION INSTRUCTIONS BELOW +------------------------------------------------ + +Thank you for registering. +We require that you "validate" your registration to ensure that +the email address you entered was correct. This protects against +unwanted spam and malicious abuse. + +To activate your account, simply click on the following link: + +<#THE_LINK#> + +(AOL Email users may need to cut and paste the link into your web +browser). + +------------------------------------------------ + HELP, I GOT AN ERROR! +------------------------------------------------ + +If you could not validate your registration by clicking on the link, please +visit this page: + +<#MAN_LINK#> + +It will ask you for a user id number, and your validation key. These are shown +below: + +User ID: <#ID#> + +Validation Key: <#CODE#> + +Please cut and paste, or type those numbers into the corresponding fields in the form. + +If you still cannot validate your account, it's possible that the account has been removed. +If this is the case, please contact an administrator to rectify the problem. + +Thank you for registering and enjoy your stay! + +EOF; + +$EMAIL['admin_newuser'] = << completed their registraton on <#DATE#> + +You can turn off user notification in the Admin Control Panel + +Have a super day! + +EOF; + +$EMAIL['lost_pass'] = <<, +This email has been sent from <#BOARD_ADDRESS#>. + +You have received this email because a password recovery +was instigated. + +IMPORTANT! IF YOU DID NOT REQUEST A PASSWORD RECOVERY DO +NOT GO ANY FURTHER AND DELETE THIS EMAIL! + +ONLY FOLLOW THE INSTRUCTIONS BELOW IF +YOU WISH FOR YOUR PASSWORD TO BE RESET! + +------------------------------------------------ + ACTIVATION INSTRUCTIONS BELOW +------------------------------------------------ + +We require that you "validate" your password recovery to ensure that +you instigated this action. This protects against +unwanted spam and malicious abuse. + +If you do not have the form show in your browser window, simply click on the following link: + +<#MAN_LINK#> + +(AOL Email users may need to cut and paste the link into your web +browser). + +It will ask you for a user id number, and your validation key. These are shown +below: + +User ID: <#ID#> + +Validation Key: <#CODE#> + +Please cut and paste, or type those numbers into the corresponding fields in the form. + +Once the activation is complete, you will be able to log in using your new password (shown below). You can +change this password at any time from your personal control panel. + +------------------------------------------------ + YOUR NEW PASSWORD +------------------------------------------------ + +Your new password is: <#PASSWORD#> + +Keep this password safe. Remember, you will need to re-activate your account +before you can use this password. + +------------------------------------------------ + HELP, I GOT AN ERROR! +------------------------------------------------ + +If you cannot re-activate your account, it's possible that the account has been removed or you +are in the process of another activation, such as registering or changing your registered email address. +If this is the case, then please complete the previous activation. +If the error persists, please contact an administrator to rectify the problem. + + +EOF; + +$EMAIL['newemail'] = <<, +This email has been sent from <#BOARD_ADDRESS#>. + +You have received this email because you requested an +email address change. + +------------------------------------------------ + ACTIVATION INSTRUCTIONS BELOW +------------------------------------------------ + +We require that you "validate" your email address change to ensure that +you instigated this action. This protects against +unwanted spam and malicious abuse. + +If you do not have the form show in your browser window, simply click on the following link: + +<#MAN_LINK#> + +(AOL Email users may need to cut and paste the link into your web +browser). + +It will ask you for a user id number, and your validation key. These are shown +below: + +User ID: <#ID#> + +Validation Key: <#CODE#> + +Please cut and paste, or type those numbers into the corresponding fields in the form. + +Once the activation is complete, you will need to log back in to update your member group +permissions. + +------------------------------------------------ + HELP, I GOT AN ERROR! +------------------------------------------------ + +If you cannot re-activate your account, it's possible that the account has been removed or you +are in the process of another activation, such as registering or changing your registered email address. +If this is the case, then please complete the previous activation. +If the error persists, please contact an administrator to rectify the problem. + + +EOF; + +$EMAIL['forward_page'] = << + + +<#THE_MESSAGE#> + +--------------------------------------------------- +Please note that IBForums has no control over the +contents of this message. +--------------------------------------------------- + +EOF; + + + +$EMAIL['subs_with_post'] = <<, + +<#POSTER#> has just posted a reply to a topic that you have subscribed to titled "<#TITLE#>". + +---------------------------------------------------------------------- +<#POST#> +---------------------------------------------------------------------- + +The topic can be found here: +<#BOARD_ADDRESS#>?act=ST&f=<#FORUM_ID#>&t=<#TOPIC_ID#> + + + +There may be more replies to this topic, but only 1 email is sent per day for each subscribed topic. This is +to limit the amount of mail that is sent to your inbox. + +Unsubscribing: +-------------- + +You can unsubscribe at any time by logging into your control panel and clicking on the "View Subscriptions" link. + +EOF; + + +$EMAIL['subs_no_post'] = <<, + +<#POSTER#> has just posted a reply to a topic that you have subscribed to titled "<#TITLE#>". + +The topic can be found here: +<#BOARD_ADDRESS#>?act=ST&f=<#FORUM_ID#>&t=<#TOPIC_ID#> + +There may be more replies to this topic, but only 1 email is sent per day for each subscribed topic. This is +to limit the amount of mail that is sent to your inbox. + +Unsubscribing: +-------------- + +You can unsubscribe at any time by logging into your control panel and clicking on the "View Subscriptions" link. + +EOF; + + + +$EMAIL['email_member'] = <<, + +<#FROM_NAME#> has sent you this email from <#BOARD_ADDRESS#>. + + +<#MESSAGE#> + +--------------------------------------------------- +Please note that IBForums has no control over the +contents of this message. +--------------------------------------------------- + + +EOF; + +$EMAIL['complete_reg'] = <<. You may now log in with +your chosen details and access your full user account at <#BOARD_ADDRESS#> + +EOF; + + +?> \ No newline at end of file diff --git a/upload/lang/en/lang_boards.php b/upload/lang/en/lang_boards.php new file mode 100644 index 00000000..e391c0df --- /dev/null +++ b/upload/lang/en/lang_boards.php @@ -0,0 +1,67 @@ + "By", + +'newslink' => "latest news: ", + +'welcome_back_text' => "Welcome back, your last visit was on", + +'sm_today_posters' => "Today's top 10 posters", +'sm_all_posters' => "Overall top 10 posters", +'sm_forum_leaders' => "The moderating team", +'sm_todays_posts' => "Today's active topics", + +protected_forums => "Protected Forums", +no_birth_users => "No members are celebrating a birthday today", +total_forums => "Total Forums:", +public_forums => "Public Forums", +public_members => "members", + +'total_word_string' => "Our members have made a total of <#posts#> posts
We have <#reg#> registered members
The newest member is <#mem#>", + + +'birthday_header' => "Today's Birthdays", + +replies => "Replies", +board_stats => "Board Statistics", + +guests => "guests", +posts => "posts", +total_of => "has a total of", +browser_user_list => "View Complete List", + +forum_leader => "Forum Led by: ", +birth_user => "member is celebrating his/her birthday today", +forum_users => "User(s) active in this forum", +forums => "Forums", +restricted_forums => "Restricted Forums", +invite_submit => "Go!", +all_times => "All Times", +new_posts => "View New Posts", +anon_members => "Anonymous Members", +d_post_read => "Mark all posts as read", +last_post_info => "Last Post Info", +birth_users => "members are celebrating their birthday today", +forum_off => "Read Only", + +cat_name => "Forum", +in => "In", +registered_mems => "registered members", +topics => "Topics", +f_protected => "Protected Forum", +d_delete_cookies => "Delete cookies set by this board", +forum_icons => "Forum Icons", + + + +info => "Information", +active_users => "user(s) active in the past 15 minutes", + +f_none => "----", +most_online => "Most users ever online was <#NUM#> on <#DATE#>", +no_new => "No New Posts", + +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_emails.php b/upload/lang/en/lang_emails.php new file mode 100644 index 00000000..2917e5e8 --- /dev/null +++ b/upload/lang/en/lang_emails.php @@ -0,0 +1,39 @@ + "Message", +title => "Send a page to a friend", +'send_lang' => "Send this email in", +to_name => "Send to (Person's Name):", +redirect => "The email has been sent", +to_email => "Send to (Email Address):", +subject => "Subject", +submit_send => "Send Email", +send_email_to => "Send an email to", +message => "Message", +show_address_text => "You can send this member an email by clicking on the link below. Invision Board does not show email addresses in the HTML code to prevent email addresses being harvested by 'spam bots'.", +send_header => ", please fill in this form fully to send an email to", +member_address_title => "Members Email Address", +send_title => "Email Form", +msg_txt => "Note: By using this form, the recipient will be able to view your email address", +subject => "Subject", +email_sent_txt => "Thanks, the email has been successfully sent to", +email_sent => "The email has been sent", + +invite_subject => "<#MEMBER_NAME#> thought you would like to see this", +subs_redirect => "You have subscribed to this topic", +invite_redirect => "The email has been sent to ", +sub_added => "Your subscription has been added", + +icq_title => "ICQ Pager", +submit => "Send this message", +aol_title => "AOL Pager", +msg => "Enter your message", +email => "Your Email", +name => "Your Name", +forum_jump => "Forum Jump", +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_error.php b/upload/lang/en/lang_error.php new file mode 100644 index 00000000..0afa234e --- /dev/null +++ b/upload/lang/en/lang_error.php @@ -0,0 +1,214 @@ + "Sorry, the administrator has taken the search engine offline for the moment. Please try again later", +'reg_off' => "The board administrator is no longer accepting any new registrations at the moment.", + +'offline_title' => "Board Offline", +'offline_login' => "If you have permission to access an offline board, please log in below", + +'skin_not_found' => "The skin you chose could not be found. It's possible that an administrator has removed the skin, please go back and choose another.", + +'no_view_board' => "You do not have permission to view this board", + +'forum_read_only' => "This forum is read only, no new posts or replies can be made.", + +'no_av_upload' => "You do not have permission to upload avatars to this server", +'no_av_type' => "You are not allowed to upload that type of file as an avatar", +'no_av_name' => "The uploaded file does not have a name, please go back and check your input", + +'upload_failed' => "The upload failed. Please contact a member of staff to help rectify the problem", + +'er_log_in_title' => "You are not logged in, you may log in below", +'erl_enter_name' => "Your account username", +'erl_enter_pass' => "Your account password", +'erl_log_in_submit' => "Log In", + +'er_useful_links' => "Useful Links", +'er_lost_pass' => "Forgotten Password Recovery", +'er_register' => "Register a new account", +'er_contact_admin' => "Contact the forums administrator", +'er_help_files' => "Our help documentation", + +'no_archive_messages' => "Sorry, no private messages were found using that search critera. Try again and broaden the scope.", + +'no_delete_post' => "Sorry, you cannot delete the first post in this topic. If you wish to delete the complete topic, choose 'Delete Topic' from your moderator bar at the foot of the topic view screen.", +'exp_text' => "Sorry, an error occured. If you are unsure on how to use a feature, or don't know why you got this error message, try looking through the help files for more information.", +'msg_head' => "The error returned was:", + +'auth_no_mem' => "We could not find any member matching the User ID that you entered. Please double check the URL, or the data you entered into the form. If the error persists, please contact a member of staff to assist you.", +'auth_key_wrong' => "Sorry, the Validation Key is incorrect for this member. Please check the URL or the data you entered into the form. If the error persists, please contact a member of staff to assist you.", +'auth_no_key' => "Sorry, that member does not have to validate their account. Please double check the data you entered.", + +'email_addy_mismatch' => "Sorry, the email addresses did not match, please go back and check the data you entered.", + +'lp_no_pass' => "Sorry, we do not have a new password for this account in our records, please contact a staff member to rectify the problem", + +'val_key_present' => "This account is already under activation verification for either a new registration, lost password or email address change. Please complete the previous activation before attempting to continue with this one. If you believe this account has been activated or re-activated, please contact a member of staff to rectify the problem", + +'complete_form' => "You must complete the form fully before proceeding. Please go back and check the data you entered.", + +forum_no_access => "Sorry, you do not have reading permissions on this forum. If this is a password protected forum, please log into the forum by clicking on the forum link from the board index page.", +name_too_long => "The username you entered was too long", +msg_blocked => "This member has chosen not to be contactable by the IBForums Messenger", +no_msg_title => "You must enter a message title", +reg_link => "Register Now!", +wrong_pass => "Sorry, that was the incorrect password", +poll_no_guests => "Guests cannot vote", +no_such_user => "Sorry, we don't have a member with that name in our records, please try again and double check the data you entered.", +search_no_input => "You must enter a keyword(s) to search by!", +stf_no_msg => "You must enter a message to send", +invite_no_name => "You must enter your name", +poll_none_found => "We could not find that poll", +no_search_id => "No search file ID number was recorded, please try again", +no_guest_new_topics => "sorry, but the board administrator does not allow guests to start new posts in this forum. If you are a registered member please log in", +no_user => "Sorry, we could not find that member", +no_search_words => "You did not enter any keywords to search by", +invalid_login => "Invalid log in. Either your password or your username was not correct. Please go back and double check the information you entered. Please remember that usernames and passwords are case sensitive, so 'PaSSwOrD' is different from 'password'", +web_too_long => "Your website entry is too long.", +stf_no_email => "You must enter the email address of the person you are sending this page to", +mem_id_wrong => "Sorry, but your Member ID is not in the correct format", +forum_off => "Sorry, but this forum has been disabled", +no_newer => "There are no topics newer than this one", +poss_hack_attempt => "We are treating that action as a possible hack attempt, this action will be logged and the board administrator will be informed via email", +not_logged_in => "You are not logged in", +int_too_long => "Your Interests entry is too long.", +no_to_member => "We could not find that member in our database, please check the spelling of the name", +invalid_ext => "You are not allowed to use that image extension on this board. A valid format is: http://www.domain.com/picture.gif, an invalid format is: http://www.domain.com/picture.one.gif", +subject_long => "The email subject was too long", +move_already_moved => "This is the original moved topic and it can't be moved again, if you want to move it again, please choose the topic that was moved into the previous destination forum", +cookie_error => "Sorry, there is a cookie error, please re-log in", +no_attach => "Attachments are not allowed for this forum", +no_aol => "That member does not have a valid AOL Name", +name_too_short => "The username you entered was too short", +missing_files => "Sorry, some required files are missing, if you intended to view a topic, it's possible that it's been moved or deleted. Please go back and try again.", +post_too_long => "Sorry, your post was too long, please reduce it", +locked_topic => "Sorry, this topic has been locked", +flash_url => "That is not a valid Flash URL", +profile_guest => "We could not find this member in our database, it's possible that the member has been removed.", +stf_no_subject => "You must enter a subject for the email", +not_icq_number => "That is not a valid ICQ number", +rp_noemail => "You must enter a valid email address before we can send this report", + +upload_to_big => "The file you requested to upload was greater than the limit the administrator has set for your group.", + + +user_exists => "We already have a member by that name, please choose another", +no_msg_chosen => "You did not select any messages. You select them by clicking on the checkbox on the far right of each entry", +error_back => "Go Back", +log_in_yes => "You are currently logged in as ", +flash_number => "The height and width attributes of the flash tag have to be a number", +no_avatar => "The administrator has disabled avatars on this board", +poll_you_voted => "You have already voted in this poll", +not_url_photo => "That is not a valid URL for your Photo. We do not allow dynamic pages in the IMG tags", +no_action => "Please don't adjust the generated URLs. If you came here in error, please go back and try again", +no_guest_posting => "Sorry, but the board administrator has disabled guest posting in this forum, if you are a registered member - please log in", +invalid_email => "You must enter a VALID email address", +no_start_polls => "You cannot start a poll", +move_no_forum => "You did not choose a destination forum", +no_use_messenger => "You are not allowed to use the messenger feature on this board", +no_msg => "You must enter a message", +no_dynamic => "Sorry, dynamic pages in the [IMG] tags are not allowed", +no_rules_show => "There isn't any FAQ/Rule files for this forum", +membername_none => "Sorry, we could not find an account with that membername", +log_in_now => "Log in Now!", +no_subject => "You did not enter a subject for the email", +pass_too_long => "The password entered was too long", +username_short => "The username you entered was too short", +already_sub => "You are already subscribed to this topic", +forgot_pass => "Forgotten your password?", +no_older => "There are no topics older than this one", +stf_no_name => "You must enter the name of the person you are sending this page to", +no_view_topic => "You do not have permission to view this topic", +IBForums_error => "IBForums Error", +no_replies => "Sorry, you do not have permission to reply to that topic", +error_title => "IBForums Message", +no_chosen_member => "You didn't enter or choose a name to send the message to!", +pass_blank => "Your password field was not complete", +flood_control => "Flood control is enabled on this board, please wait <#EXTRA#> seconds before replying or posting a new topic", +no_message => "You did not enter a message for the email", +member_in_add_book => "You already have that member stored in your address book", +posting_off => "Your posting permissions have been removed", +move_same_forum => "You cannot move this topic into the same forum, well, you could but there wouldn't be a lot of point", +error_txt => "An error has occured", +rp_nomsg => "You must enter a message to the moderators", +too_many_images => "Sorry, but your post contains more the allowed number of images", +invite_no_email => "You must enter your email address", +not_op => "Sorry, you do not have permission to edit that message", +no_poll_reply => "The poll creator has created this as a vote-only topic", +request_hack => "Some of the data did not match our records, we are treating this as a possible hack attempt!", +photo_too_long => "Your Photo field is too long.", +avatar_invalid_ext => "Sorry, that is not a valid file extension", +no_reply_polls => "You cannot vote in this poll", +no_post => "You must enter a post", +calendar_not_all => "Either complete all the birthdate fields, or leave them all blank - we cannot process partial birthdates", +referrer_fail => "IBForums does not allow offsite posting.", +not_authorised => "Sorry, but you have yet to validate your user account. Please check the email account you registered with.", +memid_blank => "Your member Id field was not complete", +session_id_no_match => "Fatal Error, your session ID cookie does not match any of the data!", +no_email_stored => "Sorry, but we could not find that email address in our records", +topictitle_too_long => "The topic title you entered is too long", +no_such_msg => "That message does not exist", +wrong_name => "Sorry, we could not find a membername matching your input (this could have been from a log in form, or a session authentication).", +too_many_emoticons => "You have posted a message with more emoticons that this board allows. Please reduce the number of emoticons you've added to the message", +no_topic_title => "You must enter a topic title", +guest_abuse => "We could not determine your posting status. Please try logging back in, or if you are a guest - please try again", +password_no_match => "The password is not the same as the data entered", +already_logged_in => "That user is already logged in!", +no_guests => "Sorry, but this function isn't available to guests", +no_permission => "Sorry, but you do not have permission to use this feature. If you are not logged in, you may do so using the form below.", +pass_no_match => "The Two New Passwords do not match", +server_too_busy => "Sorry, the server is too busy to handle your request, please try again in a moment", +loc_too_long => "Your Location entry is too long.", +poll_you_created => "You created this poll", +no_usepm_member => "This message can not be sent because the recipient does not have permission to use the private messenger.", +go_back => "Please go back and correct this error", +log_in_no => "You are NOT logged in", +pass_too_short => "The password entered was too short", +no_register => "Sorry, the board administrator has switched off Registrations", +move_no_topic => "That Topic is not in our Database, it's possible it was deleted", +flash_too_big => "Sorry, but the flash movie you posted was either too large in height, width or both", +end_subs_value => "You must enter a numeric value for the 'End Subscription' field", +no_starting => "Sorry, you do not have permission to start a topic in this forum", +no_search_forum => "You did not choose any forums to search in, or the forums you chose to search in are password protected. If this is the case, please make sure you are logged into the password protected forums before searching.", +not_registered => "Guests cannot peform this action, if you are a registered member, please log-in", +no_icq => "That member does not have a valid ICQ Number", +not_aol_name => "That is not a valid AOL Identity", +private_email => "That member has chosen to keep their email address private", +user_agent_no_match => "You are using a different computer than the one you logged in under.", +poll_add_vote => "Vote!", +you_are_banned => "Sorry, you are not permitted to use this board", +incorrect_use => "Incorrect use of one of the IBForums files", +no_search_results => "Sorry, but we did not find any matches", +request_error => "An error occured, not all of the required fields were sent from the validation link. Please ensure that they whole link was entered, it's possible that your email clients auto-wrapper cut the link in half. Please try again.", +not_yahoo_name => "That is not a valid YAHOO name", +stf_invalid_email => "The email address you entered was of an incorrect format", +pass_link => "Click here!", +no_email => "You must enter an email address to request your log-in details", +max_message_from => "Your Private Messenger box is full. You have reached the limit set for this board. You will need to delete some of your currently saved messages from either your inbox, or your saved items folder.", +cant_use_feature => "You are not allowed to use this part of the board", +memid_too_long => "Your member Id field was too long", +moderate_no_permission => "You do not have permission to carry out that function", +too_many_img => "Sorry, but you have posted more images than you are allowed to", +no_sub_id => "Sorry, we could find that topic subscription", +max_message_to => "That member's Private Messenger box is full and is unable to accept any new messages.", +error_not_registered => "Not Registered? ", +username_long => "The username you entered was too long", +memid_too_short => "Your member Id field was too short", +sig_too_long => "Your signature is too long.", +no_username => "You must enter a username", +no_avatar_selected => "No avatar was selected, please go back and correct this error", +incorrect_avatar => "Sorry, but that is not a valid avatar", +avatar_invalid_url => "Sorry, but the URL you entered for your avatar was incorrectly formatted.", +rp_noname => "You must enter your name before we can send this report", +illegal_img_ext => "Sorry, but you cannot use that file extension for an image tag", +cannot_remove_dir => "You cannot remove that virtual directory", +email_exists => "That email address cannot be used as it is already in our records", +please_complete_form => "Please complete the form fully before submitting it", +invite_no_email_f => "You must enter an email address for your friend", +move_no_source => "No source forum was chosen", +log_in => "Not Logged in?", +data_incorrect => "One of the data fields contained the incorrect type of data, please double check the URL or data you entered into the form", +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_forum.php b/upload/lang/en/lang_forum.php new file mode 100644 index 00000000..ee0e76a0 --- /dev/null +++ b/upload/lang/en/lang_forum.php @@ -0,0 +1,64 @@ + "Enter Keywords", +'search_forum' => "Search this forum:", +'search_go' => "Go", + +last_post_by => "Last Post by:", +pm_open_new => "Open Topic (new replies)", +h_topic_title => "Topic Title", +last_updated => "Last Updated:", +logged_in => "You have been authorised to access this forum", +forum_jump => "Forum Jump", +re_order_forum => "Reorder this forum", +h_last_action => "Last Action", +no_topics => "No topics were found. This is either because there are no topics in this forum, or the topics are older than the current age cut-off.", +topic_sp_pages => "Pages", +pm_hot_new => "Hot Topic (new replies)", +show_25_days => "the last 25 days", +mark_as_read => "Mark this forum as read", +show_20_days => "the last 20 days", +mod_cp => "Moderators Control Panel", +sort_by_date => "last post date", +sort_by_last_poster => "last poster", +pm_open_no => "Open Topic (no new replies)", +single_page_forum => " ", +h_topic_starter => "Topic Starter", +f_pass_submit => "Check my authorisation", +sort_text => "sorted by <#SORT_KEY_HTML#> in <#ORDER_HTML#> from <#PRUNE_HTML#>", +sort_by_views => "number of views", +enter_pass => "Forum Password", +show_all => "the beginning", +showing_text => "Showing <#MATCHED_TOPICS#> of <#TOTAL_TOPICS#> topics ", +pm_locked => "Locked Topic", +pm_moved => "Moved Topic", +need_password => "Please enter the Forum Password", +show_year => "the last year", +need_password_txt => "This forum is protected by a password. Please do not attempt to enter a password unless you are authorised. All failed attempts are logged and you may have your posting rights removed upon repetitive failure.

Please ensure that your browser is capable of storing temporary cookies", +show_90_days => "the last 90 days", +back_to_forum => "Go back to the forum", +pm_poll => "Poll (new votes)", +pm_hot_no => "Hot Topic (no new replies)", +show_today => "today", +show_15_days => "the last 15 days", +topic_started_on => "This topic was started:", +show_10_days => "the last 10 days", +sort_by_poster => "topic starter", +show_60_days => "the last 60 days", +pm_poll_no => "Poll (no new votes)", +show_5_days => "the last 5 days", +h_replies => "Replies", +sort_by_replies => "number of replies", +multi_page_forum => "Pages:", +h_hits => "Views", +show_30_days => "the last 30 days", +descending_order => "descending order", +ascending_order => "ascending order", +sort_submit => "Go!", +show_7_days => "the last week", +sort_by_topic => "topic title", +sort_by_start => "topic start date", +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_global.php b/upload/lang/en/lang_global.php new file mode 100644 index 00000000..25e5be96 --- /dev/null +++ b/upload/lang/en/lang_global.php @@ -0,0 +1,92 @@ + "GZIP Enabled", +'gzip_off' => "GZIP Disabled", + + + + +'warn_offline' => "(OFFLINE)", + +'all_emoticons' => "Show All", + +'jmp_go' => "Go!", +'forum_jump' => "Forum Jump", + +'yes' => "Yes", +'no' => "No", + +'ct_size' => "SIZE", +'ct_lrg' => "Large", +'ct_sml' => "Small", +'ct_lest' => "Largest", + +'ct_font' => "FONT", +'ct_arial' => "Arial", +'ct_times' => "Times", +'ct_courier' => "Courier", +'ct_impact' => "Impact", +'ct_geneva' => "Geneva", + +'ct_color' => "COLOR", +'ct_blue' => "Blue", +'ct_red' => "Red", +'ct_purple' => "Purple", +'ct_orange' => "Orange", +'ct_yellow' => "Yellow", +'ct_grey' => "Gray", +'ct_green' => "Green", + +'msg_full' => "Messenger FULL!", + +ba_edit => "Edit", +ba_delete => "Delete", + +submit_li => "Log in", +quote_text => "Quote", +pass => "Password", +thanks => "Thanks", +forum_read => "The forum has been marked as read", +guest_stuff => "Welcome Guest", +offline_title => "IBForums Offline Mode", +you_last_visit => "You last visited on:", +code_sample => "Code Sample", +transfer_you => "Please wait while we transfer you...", +M_1 => "Jan.", +M_2 => "Feb.", +admin_login => "Administrators Log in", +M_3 => "Mar.", +D_0 => "Sun", +new_posts => "New Posts", +M_4 => "April", +D_1 => "Mon", +M_5 => "May", +D_2 => "Tue", +M_6 => "June", +you_running_time => "Your last action was on:", +D_3 => "Wed", +M_7 => "July", +admin_cp => "Admin CP", +D_4 => "Thur", +M_8 => "Aug.", +D_5 => "Fri", +M_9 => "Sep.", +your_cp => "Your Control Panel", +D_6 => "Sat", +name => "Name", +register => "Register", +'logged_in_as' => "Logged in as: ", +M_10 => "Oct.", +M_11 => "Nov.", +M_12 => "Dec.", +msg_new => "%s new messages", +offline => "Sorry, the boards are offline at the moment", +log_out => "Log Out", +dont_wait => "Or click here if you do not wish to wait", +stand_by => "Please stand by...", +your_messenger => "Your messenger", +log_in => "Log In", +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_help.php b/upload/lang/en/lang_help.php new file mode 100644 index 00000000..deb5c7ec --- /dev/null +++ b/upload/lang/en/lang_help.php @@ -0,0 +1,18 @@ + "Here is the topic you chose to view", +results_title => "Your Help Search Results", +choose_file => "Choose a topic", +help_txt => "Welcome to the IBForums help database.

Simply choose from one of the titles to learn more about how IBForums works. Or, simply search for help files", +submit => "Search!", +search_txt => "Enter keywords to search for", +search_results => "Search Results", +results_txt => "Here are the results of the search you performed.", +help_topics => "Help Topics", +no_results => "Sorry, we could not find any help topics that matched your search criteria, please try again", +help_topic => "Help Topic", +page_title => "Help Files", +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_legends.php b/upload/lang/en/lang_legends.php new file mode 100644 index 00000000..98951bf8 --- /dev/null +++ b/upload/lang/en/lang_legends.php @@ -0,0 +1,10 @@ + "Emoticons", +'emo_type' => "Code", +'emo_img' => "Image", + +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_login.php b/upload/lang/en/lang_login.php new file mode 100644 index 00000000..4054dbaf --- /dev/null +++ b/upload/lang/en/lang_login.php @@ -0,0 +1,42 @@ + "You must already have registered for an account before you can log in.
If you do not have an account, you may register by clicking the 'register' link near the top of the screen", + +force_login => "The board administrator requires that all members log in before viewing the board", +wrong_name => "Sorry, we could not find a member called <#NAME#>, are you sure it's correct?", +please_log_in => "Please enter your details below to log in", +cookie_no => "No", + +options => "Options", +wrong_pass => "Sorry, the password was wrong. All passwords are case sensitive", +admin_force_log_in => "The board administrator requires all members to log in", +log_in_submit => "Log me in", +anon_name => "Don't add me to the active users list", +add_name => "Yes, add my name to the active users list", +errors_found => "The following errors were found:", +thanks_for_logout => "You are now logged out", + +forgot_pass => "I've forgotten my password!", + +thanks_for_login => "you are now logged in as:", + +log_out => "Log Out", +enter_name => "Please enter your name", + +cookies => "Remember me?
If enabled, you will be automatically logged in again when you visit.
This is not recommended for shared computers.", + +enter_pass => "Please enter your password", +pass_link => "Click here!", + +privacy => "Privacy, do you want to appear on the active users list?", + + +cookie_yes => "Yes", +blank_fields => "Please enter your name and password before continuing", +log_out_submit => "Log me out", +log_in => "Log In", +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_mlist.php b/upload/lang/en/lang_mlist.php new file mode 100644 index 00000000..3054fdab --- /dev/null +++ b/upload/lang/en/lang_mlist.php @@ -0,0 +1,27 @@ + "Group", +member_aol => "AOL", +sort_by_name => "Member Name", +member_joined => "Joined", +member_icq => "ICQ", +sorting_text => "Showing <#FILTER#> by <#SORT_KEY#> in <#SORT_ORDER#> with <#MAX_RESULTS#> results per page", +member_name => "Name", +member_posts => "Posts", +multi_pages => "Multiple Pages", +sort_by_posts => "Total Posts", +descending_order => "Descending Order", +ascending_order => "Ascending Order", +show_admin => "Administrators", +member_level => "Level", +sort_submit => "Go!", +show_all => "All Members", +member_email => "Email", +sort_by_joined => "Join Date", +sort_by_level => "Member Level", +show_staff => "Board Staff", +page_title => "Member List", +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_mod.php b/upload/lang/en/lang_mod.php new file mode 100644 index 00000000..f1918b34 --- /dev/null +++ b/upload/lang/en/lang_mod.php @@ -0,0 +1,165 @@ + "Topics/Posts have been approved or deleted - redirecting back to check for more...", + +'cp_prune' => "Manage Topics in forum: ", +'cp_prune_days' => "(Re)move topics with no new posts over [x] days.
(x = value entered)", +'cp_prune_type' => "(Re)move which type of topic?", +'cp_pday_open' => "Open Topics only", +'cp_pday_closed' => "Locked Topics only", +'cp_pday_link' => "Move linked Topics only", +'cp_pday_all' => "Any type of topic", +'cp_prune_replies' => "..with less than [x] replies
(Leave this blank to remove topics regardless of replies)", +'cp_prune_member' => "...started by member
(Leave blank to (re)move regardless of topic starter)", +'cp_prune_sub1' => "Check Form Submission", +'cp_prune_sub2' => "Prune this forum!", +'cp_action' => "Prune Action", +'cp_ac_prune' => "PRUNE ONLY, DON'T MOVE", +'cp_prune_text' => "You may remove topics or move topics to another forum based on your criteria. To move topics, choose a destination forum from the drop down menu. To simply remove the topics, choose 'PRUNE ONLY' from the forums drop down menu. Moving topics will not leave moved links in the source forum", +'cp_pages' => "Page: ", +'cp_error_no_mem' => "We could not locate a member by that name, please try again", +'cp_error_no_topics' => "We could not locate any topics to manage.

(Note: If you have received this notice after approving or deleting topics/posts, this notice simply means that there are no more topics/posts to approve.)", +'cp_total_topics' => "Total topics in this forum", +'cp_total_match' => "Total topics to (re)move", +'cp_check_result' => "Form Check Results", +'cp_check_text' => "Continue only if satisfied with the results, clicking the link below WILL carry out the action. If you need to make any changes, please go back and do so now.", +'cp_mod_topics_title2' => "Moderating New Topics in: ", +'cp_mod_posts_title2' => "Moderating New Posts in: ", +'cp_prune_domove' => "Move the topics!", +'cp_prune_dorem' => "Remove the topics!", +'cp_same_forum' => "You cannot move into the same forum", +'cp_no_forum' => "That is not a valid destination forum", +'cp_3_title' => "Topic Title", +'cp_3_replies' => "Queued Replies", +'cp_3_approveall' => "Approve All", +'cp_3_viewall' => "Manage Queued", +'cp_3_postno' => "Post #", + +'cp_error_no_subforum' => "You cannot choose a sub category as a destination forum", + +'cp_1_approve' => "Approve", +'cp_1_remove' => "Delete", +'cp_1_selected' => "selected posts", +'cp_1_go' => "Go!", + +'cp_results' => "Result", +'cp_result_move' => "Number of topics moved: ", +'cp_result_del' => "Number of topics deleted: ", + +'cp_edit_user' => "Edit a users profile", +'cp_find_user' => "Enter part, or all of the username you wish to edit", +'cp_find_submit' => "Find user", +'cp_find_2_user' => "Please select a member from the matches", +'cp_find_2_submit' => "Edit users profile", +'cp_no_matches' => "There was no data returned from your search input, please try again", +'cp_admin_user' => "You cannot edit an administrators profile from this control panel", +'cp_no_perms' => "You do not have permission for this action.", + +'cp_remove_av' => "Remove users avatar?", +'cp_edit_website' => "Website", +'cp_edit_location' => "Location", +'cp_edit_signature' => "Signature", +'cp_edit_interests' => "Interests", + + + +'cp_mod_in' => "Current Forum", +'cp_topics_wait' => "Topics Pending Moderation", +'cp_posts_wait' => "Posts Pending Moderation", + +'cp_modcp_ptitle' => "Moderators Control Panel", +'cp_modcp_home' => "Moderators CP Home", + +'cp_error' => "Results...", +'cp_welcome' => "Welcome!", +'cp_welcome_text' => "Welcome to your moderators control panel.
From here you will be able to process moderated topics and posts, mass move topics and prune posts. Simply choose an option from the left menu bar to proceed.", + +'cp_mod_topics_title' => "Moderate Postings", +'cp_mod_topics' => "Moderate New Topics", +'cp_mod_posts' => "Moderate New Posts", + +'cp_manage_posts' => "Manage Postings", +'cp_prune_posts' => "Mass Move /Prune Topics", + +'cp_mod_users_title' => "Manage Users", +'cp_user_edit' => "Edit Users Profile", + + + + + + + + + + +'leave_link' => "Leave a link to the new topic in the source forum?", + +'yes' => "Yes", +'no' => "No", + +'move_exp' => "Please select the destination forum and method of moving", + +'pe_top' => "Editing Poll: ", +'pe_option' => "Poll Option:", + +'pe_submit' => "Edit this poll", + +'pe_pollonly' => "Make poll only (no new replies allowed?)", +'pe_yes' => "Yes", +'pe_no' => "No", +'pe_done' => "Poll Edited", + +'pd_top' => "Deleting Poll:", + +'pd_text' => "Please confirm poll removal by clicking the button below", +'pd_submit' => "Remove this poll", +'pd_redirect' => "Poll Removed", + + +post_deleted => "Post deleted", +top_open => "Opening a topic in ", +top_edit => "Editing Topic ", +submit_move => "Move this topic", +UNPIN_TOPIC => "UnPin Topics", +OPEN_TOPIC => "Open this topic", +DELETE_TOPIC => "Delete this topic", +top_close => "Closing a topic in ", +t_open => "Open Topic", +t_edit => "Edit Topic", +p_moved => "Topic Moved", +p_pinned => "Topic Pinned", +t_delete => "Delete Topic", +top_move => "Move Topic ", +p_edited => "Topic Edited", +MOVE_TOPIC => "Move this topic", +edit_f_desc => "Topic Description", +CLOSE_TOPIC => "Close this topic", +t_close => "Close Topic", +delete_topic => "Deleting Topic, only continue if you wish to delete this topic, there will be no other confirmation screens.", +move_from => "Move this topic from", +p_deleted => "Topic Deleted", +t_move => "Move Topic", +edit_f_title => "Topic Title", +final_rebuild => "<#DELETE_COUNT#> duplicate posts removed. The new reply counter has been set to <#REPLY_COUNT#>", +to => "to", +close_topic => "NOTE: You do not have to post a message - it is optional", +submit_close => "Close this topic", +post_optional => "NOTE: You do not have to post a message - it is optional", +p_closed => "Topic Closed", +top_delete => "Deleting Topic ", +p_opened => "Topic Opened", +edit_topic => "Editing Topic Details", +p_pdeleted => "Post Deleted", +delete_old => "Source forum option:", +PIN_TOPIC => "Pin Topics", +post_icon => "Post Icons", +DELETE_POST => "Delete Posts", +submit_open => "Open this topic", +submit_edit => "Edit this topic", +submit_delete => "Delete this topic", +p_unpinned => "Topic Unpinned", +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_msg.php b/upload/lang/en/lang_msg.php new file mode 100644 index 00000000..5677a861 --- /dev/null +++ b/upload/lang/en/lang_msg.php @@ -0,0 +1,149 @@ + "Preview", + +'pm_pre_button' => "Preview Message", + +'pmp_title' => "You have a new private message!", + +'pmp_string' => "Your newest message is from <#NAME#>, entitled '<#TITLE#>'
This was sent on <#DATE#>", + +'pmp_go_inbox' => "Take me to my inbox", + +'pmp_ignore' => "Close this window", + +'pmp_thiswindow' => "Open in this window", + + +'forum_jump' => "Forum Jump", + +'author' => "Author", +'m_pmessage' => "Private Message", +'all_folders' => "All folders", +'archive_title' => "Archive Messages", +'archive_text' => "Please select the archive criteria.
The archived messages will be compiled into a single file and emailed to your address as an attachment of your choice.", +'arc_folders' => "Archive from which folder?", +'arc_dateline' => "Archive messages received in the last", +'arc_days' => "days", +'arc_alldays' => "all", +'arc_delete' => "Delete messages after archiving?", +'arc_yes' => "Yes", +'arc_no' => "No", +'arc_submit' => "Process", +'arc_complete' => "The archiving process has completed.
You should receive your email shortly with an attachment containing <#NUM#> archived messages.", +'arc_comp_title' => "Archive Complete", + +'arc_email_subject' => "Private Message Archive Attached", + +'arc_type' => "Compile datafile as", + +'arc_html' => "HTML page", +'arc_xls' => "Importable MS Excel datafile", + +'arc_max' => "Number of messages to archive", + +t_book => "Address Book", +prefs_title => "Messenger Preferences", +m_posts => "Posts:", +from_title => "Message Title", +message_from => "Sender", +mem_read_msg => "has read this message", +no => "No", +read_rec_title => "Read Receipt:", +delete_button => "delete", +from_date => "Date (oldest first)", +message_date => "Date", +enter_a_name => "Members name", +to_whom => "Recipients Name", +prefs => "Preferences", +read_rec_notify => "Get notified when this message is read", +prefs_help => "You may set up your messenger preferences from here.", +auto_sent_add => "Add a copy of this message to my sent items folder", +sort_by => "Sort Messages by", +member_added => "Member has been added to your address book", +move_button => "move to", +a_msg_no_new => "You have no new messages", +can_contact => "Message Allow", +'send' => "Send New Message", +sent_text => "Your message '<#MESSAGE_TITLE#>' has been sent to <#TO_MEMBER#>. They will now be informed that they have a new message.", +'welcome' => "Welcome to your messenger", +cannot_contact => "Message Ban", +member_name => "Member Name", +viewing_message => "Viewing Message:", +submit_send => "Send Message", +delete => "Delete", +add_to_book => "Add to contacts", +send_header => " you can choose from the list of stored names from your address book, or enter the name of the member you wish to message", +yes => "Yes", +goto_folder => "Jump to folder", +enter_name => "OR Enter the members name here", +enter_message => "Enter your message", +prefs_submit => "Submit Changes", +allow_msg => "Allow this member to message you?", +sent_on => "Sent on", +sent_url => "Click here to return to your messenger", +address_list_empty => "Address list empty", +msg_deleted => "That message has been deleted", +out_box => "Outbox", +t_welcome => "Welcome to your messenger", +max_msg => "Maximum message size is <#MAX_MSG_SIZE#> k", +sent_title => "Your Message has been sent", +submit_address_edit => "Edit this entry", +member_add => "Add a member", +move_or_delete => "or", +address_list => "Choose from your address book", +prefs_new => "Add New Virtual Directories", +selected_msg => "the selected messages", +from_date_new => "Date (newest first)", +address_title => "Your Address Book", +no_msg_chosen => "You did not select any messages. You select them by clicking on the checkbox on the far right of each entry", +from_name => "Member", +new_message => "New Message Status", +inbox_no_msg => "This folder is currently empty", +address_current => "Members already in your list", +your_options => "Your Options", +send_title => "Send a new message", +posted => "Posted", +msg_title => "Message Title", +quick_help => "A brief overview of you messenger", +submit_address => "Add this member to my address book", +icon_read => "Read messages", +cannot_remove => "Cannot Remove", +goto_submit => "Go!", +m_joined => "Joined:", +t_title => "Your Messenger", +message_read_state => "Read?", +other => "Other", +enter_desc => "Enter a short description", +c_msg_full => "
WARNING: YOUR FOLDERS ARE FULL
You MUST delete some saved messages in your inbox or folders before you can receive any more private messages", +msg_body => "Message", +dir_title => "Current Messenger Folder:", +saved_sent_msg => "Sent: ", +in_box => "Inbox", +address_none => "You have no members in your address book at the moment", +a_msg_new => "You have <#NEW_MESSAGES#> new messages!", +member_options => "Options", +prefs_text_a => "You may edit the names, or delete the name to delete this virtual directory. Please note, that all messages in this directory will be lost if you delete this directory", +edit => "Edit", +enter_block => "Options", +prefs_text_b => "You may add extra directories. You do not have to use all the input boxes.", +icon_unread => "Unread messages", +sort_submit => "Sort Messages!", +splash => "Summary", +current_sort => "Messages are currently sorted by: ", +member_edit => "You may edit this address book entry.", +contact => "Address Book", +message_options => "Options", +send_help => "This is where you can send private messages to other members from.", +no_reply => "You haven't replied to this message", +c_msg_total => "You have <#NUM#> total messages in all your folders.", +read_rec_text => "Original message sent on:", +button_preview => "Preview", +m_group => "Group:", +prefs_current => "Current Virtual Directories", +message_to => "This message was sent to", +message_title => "Message Title", +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_online.php b/upload/lang/en/lang_online.php new file mode 100644 index 00000000..d4afd403 --- /dev/null +++ b/upload/lang/en/lang_online.php @@ -0,0 +1,36 @@ + "Viewing Forum:", +WHERE_SR => "Viewing Forum Rules:", +WHERE_ST => "Viewing a topic in:", +WHERE_Login => "Logging in...", +WHERE_Post => "Posting in forum:", +WHERE_Reg => "Registering...", +WHERE_Online => "Viewing Online List", +WHERE_Members => "Viewing the Members List", +WHERE_Help => "Viewing the Help Files", +WHERE_Search => "Searching...", +WHERE_Print => "Printing Topic:", +WHERE_Forward => "Emailing topic:", +WHERE_Msg => "Using Personal Messenger", +WHERE_UserCP => "Using User CP", +WHERE_Mail => "Contacting member via email", +WHERE_Invite => "Inviting a friend to the board", +WHERE_ICQ => "Contacting member via ICQ", +WHERE_AOL => "Contacting member via AIM", +WHERE_Profile => "Viewing Members Profile", +WHERE_Stats => "Viewing Stats", +WHERE_ModCP => "Using Moderators CP:", +member_name => "Member Name", +guest => "Guest", +board_index => "Viewing Board Index", +n_a => "[ N/A ]", +pages => "Pages:", +'time' => "Time", +where => "Location", +user_ops => "Options", +page_title => "Online Users", +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_post.php b/upload/lang/en/lang_post.php new file mode 100644 index 00000000..2f5f34bf --- /dev/null +++ b/upload/lang/en/lang_post.php @@ -0,0 +1,144 @@ + "Roll your mouse over the button for more information.
Hitting 'ALT' and 'c' closes current tag", + +'unreg_namestuff' => "Unregistered User Info", + +mod_options => "After posting...", + +mod_close => "Close this topic", +mod_pin => "Pin this topic", +mod_nowt => "Don't pin or close", + +'msg_no_title' => "You must enter a message title", + +'tt_topic_settings' => "Topic Settings", +'tt_options' => "Options", +'tt_poll_settings' => "Poll Settings", + +'tt_subject' => "Topic Subscription Reply Notification", + +'upload_failed' => "The requested file upload failed. This is either because it was not in the correct format, or the file size was larger than that allowed. Please check the file you wish to upload and try again.", + +stat_flash => "Flash Movie posting: ", +poll_vote_added => "Your vote has been added", +post_to_quote_txt => "You may edit the post you are quoting here", +submit_poll => "Add my Poll", +js_used => "So far, you have used", +poll_no_guests => "Guests cannot vote", +submit_new => "Post New Topic", +js_max_length => "The maximum allowed length is", +poll_vote_created => "Your poll has been created", +stat_max_emo => "Maximum emoticons per post: ", +enabled => "Enabled", +jscode_text_enter_email => "Enter the email address", +errors_found => "THE FOLLOWING ERROR(S) WERE FOUND", +post_edited => "Your Post has been edited", +stat_dyn_img => "Dynamic image posting: ", +stat_max_img => "Maximum images per post: ", +replying_in => "Replying in", +poll_s_total => "Total Votes", +js_post => "Post", +email_address => "Your registered email address", + +no_post => "You must enter a post", +jscode_text_code => "Usage: [CODE] Your Code Here.. [/CODE]", +submit_reply => "Add Reply", +stat_allow_img => "[IMG] tag: ", +original_post => "Original Post", +html_on => "Posting HTML is allowed", +please_log_in => "You are not authorised to view this forum", +reply_added => "Your reply has been added", +no_topic_title => "You must enter a topic title longer than 2 characters", +too_many_emoticons => "You have posted a message with more emoticons that this board allows. Please reduce the number of emoticons you've added to the message", +no_poll_data => "There is are no poll questions, that makes for a rubbish poll!", +top_txt_new => "Post a new topic in", +posting_cond => "Posting Abilities", +html_off => "Posting HTML is NOT allowed", +jscode_error_no_title => "You must enter a title", +poll_null_vote => "View Results (Null Vote)", +poll_s_votes => "Votes", +moderate_topic => "Your new topic will be previewed by a moderator before it is added into this forum", +upload_text => "You may attach a file to this message.
Maximum file size (in bytes):", +invalid_ext => "You are not allowed to use that image extension on this board. A valid format is: http://www.domain.com/picture.gif, an invalid format is: http://www.domain.com/picture.one.gif", +reg_username => "Your Registered Username", +upload_title => "File Attachments", +poll_you_created => "You created this poll", +jscode_text_quote => "Usage: [QUOTE] Your Quote Here.. [/QUOTE]", +post_icon => "Post Icons", +jscode_error_no_url => "You must enter a URL", +moderate_post => "Your post will be previewed by a moderator before it is added to this topic", +flash_too_big => "Please reduce the size of the flash movie you are posting", +guest_name => "Enter your Name", +stat_flash_h => "Maximum Flash movie height: ", +topic_title => "Topic Title", +flash_url => "The URL you posted for the flash movie is not valid", +post_preview => "Post Preview", +poll_choices => "Poll Choices
Please put one answer per line. [ Maximum 10 answers ]", +non_quotes => "The number of opening quote tags does not match the number of closing quote tags", +max_length => "Maximum message length in characters:", +options => "Options", +jscode_text_flash_width => "Enter the Width of the movie in pixels. Maximum Width= ", +disabled => "Disabled", +js_no_message => "You must enter a message to post!", +poll_add_vote => "Vote!", +no_file_ext => "Please ensure that the file you are attempting to upload has a file extension", +help_cards => "Help Cards:", +review_topic => "Review the complete topic (launches new window)", +stat_flash_w => "Maximum Flash movie width: ", +ib_on => "iB Code is on", +jscode_error_no_height => "You must enter a height", +buttons_js => "Click or use the access key once to open and again to close", +editing_post => "Editing Post ", +posting_new_topic => "Posting New Topic", +jscode_text_enter_image => "Enter the complete URL for the image", +flash_number => "The width and height attributes of the flash movie must be numeric in value", +enable_sig => "Do you wish to enable your signature for this post?", +top_txt_edit => "Editing a post in", +poll_s_stats => "Statistics", +poll_you_voted => "You have already voted in this poll", +poll_to_many => "You have more than 10 poll choices, please reduce them", +jscode_text_enter_url => "Enter the complete URL for the hyperlink", +js_current => "Current Characters", +jscode_error_no_width => "You must enter a width", +jscode_text_enter_flash => "Enter the URL to the Flash movie.", +last_posts => "Last 10 Posts [ In reverse order ]", +top_txt_poll => "Creating a Poll", +too_many_img => "Sorry, but you have posted more images than you are allowed to", +topic_desc => "Topic Description", +unlimited => "( Not restricted )", +no_dynamic => "Sorry, dynamic pages in the [IMG] tags are not allowed", +invalid_mime_type => "You cannot upload this type of file", +post_options => "Post Options", +jscode_text_flash_height => "Enter the Height of the movie in pixels. Maximum Height= ", +post_to_quote => "Original Post to Quote", +poll_viewing_results => "Viewing poll results", +click_smilie => "Clickable Smilies", +button_spell => "Spell Check", +alert_flash => "You must enter a parameter for all the values!", +topic_title_long => "Topic titles cannot be longer than 50 characters", +poll_s_q => "Question", +ib_off => "iB Code is off", +new_post_added => "Your new post has been added", +top_txt_reply => "Replying to", +jscode_text_enter_url_name => "Enter the title of the webpage", +poll_only => "Make Poll Only?
(No replies allowed)", +posted_on => "Posted on", +post => "Enter your Post", +poll_not_enough => "A Poll is a choice, 1 entry is not a choice", +post_rules => "Posting Rules", +poll_s_choices => "Poll choices", +jscode_error_no_email => "You must enter an email address", +post_icon_txt => "You may choose a post icon", +submit_edit => "Submit Modified Post", +ib_code_buttons => "Code Buttons", +enable_emo => "Do you wish to enable emoticons for this post?", +quoting_post => "Quoting a Post in ", +js_characters => "characters", +email_title => "Reply to Topic Notification", +button_preview => "Preview Post", +check_length => "Check Message Length", +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_printpage.php b/upload/lang/en/lang_printpage.php new file mode 100644 index 00000000..20bde5a0 --- /dev/null +++ b/upload/lang/en/lang_printpage.php @@ -0,0 +1,13 @@ + "end", +forum => "Forum", +on => "on", +title => "Printable Version of Topic", +by => "Posted by", +start => "started by", +topic => "Topic", +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_profile.php b/upload/lang/en/lang_profile.php new file mode 100644 index 00000000..3e0f7f78 --- /dev/null +++ b/upload/lang/en/lang_profile.php @@ -0,0 +1,64 @@ + "User's local time", + +'head_title' => "Viewing Profile", + +'head_contact' => "Contact Details", + +'head_posts' => "Posting Information", + +'head_info' => "Member Information", + +'no_info' => "No Information", + +'click_here' => "Click Here", +'private' => "Private", + +'active_stats' => "Active Stats", + +'total_posts' => "Total Posts:", +'joined' => "Joined:", +'posts_per_day' => "Posts per day:", +'total_percent' => "of total forum posts", +'fav_forum' => "Most active in:", +'fav_posts' => "posts in this forum", +'fav_percent' => "of this member's posts", + +'communicate' => "Communicate", +"info" => "Information", +'post_detail' => "Posting Details", + +"back" => "back", + +'email' => "Email:", +'aim' => "AIM Name:", +'icq' => "ICQ Number:", +'yahoo' => "Yahoo Identity:", +'msn' => "MSN Identity:", +'pm' => "Private Message:", + +'page_title' => "Viewing Profile", + +'find_posts' => "Find all posts by this member", +'add_to_contact' => "Add to contact list", + +'edit_my_sig' => "Edit my Signature", +'edit_profile' => "Edit my Profile", +'edit_avatar' => "Avatar Options", + + +'mgroup' => "Member Group:", +'mtitle' => "Member Title:", +'homepage'=> "Home Page:", +'birthday' => "Birthday:", +'location' => "Location:", +'interests' => "Interests:", +'avatar' => "Avatar:", +'siggie' => "Signature:", + + +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_register.php b/upload/lang/en/lang_register.php new file mode 100644 index 00000000..116d5f65 --- /dev/null +++ b/upload/lang/en/lang_register.php @@ -0,0 +1,63 @@ + "Lost Password Form", +'lp_header' => "How to reset your password", + +'lp_text' => "Step One: Entering your account username

Enter your account username in the field below. The username is case insensitive.
Once you have submitted the form, you will receive an email asking for validation of this request to ensure that no malicious use has occured. This email will also contain your new password. Please note that you will not be able to log in with this password until you have validated your request.
You will be presented with a form.

Step Two: Validating the request

The email will contain instructions on how to validate this request.
Upon successful validation, you will be able to log in using your new password.
", + +'lp_send' => "Proceed", + +'lp_user_name' => "Enter your account username", + +'lp_subject' => "Password recovery information from", + +'lp_redirect' => "The password has been sent, taking you to the activate page...", + +'activation_form' => "Activation Form", + +registration_form => "Registration Form", +user_validate_text => "The board administrator wishes to preview all accounts before allowing you to register fully. Register now then please wait until you receive an email from the board administrator before attempting to log in.", +js_blanks => "You must complete all of the form", +reg_header => "Registration Instructions", +intro_proceed => "Proceed to log in", +js_no_check => "You cannot register unless you agree to the terms and check the 'I agree' checkbox", +title_reg => "Registration", +email_validate_text => "You will be sent an email to the email address you give after registering. Please read the email carefully, you will need to validate your account by clicking on a link in the email.", +done_reg_1 => "Your account has been activated! Proceeding to the board rules", +done_reg_2 => "Your account has been activated! Proceeding to log in", +board_rules => "Board Rules", +dumb_text => "Please ensure that you complete the form fully. The information you need will be in the email that was sent to you.", +registration_agree => "Registration Agreement", +agree_submit => "I agree", +email_address => "Please enter your email address
You will need to enter a real email address", +std_text => "Please ensure that you complete all the fields fully, taking particular care over the password fields.", +user_name => "Please choose a Username
Usernames must be between 3 and 32 characters long", +reg_success => "Registration Successful", +pass_word => "Please choose a Password
Passwords must be between 3 and 32 characters long", +re_enter_pass => "Please re-enter your password
It must match exactly", +thank_you => "Thank you", +registration_process => "Registration Process", +preview_reg_text => "Your registration has been successful. The administrator wishes to preview all new registered accounts before posting permissions are granted. The administrator has been notified of your registration.", +dumb_email => "Please enter the Email Address you registered with", +complete_form => "Please complete the form fully", +auth_text => "Your registration has been submitted.

The board administrator has chosen to require validation for all email addresses. Within the next 10 minutes (usually instantly) you'll receive an email with instructions on the next step. Don't worry, it won't take long before you can post!

The email has been sent to", +submit_form => "Submit my registration", +nav_reg => "Registration", +dumb_submit => "Proceed", +dumb_header => "Account Activation", + +'val_key' => "Validation Key:", +'user_id' => "User ID:", + +terms_service => "Terms of Service", +terms_service_text => "Please read fully and check the 'I agree' box ONLY if you agree to the terms", + + +email_address_two => "Please re-enter your email address", + +'click_wrap' => "Please remember that we are not responsible for any messages posted. We do not vouch for or warrant the accuracy, completeness or usefulness of any message, and are not responsible for the contents of any message. The messages express the views of the author of the message, not necessarily the views of this BB. Any user who feels that a posted message is objectionable is encouraged to contact us immediately by email. We have the ability to remove objectionable messages and we will make every effort to do so, within a reasonable time frame, if we determine that removal is necessary. You agree, through your use of this service, that you will not use this BB to post any material which is knowingly false and/or defamatory, inaccurate, abusive, vulgar, hateful, harassing, obscene, profane, sexually oriented, threatening, invasive of a person's privacy, or otherwise violative of any law. You agree not to post any copyrighted material unless the copyright is owned by you or by this BB.", + +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_search.php b/upload/lang/en/lang_search.php new file mode 100644 index 00000000..c5b11544 --- /dev/null +++ b/upload/lang/en/lang_search.php @@ -0,0 +1,77 @@ + "your search has been completed, please stand by as we take you to the search results.", + +'search_pages' => "Pages:", +'search_title' => "Search Engine", +'key_search' => "Search by Keywords", +'mem_search' => "Search by Member Name", +'keysearch_text' => "Simple Search: Enter a keyword or phrase to search by
Advanced Search: Join keywords with AND, OR to help define the search.
Asterisks '*' act as wildcards. (*bar* matches foobarbaz, etc).", +'match_name_ex' => "Match Exact Name", +'match_name_pa' => "Match Partial Name", +'keywords_title' => "Search Keywords", + +'search_options' => "Search Options", +'search_forums' => "Search in forum", +'search_cats' => "Search in category", +'search_where' => "Search Where?", +'search_refine' => "Refine Search", + +'search_results' => "Search Results", +'search_form' => "Search Form", + +'h_forum_name' => "Forum", + +'se_simple' => "Simple Search", +'se_advanced' => "Advanced", + +'in_posts' => "Search entire post", +'in_topics' => "Search titles only", + +'search_from' => "Search posts from..", + +'do_search' => "Perform the search", + +'today' => "Today", +'this_week' => "Last 7 days", +'this_month' => "Last 30 days", +'this_year' => "Last 365 days", +'ever' => "Any date", +'older' => "Older", +'newer' => "Newer", +'and' => "and", + +'sort_results' => "Sort results by...", + +'last_date' => "Last Posting Date", +'number_topics' => "Number of Replies", +'poster_name' => "Poster Name", +'forum_name' => "Forum Name", + +'in' => "in", + +'ascending' => 'ascending order', +'descending' => 'descending order', + +'order' => 'order', + +'active_topics' => "Active Topics", + +'active_no_topics' => "There were no active topics during those date ranges", + +'active_js_error' => "You cannot search for active topics using those dates. That'd just be silly. The first date MUST be older than the second date.", + +'active_st_text' => 'Show me active topics posted from (oldest date):', +'active_end_text' => "to (newest date):", + +'active_yesterday' => "Yesterday", +'active_today' => "Today", +'active_week' => "Last Week", +'active_month' => "Last Month", +'active_days' => "days ago", + +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_stats.php b/upload/lang/en/lang_stats.php new file mode 100644 index 00000000..26267869 --- /dev/null +++ b/upload/lang/en/lang_stats.php @@ -0,0 +1,35 @@ + "Todays Top 10 Posters", +'member' => "Member", +'member_posts' => "Total Member Posts", +'member_today' => "Posts Today", +'member_joined' => "Joined", +'member_percent' => "% of todays posts", +'total_today' => "Total posts today: ", +'no_info' => "No information is available at this time", + +'top_poster_title' => "Todays top 10 posters", + + +'forum_leaders' => "The moderating team", + +'leader_admins' => "Admins", +'leader_global' => "Global Moderators", +'leader_mods' => "Forum Moderators", + + +'leader_name' => "Member Name", +'leader_email' => "Email", +'leader_aol' => "AOL", +'leader_icq' => "ICQ", +'leader_location' => "Location", +'leader_forums' => "Forums", +'leader_all_forums' => "All Forums", + + + +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_topic.php b/upload/lang/en/lang_topic.php new file mode 100644 index 00000000..64e946a0 --- /dev/null +++ b/upload/lang/en/lang_topic.php @@ -0,0 +1,53 @@ + "Go to first unread post", +'edited_by' => "Edited by", + + + +EDIT_TOPIC => "Edit this Topic", +forum_jump => "Forum Jump", +UNPIN_TOPIC => "Unpin this Topic", +OPEN_TOPIC => "Open this topic", +adjust_level => "Adjust Warn Level", +attach_hits => "Number of downloads", +DELETE_TOPIC => "Delete this topic", +topic_moved => "This topic has moved, taking you to the correct forum", +pic_attach => "Attached Image", +m_posts => "Posts:", +mod_cp => "Moderators Control Panel", +multi_page_topic => "Pages:", +snitch_geezer_to_a_copper => "Report this post to a moderator", +MOVE_TOPIC => "Move this topic", +CLOSE_TOPIC => "Close this topic", +topic_page_h => "Topic", +member_warn_level => "Member Warn Level", +start_new_poll => "Start a new poll", +m_joined => "Joined:", +track_topic => "Track this topic", +js_del_1 => "Are you sure you want to delete this message?", +please_log_in => "You are not logged into this forum.", +js_del_2 => "Ok, no action has been taken", +start_new_topic => "Start a new topic", +moderation_ops => "Topic Options", +RECOUNT => "Rebuild Topic", +ip => "IP", +reply_to_topic => "Reply to this topic", +topic_stats => "<#POSTS#> replies since <#START#>", +single_page_topic => " ", +PIN_TOPIC => "Pin this Topic", +'print' => "Print this topic", +topic => "Topic", +posted_on => "Posted:", +attach_dl => "Download attachment", +DELETE_POST => "Delete Posts", +t_old => "Next Oldest", +t_new => "Next Newest", +forward => "Email this topic", +m_group => "Group:", +'back_top' => "Back to top", +'member_no' => "Member No.:", +); +?> \ No newline at end of file diff --git a/upload/lang/en/lang_ucp.php b/upload/lang/en/lang_ucp.php new file mode 100644 index 00000000..10ed07be --- /dev/null +++ b/upload/lang/en/lang_ucp.php @@ -0,0 +1,360 @@ + "Is daylight savings time in effect?
(If you have selected the correct time zone and the clock appears an hour out, check or uncheck box to suit)", + + + +'lp_subject' => "Email address change at", + +'avup_yes' => "You already have an uploaded avatar (shown at the top of this page)
Unless you choose to enter a URL for an avatar, or upload another avatar, your current uploaded avatar will remain", +'avup_no' => "You do not have an uploaded avatar stored, you may choose to upload an avatar by using the box above", + +'set_updated' => "Settings updated", + +'hide_session_txt' => "Do you wish to hide your session id in the links?
(Note: Your computer must be able to receive temporary cookies to use this feature)
Choosing 'no' may cause problems when sharing links with people on the same proxy as you.", + +'m_messenger' => "Messenger", + +'av_tt_one' => "I don't wish to use an avatar (remove all current)", +'av_tt_two' => "Selecting this option will remove all current avatars if you have any selected/uploaded or entered in the URL field", + +'mess_new' => "Send New PM", + +'mess_contact' => "Contact List", +'mess_folders' => "Edit Folders", + +'mess_inbox' => "Go to Inbox", + +'mess_archive' => "Archive Messages", + + +'forum_jump' => "Forum Jump", + +'m_personal' => "Personal Profile", +'m_contact_info' => "Edit Profile info", +'m_bio_info' => "Edit Biography", +'m_sig_info' => "Edit Signature", +'m_avatar_info' => "Edit Avatar Settings", + +'m_options' => "Options", + +'m_email_opt' => "Email Settings", +'m_board_opt' => "Board Settings", +'m_skin_lang' => "Skin and Languages", +'m_email_change' => "Change Email Address", +'m_passy_opt' => "Change Password", + +'m_tracker' => "Topic Tracker", +'m_view_subs' => "View subscriptions", + +'m_links' => "Personal Links", +'m_edit_links' => "Edit Links", + +'qc_header' => "Quick Clicks", + +'qc_messenger' => "Messenger", +'qc_inbox' => "|_ Inbox", +'qc_sent' => "|_ Sent Items", +'qc_compose' => "|_ Send Msg", +'qc_prefs' => "|_ Msg Prefs", + +'qc_search' => "Search", +'qc_home' => "Forum Home", +'qc_help' => "Help", + +'qc_your_links' => "Your links", + +'ta_size' => 'Notepad size:', + +'new_window' => "New Window", + +'subs_delete' => "Unsubscribe", + +'with_selected' => "with selected", + +'ta_s' => 'small', +'ta_m' => 'medium', +'ta_l' => 'large', + +'cp_edit_sig' => "Edit your signature", +'cp_current_sig' => "Your current Signature", +'cp_submit_sig' => "Update my Signature", + +'messenger_summary' => "Your messenger summary", +'total_messages' => "Total messages (in all folders)", +'messages_left' => "Message space left: ", +'folders_full' => "YOUR MESSENGER FOLDERS ARE FULL!", +'total_capacity' => "of total capacity", + +'change_email_title' => "Change your registered email address", + +'ce_new_email' => "Enter your new email address", +'ce_new_email2' => "Confirm the new email address", + +'ce_current' => "Your current email address: ", +'ce_auth' => "

PLEASE NOTE: You will have to re-activate your account after changing your email address.
An email will be sent to the email address you specify below, outlining what you need to do.

Proceeding with this action will log you out. It is strongly recommended that you reset your password before changing your email address if you are unable to remember your password.", + +'ce_redirect' => "An email has been sent, redirecting to the activation screen", + +'ce_subject' => "Email change request from ", + +'pass_change_text' => "You may change your password here.

We will attempt to update your current session after your successful password change. If, however, you do experience difficulties, please try logging out and logging back in before contacting a staff member to help resolve the problem", + +'pass_redirect' => "Your password has been changed. Depending on your cookie settings, you may need to log back in with your new password.", + +'upload_avatar' => "OR Upload an avatar", + +//---------------------- + +'cp_skin_preview' => "Preview this skin", + + +total_posts => "Total Posts", +aol_name => "AOLAIM Name", +home_page => "Home Page", +viewing_profile => "Viewing member profile", +interests => "Interests", +registration_date => "Registration Date", +change_email => "Email Address Change request", +no_posts => "Member has yet to post", +no_information => "No Information Entered", +msn_name => "MSN Identity", +location => "Location", +email_address => "Email Address", +profile_edited => "Your profile has been edited", +member_level => "Member Level", +post_average => "Post Average", +b_date => "Your Date of Birth", +send_pm => "Click here to send <# NAME #> a Private Message", +M_1 => "Jan.", +M_2 => "Feb.", +thank_you => "Thank you", +M_3 => "Mar.", +send_email => "Send <# NAME #> an email", +M_4 => "April", +D_0 => "Sun", +registration_process => "Email address change request", +M_5 => "May", +D_1 => "Mon", +per_day => "posts per day", +M_6 => "June", +D_2 => "Tue", +no_photo => "[ No Personal Photograph ]", +M_7 => "July", +D_3 => "Wed", +M_8 => "Aug.", +D_4 => "Thur", +M_9 => "Sep.", +D_5 => "Fri", +D_6 => "Sat", +hidden_email => "<# NAME #> has chosen to keep his/her email address private", +auth_text => "Your Email address change request has been processed.

The board administrator has chosen to require validation for all email addresses. Within the next 10 minutes (usually instantly) you'll receive an email with instructions on the next step.
The email has been sent to", +icq_number => "ICQ Number", +M_10 => "Oct.", +M_11 => "Nov.", +M_12 => "Dec.", +add_book => "Click here to add <# NAME #> to your contact book", +contact_header => "Contact Details", +signature => "Signature", +last_modification => "Last Profile Update", +yahoo_name => "Yahoo Identity", +personal_header => "Statistics and Personal Information for <# NAME #>", + +//---- + +'note_pad' => "Your personal note pad", +'submit_notepad' => "Update", + +'note_pad_empty' => "You may store post snippets, or any other information you need to hand here", + +month1 => "January", +birthday => "Your Date of Birth", +month2 => "February", +month3 => "March", +month4 => "April", +av_personal => "You are currently using a personal avatar", +width => "Width", +month5 => "May", +js_used => "You have used", +month6 => "June", +month7 => "July", +avatar_pre_title => "Pre-installed avatars", +month8 => "August", +lp_redirect => "Email dispatched", +month9 => "September", +settings_lang_txt => "Please select a language for the board interface", +settings_hour => "Hours", +edit_profile => "Edit your profile", +messenger_url => "Go to your messenger", +no => "No", +settings_time_txt => "You may adjust the base time zone
The time (including your current adjustment) is:", +personal_help => "This is where you can amend your personal profile for other visitors to view", +subs_forum => "Forum", +settings_submit => "Change my Account Options", +js_location => "Location", + +avatar_url_allowed => "
You can either select an avatar already installed on this board, or enter a URL for an image you've got uploaded on your website. Please choose which you'd prefer.", +privacy_settings => "Privacy Settings", +avatar_show_all => "
[ Help Cards: Show all avatars ]", +account_title => "Modify Your Account", +welcome => "Welcome to your control panel ", +maximum => "Maximum", +signature => "Your Signature", +avatar_pre_txt => "Please select an avatar from the list below, simply click on the avatar's name to view it.", +height => "Height", +icq => "Your ICQ UIN", +subs_replies => "Replies", +avatar_url_title => "Your image avatars", +avatar_title => "Your avatar options", +month10 => "October", +month11 => "November", +account => "Modify Account", +month12 => "December", +hide_email => "Hide my email address from other members", +account_email_txt => "Your Email Address", +settings_skin => "Board 'Skin'", +account_pass_new2 => "Please confirm your NEW password", +website => "Your website url", +account_pass_title => "Your Password", +personal_ops => "Your personal options", +settings_title => "Your Account Options", +yahoo => "Your Yahoo identity", +subs_cancel => "Cancel", + +account_email_title => "Your registered email address", +js_signature => "Signature", +settings_viewimg => "Do you wish to view images in posts, such as smilies and posted images?", +t_title => "Your control panel", + +av_none_selected => "[ No Avatar Selected ]", +subs_header => "Current Subscriptions", +profile_title => "Your personal profile", +board_prefs => "Board Preferences", +subs_left => "Days Left", +subs_topic => "Topic", +settings_viewava => "Do you wish to view members avatars when reading threads?", +personal_ops_txt => "this is where you can modify your personal information to allow others to find out a little more about you. This is also where you can set up your avatar. An avatar is a little image that is displayed under your name when you make a post.", +subs_start => "Subscribed on", +submit_email => "Amend my email settings", + + +'msg_options' => "Options", +avatar_dims => "Avatar Dimensions", +avatar => "Your avatar", +subs_view => "Views", +email_text_lp => "Lost Password request at", +avatar_ops_txt => "This is where you can choose your avatar to use when making a post. This is completely optional, but many members use them as a fun way to express themselves.", +js_max => "The maximumm allowed length is", +interests => "Your interests", +submit_profile => "Amend my profile", +avatar_click => "Click on one of the avatars in this list to add it into the 'Your Avatar' box.", +location => "Your Location", +avatar_url_ext => "The following file types are allowed: ", +email_address => "Your registered email address", +pm_reminder => "Send a confirmation email when I receive a new private message", +subs_last_post => "Last Post", +email => "Email Settings", +account_email_submit => "Change my Email Address", +settings => "Account Options", +photo => "You may enter a URL for a personal photograph
[This will only be displayed on your profile - not with your posts]", +js_so_far => "characters so far", +email_help => "This is where you can change your email settings", +settings_dopopup => "Do you wish to get a pop up notification when you get a new private message?", +settings_display => "Board Display Settings", +settings_skin_txt => "You may choose a 'skin' to use.
This will change the way the board looks", +send_full_msg => "Include a copy of the post when emailing me from a subscribed topic", +member_title => "Custom member title", +yes => "Yes", +account_pass_new => "Enter your NEW password", +settings_viewsig => "Do you wish to view members signatures when reading threads?", +js_interests => "Interests", +av_preset => "You are currently using a pre-installed avatar", +aol => "Your AOL identity", +settings_lang => "Board Interface Language", +end_subs => "Number of days a topic subscription lasts
(This is useful to automatically unsubscribe from a subscription after the number of days entered have passed)", +pixels => "pixels", +t_welcome => "Welcome to your control panel", +personal => "Personal Info", +daily_average => "Average number of posts per day", +avatar_ops => "Avatar Options", +account_pass_submit => "Change my Password", +profile_header => ", you may create and/or amend your personal profile. This will be viewable by everyone. All of this information is optional", +stats_header => "Your account summary", +settings_time => "Time Zone", +subs_title => "Your Topic Subscriptions", +no_posts => "You've yet to post", +subs => "Topic Tracker", +subs_none => "You are not subscribed to any topics", +current_avatar => "Avatar Preview", +subs_deleted => "The subscription has been deleted", +avatar_pre_submit => "Add this avatar to my profile", +msn => "Your MSN Messenger identity", +avatar_sub => "this is where you can choose to use an avatar under yourname when you post a message on these boards.", +registered => "You registered on ", +avatar_url_submit => "Add my own image as my avatar", +subs_by => "By:", +number_posts => "Total number of posts to date", +account_pass_old => "Enter your CURRENT password", +js_characters => "characters", +account_email_req => "You will receive an email asking you to verify this change", +email_title => "Your email settings", +av_current => "Your Current Avatar", +check_length => "Check Length", +admin_send => "Send me any updates sent by the board administrator", +); + + +// Time zones... + +$lang['time_-12'] = "(GMT - 12:00 hours) Enitwetok, Kwajalien"; +$lang['time_-11'] = "(GMT - 11:00 hours) Midway Island, Samoa"; +$lang['time_-10'] = "(GMT - 10:00 hours) Hawaii"; +$lang['time_-9'] = "(GMT - 9:00 hours) Alaska"; +$lang['time_-8'] = "(GMT - 8:00 hours) Pacific Time (US & Canada)"; +$lang['time_-7'] = "(GMT - 7:00 hours) Mountain Time (US & Canada)"; +$lang['time_-6'] = "(GMT - 6:00 hours) Central Time (US & Canada), Mexico City"; +$lang['time_-5'] = "(GMT - 5:00 hours) Eastern Time (US & Canada), Bogota, Lima, Quito"; +$lang['time_-4'] = "(GMT - 4:00 hours) Atlantic Time (Canada), Caracas, La Paz"; +$lang['time_-3.5'] = "(GMT - 3:30 hours) Newfoundland"; +$lang['time_-3'] = "(GMT - 3:00 hours) Brazil, Buenos Aires, Georgetown, Falkland Is."; +$lang['time_-2'] = "(GMT - 2:00 hours) Mid-Atlantic, Ascention Is., St Helena"; +$lang['time_-1'] = "(GMT - 1:00 hours) Azores, Cape Verde Islands"; +$lang['time_0'] = "(GMT) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia"; +$lang['time_1'] = "(GMT + 1:00 hours) Berlin, Brussels, Copenhagen, Madrid, Paris, Rome"; +$lang['time_2'] = "(GMT + 2:00 hours) Kaliningrad, South Africa, Warsaw"; +$lang['time_3'] = "(GMT + 3:00 hours) Baghdad, Riyadh, Moscow, Nairobi"; +$lang['time_3.5'] = "(GMT + 3:30 hours) Tehran"; +$lang['time_4'] = "(GMT + 4:00 hours) Adu Dhabi, Baku, Muscat, Tbilisi"; +$lang['time_4.5'] = "(GMT + 4:30 hours) Kabul"; +$lang['time_5'] = "(GMT + 5:00 hours) Ekaterinburg, Islamabad, Karachi, Tashkent"; +$lang['time_5.5'] = "(GMT + 5:30 hours) Bombay, Calcutta, Madras, New Delhi"; +$lang['time_6'] = "(GMT + 6:00 hours) Almaty, Colomba, Dhakra"; +$lang['time_7'] = "(GMT + 7:00 hours) Bangkok, Hanoi, Jakarta"; +$lang['time_8'] = "(GMT + 8:00 hours) Beijing, Hong Kong, Perth, Singapore, Taipei"; +$lang['time_9'] = "(GMT + 9:00 hours) Osaka, Sapporo, Seoul, Tokyo, Yakutsk"; +$lang['time_9.5'] = "(GMT + 9:30 hours) Adelaide, Darwin"; +$lang['time_10'] = "(GMT + 10:00 hours) Melbourne, Papua New Guinea, Sydney, Vladivostok"; +$lang['time_11'] = "(GMT + 11:00 hours) Magadan, New Caledonia, Solomon Islands"; +$lang['time_12'] = "(GMT + 12:00 hours) Auckland, Wellington, Fiji, Marshall Island"; + + + + + + + + + + + + + + + + + + + +?> \ No newline at end of file diff --git a/upload/phpinfo.php b/upload/phpinfo.php new file mode 100644 index 00000000..d2b25e4e --- /dev/null +++ b/upload/phpinfo.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/upload/sm_install.php b/upload/sm_install.php new file mode 100644 index 00000000..cd4938f8 --- /dev/null +++ b/upload/sm_install.php @@ -0,0 +1,1514 @@ + Script written by Matthew Mecham +| > Date started: 30th March 2002 +| ++-------------------------------------------------------------------------- +*/ + +error_reporting (E_ERROR | E_WARNING | E_PARSE); +set_magic_quotes_runtime(0); + +//+--------------------------------------- +// ENTER YOUR PATH TO THE DIRECTORY THIS SCRIPT +// IS IN. +// +// Tips: +// +// If you are using Windows and Apache, do not +// use backslashes, use normal forward slashes. +// You may need to remove the drive letter also +// Example: C:\apache\htdocs\ibforums\ will need +// to be: /apache/htdocs/ibforums/ +// +// If you are using Windows and IIS, then you will +// need to enter double backslashes. +// +// In all cases, please enter a trailing slash (or +// trailing backslashes...) +//+--------------------------------------- + +$root = "./"; + + + +//+--------------------------------------- + +$template = new template; +$std = new installer; + +$VARS = $std->parse_incoming(); + +//+--------------------------------------- +// What are we doing then? Eh? I'm talking to you! +//+--------------------------------------- + +if ( file_exists($root.'install.lock') ) +{ + install_error("This installer is locked!
Please (via FTP) remove the 'install.lock' file in this directory"); + exit(); +} + + +switch($VARS['a']) +{ + case '1': + do_setup_form(); + break; + + case '2': + do_install(); + break; + + case '3': + do_finish(); + break; + + default: + do_intro(); + break; +} + +function do_finish() +{ + global $std, $template, $root, $VARS, $SQL; + + // Attempt to lock the install.. + + if ($FH = fopen( $root.'install.lock', 'w' ) ) + { + fwrite( $FH, 'bleh', 4 ); + fclose($FH); + + @chmod( $root.'install.lock', 0666 ); + + $template->print_top('Success!'); + + $template->contents .= " + • Success! + + + + + + +
+ + + + +
+ + + + +
+ The installation is now complete! +

+ Although the installer is now locked (to re-install, remove the file 'install.lock'), for added + security, please remove the sm_install.php program before continuing. +

+
CLICK HERE TO LOG IN!
+
+
+
"; + } + else + { + $template->print_top('Success!'); + + $template->contents .= " + • WARNING! + + + + + + +
+ + + + +
+ + + + +
+ The installation is now complete! +

+ PLEASE REMOVE THE INSTALLER ('sm_install.php') BEFORE CONTINUING! +
+ Failure to do so will enable ANYONE to delete your board at any time! +

+
CLICK HERE TO LOG IN!
+
+
+
"; + } + + $template->output(); + + + +} + +//+--------------------------------------- + + +function do_install() +{ + global $std, $template, $root, $VARS, $HTTP_POST_VARS; + + // Ok, lets check for blankies... + + $NEW_INFO = array(); + + $need = array('board_url','sql_host','sql_database','sql_user','adminname','adminpassword','adminpassword2','email'); + + //----------------------------------- + + foreach($need as $greed) + { + if ($VARS[ $greed ] == "") + { + install_error("You must complete all of the form with the sole exception of 'SQL Table prefix'"); + } + } + + //----------------------------------- + + $VARS['board_url'] = preg_replace( "#/$#", "", $VARS['board_url'] ); + + if ($VARS['sql_tbl_prefix'] == "") + { + $VARS['sql_tbl_prefix'] = 'ibf_'; + } + + //----------------------------------- + // Did the admin passy and passy2 match? + //----------------------------------- + + if ($VARS['adminpassword2'] != $VARS['adminpassword']) + { + install_error("Your passwords did not match"); + } + + /*if ( ! preg_match( "!^http://!", $VARS['board_url'] ) ) + { + install_error("The board URL must start with 'http://'"); + }*/ + + //----------------------------------- + // IMPORT $INFO! + //----------------------------------- + + if ($root == './') + { + $root = str_replace( '\\', '/', getcwd() ) . '/'; + } + + $require = $root."conf_global.php"; + + if ( ! file_exists($require) ) + { + install_error("Could not locate '$require'. You may need to enter a value for the root path in this installer script, to do this, simply open up this script in a text editor and enter a value in \$root - remember to add a trailing slash. NT users will need to use double backslashes"); + } + + //@chmod( "conf_global.php", 0666 ); + + include($require); + + //echo("here"); + //exit(); + + if ( count($INFO) < 1 ) + { + install_error("Possible corruption in 'conf_global.php' ({$VARS['base_dir']}conf_global.php), please re-upload in ASCII format"); + } + + //----------------------------------- + // Attempt a DB connection.. + //----------------------------------- + + if ( ! $connect_id = mysql_connect( $VARS['sql_host'],$HTTP_POST_VARS['sql_user'],$HTTP_POST_VARS['sql_pass'] ) ) + { + install_error("Could not create a mySQL connection, please check the SQL values entered"); + } + + + if ( ! mysql_select_db($VARS['sql_database'], $connect_id) ) + { + install_error("mySQL could not locate a database called '{$VARS['sql_database']}' please check the value entered for this"); + } + + //----------------------------------- + // Attempt to write the config file. + //----------------------------------- + + $new = array( 'base_dir' => $root, + 'board_url' => $VARS['board_url'], + 'sql_host' => $VARS['sql_host'], + 'sql_database' => $VARS['sql_database'], + 'sql_user' => $HTTP_POST_VARS['sql_user'], + 'sql_pass' => $HTTP_POST_VARS['sql_pass'], + 'sql_tbl_prefix' => $VARS['sql_tbl_prefix'], + + 'html_dir' => $root."html/", + 'html_url' => $VARS['board_url']."/html", + 'upload_dir' => $root."uploads", + 'upload_url' => $VARS['board_url']."/uploads", + 'email_in' => $VARS['email'], + 'email_out' => $VARS['email'], + 'ban_names' => "", + 'ban_email' => "", + 'ban_ip' => "", + 'force_login' => 0, + 'load_limit' => "", + 'board_start' => time(), + 'installed' => 1, + 'guests_ava' => 1, + 'guests_img' => 1, + 'guests_sig' => 1, + 'print_headers' => 0, + 'guest_name_pre' => "Guest_", + ); + + foreach( $new as $k => $v ) + { + // Update the old... + + $v = preg_replace( "/'/", "\\'" , $v ); + $v = preg_replace( "/\r/", "" , $v ); + + $INFO[ $k ] = $v; + } + + $file_string = " $v ) + { + if ($k == 'skin' or $k == 'languages') + { + continue; + } + $file_string .= '$INFO['."'".$k."'".']'."\t\t\t=\t'".$v."';\n"; + } + + $file_string .= "\n".'?'.'>'; // Question mark + greater than together break syntax hi-lighting in BBEdit 6 :p + + if ( $fh = fopen( $require, 'w' ) ) + { + fputs($fh, $file_string, strlen($file_string) ); + fclose($fh); + } + else + { + install_error("Could not write to 'conf_global.php'"); + } + + //----------------------------------- + // Lets populate the database! + //----------------------------------- + + $SQL = get_sql(); + + foreach( $SQL as $q ) + { + if ($VARS['sql_tbl_prefix'] != "ibf_") + { + $q = preg_replace("/ibf_(\S+?)([\s\.,]|$)/", $VARS['sql_tbl_prefix']."\\1\\2", $q); + } + + if ( preg_match("/CREATE TABLE (\S+) \(/", $q, $match) ) + { + if ($match[1]) + { + $the_query = "DROP TABLE if exists ".$match[1]; + if (! mysql_query($the_query, $connect_id) ) + { + install_error("mySQL Error: ".mysql_error()); + } + } + } + + if ( ! mysql_query($q, $connect_id) ) + { + install_error("mySQL Error: ".mysql_error()); + } + } + + // Insert the admin... + + $passy = md5($VARS['adminpassword']); + $time = time(); + + $query = "INSERT INTO ".$VARS['sql_tbl_prefix']."members (id, name, mgroup, password, email, joined, ip_address, posts, title, last_visit, last_activity) ". + "VALUES(1, '{$VARS['adminname']}', 4, '$passy', '{$VARS['email']}', '$time', '127.0.0.1', '0', 'Administrator', '$time', '$time')"; + + if ( ! mysql_query($query, $connect_id) ) + { + install_error("mySQL Error: ".mysql_error()); + + } + + // ARE WE DONE? REALLY? COOL!! + + $template->print_top('Success!'); + + $template->contents .= " + • Success! + + + + + + +
+ + + + +
+ + + + +
+ Your board has now been installed! +

+ The installation process is almost complete.. +

+
CLICK HERE TO COMPLETE THE INSTALL
+
+
+
"; + + $template->output(); + +} + + + + +function do_setup_form() +{ + global $std, $template, $root, $HTTP_SERVER_VARS; + + $template->print_top('Set Up form'); + + //-------------------------------------------------- + + $this_url = str_replace( "/sm_install.php", "", $HTTP_SERVER_VARS['HTTP_REFERER']); + + if ( ! $this_url ) + { + $this_url = substr($HTTP_SERVER_VARS['SCRIPT_NAME'],0, -15); + + if ($this_url == '') + { + $this_url == '/'; + } + $this_url = 'http://'.$HTTP_SERVER_VARS['SERVER_NAME'].$this_url; + } + + + //-------------------------------------------------- + + $template->contents .= " + • Your Server Environment + + +
+ + + + + +
+ + + + +
+ + + + + + + + + + +
+ This section requires you to enter the paths and URL's for the board. If in doubt, please + check with your webhost before asking for support. +
The script URL
This is the URL (must start with http://) to the directory that this script is in
+
+
+ + + + + • Your SQL Environment + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ This section requires you to enter your SQL information. If in doubt, please + check with your webhost before asking for support. You may choose to enter an existing database name, + if not - you must create a new database before continuing. +
SQL Host
(localhost is usually sufficient)
SQL Database Name
SQL Username
SQL Password
SQL Table Prefix(You can leave this blank)
+
+
+ + + • Your Admin Account + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ This section requires information to create your administration account. Please + enter the data carefully! +
Username
Password
Retype your password
Email Address
+
+
+
+ + + + "; + + $template->output(); + +} + +//+--------------------------------------- + +function do_intro() +{ + global $std, $template, $root; + + $template->print_top('Welcome'); + + $template->contents .= " + • Welcome! + + + + + + +
+ + + + +
+ + + + +
+ Welcome to the Invision Board Safe Mode Installer +

+ Before we go any further, please ensure that all the files have been uploaded, and that the + file 'conf_global.php' has suitable permissions to allow this script to write to it ( 0666 should be sufficient ). +

+ You will also need your SQL database name, your SQL username, your SQL password and SQL host (usually localhost). +

+ Once you have clicked on proceed, you will be taken to a form to enter information the installer needs to set up your board. +

+ PLEASE NOTE: USING THIS INSTALLER WILL DELETE ANY CURRENT INVISION BOARD DATABASE IF YOU ARE USING THE SAME TABLE PREFIX +
+
+
"; + + // Check to make sure that the config file is there and it's got suitable permissions to write to: + + $file = $root."conf_global.php"; + + $warnings = array(); + + if ( ! file_exists($file) ) + { + $warnings[] = "Cannot locate the file 'conf_global.php'. This should be uploaded into the same directory as this script!"; + } + + if ( ! is_writeable($file) ) + { + $warnings[] = "Cannot write to 'conf_global.php'. Please adjust the permissions to allow this script to write to the file. if in doubt, CHMOD via FTP to 0777"; + } + + $phpversion = phpversion(); + + if ($phpversion < '4.0.0') { + $warnings[] = "You cannot install Invision Board. Invision Board requires PHP Version 4.0.0 or better."; + } + + if ( count($warnings) > 0 ) + { + + $err_string = "
  • ".implode( "
  • ", $warnings )."
"; + + $template->contents .= " + • WARNING! + + + + + + +
+ + + + +
+ + + + +
+ The following errors must be rectified before continuing! +

+ $err_string +
+
+
"; + } + else + { + $template->contents .= "
Proceed >>"; + } + + + $template->output(); +} + + + +function install_error($msg="") +{ + global $std, $template, $root; + + $template->print_top('Warning!'); + + + + $template->contents .= " + • WARNING! + + + + + + +
+ + + + +
+ + + + +
+ The following errors must be rectified before continuing!
Please go back and try again! +

+ $msg +
+
+
"; + + + + $template->output(); +} + +//+-------------------------------------------------------------------------- +// CLASSES +//+-------------------------------------------------------------------------- + + + +class template +{ + var $contents = ""; + + function output() + { + echo $this->contents; + echo " + +

© 2002 Invision Board (www.invisionboard.com)
+ + + "; + exit(); + } + + //-------------------------------------- + + function print_top($title="") + { + + $this->contents = " + Invision Board Set Up :: $title + + + + + + + + +
+
+ + "; + + } + + +} + + +class installer +{ + + function parse_incoming() + { + global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_CLIENT_IP, $REQUEST_METHOD, $REMOTE_ADDR, $HTTP_PROXY_USER, $HTTP_X_FORWARDED_FOR; + $return = array(); + + if( is_array($HTTP_GET_VARS) ) + { + while( list($k, $v) = each($HTTP_GET_VARS) ) + { + //$k = $this->clean_key($k); + if( is_array($HTTP_GET_VARS[$k]) ) + { + while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) ) + { + $return[$k][ $this->clean_key($k2) ] = $this->clean_value($v2); + } + } + else + { + $return[$k] = $this->clean_value($v); + } + } + } + + // Overwrite GET data with post data + + if( is_array($HTTP_POST_VARS) ) + { + while( list($k, $v) = each($HTTP_POST_VARS) ) + { + //$k = $this->clean_key($k); + if ( is_array($HTTP_POST_VARS[$k]) ) + { + while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) ) + { + $return[$k][ $this->clean_key($k2) ] = $this->clean_value($v2); + } + } + else + { + $return[$k] = $this->clean_value($v); + } + } + } + + return $return; + } + + function clean_key($key) { + + if ($key == "") + { + return ""; + } + + $key = preg_replace( "/\.\./" , "" , $key ); + $key = preg_replace( "/\_\_(.+?)\_\_/" , "" , $key ); + $key = preg_replace( "/^([\w\.\-\_]+)$/", "$1", $key ); + return $key; + } + + function clean_value($val) { + + if ($val == "") + { + return ""; + } + + $val = preg_replace( "/&/" , "&" , $val ); + $val = preg_replace( "//" , "-->" , $val ); + $val = preg_replace( "/\n"; + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , $form_code ), + 2 => array( 'act' , 'group' ), + 3 => array( 'id' , $IN['id'] ), + ) , 'adform', "onSubmit='return checkform()'" ); + + + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $prefix = preg_replace( "/'/", "'", $group['prefix'] ); + $prefix = preg_replace( "/html .= $SKIN->start_table( "Global Settings" ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Group Title" , + $SKIN->form_input("g_title", $group['g_title'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Group Icon
(Can be omitted)" , + $SKIN->form_input("g_icon", $group['g_icon'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Max upload file size (in KB)
(Leave blank to disallow uploads)" , + $SKIN->form_input("g_attach_max", $group['g_attach_max'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Online List Format [Prefix]
(Can be left blank)
(Example:<span style='color:red'>)" , + $SKIN->form_input("prefix", $prefix ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Online List Format [Suffix]
(Can be left blank)
(Example:</span>)" , + $SKIN->form_input("suffix", $suffix ) + ) ); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Global Permissions" ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can view board?" , + $SKIN->form_yes_no("g_view_board", $group['g_view_board'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can view OFFLINE board?" , + $SKIN->form_yes_no("g_access_offline", $group['g_access_offline'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can view member profiles and the member list?" , + $SKIN->form_yes_no("g_mem_info", $group['g_mem_info'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can view other members topics?" , + $SKIN->form_yes_no("g_other_topics", $group['g_other_topics'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can use search?" , + $SKIN->form_yes_no("g_use_search", $group['g_use_search'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can mail members from the board?" , + $SKIN->form_yes_no("g_email_friend", $group['g_email_friend'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can edit own profile info?$guest_legend" , + $SKIN->form_yes_no("g_edit_profile", $group['g_edit_profile'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can use PM system?$guest_legend" , + $SKIN->form_yes_no("g_use_pm", $group['g_use_pm'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can Upload avatars?$guest_legend" , + $SKIN->form_yes_no("g_avatar_upload", $group['g_avatar_upload'] ) + ) ); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Posting Permissions" ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can post new topics (where allowed)?" , + $SKIN->form_yes_no("g_post_new_topics", $group['g_post_new_topics'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can reply to OWN topics?" , + $SKIN->form_yes_no("g_reply_own_topics", $group['g_reply_own_topics'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can reply to OTHER members topics (where allowed)?" , + $SKIN->form_yes_no("g_reply_other_topics", $group['g_reply_other_topics'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can edit own posts?$guest_legend" , + $SKIN->form_yes_no("g_edit_posts", $group['g_edit_posts'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Append 'Edited by' legend?" , + $SKIN->form_yes_no("g_append_edit", $group['g_append_edit'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can delete own posts?$guest_legend" , + $SKIN->form_yes_no("g_delete_own_posts", $group['g_delete_own_posts'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can open/close own topics?$guest_legend" , + $SKIN->form_yes_no("g_open_close_posts", $group['g_open_close_posts'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can delete own topics?$guest_legend" , + $SKIN->form_yes_no("g_delete_own_topics", $group['g_delete_own_topics'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can start new polls (where allowed)?$guest_legend" , + $SKIN->form_yes_no("g_post_polls", $group['g_post_polls'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can vote in polls (where allowed)?$guest_legend" , + $SKIN->form_yes_no("g_vote_polls", $group['g_vote_polls'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can avoid flood control?" , + $SKIN->form_yes_no("g_avoid_flood", $group['g_avoid_flood'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can avoid moderation queues?" , + $SKIN->form_yes_no("g_avoid_q", $group['g_avoid_q'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can add events to the calendar?$guest_legend" , + $SKIN->form_yes_no("g_calendar_post", $group['g_calendar_post'] ) + ) ); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Moderation Permissions" ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Is Super Moderator (can moderate anywhere)?$guest_legend" , + $SKIN->form_yes_no("g_is_supmod", $group['g_is_supmod'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can access the Admin CP?$guest_legend" , + $SKIN->form_yes_no("g_access_cp", $group['g_access_cp'] ) + ) ); + + $ADMIN->html .= $SKIN->end_form($button); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + + } + + //+--------------------------------------------------------------------------------- + // + // Show "Management Screen + // + //+--------------------------------------------------------------------------------- + + function main_screen() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_title = "User Groups"; + + $ADMIN->page_detail = "User Grouping is a quick and powerful way to organise your members. There are 4 preset groups that you cannot remove (Validating, Guest, Member and Admin) although you may edit these at will. A good example of user grouping is to set up a group called 'Moderators' and allow them access to certain forums other groups do not have access to.
Forum access allows you to make quick changes to that groups forum read, write and reply settings. You may do this on a forum per forum basis in forum control."; + + $g_array = array(); + + $SKIN->td_header[] = array( "Group Title" , "30%" ); + $SKIN->td_header[] = array( "ACP" , "5%" ); + $SKIN->td_header[] = array( "SMOD" , "5%" ); + $SKIN->td_header[] = array( "Members" , "10%" ); + $SKIN->td_header[] = array( "Edit Group" , "20%" ); + $SKIN->td_header[] = array( "Forum Access" , "20%" ); + $SKIN->td_header[] = array( "Delete" , "10%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "User Group Management" ); + + $DB->query("SELECT ibf_groups.g_id, ibf_groups.g_access_cp, ibf_groups.g_is_supmod, ibf_groups.g_title,ibf_groups.prefix, ibf_groups.suffix, COUNT(ibf_members.id) as count FROM ibf_groups " + ."LEFT JOIN ibf_members ON (ibf_members.mgroup = ibf_groups.g_id) " + ."GROUP BY ibf_groups.g_id ORDER BY ibf_groups.g_title"); + + while ( $r = $DB->fetch_row() ) + { + + $del = ""; + $mod = ' '; + $adm = ' '; + + if ($r['g_id'] > 4) + { + $del = "
Delete
"; + } + //----------------------------------- + if ($r['g_access_cp'] == 1) + { + $adm = '
Y
'; + } + //----------------------------------- + if ($r['g_is_supmod'] == 1) + { + $mod = '
Y
'; + } + + if ($r['g_id'] != 1 and $r['g_id'] != 2) + { + $total_linkage = "".$r['prefix'].$r['g_title'].$r['suffix'].""; + } + else + { + $total_linkage = $r['prefix'].$r['g_title'].$r['suffix']; + } + + $ADMIN->html .= $SKIN->add_td_row( array( "$total_linkage" , + $adm, + $mod, + "
".$r['count']."
", + "
Edit Group
", + "
Forum Access
", + $del + + ) ); + + $g_array[] = array( $r['g_id'], $r['g_title'] ); + } + + $ADMIN->html .= $SKIN->add_td_basic(" ", "center", "title"); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'add' ), + 2 => array( 'act' , 'group' ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Add a new member group" ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Base new group on..." , + $SKIN->form_dropdown("id", $g_array, 3 ) + ) ); + + $ADMIN->html .= $SKIN->end_form("Set up New Group"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + + } + + +} + + +?> \ No newline at end of file diff --git a/upload/sources/Admin/ad_help.php b/upload/sources/Admin/ad_help.php new file mode 100644 index 00000000..b0b08bb4 --- /dev/null +++ b/upload/sources/Admin/ad_help.php @@ -0,0 +1,273 @@ + Help Control functions +| > Module written by Matt Mecham +| > Date started: 2nd April 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + + + +$idx = new ad_settings(); + + +class ad_settings { + + var $base_url; + + function ad_settings() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + switch($IN['code']) + { + case 'edit': + $this->show_form('edit'); + break; + case 'new': + $this->show_form('new'); + break; + + case 'doedit': + $this->doedit(); + break; + + case 'donew': + $this->doadd(); + break; + + case 'remove': + $this->remove(); + break; + + //------------------------- + default: + $this->list_files(); + break; + } + + } + + //------------------------------------------------------------- + // HELP FILE FUNCTIONS + //------------------------------------------------------------- + + function doedit() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + if ($IN['id'] == "") + { + $ADMIN->error("You must pass a valid emoticon id, silly!"); + } + + $text = preg_replace( "/\n/", "
", stripslashes($HTTP_POST_VARS['text'] ) ); + $title = preg_replace( "/\n/", "
", stripslashes($HTTP_POST_VARS['title'] ) ); + $desc = preg_replace( "/\n/", "
", stripslashes($HTTP_POST_VARS['description'] ) ); + + $db_string = $DB->compile_db_update_string( array( 'title' => $title, + 'text' => $text, + 'description' => $desc, + ) ); + + $DB->query("UPDATE ibf_faq SET $db_string WHERE id='".$IN['id']."'"); + + $std->boink_it($SKIN->base_url."&act=help"); + exit(); + + + } + + //===================================================== + + + function show_form($type='new') + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_detail = "You may add/edit and remove help files below."; + $ADMIN->page_title = "Help File Management"; + + //+------------------------------- + + if ($type != 'new') + { + + if ($IN['id'] == "") + { + $ADMIN->error("You must pass a valid help file id, silly!"); + } + + //+------------------------------- + + $DB->query("SELECT * FROM ibf_faq WHERE id='".$IN['id']."'"); + + if ( ! $r = $DB->fetch_row() ) + { + $ADMIN->error("We could not find that help file in the database"); + } + + //+------------------------------- + + $button = 'Edit this Help File'; + $code = 'doedit'; + } + else + { + $r = array(); + $button = 'Add this Help File'; + $code = 'donew'; + } + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , $code ), + 2 => array( 'act' , 'help' ), + 3 => array( 'id' , $IN['id'] ), + ) ); + + + + $SKIN->td_header[] = array( " " , "20%" ); + $SKIN->td_header[] = array( " " , "80%" ); + + $r['text'] = preg_replace( "/
/i", "\n", stripslashes($r['text']) ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( $button ); + + + $ADMIN->html .= $SKIN->add_td_row( array( "Help File Title", + $SKIN->form_input('title' , stripslashes($r['title']) ), + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Help File Description", + $SKIN->form_textarea('description', stripslashes($r['description']) ), + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Help File Text", + $SKIN->form_textarea('text', $r['text'], "60", "10" ), + ) ); + + $ADMIN->html .= $SKIN->end_form($button); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + } + + //===================================================== + + function remove() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['id'] == "") + { + $ADMIN->error("You must pass a valid help file id, silly!"); + } + + $DB->query("DELETE FROM ibf_faq WHERE id='".$IN['id']."'"); + + $std->boink_it($SKIN->base_url."&act=help"); + exit(); + + + } + + //===================================================== + + function doadd() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + if ($IN['title'] == "") + { + $ADMIN->error("You must enter a title, silly!"); + } + + + + $text = preg_replace( "/\n/", "
", stripslashes($HTTP_POST_VARS['text'] ) ); + $title = preg_replace( "/\n/", "
", stripslashes($HTTP_POST_VARS['title'] ) ); + $desc = preg_replace( "/\n/", "
", stripslashes($HTTP_POST_VARS['description'] ) ); + + $db_string = $DB->compile_db_insert_string( array( 'title' => $title, + 'text' => $text, + 'description' => $desc, + ) ); + + $DB->query("INSERT INTO ibf_faq (".$db_string['FIELD_NAMES'].") VALUES(".$db_string['FIELD_VALUES'].")"); + + $std->boink_it($SKIN->base_url."&act=help"); + exit(); + + + } + + //===================================================== + + function list_files() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_detail = "You may add/edit and remove help files below."; + $ADMIN->page_title = "Help File Management"; + + //+------------------------------- + + $SKIN->td_header[] = array( "Title" , "50%" ); + $SKIN->td_header[] = array( "Edit" , "30%" ); + $SKIN->td_header[] = array( "Remove" , "20%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Current Help Files" ); + + $DB->query("SELECT * from ibf_faq ORDER BY id ASC"); + + if ( $DB->get_num_rows() ) + { + while ( $r = $DB->fetch_row() ) + { + + $ADMIN->html .= $SKIN->add_td_row( array( "".stripslashes($r['title'])."
".stripslashes($r['description']), + "
Edit
", + "
Remove
", + ) ); + + + + } + } + + $ADMIN->html .= $SKIN->add_td_basic("Add New Help File", "center", "title" ); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + + $ADMIN->output(); + + } + + +} + + +?> \ No newline at end of file diff --git a/upload/sources/Admin/ad_imagemacros.php b/upload/sources/Admin/ad_imagemacros.php new file mode 100644 index 00000000..cfe47ab0 --- /dev/null +++ b/upload/sources/Admin/ad_imagemacros.php @@ -0,0 +1,605 @@ + Skin -> Image Macro functions +| > Module written by Matt Mecham +| > Date started: 4th April 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + + + + +$idx = new ad_settings(); + + +class ad_settings { + + var $base_url; + + function ad_settings() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + switch($IN['code']) + { + case 'wrapper': + $this->list_current(); + break; + + case 'add': + $this->add_images(); + break; + + case 'edit': + $this->do_form('edit'); + break; + + case 'doadd': + $this->save_wrapper('add'); + break; + + case 'doedit': + $this->save_wrapper('edit'); + break; + + case 'remove': + $this->remove(); + break; + + case 'export': + $this->export(); + + //------------------------- + default: + $this->list_current(); + break; + } + + } + + + + function export() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing image set ID, go back and try again"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_images WHERE imid='".$IN['id']."'"); + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + //+------------------------------- + + $archive_dir = $INFO['base_dir']."/archive_out"; + $images_dir = $INFO['base_dir']."/style_images/".$row['imid']; + + require $root_dir."sources/lib/tar.php"; + + if (!is_dir($archive_dir)) + { + $ADMIN->error("Could not locate $archive_dir, is the directory there?"); + } + + if (!is_writeable($archive_dir)) + { + $ADMIN->error("Cannot write in $archive_dir, CHMOD via FTP to 0755 or 0777 to enable this script to write into it. IBF cannot do this for you"); + } + + if (!is_dir($images_dir)) + { + $ADMIN->error("Could not locate $images_dir, is the directory there?"); + } + + //+------------------------------- + // Attempt to copy the files to the + // working directory... + //+------------------------------- + + $l_name = preg_replace( "/\s{1,}/", "_", $row['setname'] ); + + $new_dir = "image-".$l_name; + + if ( ! $ADMIN->copy_dir($images_dir, $archive_dir."/".$new_dir) ) + { + $ADMIN->error( $ADMIN->errors ); + } + + // Generate the config file.. + + $file_content = " $v) + { + + $v = preg_replace( "#style_images/".$row['imid']."/#", "style_images/%img_dir%/", $v ); + + $file_content .= "\n\$config['$k'] = \"".addslashes($v)."\";"; + } + + $file_content .= "\n\n?".">"; + + $FH = fopen($archive_dir."/".$new_dir."/"."conf.inc", 'w'); + fwrite($FH, $file_content, strlen($file_content)); + fclose($FH); + + // Add files and write tarball + + $tar = new tar(); + + $tar->new_tar( $archive_dir, $new_dir.".tar" ); + $tar->add_directory( $archive_dir."/".$new_dir ); + $tar->write_tar(); + + // Check for errors. + + if ($tar->error != "") + { + $ADMIN->error($tar->error); + } + + // remove original unarchived directory + + $ADMIN->rm_dir($archive_dir."/".$new_dir); + + $ADMIN->done_screen("Template Pack Export Created

You can download the tar-chive here", "Manage Template Sets", "act=templ" ); + + + } + + //------------------------------------------------------------- + // Add images.. + //------------------------------------------------------------- + + + function add_images() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing image set ID, go back and try again"); + } + + //------------------------------------- + + if ( ! is_writeable($root_path.'style_images') ) + { + $ADMIN->error("The directory 'style_images' is not writeable by this script. Please check the permissions on that directory. CHMOD to 0777 if in doubt and try again"); + } + + //------------------------------------- + + if ( ! is_dir($root_path.'style_images/'.$IN['id']) ) + { + $ADMIN->error("Could not locate the original image set to copy, please check and try again"); + } + + //------------------------------------- + + $DB->query("SELECT * FROM ibf_images WHERE imid='".$IN['id']."'"); + + //------------------------------------- + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query that image set from the DB, so there"); + } + + //------------------------------------- + + $row['setname'] = $row['setname'].".2"; + + // Insert a new row into the DB... + + $final = array(); + + foreach($row as $k => $v) + { + if ($k == 'imid') + { + continue; + } + else + { + $final[ $k ] = $v; + } + } + + $db_string = $DB->compile_db_insert_string( $final ); + + $DB->query("INSERT INTO ibf_images (".$db_string['FIELD_NAMES'].") VALUES(".$db_string['FIELD_VALUES'].")"); + + $new_id = $DB->get_insert_id(); + + //------------------------------------- + + if ( ! $ADMIN->copy_dir( $INFO['base_dir'].'style_images/'.$IN['id'] , $INFO['base_dir'].'style_images/'.$new_id ) ) + { + $DB->query("DELETE FROM ibf_images WHERE imid='$new_id'"); + + $ADMIN->error( $ADMIN->errors ); + } + + //------------------------------------- + // Pass to edit / add form... + //------------------------------------- + + $this->do_form('add', $new_id); + + } + + //------------------------------------------------------------- + // REMOVE WRAPPERS + //------------------------------------------------------------- + + function remove() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + //+------------------------------- + + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing image set ID, go back and try again"); + } + + $dir_to_remove = $INFO['base_dir']."style_images/".$IN['id']; + + if ( SAFE_MODE_ON == 0 ) + { + if ( $ADMIN->rm_dir( $dir_to_remove ) ) + { + + $DB->query("DELETE FROM ibf_images WHERE imid='".$IN['id']."'"); + + $std->boink_it($SKIN->base_url."&act=image"); + exit(); + } + else + { + $ADMIN->error("Could not remove the image pack files, please check the CHMOD permissions to ensure that this script has the correct permissions to allow this"); + } + } + else + { + $DB->query("DELETE FROM ibf_images WHERE imid='".$IN['id']."'"); + $ADMIN->info_screen("Safe mode has been detected and this script cannot remove the images and directories for you, please remove the directory '$dir_to_remove' via FTP. The data has been removed from the database successfully"); + } + } + + + + //------------------------------------------------------------- + // ADD / EDIT IMAGE SETS + //------------------------------------------------------------- + + function save_wrapper() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + //+------------------------------- + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing image set ID, go back and try again"); + } + + + if ($IN['setname'] == "") + { + $ADMIN->error("You must specify a name for this image and macro set"); + } + + $barney = array(); + + foreach ($IN as $k => $v) + { + if ( preg_match( "/^XX_(\S+)$/", $k, $match ) ) + { + if ( isset($IN[ $match[0] ]) ) + { + $v = preg_replace( "/'/", "'", stripslashes($HTTP_POST_VARS[ $match[0] ]) ); + + $barney[ $match[1] ] = $v; + } + } + } + + if ( count($barney) < 10 ) + { + $ADMIN->error("Oopsie, something has gone wrong - did you leave all the fields blank?"); + } + + $barney['setname'] = $IN['setname']; + + $db_string = $DB->compile_db_update_string( $barney ); + + $DB->query("UPDATE ibf_images SET $db_string WHERE imid='".$IN['id']."'"); + + $ADMIN->done_screen("Set updated", "Manage Image and Macro Sets", "act=image" ); + + + + } + + //------------------------------------------------------------- + // ADD / EDIT MACRO SETS + //------------------------------------------------------------- + + function do_form( $type='add', $id="" ) + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + //+------------------------------- + + if ($id != "") + { + $IN['id'] = $id; + } + + //+------------------------------- + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing image set ID, go back and try again"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_images WHERE imid='".$IN['id']."'"); + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + if ($type == 'add') + { + $button = 'Update Image & Macro set'; + + foreach( $row as $k => $v ) + { + $v = preg_replace( "#style_images/(\d+)/#", "style_images/".$IN['id']."/", $v ); + + $row[$k] = $v; + } + + } + else + { + $button = 'Edit Image & Macro set'; + } + + //+------------------------------- + + $ADMIN->page_detail = "You may use edit the macros that power the images. You do not have to use an image, you may use text, flash or other objects."; + $ADMIN->page_title = "Manage Image & Macro sets"; + + //+------------------------------- + + + $ADMIN->html .= $SKIN->js_no_specialchars(); + + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'doedit' ), + 2 => array( 'act' , 'image' ), + 3 => array( 'id' , $IN['id'] ), + ), "theAdminForm", "onSubmit=\"return no_specialchars('images')\"" ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "20%" ); + $SKIN->td_header[] = array( " " , "80%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Image & Macro set title" ); + + $ADMIN->html .= $SKIN->add_td_row( array( + "Image & Macro Set Title", + $SKIN->form_input('setname', $row['setname']), + ) ); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + + $SKIN->td_header[] = array( "Macro" , "20%" ); + $SKIN->td_header[] = array( "Source" , "60%" ); + $SKIN->td_header[] = array( "Current" , "20%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Current Macros" ); + + foreach($row as $k => $v) + { + if ($k != 'imid' && $k != 'setname') + { + if ( ! preg_match( "/^\d+$/", $k ) ) + { + + $real = preg_replace( "/'/", "'", $v ); + + $ADMIN->html .= $SKIN->add_td_row( array( + "$k", + $SKIN->form_input('XX_'.$k, $real), + "$v", + ) ); + } + } + } + + + + $ADMIN->html .= $SKIN->end_form($button); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + //+------------------------------- + + $ADMIN->output(); + + + } + + //------------------------------------------------------------- + // SHOW WRAPPERS + //------------------------------------------------------------- + + function list_current() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $form_array = array(); + + $ADMIN->page_detail = "Images and Macros are used in the skin templates as shorthand for an image or other style information. This enables you to use text links instead of buttons or flash movies for certain images. An image and macro set contains the actual images and the macros to power them."; + $ADMIN->page_title = "Manage Image and Macros"; + + //+------------------------------- + + $SKIN->td_header[] = array( "Title" , "40%" ); + $SKIN->td_header[] = array( "Allocation" , "30%" ); + $SKIN->td_header[] = array( "Export" , "10%" ); + $SKIN->td_header[] = array( "Edit" , "10%" ); + $SKIN->td_header[] = array( "Remove" , "10%" ); + + //+------------------------------- + + $DB->query("SELECT DISTINCT(s.img_id), i.imid, i.setname, s.sname from ibf_images i, ibf_skins s WHERE s.img_id=i.imid ORDER BY i.setname ASC"); + + $used_ids = array(); + $show_array = array(); + + if ( $DB->get_num_rows() ) + { + + $ADMIN->html .= $SKIN->start_table( "Current Image & Macro sets In Use" ); + + while ( $r = $DB->fetch_row() ) + { + + $show_array[ $r['imid'] ] .= stripslashes($r['sname'])."
"; + + if ( in_array( $r['imid'], $used_ids ) ) + { + continue; + } + + $ADMIN->html .= $SKIN->add_td_row( array( "".stripslashes($r['setname'])."", + "<#X-{$r['imid']}#>", + "
Export
", + "
Edit
", + "Deallocate before removing", + ) ); + + $used_ids[] = $r['imid']; + + $form_array[] = array( $r['imid'], $r['setname'] ); + + } + + foreach( $show_array as $idx => $string ) + { + $string = preg_replace( "/
$/", "", $string ); + + $ADMIN->html = preg_replace( "/<#X-$idx#>/", "$string", $ADMIN->html ); + } + + $ADMIN->html .= $SKIN->end_table(); + } + + if ( count($used_ids) > 0 ) + { + + $DB->query("SELECT imid, setname FROM ibf_images WHERE imid NOT IN(".implode(",",$used_ids).")"); + + if ( $DB->get_num_rows() ) + { + + $SKIN->td_header[] = array( "Title" , "70%" ); + $SKIN->td_header[] = array( "Export" , "10%" ); + $SKIN->td_header[] = array( "Edit" , "10%" ); + $SKIN->td_header[] = array( "Remove" , "10%" ); + + $ADMIN->html .= $SKIN->start_table( "Current Unallocated Image & Macro sets" ); + + $ADMIN->html .= $SKIN->js_checkdelete(); + + while ( $r = $DB->fetch_row() ) + { + + $ADMIN->html .= $SKIN->add_td_row( array( "".stripslashes($r['setname'])."", + "
Export
", + "
Edit
", + "
Remove
", + ) ); + + $form_array[] = array( $r['imid'], $r['setname'] ); + + } + + $ADMIN->html .= $SKIN->end_table(); + } + } + + //+------------------------------- + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'add' ), + 2 => array( 'act' , 'image' ), + ) ); + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + $ADMIN->html .= $SKIN->start_table( "Create New Image & Macro Set" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->add_td_row( array( "Base new Image & Macro set on...
(Note: This will also copy the images)" , + $SKIN->form_dropdown( "id", $form_array) + ) ); + + $ADMIN->html .= $SKIN->end_form("Create new Image & Macro set"); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + //+------------------------------- + + $ADMIN->output(); + + } + + +} + + +?> \ No newline at end of file diff --git a/upload/sources/Admin/ad_index.php b/upload/sources/Admin/ad_index.php new file mode 100644 index 00000000..c5d7d885 --- /dev/null +++ b/upload/sources/Admin/ad_index.php @@ -0,0 +1,204 @@ + Admin "welcome" screen functions +| > Module written by Matt Mecham +| > Date started: 1st march 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + + + +$idx = new index_page(); + + +class index_page { + + + function index_page() { + global $DB, $IN, $INFO, $ADMIN, $SKIN, $std; + + $DB->query("SELECT * FROM ibf_stats"); + + $row = $DB->fetch_row(); + + if ($row['TOTAL_REPLIES'] < 0) $row['TOTAL_REPLIES'] = 0; + if ($row['TOTAL_TOPICS'] < 0) $row['TOTAL_TOPICS'] = 0; + if ($row['MEM_COUNT'] < 0) $row['MEM_COUNT'] = 0; + + $DB->query("SELECT COUNT(*) as reg FROM ibf_members WHERE mgroup='".$INFO['auth_group']."' AND (new_pass='' or new_pass IS NULL)"); + $reg = $DB->fetch_row(); + + if ($reg['reg'] < 1 ) $reg['reg'] = 0; + + //------------------------------------------------- + // Make sure the uploads path is correct + //------------------------------------------------- + + $uploads_size = 0; + + if ($dh = opendir( $INFO['upload_dir'] )) + { + while ( $file = readdir( $dh ) ) + { + if ( !preg_match( "/^..?$|^index/i", $file ) ) + { + $uploads_size += @filesize( $INFO['upload_dir'] . "/" . $file ); + } + } + closedir( $dh ); + } + + // This piece of code from Jesse's (jesse@jess.on.ca) contribution + // to the PHP manual @ php.net + + if ($uploads_size >= 1048576) + { + $uploads_size = round($uploads_size / 1048576 * 100 ) / 100 . " mb"; + } + else if ($uploads_size >= 1024) + { + $uploads_size = round($uploads_size / 1024 * 100 ) / 100 . " k"; + } + else + { + $uploads_size = $uploads_size . " bytes"; + } + + //+----------------------------------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Administrators using the CP" ); + + $t_time = time() - 60*10; + + $DB->query("SELECT DISTINCT(MEMBER_NAME) FROM ibf_admin_sessions WHERE RUNNING_TIME > $t_time"); + + $mem_array = array(); + + while ( $r = $DB->fetch_row() ) + { + $mem_array[] = $r['MEMBER_NAME']; + } + + $ADMIN->html .= $SKIN->add_td_basic( implode(", ", $mem_array ) ); + + $ADMIN->html .= $SKIN->end_table(); + + //+----------------------------------------------------------- + + $ADMIN->html .= $SKIN->add_td_spacer(); + + //+----------------------------------------------------------- + + $SKIN->td_header[] = array( "Definition", "25%" ); + $SKIN->td_header[] = array( "Value" , "25%" ); + $SKIN->td_header[] = array( "Definition", "25%" ); + $SKIN->td_header[] = array( "Value" , "25%" ); + + $ADMIN->html .= $SKIN->start_table( "System Overview" ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Total Unique Topics" , $row['TOTAL_TOPICS'], + "Total Replies to topics" , $row['TOTAL_REPLIES'] + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Total Members" , $row['MEM_COUNT'], "Public Upload Folder Size", $uploads_size ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Users awaiting validation" , $reg['reg'], + " ", " ", + ) ); + + $ADMIN->html .= $SKIN->end_table(); + + //+----------------------------------------------------------- + + $ADMIN->html .= $SKIN->add_td_spacer(); + + //+----------------------------------------------------------- + + $ADMIN->html .= $SKIN->start_form(); + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "30%" ); + $SKIN->td_header[] = array( " " , "30%" ); + + $ADMIN->html .= $SKIN->start_table( "Quick Clicks" ); + + $ADMIN->html .= " + + +
+ + "; + + $ADMIN->html .= $SKIN->add_td_row( array( "Edit Member:", + "", + "" + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Add New Category:", + "", + "" + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Add New Forum:", + "", + "" + ) ); + + $ADMIN->html .= ""; + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + } + +} + + +?> \ No newline at end of file diff --git a/upload/sources/Admin/ad_languages.php b/upload/sources/Admin/ad_languages.php new file mode 100644 index 00000000..8acf2ef7 --- /dev/null +++ b/upload/sources/Admin/ad_languages.php @@ -0,0 +1,1003 @@ + Language functions +| > Module written by Matt Mecham +| > Date started: 22nd April 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new ad_langs(); + + +class ad_langs { + + var $base_url; + + function ad_langs() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + switch($IN['code']) + { + + case 'add': + $this->add_language(); + break; + + case 'edit': + $this->do_form('edit'); + break; + + case 'edit2': + $this->show_file(); + break; + + case 'doadd': + $this->save_wrapper('add'); + break; + + case 'doedit': + $this->save_langfile(); + break; + + case 'remove': + $this->remove(); + break; + + case 'editinfo': + $this->edit_info(); + break; + + case 'export': + $this->export(); + break; + + case 'import': + $this->import(); + break; + + case 'doimport': + $this->doimport(); + break; + + //------------------------- + default: + $this->list_current(); + break; + } + + } + + function doimport() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['tarball'] == "") + { + $ADMIN->error("You did not select a tar-chive to import!"); + } + + require $root_dir."sources/lib/tar.php"; + + $to_dir = $INFO['base_dir']."/lang"; + + $tarname = $IN['tarball']; + + $from_dir = $INFO['base_dir']."/archive_in"; + + $tar = new tar(); + + //------------------------------ + + $real_name = preg_replace( "/^lang-(\S+)\.tar$/", "\\1", $IN['tarball'] ); + + $real_name = preg_replace( "/_/", " ", $real_name ); + + //------------------------------ + + $tar->new_tar( $from_dir, $tarname ); + + $files = $tar->list_files(); + + if (count($files) > 0) + { + foreach($files as $giles) + { + if ( ! preg_match( "/^(?:[\.\w\d\+\-\_\/]+)$/", $giles) ) + { + $ADMIN->error("$tarname is possibly corrupted, please re-upload in binary"); + } + } + } + else + { + $ADMIN->error("$tarname is not a valid tar-chive"); + } + + $DB->query("INSERT INTO ibf_languages (ldir, lname) VALUES('temp', '$real_name (Import)')"); + + $new_id = $DB->get_insert_id(); + + //------------------------- + // attempt to make new dir + //------------------------- + + $dest = $to_dir."/".$new_id; + + if ( ! mkdir($dest, 0777) ) + { + $DB->query("DELETE FROM ibf_languages WHERE lid='$new_id'"); + + $ADMIN->error("Could not create a new directory in $to_dir, please give sufficient CHMOD permissions to allow this"); + } + + //------------------------------ + // Extract the tarball + //------------------------------ + + $tar->extract_files($dest); + + if ($tar->error != "") + { + $DB->query("DELETE FROM ibf_languages WHERE lid='$new_id'"); + + $ADMIN->error( $tar->error ); + } + + $extra = array( 'lauthor' => "", 'lemail' => "" ); + + if (file_exists($dest."/conf.inc")) + { + require $dest."/conf.inc"; + + $extra['lauthor'] = stripslashes($config['lauthor']); + $extra['lemail'] = stripslashes($config['lemail']); + + } + + $extra['ldir'] = $new_id; + + $db_string = $DB->compile_db_update_string($extra); + + $DB->query("UPDATE ibf_languages SET $db_string WHERE lid='$new_id'"); + + $ADMIN->done_screen("Language Pack Export Imported", "Manage Language Sets", "act=lang" ); + + } + + //-------------------------------------------- + + function import() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_detail = "The tar-chive that you wish to import must reside in 'archive_in' and be a valid tar-chive uploaded in binary format."; + $ADMIN->page_title = "Language Pack Import"; + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'doimport' ), + 2 => array( 'act' , 'lang' ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "50%" ); + $SKIN->td_header[] = array( " " , "50%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Choose a tar-chive to import" ); + + $files = $ADMIN->get_tar_names("lang-"); + + $form_array = array(); + + if (count($files) > 0) + { + foreach($files as $piles) + { + $form_array[] = array( $piles, $piles ); + } + } + + $ADMIN->html .= $SKIN->add_td_row( array( "Tar-chive to import..." , + $SKIN->form_dropdown( "tarball", $form_array ) + ) ); + + $ADMIN->html .= $SKIN->end_form("Import!"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + + } + + + //-------------------------------------------- + + + function export() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing language set ID, go back and try again"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_languages WHERE lid='".$IN['id']."'"); + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + //+------------------------------- + + $archive_dir = $INFO['base_dir']."/archive_out"; + $lang_dir = $INFO['base_dir']."/lang/".$row['ldir']; + + require $root_dir."sources/lib/tar.php"; + + if (!is_dir($archive_dir)) + { + $ADMIN->error("Could not locate $archive_dir, is the directory there?"); + } + + if (!is_writeable($archive_dir)) + { + $ADMIN->error("Cannot write in $archive_dir, CHMOD via FTP to 0755 or 0777 to enable this script to write into it. IBF cannot do this for you"); + } + + if (!is_dir($lang_dir)) + { + $ADMIN->error("Could not locate $lang_dir, is the directory there?"); + } + + //+------------------------------- + // Attempt to copy the files to the + // working directory... + //+------------------------------- + + $l_name = preg_replace( "/\s{1,}/", "_", $row['lname'] ); + + $new_dir = "lang-".$l_name; + + if ( ! $ADMIN->copy_dir($lang_dir, $archive_dir."/".$new_dir) ) + { + $ADMIN->error( $ADMIN->errors ); + } + + // Generate the config file.. + + $file_content = " \"".addslashes($row['lauthor'])."\", 'lemail'=>\"".addslashes($row['lemail'])."\")\n\n?".">"; + + $FH = fopen($archive_dir."/".$new_dir."/"."conf.inc", 'w'); + fwrite($FH, $file_content, strlen($file_content)); + fclose($FH); + + // Add files and write tarball + + $tar = new tar(); + + $tar->new_tar( $archive_dir, $new_dir.".tar" ); + $tar->add_directory( $archive_dir."/".$new_dir ); + $tar->write_tar(); + + // Check for errors. + + if ($tar->error != "") + { + $ADMIN->error($tar->error); + } + + // remove original unarchived directory + + $ADMIN->rm_dir($archive_dir."/".$new_dir); + + $ADMIN->done_screen("Language Pack Export Created

You can download the tar-chive here", "Manage Language Sets", "act=lang" ); + + + } + + + + + + function show_file() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing language set ID, go back and try again"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_languages WHERE lid='".$IN['id']."'"); + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + //+------------------------------- + + $lang_dir = $INFO['base_dir']."lang/".$row['ldir']; + + $form_array = array(); + + $lang_file = $lang_dir."/".$IN['lang_file']; + + + if ( ! is_writeable($lang_dir) ) + { + $ADMIN->error("Cannot write into '$lang_dir', please check the CHMOD value, and if needed, CHMOD to 0777 via FTP. IBF cannot do this for you."); + } + + if (! file_exists($lang_file) ) + { + $ADMIN->error("Cannot locate {$IN['lang_file']} in '$lang_dir', please go back and check the input"); + } + else + { + require $lang_file; + } + + if ($IN['lang_file'] == 'email_content.php') + { + $lang = $EMAIL; + } + + if ( ! is_writeable($lang_file) ) + { + $ADMIN->error("Cannot write to '$lang_file', please check the CHMOD value, and if needed, CHMOD to 0777 via FTP. IBF cannot do this for you."); + } + + + $ADMIN->page_detail = "You may edit any of the language information below."; + $ADMIN->page_title = "Edit Language set: ".$row['lname']; + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'doedit' ), + 2 => array( 'act' , 'lang' ), + 3 => array( 'id' , $IN['id'] ), + 4 => array( 'lang_file' , $IN['lang_file'] ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( "Block Name" , "20%" ); + $SKIN->td_header[] = array( "Content" , "80%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Language Text: ".$IN['lang_file'] ); + + foreach($lang as $k => $v) + { + + + //+------------------------------- + // Swop < and > into ascii entities + // to prevent textarea breaking html + //+------------------------------- + + $v = stripslashes($v); + + $v = preg_replace("/&/", "&", $v ); + $v = preg_replace("//", ">", $v ); + $v = preg_replace("/'/", "'", $v ); + + if ($IN['lang_file'] == 'email_content.php') + { + $rows = 15; + + $cols = 70; + + $ADMIN->html .= $SKIN->add_td_row( array( + "<ibf.lang.".$k.">", + $SKIN->form_textarea('XX_'.$k, $v, $cols, $rows), + ) ); + } + else + { + $ADMIN->html .= $SKIN->add_td_row( array( + "<ibf.lang.".$k.">", + $SKIN->form_input('XX_'.$k, $v), + ) ); + } + + } + + + + $ADMIN->html .= $SKIN->end_form("Edit this file"); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + //+------------------------------- + + $ADMIN->output(); + + + } + + //------------------------------------------------------------- + // Edit language pack information + //------------------------------------------------------------- + + function edit_info() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing language set ID, go back and try again"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_languages WHERE lid='".$IN['id']."'"); + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + $final['lname'] = stripslashes($HTTP_POST_VARS['lname']); + + if (isset($HTTP_POST_VARS['lname'])) + { + $final['lauthor'] = stripslashes($HTTP_POST_VARS['lauthor']); + $final['lemail'] = stripslashes($HTTP_POST_VARS['lemail']); + } + + $db_string = $DB->compile_db_update_string( $final ); + + $DB->query("UPDATE ibf_languages SET $db_string WHERE lid='".$IN['id']."'"); + + $ADMIN->done_screen("Language pack information updated", "Manage language sets", "act=lang" ); + + } + + //------------------------------------------------------------- + // Add language pack + //------------------------------------------------------------- + + + function add_language() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing language set ID, go back and try again"); + } + + + $DB->query("SELECT * FROM ibf_languages WHERE lid='".$IN['id']."'"); + + //------------------------------------- + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query that language set from the DB, so there"); + } + + //------------------------------------- + + //------------------------------------- + + if ( ! is_writeable($root_path.'lang') ) + { + $ADMIN->error("The directory 'lang' is not writeable by this script. Please check the permissions on that directory. CHMOD to 0777 if in doubt and try again"); + } + + //------------------------------------- + + if ( ! is_dir($root_path.'lang/'.$row['ldir']) ) + { + $ADMIN->error("Could not locate the original language set to copy, please check and try again"); + } + + //------------------------------------- + + $row['lname'] = $row['lname'].".2"; + + // Insert a new row into the DB... + + $final = array(); + + foreach($row as $k => $v) + { + if ($k == 'lid') + { + continue; + } + else + { + $final[ $k ] = $v; + } + } + + $db_string = $DB->compile_db_insert_string( $final ); + + $DB->query("INSERT INTO ibf_languages (".$db_string['FIELD_NAMES'].") VALUES(".$db_string['FIELD_VALUES'].")"); + + $new_id = $DB->get_insert_id(); + + //------------------------------------- + + if ( ! $ADMIN->copy_dir( $INFO['base_dir'].'lang/'.$row['ldir'] , $INFO['base_dir'].'lang/'.$new_id ) ) + { + $DB->query("DELETE FROM ibf_languages WHERE lid='$new_id'"); + + $ADMIN->error( $ADMIN->errors ); + } + else + { + $DB->query("UPDATE ibf_languages SET ldir='$new_id' WHERE lid='$new_id'"); + } + + //------------------------------------- + // Pass to edit / add form... + //------------------------------------- + + $this->do_form('add', $new_id); + + } + + //------------------------------------------------------------- + // REMOVE WRAPPERS + //------------------------------------------------------------- + + function remove() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + //+------------------------------- + + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing image set ID, go back and try again"); + } + + if ($IN['id'] == 1) + { + $ADMIN->error("You cannot remove this language pack."); + } + + $DB->query("SELECT * from ibf_languages WHERE lid='".$IN['id']."'"); + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the language information from the database"); + } + + if ( $ADMIN->rm_dir( $INFO['base_dir']."lang/".$row['ldir'] ) ) + { + + $DB->query("DELETE FROM ibf_languages WHERE lid='".$IN['id']."'"); + + $std->boink_it($SKIN->base_url."&act=lang"); + exit(); + } + else + { + $ADMIN->error("Could not remove the language pack files, please check the CHMOD permissions to ensure that this script has the correct permissions to allow this"); + } + } + + + + //------------------------------------------------------------- + // ADD / EDIT IMAGE SETS + //------------------------------------------------------------- + + function save_langfile() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + //+------------------------------- + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing language set ID, go back and try again"); + } + + if ($IN['lang_file'] == "") + { + $ADMIN->error("You must specify an existing language filename, go back and try again"); + } + + $DB->query("SELECT * from ibf_languages WHERE lid='".$IN['id']."'"); + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the language information from the database"); + } + + $lang_file = $root_path."lang/".$row['ldir']."/".$IN['lang_file']; + + if (! file_exists( $lang_file ) ) + { + $ADMIN->error("Could not locate $lang_file, is it there?"); + } + + if (! is_writeable( $lang_file ) ) + { + $ADMIN->error("Cannot write to $lang_file, please chmod to 0666 or better and try again"); + } + + $barney = array(); + + foreach ($IN as $k => $v) + { + if ( preg_match( "/^XX_(\S+)$/", $k, $match ) ) + { + if ( isset($IN[ $match[0] ]) ) + { + $v = preg_replace("/'/", "'", stripslashes($HTTP_POST_VARS[ $match[0] ]) ); + $v = preg_replace("/</", "<", $v ); + $v = preg_replace("/>/", ">", $v ); + $v = preg_replace("/&/", "&", $v ); + $v = preg_replace("/\r/", "", $v ); + + $barney[ $match[1] ] = $v; + } + } + } + + if ( count($barney) < 1 ) + { + $ADMIN->error("Oopsie, something has gone wrong - did you leave all the fields blank?"); + } + + $start = " $text) + { + $text = preg_replace("/n{1,}$/", "", $text); + $start .= "\n".'$EMAIL['."'$key'".'] = << $text) + { + $start .= "\n".'$lang['."'$key'".'] = "'.addslashes($text).'";'; + } + } + + $start .= "\n\n?".">"; + + if ($fh = fopen( $lang_file, 'w') ) + { + fwrite($fh, $start, strlen($start) ); + fclose($fh); + } + else + { + $ADMIN->error("Could not write back to $lang_file"); + } + + $ADMIN->done_screen("Set updated", "Manage Language Sets", "act=lang" ); + + + + } + + //------------------------------------------------------------- + // EDIT SPLASH + //------------------------------------------------------------- + + function do_form( $method='add', $id="" ) + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + //+------------------------------- + + if ($id != "") + { + $IN['id'] = $id; + } + + //+------------------------------- + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing language set ID, go back and try again"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_languages WHERE lid='".$IN['id']."'"); + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + //+------------------------------- + + $lang_dir = $INFO['base_dir']."lang/".$row['ldir']; + + $form_array = array(); + + if ($method != 'add') + { + if ( ! is_writeable($lang_dir) ) + { + $ADMIN->error("Cannot write into '$lang_dir', please check the CHMOD value, and if needed, CHMOD to 0777 via FTP. IBF cannot do this for you."); + } + } + + //+------------------------------- + + if ( is_dir($lang_dir) ) + { + $handle = opendir($lang_dir); + + while (($filename = readdir($handle)) !== false) + { + if (($filename != ".") && ($filename != "..")) + { + if (preg_match("/^index/", $filename)) + { + continue; + } + + if (preg_match("/\.php$/", $filename)) + { + $form_array[] = array( $filename, preg_replace( "/\.php$/", "", $filename ) ); + } + } + } + + closedir($handle); + } + + if ($row['lauthor'] and $row['lemail']) + { + $author = "

This language set '{$row['lname']}' was created by {$row['lauthor']}"; + } + else if ($row['lauthor']) + { + $author = "

This language set '{$row['lname']}' was created by {$row['lauthor']}"; + } + + //+------------------------------- + + $ADMIN->page_detail = "Please choose which language section you wish to edit below.$author $url"; + $ADMIN->page_title = "Edit Language set"; + + //+------------------------------- + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'editinfo' ), + 2 => array( 'act' , 'lang' ), + 3 => array( 'id' , $IN['id'] ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "60%" ); + $SKIN->td_header[] = array( " " , "40%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Edit language set information" ); + + + $ADMIN->html .= $SKIN->add_td_row( array( + "Language Set Name", + $SKIN->form_input('lname', $row['lname']), + ) ); + + if ($method == 'add') + { + + $ADMIN->html .= $SKIN->add_td_row( array( + "Language set author name:", + $SKIN->form_input('lauthor', $row['lauthor']), + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( + "Language set author email:", + $SKIN->form_input('lemail', $row['lemail']), + ) ); + + } + + $ADMIN->html .= $SKIN->end_form("Edit language set details"); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'edit2' ), + 2 => array( 'act' , 'lang' ), + 3 => array( 'id' , $IN['id'] ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "60%" ); + $SKIN->td_header[] = array( " " , "40%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Edit language files in set '".$row['lname']."'" ); + + $ADMIN->html .= $SKIN->add_td_row( array( + "Please select a language file to edit", + $SKIN->form_dropdown('lang_file', $form_array), + ) ); + + $ADMIN->html .= $SKIN->end_form("Edit this language file"); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + //+------------------------------- + + $ADMIN->output(); + + } + + //------------------------------------------------------------- + // SHOW ALL LANGUAGE PACKS + //------------------------------------------------------------- + + function list_current() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $form_array = array(); + + $ADMIN->page_detail = "You can edit, remove and create new language packs from this section"; + $ADMIN->page_title = "Manage Language Sets"; + + //+------------------------------- + + $DB->query("select ibf_languages.*, count(ibf_members.id) as mcount from ibf_languages left join ibf_members on(ibf_members.language=ibf_languages.ldir) where (ibf_members.language is not null or ibf_members.language = 'en') group by ibf_languages.ldir order by ibf_languages.lname"); + + + $used_ids = array(); + $show_array = array(); + + if ( $DB->get_num_rows() ) + { + + $SKIN->td_header[] = array( "Title" , "40%" ); + $SKIN->td_header[] = array( "Members" , "30%" ); + $SKIN->td_header[] = array( "Export" , "10%" ); + $SKIN->td_header[] = array( "Edit" , "10%" ); + $SKIN->td_header[] = array( "Remove" , "10%" ); + + $ADMIN->html .= $SKIN->start_table( "Current Language Packs In Use" ); + + while ( $r = $DB->fetch_row() ) + { + + $show_array[ $r['lid'] ] .= stripslashes($r['lname'])."
"; + + if ( in_array( $r['lid'], $used_ids ) ) + { + continue; + } + + $ADMIN->html .= $SKIN->add_td_row( array( "".stripslashes($r['lname'])."", + "
{$r['mcount']}
", + "
Export
", + "
Edit
", + "Deallocate before removing", + ) ); + + $used_ids[] = $r['lid']; + + $form_array[] = array( $r['lid'], $r['lname'] ); + + } + + $ADMIN->html .= $SKIN->end_table(); + } + + if ( count($used_ids) < 1 ) + { + $used_ids[] = '0'; + } + $DB->query("SELECT lid, ldir, lname FROM ibf_languages WHERE lid NOT IN(".implode(",",$used_ids).")"); + + if ( $DB->get_num_rows() ) + { + + $SKIN->td_header[] = array( "Title" , "40%" ); + $SKIN->td_header[] = array( "Export" , "10%" ); + $SKIN->td_header[] = array( "Edit" , "30%" ); + $SKIN->td_header[] = array( "Remove" , "20%" ); + + $ADMIN->html .= $SKIN->start_table( "Current Unallocated Language Packs" ); + + $ADMIN->html .= $SKIN->js_checkdelete(); + + while ( $r = $DB->fetch_row() ) + { + + $ADMIN->html .= $SKIN->add_td_row( array( "".stripslashes($r['lname'])."", + "
Export
", + "
Edit
", + "
Remove
", + ) ); + + $form_array[] = array( $r['lid'], $r['lname'] ); + + } + + $ADMIN->html .= $SKIN->end_table(); + } + //} + + //+------------------------------- + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'add' ), + 2 => array( 'act' , 'lang' ), + ) ); + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + $ADMIN->html .= $SKIN->start_table( "Create Language Set" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->add_td_row( array( "Base new language set on..." , + $SKIN->form_dropdown( "id", $form_array) + ) ); + + $ADMIN->html .= $SKIN->end_form("Create new Language set"); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + //+------------------------------- + + $ADMIN->output(); + + } + + +} + + +?> \ No newline at end of file diff --git a/upload/sources/Admin/ad_member.php b/upload/sources/Admin/ad_member.php new file mode 100644 index 00000000..26ffbb0b --- /dev/null +++ b/upload/sources/Admin/ad_member.php @@ -0,0 +1,1583 @@ + Admin Forum functions +| > Module written by Matt Mecham +| > Date started: 1st march 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new ad_forums(); + + +class ad_forums { + + var $base_url; + + function ad_forums() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $ibforums; + + switch($IN['code']) + { + case 'stepone': + $this->step_one(); + break; + case 'doform': + $this->do_edit_form(); + break; + case 'doedit': + $this->do_edit(); + break; + //--------------------- + case 'add': + $this->add_form(); + break; + case 'doadd': + $this->do_add(); + break; + //--------------------- + case 'del': + $this->delete_form(); + break; + case 'delete2': + $this->delete_lookup_form(); + break; + case 'dodelete': + $this->dodelete(); + break; + case 'prune': + $this->prune_confirm(); + break; + case 'doprune': + $this->doprune(); + break; + //--------------------- + case 'title': + $this->titles(); + break; + case 'rank_edit': + $this->rank_setup('edit'); + break; + case 'rank_add': + $this->rank_setup('add'); + break; + case 'do_add_rank': + $this->add_rank(); + break; + case 'do_rank_edit': + $this->edit_rank(); + break; + case 'rank_delete': + $this->delete_rank(); + break; + //--------------------- + case 'ban': + $this->ban_control(); + break; + case 'doban': + $this->update_ban(); + break; + //--------------------- + case 'mod': + $this->view_mod(); + break; + case 'domod': + $this->domod(); + break; + //--------------------- + default: + $this->search_form(); + break; + } + + } + + + + //+--------------------------------------------------------------------------------- + // + // Moderation control... + // + //+--------------------------------------------------------------------------------- + + function domod() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ids = array(); + + foreach ($IN as $k => $v) + { + if ( preg_match( "/^mid_(\d+)$/", $k, $match ) ) + { + if ($IN[ $match[0] ]) + { + $ids[] = $match[1]; + } + } + } + + //------------------- + + if ( count($ids) < 1 ) + { + $ADMIN->error("You did not select any members to approve or delete"); + } + + + + //------------------- + + if ($IN['type'] == 'approve') + { + + //------------------------------------------- + + require $root_path."sources/lib/emailer.php"; + + $email = new emailer(); + + $email->get_template("complete_reg"); + + $email->build_message( "" ); + + $email->subject = "Account validated at ".$INFO['board_name']; + + //------------------------------------------- + + $main = $DB->query("SELECT id, email, validate_key, mgroup, prev_group FROM ibf_members WHERE id IN(".implode( ",",$ids ).")"); + + while( $row = $DB->fetch_row( $main ) ) + { + if ($row['mgroup'] != $INFO['auth_group']) + { + continue; + } + + if ($row['prev_group'] == "") + { + $row['prev_group'] = $INFO['member_group']; + } + + $update = $DB->query("UPDATE ibf_members SET prev_group='', validate_key='', mgroup='".$row['prev_group']."' WHERE id='".$row['id']."'"); + + $email->to = $row['email']; + + $email->send_mail(); + } + + $DB->query("SELECT id, name FROM ibf_members WHERE mgroup <> '".$INFO['auth_group']."' ORDER BY id DESC LIMIT 0,1"); + $r = $DB->fetch_row(); + + $DB->query("UPDATE ibf_stats SET MEM_COUNT=MEM_COUNT+".count($ids).", LAST_MEM_NAME='{$r['name']}', LAST_MEM_ID='{$r['id']}'"); + + + $ADMIN->done_screen( count($ids)." Members Approved", "Manage Registrations", "act=mem&code=mod" ); + + } + else + { + $DB->query("DELETE FROM ibf_members WHERE id IN(".implode( ",",$ids ).")"); + + $DB->query("UPDATE ibf_stats SET MEM_COUNT=MEM_COUNT-".count($ids)); + + $ADMIN->done_screen( count($ids)." Members Removed", "Manage Registrations", "act=mem&code=mod" ); + } + + } + + + //--------------------------------------------- + + function view_mod() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_title = "Manage User Registration/Email Change Queues"; + + $ADMIN->page_detail = "This section allows you to allow or deny registrations where you have requested that an administrator previews new accounts before allowing full membership. It will also allow you to complete or deny new email address changes.

This form will also allow you to complete the registrations for those who did not receive an email."; + + $DB->query("SELECT COUNT(id) as mcount FROM ibf_members WHERE mgroup='".$INFO['auth_group']."' and (new_pass = '' or new_pass is null)"); + + $row = $DB->fetch_row(); + + $cnt = $row['mcount'] < 1 ? 0 : $row['mcount']; + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'domod' ), + 2 => array( 'act' , 'mem' ), + ) ); + + $SKIN->td_header[] = array( "Member Name" , "30%" ); + $SKIN->td_header[] = array( "Email Address" , "30%" ); + $SKIN->td_header[] = array( "Posts" , "10%" ); + $SKIN->td_header[] = array( "Registered On" , "20%" ); + $SKIN->td_header[] = array( "Select" , "10%" ); + + $ADMIN->html .= $SKIN->start_table( "Users awaiting authorisation" ); + + $ADMIN->html .= $SKIN->add_td_basic( "$cnt users require registration or email change validation, showing 0 - 75", "center", "title"); + + if ($cnt > 0) + { + $DB->query("SELECT name, id, email, posts, joined FROM ibf_members WHERE mgroup='".$INFO['auth_group']."' and (new_pass = '' or new_pass is null) ORDER BY joined DESC LIMIT 0,75"); + + while ( $r = $DB->fetch_row() ) + { + $ADMIN->html .= $SKIN->add_td_row( array( "".$r['name']."" , + $r['email'], + "
{$r['posts']}
", + $std->get_date( $r['joined'], 'JOINED' ), + "" + ) ); + } + + $ADMIN->html .= $SKIN->add_td_basic("", "center", "row1" ); + + } + + $ADMIN->html .= $SKIN->end_form("Go!"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + } + + + + //+--------------------------------------------------------------------------------- + // + // Ban control... + // + //+--------------------------------------------------------------------------------- + + function ban_control() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_title = "Ban Control"; + + $ADMIN->page_detail = "This section allows you to modify, delete or add IP addresses, email addresses and reserved names to the ban filters."; + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'doban' ), + 2 => array( 'act' , 'mem' ), + ) ); + + $ip_list = ""; + $name_list = ""; + $email_list = ""; + + if ($INFO['ban_ip'] != "") + { + $ip_list = preg_replace( "/\|/", "\n", $INFO['ban_ip'] ); + } + + //+------------------------------- + + if ($INFO['ban_email'] != "") + { + $email_list = preg_replace( "/\|/", "\n", $INFO['ban_email'] ); + } + + //+------------------------------- + + if ($INFO['ban_names'] != "") + { + $name_list = preg_replace( "/\|/", "\n", $INFO['ban_names'] ); + } + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Ban Control" ); + + $ADMIN->html .= $SKIN->add_td_basic("Banned IP Addresses (one per line - use * as a wildcard)", "center", "title"); + + $ADMIN->html .= $SKIN->add_td_row( array( "Banned IP Address
(Example: 212.45.45.23)
(Example: 212.45.45.*)" , + $SKIN->form_textarea( 'ban_ip', $ip_list ) + ) ); + + $ADMIN->html .= $SKIN->add_td_basic("Banned Email Addresses (one per line - use * as a wildcard)", "center", "title"); + + $ADMIN->html .= $SKIN->add_td_row( array( "Banned Email Address
(Example: name@domain.com)
(Example: *@domain.com)" , + $SKIN->form_textarea( 'ban_email', $email_list ) + ) ); + + $ADMIN->html .= $SKIN->add_td_basic("Banned / Reserved Names (one per line)", "center", "title"); + + $ADMIN->html .= $SKIN->add_td_row( array( "Banned Names" , + $SKIN->form_textarea( 'ban_names', $name_list ) + ) ); + + $ADMIN->html .= $SKIN->end_form("Update the ban filters"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + } + + function update_ban() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + // Get the incoming.. + + $new = array(); + + $new['ban_ip'] = preg_replace( "/\n/", "|", trim($HTTP_POST_VARS['ban_ip']) ); + $new['ban_email'] = preg_replace( "/\n/", "|", trim($HTTP_POST_VARS['ban_email']) ); + $new['ban_names'] = preg_replace( "/\n/", "|", trim($HTTP_POST_VARS['ban_names']) ); + + $ADMIN->rebuild_config( $new ); + + $ADMIN->done_screen("Ban Filters Updated", "Ban Control", "act=mem&code=ban" ); + + } + + + + //+--------------------------------------------------------------------------------- + // + // MEMBER RANKS... + // + //+--------------------------------------------------------------------------------- + + function titles() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_title = "Member Ranking Set Up"; + + $ADMIN->page_detail = "This section allows you to modify, delete or add extra ranks.
If you wish to display pips below the members name, enter the number of pips. If you wish to use a custom image, simply enter the image name in the pips box. Note, these custom images must reside in the 'html/team_icons' directory of your installation"; + + + //+------------------------------- + + $SKIN->td_header[] = array( "Title" , "30%" ); + $SKIN->td_header[] = array( "Min Posts" , "10%" ); + $SKIN->td_header[] = array( "Pips" , "20%" ); + $SKIN->td_header[] = array( " " , "20%" ); + $SKIN->td_header[] = array( " " , "20%" ); + + //+------------------------------- + + $DB->query("SELECT s.*, i.*, t.template FROM ibf_templates t, ibf_skins s, ibf_images i ". + "WHERE s.default_set=1 AND t.tmid=s.tmpl_id AND i.imid=s.img_id"); + + $row = $DB->fetch_row(); + + $ADMIN->html .= $SKIN->start_table( "Member Titles/Ranks" ); + + $DB->query("SELECT * FROM ibf_titles ORDER BY posts"); + + while ( $r = $DB->fetch_row() ) + { + $img = ""; + + if ( preg_match( "/^\d+$/", $r['pips'] ) ) + { + for ($i = 1; $i <= $r['pips']; $i++) + { + $img .= $row['A_STAR']; + + } + } + else + { + $img = ""; + } + + $ADMIN->html .= $SKIN->add_td_row( array( "".$r['title']."" , + $r['posts'], + $img, + "Edit", + "Delete", + ) ); + + } + + + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'do_add_rank' ), + 2 => array( 'act' , 'mem' ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Add a Member Rank" ); + + + $ADMIN->html .= $SKIN->add_td_row( array( "Rank Title" , + $SKIN->form_input( "title" ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Minimum number of posts needed" , + $SKIN->form_input( "posts" ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Number of pips
(Or pip image)" , + $SKIN->form_input( "pips" ) + ) ); + + $ADMIN->html .= $SKIN->end_form("Add this rank"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + } + + //+--------------------------------------------------------------------------------- + + function add_rank() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + //+------------------------------- + // check for input + //+------------------------------- + + foreach( array( 'posts', 'title', 'pips' ) as $field ) + { + if ($IN[ $field ] == "") + { + $ADMIN->error("You must complete the form fully"); + } + } + + //+------------------------------- + // Add it to the DB + //+------------------------------- + + $db_string = $DB->compile_db_insert_string( array ( + 'posts' => trim($IN['posts']), + 'title' => trim($IN['title']), + 'pips' => trim($IN['pips']), + ) ); + + $DB->query("INSERT INTO ibf_titles (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"); + + $ADMIN->done_screen("Rank Added", "Member Ranking Control", "act=mem&code=title" ); + + + } + + //+--------------------------------------------------------------------------------- + + function delete_rank() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + //+------------------------------- + // check for input + //+------------------------------- + + if ($IN['id'] == "") + { + $ADMIN->error("We could not match that ID"); + } + + $DB->query("DELETE FROM ibf_titles WHERE id='".$IN['id']."'"); + + $ADMIN->done_screen("Rank Removed", "Member Ranking Control", "act=mem&code=title" ); + + } + + //+--------------------------------------------------------------------------------- + + function edit_rank() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + //+------------------------------- + // check for input + //+------------------------------- + + if ($IN['id'] == "") + { + $ADMIN->error("We could not match that ID"); + } + + //+------------------------------- + + foreach( array( 'posts', 'title', 'pips' ) as $field ) + { + if ($IN[ $field ] == "") + { + $ADMIN->error("You must complete the form fully"); + } + } + + //+------------------------------- + // Add it to the DB + //+------------------------------- + + $db_string = $DB->compile_db_update_string( array ( + 'posts' => trim($IN['posts']), + 'title' => trim($IN['title']), + 'pips' => trim($IN['pips']), + ) ); + + $DB->query("UPDATE ibf_titles SET $db_string WHERE id='".$IN['id']."'"); + + $ADMIN->done_screen("Rank Edited", "Member Ranking Control", "act=mem&code=title" ); + + + } + + //+--------------------------------------------------------------------------------- + + function rank_setup($mode='edit') { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_title = "Member Rank Set Up"; + + $ADMIN->page_detail = "If you wish to display pips below the members name, enter the number of pips. If you wish to use a custom image, simply enter the image name in the pips box. Note, these custom images must reside in the 'html/team_icons' directory of your installation"; + + if ($mode == 'edit') + { + $form_code = 'do_rank_edit'; + + if ($IN['id'] == "") + { + $ADMIN->error("No rank ID was set, please try again"); + } + + $DB->query("SELECT * from ibf_titles WHERE id='".$IN['id']."'"); + $rank = $DB->fetch_row(); + + $button = "Complete Edit"; + } + else + { + $form_code = 'do_add_rank'; + $rank = array( 'posts' => "", 'title' => "", 'pips' => ""); + $button = "Add this rank"; + } + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , $form_code ), + 2 => array( 'act' , 'mem' ), + 3 => array( 'id' , $rank['id'] ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Member Ranks" ); + + + $ADMIN->html .= $SKIN->add_td_row( array( "Rank Title" , + $SKIN->form_input( "title", $rank['title'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Minimum number of posts needed" , + $SKIN->form_input( "posts", $rank['posts'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Number of pips
(Or pip image)" , + $SKIN->form_input( "pips", $rank['pips'] ) + ) ); + + $ADMIN->html .= $SKIN->end_form($button); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + + } + + //+--------------------------------------------------------------------------------- + + + //+--------------------------------------------------------------------------------- + // + // DELETE MEMBER SET UP + // + //+--------------------------------------------------------------------------------- + + function delete_form() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_title = "Member Account Deletion"; + + $ADMIN->page_detail = "Search for a member to delete by enter part or all of the username, or configure the prune form."; + + + $mem_group[0] = array( '0', 'Any member group' ); + + $DB->query("SELECT g_id, g_title FROM ibf_groups ORDER BY g_title"); + + while ( $r = $DB->fetch_row() ) + { + $mem_group[] = array( $r['g_id'] , $r['g_title'] ); + } + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'delete2' ), + 2 => array( 'act' , 'mem' ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Member Lookup" ); + + + $ADMIN->html .= $SKIN->add_td_row( array( "Enter part or all of the usersname" , + $SKIN->form_input( "USER_NAME" ) + ) ); + + $ADMIN->html .= $SKIN->end_form("Find Member Account"); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'prune' ), + 2 => array( 'act' , 'mem' ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "or remove members where..." ); + + + $ADMIN->html .= $SKIN->add_td_row( array( "The members last post was over [x] days ago.
([x] = number entered)
(Leave blank to omit from query)" , + $SKIN->form_input( "last_post", '60') + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "and where the member has less than [x] posts
([x] = number entered)
(Leave blank to omit from query)" , + $SKIN->form_input( "posts", '100') + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "and where the member joined [x] days ago
([x] = number entered)
(Leave blank to omit from query)" , + $SKIN->form_input( "joined", '365') + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "and the member group is..." , + $SKIN->form_dropdown( "mgroup", + $mem_group, + 0 + ) + ) ); + + $ADMIN->html .= $SKIN->end_form("Prune members"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + + } + + //+--------------------------------------------------------------------------------- + + function prune_confirm() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + //----------------------------- + // Make sure we have *something* + //------------------------------ + + $blanks = 0; + + foreach( array( 'posts', 'last_post', 'joined' ) as $field ) + { + if ($IN[ $field ] == "") + { + $blanks++; + } + } + + if ($blanks == 3) + { + $ADMIN->error("You must specify at least one field to use in the pruning query"); + } + + $time_now = time(); + + $query = "SELECT COUNT(id) as mcount FROM ibf_members WHERE"; + + $add_query = array(); + + if ($IN['joined'] > 0) + { + $j = $time_now - ($IN['joined'] *60*60*24); + $add_query[] = " joined < $j "; + } + + if ($IN['last_post'] > 0) + { + $l = $time_now - ($IN['last_post'] *60*60*24); + $add_query[] = " last_post < $l "; + } + + if ($IN['posts'] > 0) + { + $add_query[] = " posts < ".$IN['posts']." "; + } + + if ($IN['mgroup'] > 0) + { + $add_query[] = " mgroup='".$IN['mgroup']."' "; + } + + $add_query[] = ' id > 0'; + + $additional_query = implode( "AND", $add_query ); + + $this_query = trim( $query.$additional_query ); + + $pass_query = addslashes(urlencode($additional_query)); + + //-------------------------------- + // Run the query + //-------------------------------- + + $DB->query($this_query); + + $count = $DB->fetch_row(); + + if ($count['mcount'] < 1) + { + $ADMIN->error("We did not find any members matching the prune criteria. Please go back and try again"); + } + + $ADMIN->page_title = "Member Pruning"; + + $ADMIN->page_detail = "Please confirm your action."; + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'doprune' ), + 2 => array( 'act' , 'mem' ), + 3 => array( 'query' , $pass_query ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Member Prune Confirmation" ); + + + $ADMIN->html .= $SKIN->add_td_row( array( "Number of members to prune" , + $count['mcount'] + ) ); + + $ADMIN->html .= $SKIN->end_form("Complete Member Pruning"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + } + + + //+--------------------------------------------------------------------------------- + + + function doprune() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + //----------------------------- + // Make sure we have *something* + //------------------------------ + + $query = trim(urldecode(stripslashes($IN['query']))); + + if ($query == "") + { + $ADMIN->error("Prune query error, no query to use"); + } + + //----------------------------- + // Get the member ids... + //------------------------------ + + $ids = array(); + + $DB->query("SELECT id FROM ibf_members WHERE ".$query); + + if ( $DB->get_num_rows() ) + { + while ($i = $DB->fetch_row()) + { + $ids[] = $i['id']; + } + } + else + { + $ADMIN->error("Could not find any members that matched the prune criteria"); + } + + $id_string = implode( "," , $ids ); + + $id_count = count($ids); + + // Convert their posts and topics into guest postings.. + + $DB->query("UPDATE ibf_posts SET author_id='0' WHERE author_id IN(".$id_string.")"); + + $DB->query("UPDATE ibf_topics SET starter_id='0' WHERE starter_id IN(".$id_string.")"); + + // Delete member... + + $DB->query("DELETE from ibf_members WHERE id IN(".$id_string.")"); + + // Delete member messages... + + $DB->query("DELETE from ibf_messages WHERE member_id IN (".$id_string.")"); + + // Delete member subscriptions. + + $DB->query("DELETE from ibf_tracker WHERE member_id IN (".$id_string.")"); + + // Set the stats DB straight. + + $DB->query("SELECT id, name FROM ibf_members WHERE mgroup <> '".$INFO['auth_group']."' ORDER BY joined DESC LIMIT 0,1"); + + $mem = $DB->fetch_row(); + + $DB->query("UPDATE ibf_stats SET ". + "MEM_COUNT=MEM_COUNT-".$id_count.", ". + "LAST_MEM_NAME='" . $mem['name'] . "', ". + "LAST_MEM_ID='" . $mem['id'] . "'"); + + // Blow me melon farmer + + $ADMIN->done_screen("Member Account(s) Deleted", "Member Control", "act=mem&code=edit" ); + + } + + //+--------------------------------------------------------------------------------- + + function delete_lookup_form() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['USER_NAME'] == "") + { + $ADMIN->error("You didn't choose a member name to look for!"); + } + + $DB->query("SELECT id, name FROM ibf_members WHERE name LIKE '".$IN['USER_NAME']."%'"); + + if (! $DB->get_num_rows() ) + { + $ADMIN->error("Sorry, we could not find any members that matched the search string you entered"); + } + + $form_array = array(); + + while ( $r = $DB->fetch_row() ) + { + $form_array[] = array( $r['id'] , $r['name'] ); + } + + + + $ADMIN->page_title = "Delete a member"; + + $ADMIN->page_detail = "Please choose which member to delete."; + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'dodelete' ), + 2 => array( 'act' , 'mem' ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Member Lookup results" ); + + + $ADMIN->html .= $SKIN->add_td_row( array( "Choose from the matches..." , + $SKIN->form_dropdown( "MEMBER_ID", $form_array ) + ) ); + + $ADMIN->html .= $SKIN->end_form("Delete Member"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + } + + //+--------------------------------------------------------------------------------- + + //+--------------------------------------------------------------------------------- + // + // DO DELETE + // + //+--------------------------------------------------------------------------------- + + function dodelete() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['MEMBER_ID'] == "") + { + $ADMIN->error("Could not resolve member id"); + } + + //+------------------------------- + + $DB->query("SELECT * FROM ibf_members WHERE id='".$IN['MEMBER_ID']."'"); + $mem = $DB->fetch_row(); + + //+------------------------------- + + if ($mem['id'] == "") + { + $ADMIN->error("Could not resolve member id"); + } + + // Convert their posts and topics into guest postings.. + + $DB->query("UPDATE ibf_posts SET author_id='0' WHERE author_id='".$IN['MEMBER_ID']."'"); + + $DB->query("UPDATE ibf_topics SET starter_id='0' WHERE starter_id='".$IN['MEMBER_ID']."'"); + + // Delete member... + + $DB->query("DELETE from ibf_members WHERE id='".$IN['MEMBER_ID']."'"); + + // Delete member messages... + + $DB->query("DELETE from ibf_messages WHERE member_id='".$IN['MEMBER_ID']."'"); + + // Delete member subscriptions. + + $DB->query("DELETE from ibf_tracker WHERE member_id='".$IN['MEMBER_ID']."'"); + + // Set the stats DB straight. + + $DB->query("SELECT id, name FROM ibf_members WHERE mgroup <> '".$INFO['auth_group']."' ORDER BY joined DESC LIMIT 0,1"); + + $mem = $DB->fetch_row(); + + $DB->query("UPDATE ibf_stats SET ". + "MEM_COUNT=MEM_COUNT-1, ". + "LAST_MEM_NAME='" . $mem['name'] . "', ". + "LAST_MEM_ID='" . $mem['id'] . "'"); + + // Blow me melon farmer + + $ADMIN->done_screen("Member Account Deleted", "Member Control", "act=mem&code=edit" ); + + } + + //+------------------------------- + //+--------------------------------------------------------------------------------- + // + // ADD MEMBER FORM + // + //+--------------------------------------------------------------------------------- + + function add_form() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_title = "Pre Register a member"; + + $ADMIN->page_detail = "You may pre-register members using this form."; + + $DB->query("SELECT g_id, g_title FROM ibf_groups ORDER BY g_title"); + + while ( $r = $DB->fetch_row() ) + { + $mem_group[] = array( $r['g_id'] , $r['g_title'] ); + } + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'doadd' ), + 2 => array( 'act' , 'mem' ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Member Registration" ); + + + $ADMIN->html .= $SKIN->add_td_row( array( "Member Name" , + $SKIN->form_input( "name" ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Password" , + $SKIN->form_input( "password", "", 'password' ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Email Address" , + $SKIN->form_input( "email" ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Member Group" , + $SKIN->form_dropdown( "mgroup", + $mem_group, + $mem['mgroup'] + ) + ) ); + + $ADMIN->html .= $SKIN->end_form("Register Member"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + + } + + function do_add() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + foreach( array('name', 'password', 'email', 'mgroup') as $field ) + { + if ($IN[ $field ] == "") + { + $ADMIN->error("You must complete the form fully!"); + } + } + + //---------------------------------- + // Do we already have such a member? + //---------------------------------- + + $DB->query("SELECT id FROM ibf_members WHERE LOWER(name)='".$IN['name']."'"); + + if ( $DB->get_num_rows() ) + { + $ADMIN->error("We already have a member by that name, please select another"); + } + + //+-------------------------------------------- + //| Find the highest member id, and increment it + //| auto_increment not used for guest id 0 val. + //+-------------------------------------------- + + $DB->query("SELECT MAX(id) as new_id FROM ibf_members"); + $r = $DB->fetch_row(); + + $member_id = $r['new_id'] + 1; + + $db_string = $DB->compile_db_insert_string( array ( + 'id' => $member_id, + 'name' => trim($IN['name']), + 'password' => md5(trim($IN['password'])), + 'email' => trim(strtolower($IN['email'])), + 'mgroup' => $IN['mgroup'], + 'joined' => time(), + 'posts' => 0, + 'ip_address' => $IN['ip_address'], + 'time_offset' => 0, + 'view_sigs' => 1, + 'view_avs' => 1, + 'allow_post' => 1, + 'view_pop' => 1, + 'view_img' => 1, + 'vdirs' => "in:Inbox|sent:Sent Items", + ) ); + + $DB->query("INSERT INTO ibf_members (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"); + + $member_id = $DB->get_insert_id(); + + $DB->query("UPDATE ibf_stats SET ". + "MEM_COUNT=MEM_COUNT+1, ". + "LAST_MEM_NAME='" . trim($IN['name']) . "', ". + "LAST_MEM_ID='" . $member_id . "'"); + + $ADMIN->done_screen("Member Account Created", "Member Control", "act=mem&code=edit" ); + + } + + + //+--------------------------------------------------------------------------------- + // + // SEARCH FORM, SEARCH FOR MEMBER + // + //+--------------------------------------------------------------------------------- + + function search_form() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_title = "Edit a member"; + + $ADMIN->page_detail = "Search for a member."; + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'stepone' ), + 2 => array( 'act' , 'mem' ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Search for a member" ); + + + $ADMIN->html .= $SKIN->add_td_row( array( "Enter part or all of the usersname" , + $SKIN->form_input( "USER_NAME" ) + ) ); + + $ADMIN->html .= $SKIN->end_form("Find Member"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + + } + + //+--------------------------------------------------------------------------------- + + function step_one() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['USER_NAME'] == "") + { + $ADMIN->error("You didn't choose a member name to look for!"); + } + + $DB->query("SELECT id, name FROM ibf_members WHERE name LIKE '".$IN['USER_NAME']."%'"); + + if (! $DB->get_num_rows() ) + { + $ADMIN->error("Sorry, we could not find any members that matched the search string you entered"); + } + + $form_array = array(); + + while ( $r = $DB->fetch_row() ) + { + $form_array[] = array( $r['id'] , $r['name'] ); + } + + + + $ADMIN->page_title = "Edit a member"; + + $ADMIN->page_detail = "Search for a member."; + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'doform' ), + 2 => array( 'act' , 'mem' ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Search for a member" ); + + + $ADMIN->html .= $SKIN->add_td_row( array( "Choose from the matches..." , + $SKIN->form_dropdown( "MEMBER_ID", $form_array ) + ) ); + + $ADMIN->html .= $SKIN->end_form("Edit Member"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + + + + + } + + + //+--------------------------------------------------------------------------------- + // + // DO EDIT FORM + // + //+--------------------------------------------------------------------------------- + + function do_edit_form() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $ibforums; + + require $root_path."sources/lib/post_parser.php"; + + $parser = new post_parser(); + + if ($IN['MEMBER_ID'] == "") + { + $ADMIN->error("Could not resolve member id"); + } + + //+------------------------------- + + $DB->query("SELECT * FROM ibf_members WHERE id='".$IN['MEMBER_ID']."'"); + $mem = $DB->fetch_row(); + + //+------------------------------- + + if ($mem['id'] == "") + { + $ADMIN->error("Could not resolve member id"); + } + + //+------------------------------- + + $mem_group = array(); + + $DB->query("SELECT g_id, g_title FROM ibf_groups ORDER BY g_title"); + + while ( $r = $DB->fetch_row() ) + { + $mem_group[] = array( $r['g_id'] , $r['g_title'] ); + } + + //+------------------------------- + + $lang_array = array(); + + $DB->query("SELECT ldir, lname FROM ibf_languages"); + + while ( $l = $DB->fetch_row() ) + { + $lang_array[] = array( $l['ldir'], $l['lname'] ); + } + + //+------------------------------- + + $DB->query("SELECT uid, sid, sname FROM ibf_skins"); + + $skin_array = array(); + + if ( $DB->get_num_rows() ) + { + while ( $s = $DB->fetch_row() ) + { + + $skin_array[] = array( $s['sid'], $s['sname'] ); + + } + } + + //+------------------------------- + //+------------------------------- + + + $ADMIN->page_title = "Edit member: ".$mem['name']." (ID: ".$mem['id'].")"; + + $ADMIN->page_detail = "You may alter the members settings from here."; + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'doedit' ), + 2 => array( 'act' , 'mem' ), + 3 => array( 'mid' , $mem['id'] ), + 4 => array( 'curpass', $mem['password'] ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Member Security Settings" ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow {$mem['name']} to post where allowed?" , + $SKIN->form_yes_no("allow_post", $mem['allow_post'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Member Group" , + $SKIN->form_dropdown( "mgroup", + $mem_group, + $mem['mgroup'] + ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Member Title" , + $SKIN->form_input("title", $mem['title']) + ) ); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Password Control" ); + + $ADMIN->html .= $SKIN->add_td_row( array( "New Password
(Leave this blank if you do not wish to reset password!)" , + $SKIN->form_input("password") + ) ); + + $ADMIN->html .= $SKIN->end_table(); + + //+-------------------------------+ + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+-------------------------------+ + + $ADMIN->html .= $SKIN->start_table( "Board Settings" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->add_td_row( array( "Language Choice" , + $SKIN->form_dropdown( "language", + $lang_array, + $mem['language'] + ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Skin Choice" , + $SKIN->form_dropdown( "skin", + $skin_array, + $mem['skin'] + ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Hide this members email address?" , + $SKIN->form_yes_no("hide_email", $mem['hide_email'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Email a PM reminder?" , + $SKIN->form_yes_no("email_pm", $mem['email_pm'] ) + ) ); + + $ADMIN->html .= $SKIN->end_table(); + + //+-------------------------------+ + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+-------------------------------+ + + $ADMIN->html .= $SKIN->start_table( "Contact Information" ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Email Address" , + $SKIN->form_input("email", $mem['email']) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "AIM Identity" , + $SKIN->form_input("aim_name", $mem['aim_name']) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "ICQ Number" , + $SKIN->form_input("icq_number", $mem['icq_number']) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Yahoo Identity" , + $SKIN->form_input("yahoo", $mem['yahoo']) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "MSN Identity" , + $SKIN->form_input("msnname", $mem['msnname']) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Website Address" , + $SKIN->form_input("website", $mem['website']) + ) ); + + $ADMIN->html .= $SKIN->end_table(); + + //+-------------------------------+ + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+-------------------------------+ + + $ADMIN->html .= $SKIN->start_table( "Other Information" ); + + //+------------------------------- + + $mem['signature'] = $parser->unconvert( $mem['signature'] ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Avatar" , + $SKIN->form_input("avatar", $mem['avatar']) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Avatar Size" , + $SKIN->form_input("avatar_size", $mem['avatar_size']) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Photo URL" , + $SKIN->form_input("photo", $mem['photo']) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Post Count" , + $SKIN->form_input("posts", $mem['posts']) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Location" , + $SKIN->form_input("location", $mem['location']) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Interests" , + $SKIN->form_textarea("interests", $mem['interests']) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Signature" , + $SKIN->form_textarea("signature", $mem['signature']) + ) ); + + $ADMIN->html .= $SKIN->end_table(); + + //+-------------------------------+ + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+-------------------------------+ + + $ADMIN->html .= $SKIN->start_table( "Validation Keys" ); + + + $ADMIN->html .= $SKIN->add_td_row( array( "Validation Key
(Do not alter unless you are sure it is no longer needed!)" , + $SKIN->form_input("validate_key", $mem['validate_key']) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "New Password (MD5)
(Do not alter unless you are sure it is no longer needed!)" , + $SKIN->form_input("new_pass", $mem['new_pass']) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Previous Member Group ID
(Do not alter unless you are sure it is no longer needed!)" , + $SKIN->form_input("prev_group", $mem['prev_group']) + ) ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->end_form("Edit this member"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + + } + + + //+--------------------------------------------------------------------------------- + + function do_edit() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $ibforums; + + $password = ""; + + if ($IN['password'] != "") + { + $password = ", password='".md5($IN['password'])."'"; + } + + require $root_path."sources/lib/post_parser.php"; + + $parser = new post_parser(); + + $IN['signature'] = $parser->convert( array ('TEXT' => $IN['signature'], + 'SMILIES' => 0, + 'CODE' => $INFO['sig_allow_ibc'], + 'HTML' => $INFO['sig_allow_html'], + 'SIGNATURE' => 1 + ) ); + + $db_string = $DB->compile_db_update_string( array ( + 'allow_post' => $IN['allow_post'], + 'mgroup' => $IN['mgroup'], + 'title' => $IN['title'], + 'validate_key' => $IN['validate_key'], + 'new_pass' => $IN['new_pass'], + 'prev_group' => $IN['prev_group'], + 'language' => $IN['language'], + 'skin' => $IN['skin'], + 'hide_email' => $IN['hide_email'], + 'email_pm' => $IN['email_pm'], + 'email' => $IN['email'], + 'aim_name' => $IN['aim_name'], + 'icq_number' => $IN['icq_number'], + 'yahoo' => $IN['yahoo'], + 'msnname' => $IN['msnname'], + 'website' => $IN['website'], + 'avatar' => $IN['avatar'], + 'avatar_size' => $IN['avatar_size'], + 'photo' => $IN['photo'], + 'posts' => $IN['posts'], + 'location' => $IN['location'], + 'interests' => $IN['interests'], + 'signature' => $IN['signature'], + ) ); + + $DB->query("UPDATE ibf_members SET $db_string".$password." WHERE id='".$IN['mid']."'"); + + $ADMIN->done_screen("Member Edited", "Member Control", "act=mem&code=edit" ); + + } + + + + + +} + + +?> \ No newline at end of file diff --git a/upload/sources/Admin/ad_moderator.php b/upload/sources/Admin/ad_moderator.php new file mode 100644 index 00000000..7b1383bb --- /dev/null +++ b/upload/sources/Admin/ad_moderator.php @@ -0,0 +1,766 @@ + Admin Category functions +| > Module written by Matt Mecham +| > Date started: 1st march 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + + +$idx = new ad_mod(); + + +class ad_mod { + + var $base_url; + + function ad_mod() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + switch($IN['code']) + { + case 'add': + $this->add_one(); + break; + case 'add_two': + $this->add_two(); + break; + case 'add_final': + $this->mod_form('add'); + break; + case 'doadd': + $this->add_mod(); + break; + + case 'edit': + $this->mod_form('edit'); + break; + + case 'doedit': + $this->do_edit(); + break; + + case 'remove': + $this->do_delete(); + break; + + default: + $this->show_list(); + break; + } + + } + + //+--------------------------------------------------------------------------------- + // + // DELETE MODERATOR + // + //+--------------------------------------------------------------------------------- + + function do_delete() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['mid'] == "") + { + $ADMIN->error("You did not choose a valid moderator ID"); + } + + $DB->query("DELETE FROM ibf_moderators WHERE mid='".$IN['mid']."'"); + + $ADMIN->done_screen("Moderator Removed", "Moderator Control", "act=mod" ); + + } + + + //+--------------------------------------------------------------------------------- + // + // EDIT MODERATOR + // + //+--------------------------------------------------------------------------------- + + function do_edit() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['mid'] == "") + { + $ADMIN->error("You did not choose a valid moderator ID"); + } + + //-------------------------------------- + // Build Mr Hash + //-------------------------------------- + + $mr_hash = array( + 'forum_id' => $IN['forum_id'], + 'edit_post' => $IN['edit_post'], + 'edit_topic' => $IN['edit_topic'], + 'delete_post' => $IN['delete_post'], + 'delete_topic' => $IN['delete_topic'], + 'view_ip' => $IN['view_ip'], + 'open_topic' => $IN['open_topic'], + 'close_topic' => $IN['close_topic'], + 'mass_move' => $IN['mass_move'], + 'mass_prune' => $IN['mass_prune'], + 'move_topic' => $IN['move_topic'], + 'pin_topic' => $IN['pin_topic'], + 'unpin_topic' => $IN['unpin_topic'], + 'post_q' => $IN['post_q'], + 'topic_q' => $IN['topic_q'], + 'allow_warn' => $IN['allow_warn'], + 'edit_user' => $IN['edit_user'] + ); + + + + $db_string = $DB->compile_db_update_string( $mr_hash ); + + $DB->query("UPDATE ibf_moderators SET $db_string WHERE mid='".$IN['mid']."'"); + + $ADMIN->done_screen("Moderator Edited", "Moderator Control", "act=mod" ); + + } + + //+--------------------------------------------------------------------------------- + // + // ADD MODERATOR + // + //+--------------------------------------------------------------------------------- + + function add_mod() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['fid'] == "") + { + $ADMIN->error("You did not choose any forums to add this member to"); + } + + if ($IN['mem'] == "") + { + $ADMIN->error("You did not choose a member to add as a moderator"); + } + + $DB->query("SELECT id, name from ibf_members WHERE id='".$IN['mem']."'"); + + if ( ! $mem = $DB->fetch_row() ) + { + $ADMIN->error("Could not match that member name so there."); + } + + //-------------------------------------- + // Check for legal forums + //-------------------------------------- + + $forum_ids = array(); + + $DB->query("SELECT id FROM ibf_forums WHERE id IN(".$IN['fid'].")"); + + while( $i = $DB->fetch_row() ) + { + $forum_ids[] = $i['id']; + } + + if ( count($forum_ids) == 0) + { + $ADMIN->error("We could not match any forums with those IDS"); + } + + //-------------------------------------- + // Build Mr Hash + //-------------------------------------- + + $mr_hash = array( + 'member_name' => $mem['name'], + 'member_id' => $mem['id'], + 'edit_post' => $IN['edit_post'], + 'edit_topic' => $IN['edit_topic'], + 'delete_post' => $IN['delete_post'], + 'delete_topic' => $IN['delete_topic'], + 'view_ip' => $IN['view_ip'], + 'open_topic' => $IN['open_topic'], + 'close_topic' => $IN['close_topic'], + 'mass_move' => $IN['mass_move'], + 'mass_prune' => $IN['mass_prune'], + 'move_topic' => $IN['move_topic'], + 'pin_topic' => $IN['pin_topic'], + 'unpin_topic' => $IN['unpin_topic'], + 'post_q' => $IN['post_q'], + 'topic_q' => $IN['topic_q'], + 'allow_warn' => $IN['allow_warn'], + 'edit_user' => $IN['edit_user'] + ); + + //-------------------------------------- + // Loopy loopy + //-------------------------------------- + + foreach ($forum_ids as $cartman) + { + $mr_hash['forum_id'] = $cartman; + + $kenny = $DB->compile_db_insert_string( $mr_hash ); + + $DB->query("INSERT INTO ibf_moderators (" .$kenny['FIELD_NAMES']. ") VALUES (". $kenny['FIELD_VALUES'] .")"); + } + + $ADMIN->done_screen("Moderator Added", "Moderator Control", "act=mod" ); + + } + + //+--------------------------------------------------------------------------------- + // + // ADD FINAL, display the add / edit form + // + //+--------------------------------------------------------------------------------- + + function mod_form( $type='add' ) { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($type == 'add') + { + if ($IN['fid'] == "") + { + $ADMIN->error("You did not choose any forums to add this member to"); + } + + $mod = array(); + $names = array(); + + //-------------------------------------- + + $DB->query("SELECT name FROM ibf_forums WHERE id IN(".$IN['fid'].")"); + + while ( $r = $DB->fetch_row() ) + { + $names[] = $r['name']; + } + + $thenames = implode( ", ", $names ); + + //-------------------------------------- + + $button = "Add this moderator"; + + $form_code = 'doadd'; + + if ($IN['MEMBER_ID'] == "") + { + $ADMIN->error("Could not resolve the member id bucko"); + } + else + { + $DB->query("SELECT name, id FROM ibf_members WHERE id='".$IN['MEMBER_ID']."'"); + + if ( ! $mem = $DB->fetch_row() ) + { + $ADMIN->error("That member ID does not resolve"); + } + + $member_id = $mem['id']; + $member_name = $mem['name']; + } + + $ADMIN->page_detail = "Adding a $member_name as a moderator to: $thenames"; + $ADMIN->page_title = "Add a moderator"; + + } + else + { + if ($IN['mid'] == "") + { + $ADMIN->error("You must choose a valid moderator to edit."); + } + + $button = "Edit this moderator"; + + $form_code = "doedit"; + + $ADMIN->page_title = "Editing a moderator"; + $ADMIN->page_detail = "Please check the information carefully before submitting the form"; + + $DB->query("SELECT * from ibf_moderators WHERE mid='".$IN['mid']."'"); + + if ( ! $mod = $DB->fetch_row() ) + { + $ADMIN->error("Could not retrieve that moderators record"); + } + + $member_id = $mod['member_id']; + $member_name = $mod['member_name']; + } + + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , $form_code ), + 2 => array( 'act' , 'mod' ), + 3 => array( 'mid' , $mod['mid']), + 4 => array( 'fid' , $IN['fid'] ), + 5 => array( 'mem' , $member_id ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "General Settings" ); + + //+------------------------------- + + if ($type == 'edit') + { + $forums = array(); + + $DB->query("SELECT id, name FROM ibf_forums ORDER BY position"); + + while ( $r = $DB->fetch_row() ) + { + $forums[] = array( $r['id'], $r['name'] ); + } + + $ADMIN->html .= $SKIN->add_td_row( array( "Moderates forum..." , + $SKIN->form_dropdown( "forum_id", $forums, $mod['forum_id'] ) + ) ); + } + + //+------------------------------- + + $ADMIN->html .= $SKIN->add_td_row( array( "Can edit others posts/polls?" , + $SKIN->form_yes_no("edit_post", $mod['edit_post'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can edit others topic titles?" , + $SKIN->form_yes_no("edit_topic", $mod['edit_topic'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can delete others posts?" , + $SKIN->form_yes_no("delete_post", $mod['delete_post'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can delete others topics/polls?" , + $SKIN->form_yes_no("delete_topic", $mod['delete_topic'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can view posters IP addresses?" , + $SKIN->form_yes_no("view_ip", $mod['view_ip'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can open locked topics?" , + $SKIN->form_yes_no("open_topic", $mod['open_topic'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can close open topics?" , + $SKIN->form_yes_no("close_topic", $mod['close_topic'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can move topics?" , + $SKIN->form_yes_no("move_topic", $mod['move_topic'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can pin topics?" , + $SKIN->form_yes_no("pin_topic", $mod['pin_topic'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can unpin topics?" , + $SKIN->form_yes_no("unpin_topic", $mod['unpin_topic'] ) + ) ); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Moderator Control Panel Settings" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->add_td_row( array( "Can mass move topics?" , + $SKIN->form_yes_no("mass_move", $mod['mass_move'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can mass prune topics?" , + $SKIN->form_yes_no("mass_prune", $mod['mass_prune'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can manage queued topics?" , + $SKIN->form_yes_no("topic_q", $mod['topic_q'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can manage queued posts?" , + $SKIN->form_yes_no("post_q", $mod['post_q'] ) + ) ); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Advanced Settings" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->add_td_row( array( "Can warn other users?" , + $SKIN->form_yes_no("allow_warn", $mod['allow_warn'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Can edit user avatars and signatures?" , + $SKIN->form_yes_no("edit_user", $mod['edit_user'] ) + ) ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->end_form($button); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + + } + + + //+--------------------------------------------------------------------------------- + // + // ADD step one: Look up a member + // + //+--------------------------------------------------------------------------------- + + function add_one() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + //----------------------------- + // Grab and serialize the input + //----------------------------- + + $fid = ""; + $fidarray = array(); + + foreach ($IN as $k => $v) + { + if ( preg_match( "/^add_(\d+)$/", $k, $match ) ) + { + if ($IN[ $match[0] ]) + { + $fidarray[] = $match[1]; + } + } + } + + if ( count($fidarray) < 1 ) + { + $ADMIN->error("You must select a forum, or forums to add a moderator to. You can do this by checking the checkboxes to the left of the forum name"); + } + + $fid = implode( "," ,$fidarray ); + + $ADMIN->page_title = "Add a moderator"; + + $ADMIN->page_detail = "Please find a member to moderate the forums you previously selected."; + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'add_two' ), + 2 => array( 'act' , 'mod' ), + 3 => array( 'fid' , $fid ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Search for a member" ); + + + $ADMIN->html .= $SKIN->add_td_row( array( "Enter part or all of the usersname" , + $SKIN->form_input( "USER_NAME" ) + ) ); + + $ADMIN->html .= $SKIN->end_form("Find Member"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + + } + + //+--------------------------------------------------------------------------------- + // + // REFINE MEMBER SEARCH + // + //+--------------------------------------------------------------------------------- + + function add_two() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['USER_NAME'] == "") + { + $ADMIN->error("You didn't choose a member name to look for!"); + } + + $DB->query("SELECT id, name FROM ibf_members WHERE name LIKE '".$IN['USER_NAME']."%'"); + + if (! $DB->get_num_rows() ) + { + $ADMIN->error("Sorry, we could not find any members that matched the search string you entered"); + } + + $form_array = array(); + + while ( $r = $DB->fetch_row() ) + { + $form_array[] = array( $r['id'] , $r['name'] ); + } + + + + $ADMIN->page_title = "Add a moderator"; + + $ADMIN->page_detail = "Please select the correct member name from the selection below to add as a moderator to the previously selected forums."; + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'add_final' ), + 2 => array( 'act' , 'mod' ), + 3 => array( 'fid' , $IN['fid']), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Search for a member" ); + + + $ADMIN->html .= $SKIN->add_td_row( array( "Choose from the matches..." , + $SKIN->form_dropdown( "MEMBER_ID", $form_array ) + ) ); + + $ADMIN->html .= $SKIN->end_form("Choose Member"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + } + + + //+--------------------------------------------------------------------------------- + // + // SHOW LIST + // Renders a complete listing of all the forums and categories w/mods. + // + //+--------------------------------------------------------------------------------- + + function show_list() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_title = "Moderator Control Overview"; + $ADMIN->page_detail = "This section allows you to edit, remove and add new moderators to your forums"; + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'add' ), + 2 => array( 'act' , 'mod' ), + ) ); + + $SKIN->td_header[] = array( "Add" , "5%" ); + $SKIN->td_header[] = array( "Forum Name" , "30%" ); + $SKIN->td_header[] = array( "Posts" , "10%" ); + $SKIN->td_header[] = array( "Topics" , "10%" ); + $SKIN->td_header[] = array( "Current Moderators" , "45%" ); + + $ADMIN->html .= $SKIN->start_table( "Your Categories and Forums" ); + + //------------------------------------ + + $cats = array(); + $forums = array(); + $mods = array(); + $children = array(); + + $DB->query("SELECT * from ibf_categories where id > 0 ORDER BY position ASC"); + while ($r = $DB->fetch_row()) + { + $cats[$r['id']] = $r; + } + + $DB->query("SELECT * from ibf_forums ORDER BY position ASC"); + while ($r = $DB->fetch_row()) + { + + if ($r['parent_id'] > 0) + { + $children[ $r['parent_id'] ][] = $r; + } + else + { + $forums[] = $r; + } + + } + + $DB->query("SELECT * from ibf_moderators"); + while ($r = $DB->fetch_row()) + { + $mods[] = $r; + } + + //------------------------------------ + + $last_cat_id = -1; + + foreach ($cats as $c) + { + + $ADMIN->html .= $SKIN->add_td_row( array( + ' ', + "".$c['name']."", + ' ', + ' ', + ' ', + ), 'catrow' ); + $last_cat_id = $c['id']; + + + foreach($forums as $r) + { + + if ($r['category'] == $last_cat_id) + { + + $mod_string = ""; + + foreach( $mods as $phpid => $data ) + { + if ($data['forum_id'] == $r['id']) + { + $mod_string .= "
+ + + + "; + } + } + + if ($mod_string != "") + { + $these_mods = "
{$data['member_name']}RemoveEdit
".$mod_string."
"; + } + else + { + $these_mods = "
Unmoderated
"; + } + + if ($r['subwrap'] == 1) + { + + $ADMIN->html .= $SKIN->add_td_row( array( + ' ', + $c['name'], + ' ', + ' ', + ' ', + ), 'catrow2' ); + } + else + { + $ADMIN->html .= $SKIN->add_td_row( array( + "
", + "".$r['name']."
".$r['description'], + $r['posts'], + $r['topics'], + $these_mods + ) ); + } + + if ( ( isset($children[ $r['id'] ]) ) and ( count ($children[ $r['id'] ]) > 0 ) ) + { + foreach($children[ $r['id'] ] as $idx => $rd) + { + + $mod_string = ""; + + foreach( $mods as $phpid => $data ) + { + if ($data['forum_id'] == $rd['id']) + { + $mod_string .= " + {$data['member_name']} + Remove + Edit + "; + } + } + + if ($mod_string != "") + { + $these_mods = "".$mod_string."
"; + } + else + { + $these_mods = "
Unmoderated
"; + } + + $ADMIN->html .= $SKIN->add_td_row( array( + "
", + "".$rd['name']."
".$rd['description'], + $rd['posts'], + $rd['topics'], + $these_mods + ) ,'subforum' ); + } + } + } + } + } + + $ADMIN->html .= $SKIN->end_form("Add a moderator to the selected forums"); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + } + + + + + +} + + +?> \ No newline at end of file diff --git a/upload/sources/Admin/ad_modlogs.php b/upload/sources/Admin/ad_modlogs.php new file mode 100644 index 00000000..129a812e --- /dev/null +++ b/upload/sources/Admin/ad_modlogs.php @@ -0,0 +1,282 @@ + Import functions +| > Module written by Matt Mecham +| > Date started: 22nd April 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +// Ensure we've not accessed this script directly: + + + +$idx = new ad_modlogs(); + + +class ad_modlogs { + + var $base_url; + + function ad_modlogs() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + switch($IN['code']) + { + + case 'view': + $this->view(); + break; + + case 'remove': + $this->remove(); + break; + + + //------------------------- + default: + $this->list_current(); + break; + } + + } + + //--------------------------------------------- + // Remove archived files + //--------------------------------------------- + + function view() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $start = $IN['st'] ? $IN['st'] : 0; + + $ADMIN->page_detail = "Viewing all actions by a moderator"; + $ADMIN->page_title = "Moderator Logs Manager"; + + if ($IN['search_string'] == "") + { + $DB->query("SELECT COUNT(id) as count FROM ibf_moderator_logs WHERE member_id='".$IN['mid']."'"); + $row = $DB->fetch_row(); + + $row_count = $row['count']; + + $query = "&act=modlog&mid={$IN['mid']}&code=view"; + + $DB->query("SELECT m.*, f.id as forum_id, f.name FROM ibf_moderator_logs m, ibf_forums f WHERE m.member_id='".$IN['mid']."' AND f.id=m.forum_id ORDER BY m.ctime DESC LIMIT $start, 20"); + + } + else + { + $IN['search_string'] = urldecode($IN['search_string']); + + if ( ($IN['search_type'] == 'topic_id') or ($IN['search_type'] == 'forum_id') ) + { + $dbq = "m.".$IN['search_type']."='".$IN['search_string']."'"; + } + else + { + $dbq = "m.".$IN['search_type']." LIKE '%".$IN['search_string']."%'"; + } + + $DB->query("SELECT COUNT(m.id) as count FROM ibf_moderator_logs m WHERE $dbq"); + $row = $DB->fetch_row(); + + $row_count = $row['count']; + + $query = "&act=modlog&code=view&search_type={$IN['search_type']}&search_string=".urlencode($IN['search_string']); + + $DB->query("SELECT m.*, f.id as forum_id, f.name FROM ibf_moderator_logs m, ibf_forums f WHERE $dbq AND f.id=m.forum_id ORDER BY m.ctime DESC LIMIT $start, 20"); + + + + } + + $links = $std->build_pagelinks( array( 'TOTAL_POSS' => $row_count, + 'PER_PAGE' => 20, + 'CUR_ST_VAL' => $start, + 'L_SINGLE' => "Single Page", + 'L_MULTI' => "Pages: ", + 'BASE_URL' => $ADMIN->base_url.$query, + ) + ); + + $ADMIN->page_detail = "You may view and remove actions performed by your moderators"; + $ADMIN->page_title = "Moderator Logs Manager"; + + //+------------------------------- + + $SKIN->td_header[] = array( "Member Name" , "15%" ); + $SKIN->td_header[] = array( "Action Perfomed" , "15%" ); + $SKIN->td_header[] = array( "Forum" , "15%" ); + $SKIN->td_header[] = array( "Topic Title" , "25%" ); + $SKIN->td_header[] = array( "Time of action" , "20%" ); + $SKIN->td_header[] = array( "IP address" , "10%" ); + + $ADMIN->html .= $SKIN->start_table( "Saved Moderator Logs" ); + $ADMIN->html .= $SKIN->add_td_basic($links, 'center', 'catrow'); + + if ( $DB->get_num_rows() ) + { + while ( $row = $DB->fetch_row() ) + { + + $row['ctime'] = $std->get_date( $row['ctime'], 'LONG' ); + + $sess_id = preg_replace( "/^.+?s=(\w{32}).+?$/" , "\\1", $row['http_referer'] ); + $row['http_referer'] = preg_replace( "/s=(\w){32}/" , "" , $row['http_referer'] ); + + $ADMIN->html .= $SKIN->add_td_row( array( "{$row['member_name']}", + "{$row['action']}", + "{$row['name']}", + "{$row['topic_title']}", + "{$row['ctime']}", + "{$row['ip_address']}", + ) ); + + + } + } + else + { + $ADMIN->html .= $SKIN->add_td_basic("
No results
"); + } + + $ADMIN->html .= $SKIN->add_td_basic($links, 'center', 'tdtop'); + + $ADMIN->html .= $SKIN->end_table(); + + + //+------------------------------- + //+------------------------------- + + $ADMIN->output(); + + } + + //--------------------------------------------- + // Remove archived files + //--------------------------------------------- + + function remove() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['mid'] == "") + { + $ADMIN->error("You did not select a member ID to remove by!"); + } + + $DB->query("DELETE FROM ibf_moderator_logs WHERE member_id='".$IN['mid']."'"); + + $std->boink_it($ADMIN->base_url."&act=modlog"); + exit(); + + + } + + + + + + //------------------------------------------------------------- + // SHOW ALL LANGUAGE PACKS + //------------------------------------------------------------- + + function list_current() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $form_array = array(); + + $ADMIN->page_detail = "You may view and remove actions performed by your moderators"; + $ADMIN->page_title = "Moderator Logs Manager"; + + //+------------------------------- + + $SKIN->td_header[] = array( "Member Name" , "30%" ); + $SKIN->td_header[] = array( "Actions Perfomed" , "20%" ); + $SKIN->td_header[] = array( "View all by member" , "20%" ); + $SKIN->td_header[] = array( "Remove all by member" , "30%" ); + + $ADMIN->html .= $SKIN->start_table( "Saved Moderator Logs" ); + + $DB->query("SELECT m.*, count(m.id) as act_count from ibf_moderator_logs m GROUP BY m.member_id ORDER BY act_count DESC"); + + while ( $r = $DB->fetch_row() ) + { + + $ADMIN->html .= $SKIN->add_td_row( array( "{$r['member_name']}", + "
{$r['act_count']}
", + "
View
", + "
Remove
", + ) ); + } + + + + $ADMIN->html .= $SKIN->end_table(); + + + //+------------------------------- + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'view' ), + 2 => array( 'act' , 'modlog' ), + ) ); + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + $ADMIN->html .= $SKIN->start_table( "Search Moderator Logs" ); + + $form_array = array( + 0 => array( 'topic_title', 'Topic Title' ), + 1 => array( 'ip_address', 'IP Address' ), + 2 => array( 'member_name', 'Member Name' ), + 3 => array( 'topic_id' , 'Topic ID' ), + 4 => array( 'forum_id' , 'Forum ID' ) + ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->add_td_row( array( "Search for..." , + $SKIN->form_input( "search_string") + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Search in..." , + $SKIN->form_dropdown( "search_type", $form_array) + ) ); + + $ADMIN->html .= $SKIN->end_form("Search"); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + //+------------------------------- + + $ADMIN->output(); + + } + + + +} + + +?> \ No newline at end of file diff --git a/upload/sources/Admin/ad_settings.php b/upload/sources/Admin/ad_settings.php new file mode 100644 index 00000000..fb6363f7 --- /dev/null +++ b/upload/sources/Admin/ad_settings.php @@ -0,0 +1,1440 @@ + Admin Setting functions +| > Module written by Matt Mecham +| > Date started: 20th March 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new ad_settings(); + + +class ad_settings { + + var $base_url; + + function ad_settings() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + switch($IN['code']) + { + case 'cookie': + $this->cookie(); + break; + case 'docookie': + $this->save_config( array( 'cookie_domain', 'cookie_id', 'cookie_path' ) ); + break; + //------------------------- + case 'secure': + $this->secure(); + break; + case 'dosecure': + $this->save_config( array ( 'allow_dynamic_img','session_expiration','match_browser','allow_dup_email','allow_images', 'force_login', 'no_reg', + 'allow_flash','new_reg_notify','use_mail_form','flood_control', 'allow_online_list', 'reg_auth_type' ) ); + break; + //------------------------- + case 'post': + $this->post(); + break; + case 'dopost': + $this->save_config( array ( 'guest_name_pre', 'guest_name_suf', 'max_w_flash', 'max_h_flash', 'hot_topic', 'display_max_topics','display_max_posts','max_emos','max_images','emo_per_row', 'etfilter_punct', 'etfilter_shout', + 'max_post_length','show_img_upload','pre_polls','pre_moved','pre_pinned','img_ext' ) ); + break; + //------------------------- + case 'avatars': + $this->avatars(); + break; + case 'doavatars': + $this->save_config( array ( 'allow_skins', 'max_sig_length', 'sig_allow_ibc', 'sig_allow_html','avatar_ext','avatar_url','avup_size_max','avatars_on','avatar_dims','avatar_def', 'max_location_length', 'max_interest_length', 'post_titlechange', 'guests_ava', 'guests_img', 'guests_sig' ) ); + break; + //------------------------- + case 'dates': + $this->dates(); + break; + case 'dodates': + $this->save_config( array ( 'time_offset','clock_short','clock_joined','clock_long', 'time_adjust' ) ); + break; + //------------------------- + case 'cpu': + $this->cpu(); + break; + case 'docpu': + $this->save_config( array ( 'load_limit','show_active','show_birthdays','show_totals','allow_search', 'show_user_posted', 'nocache' ) ); + break; + //------------------------- + case 'url': + $this->url(); + break; + case 'dourl': + $this->save_config( array ( 'email_in','email_out','board_name','board_url','home_name','home_url', 'disable_gzip', + 'html_url','upload_url', 'upload_dir', 'print_headers', 'header_redirect', 'debug_level' ) ); + break; + //------------------------- + case 'pm': + $this->pm(); + break; + case 'dopm': + $this->save_config( array ( 'max_messages', 'msg_allow_code', 'msg_allow_html' ) ); + break; + //------------------------- + case 'news': + $this->news(); + break; + case 'donews': + $this->save_config( array ( 'news_forum_id', 'index_news_link' ) ); + break; + //------------------------- + case 'board': + $this->board(); + break; + case 'doboard': + $this->save_config( array ( 'board_offline', 'offline_msg' ) ); + break; + //------------------------- + case 'bw': + $this->badword(); + break; + case 'bw_add': + $this->add_badword(); + break; + case 'bw_remove': + $this->remove_badword(); + break; + case 'bw_edit': + $this->edit_badword(); + break; + case 'bw_doedit': + $this->doedit_badword(); + break; + //------------------------- + case 'emo': + $this->emoticons(); + break; + case 'emo_add': + $this->add_emoticons(); + break; + case 'emo_remove': + $this->remove_emoticons(); + break; + case 'emo_edit': + $this->edit_emoticons(); + break; + case 'emo_doedit': + $this->doedit_emoticons(); + break; + //------------------------- + case 'count': + $this->countstats(); + break; + case 'docount': + $this->docount(); + break; + default: + $this->cookie(); + break; + } + + } + + //===================================================== + + function docount() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ( (! $IN['posts']) and (! $IN['members'] ) and (! $IN['lastreg'] ) ) + { + $ADMIN->error("Nothing to recount!"); + } + + $stats = array(); + + if ($IN['posts']) + { + $DB->query("SELECT COUNT(pid) as posts FROM ibf_posts WHERE queued <> 1"); + $r = $DB->fetch_row(); + $stats['TOTAL_REPLIES'] = $r['posts']; + $stats['TOTAL_REPLIES'] < 1 ? 0 : $stats['TOTAL_REPLIES']; + + $DB->query("SELECT COUNT(tid) as topics FROM ibf_topics WHERE approved = 1"); + $r = $DB->fetch_row(); + $stats['TOTAL_TOPICS'] = $r['topics']; + $stats['TOTAL_TOPICS'] < 1 ? 0 : $stats['TOTAL_TOPICS']; + + $stats['TOTAL_REPLIES'] -= $stats['TOTAL_TOPICS']; + } + + if ($IN['members']) + { + $DB->query("SELECT COUNT(id) as members from ibf_members WHERE mgroup <> '".$INFO['auth_group']."'"); + $r = $DB->fetch_row(); + $stats['MEM_COUNT'] = $r['members']; + // Remove "guest" account... + $stats['MEM_COUNT']--; + $stats['MEM_COUNT'] < 1 ? 0 : $stats['MEM_COUNT']; + } + + if ($IN['lastreg']) + { + $DB->query("SELECT id, name FROM ibf_members WHERE mgroup <> '".$INFO['auth_group']."' ORDER BY id DESC LIMIT 0,1"); + $r = $DB->fetch_row(); + $stats['LAST_MEM_NAME'] = $r['name']; + $stats['LAST_MEM_ID'] = $r['id']; + } + + if ($IN['online']) + { + $stats['MOST_DATE'] = time(); + $stats['MOST_COUNT'] = 1; + } + + if ( count($stats) > 0 ) + { + $db_string = $DB->compile_db_update_string( $stats ); + $DB->query("UPDATE ibf_stats SET $db_string"); + } + else + { + $ADMIN->error("Nothing to recount!"); + } + + $ADMIN->done_screen("Statistics Recounted", "Administration CP Home", "act=index" ); + + } + + + + function countstats() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_detail = "Please choose which statistics to recount."; + $ADMIN->page_title = "Recount Statistics Control"; + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'docount' ), + 2 => array( 'act' , 'op' ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( "Statistic" , "70%" ); + $SKIN->td_header[] = array( "Option" , "30%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Recount Statistics" ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Recount total topics and posts", + $SKIN->form_dropdown( 'posts', array( 0 => array( 1, 'Yes' ), 1 => array( 0, 'No' ) ) ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Recount Members", + $SKIN->form_dropdown( 'members', array( 0 => array( 1, 'Yes' ), 1 => array( 0, 'No' ) ) ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Reset last registered member", + $SKIN->form_dropdown( 'lastreg', array( 0 => array( 1, 'Yes' ), 1 => array( 0, 'No' ) ) ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Reset 'Most online' statistic?", + $SKIN->form_dropdown( 'online', array( 0 => array( 0, 'No' ), 1 => array( 1, 'Yes' ) ) ) + ) ); + + $ADMIN->html .= $SKIN->end_form('Reset these statistics'); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + } + + //------------------------------------------------------------- + // URLs and ADDRESSES + //-------------------------------------------------------------- + + function board() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $this->common_header('doboard', 'Board offline/online', 'You may change the configuration below'); + + $ADMIN->html .= $SKIN->add_td_row( array( "Turn the board offline?
The board will still be accessable by those who have permission" , + $SKIN->form_yes_no( "board_offline", $INFO['board_offline'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "The offline message to display" , + $SKIN->form_textarea( "offline_msg", $INFO['offline_msg'] ) + ) ); + + + $this->common_footer(); + + + } + + //------------------------------------------------------------- + // EMOTICON FUNCTIONS + //------------------------------------------------------------- + + function doedit_emoticons() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['before'] == "") + { + $ADMIN->error("You must enter text to replace, silly!"); + } + + if ($IN['id'] == "") + { + $ADMIN->error("You must pass a valid emoticon id, silly!"); + } + + $IN['clickable'] = $IN['clickable'] ? 1 : 0; + + $db_string = $DB->compile_db_update_string( array( 'typed' => $IN['before'], + 'image' => $IN['after'], + 'clickable' => $IN['click'], + ) ); + + $DB->query("UPDATE ibf_emoticons SET $db_string WHERE id='".$IN['id']."'"); + + $std->boink_it($SKIN->base_url."&act=op&code=emo"); + exit(); + + + } + + //===================================================== + + + function edit_emoticons() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_detail = "You may edit the emoticon filter below"; + $ADMIN->page_title = "Edit Emoticon"; + + //+------------------------------- + + if ($IN['id'] == "") + { + $ADMIN->error("You must pass a valid filter id, silly!"); + } + + //+------------------------------- + + $DB->query("SELECT * FROM ibf_emoticons WHERE id='".$IN['id']."'"); + + if ( ! $r = $DB->fetch_row() ) + { + $ADMIN->error("We could not find that emoticon in the database"); + } + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'emo_doedit' ), + 2 => array( 'act' , 'op' ), + 3 => array( 'id' , $IN['id'] ), + ) ); + + + + $SKIN->td_header[] = array( "Before" , "40%" ); + $SKIN->td_header[] = array( "After" , "40%" ); + $SKIN->td_header[] = array( "+ Clickable" , "20%" ); + + //+------------------------------- + + $emos = array(); + + if (! is_dir($INFO['html_dir'].'emoticons') ) + { + $ADMIN->error("Could not locate the emoticons directory - make sure the 'html_dir' path is set correctly"); + } + + //+------------------------------- + + + $dh = opendir( $INFO['html_dir'].'emoticons' ) or die("Could not open the emoticons directory for reading, check paths and permissions"); + while ( $file = readdir( $dh ) ) + { + if ( !preg_match( "/^..?$|^index|htm$|html$|^\./i", $file ) ) + { + $emos[] = array( $file, $file ); + } + } + closedir( $dh ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Edit an Emoticon" ); + + $ADMIN->html .= " + "; + + $ADMIN->html .= $SKIN->add_td_row( array( $SKIN->form_input('before', stripslashes($r['typed']) ), + $SKIN->form_dropdown('after', $emos, $r['image'], "onChange='show_emo()'") . "  ", + $SKIN->form_dropdown( 'click', array( 0 => array( 1, 'Yes' ), 1 => array( 0, 'No' ) ), $r['clickable'] ) + ) ); + + $ADMIN->html .= $SKIN->end_form('Edit Emoticon'); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + } + + //===================================================== + + function remove_emoticons() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['id'] == "") + { + $ADMIN->error("You must pass a valid emoticon id, silly!"); + } + + $DB->query("DELETE FROM ibf_emoticons WHERE id='".$IN['id']."'"); + + $std->boink_it($SKIN->base_url."&act=op&code=emo"); + exit(); + + + } + + //===================================================== + + function add_emoticons() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['before'] == "") + { + $ADMIN->error("You must enter an emoticon text to replace, silly!"); + } + + $IN['click'] = $IN['click'] ? 1 : 0; + + $db_string = $DB->compile_db_insert_string( array( 'typed' => $IN['before'], + 'image' => $IN['after'], + 'clickable' => $IN['click'], + ) ); + + $DB->query("INSERT INTO ibf_emoticons (".$db_string['FIELD_NAMES'].") VALUES(".$db_string['FIELD_VALUES'].")"); + + $std->boink_it($SKIN->base_url."&act=op&code=emo"); + exit(); + + + } + + + function perly_length_sort($a, $b) + { + if ( strlen($a['typed']) == strlen($b['typed']) ) + { + return 0; + } + return ( strlen($a['typed']) > strlen($b['typed']) ) ? -1 : 1; + } + + function perly_word_sort($a, $b) + { + if ( strlen($a['type']) == strlen($b['type']) ) + { + return 0; + } + return ( strlen($a['type']) > strlen($b['type']) ) ? -1 : 1; + } + + //===================================================== + + function emoticons() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_detail = "You may add/edit or remove emoticons in this section.
You can only choose emoticons that have been uploaded into the 'html/emoticons' directory.

Clickable refers to emoticons that are in the posting screens 'Clickable Emoticons' table."; + $ADMIN->page_title = "Emoticon Control"; + + //+------------------------------- + + $SKIN->td_header[] = array( "Before" , "30%" ); + $SKIN->td_header[] = array( "After" , "30%" ); + $SKIN->td_header[] = array( "+ Clickable" , "20%" ); + $SKIN->td_header[] = array( "Edit" , "10%" ); + $SKIN->td_header[] = array( "Remove" , "10%" ); + + //+------------------------------- + + + + $ADMIN->html .= $SKIN->start_table( "Current Emoticons" ); + + $DB->query("SELECT * from ibf_emoticons"); + + $emo_url = $INFO['html_url'] . '/emoticons'; + + $smilies = array(); + + if ( $DB->get_num_rows() ) + { + while ( $r = $DB->fetch_row() ) + { + $smilies[] = $r; + } + + usort($smilies, array( 'ad_settings', 'perly_length_sort' ) ); + + foreach( $smilies as $array_idx => $r ) + { + + $click = $r['clickable'] ? 'Yes' : 'No'; + + $ADMIN->html .= $SKIN->add_td_row( array( stripslashes($r['typed']), + "
", + "
$click
", + "
Edit
", + "
Remove
", + ) ); + + + + } + } + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + + $emos = array(); + + if (! is_dir($INFO['html_dir'].'emoticons') ) + { + $ADMIN->error("Could not locate the emoticons directory - make sure the 'html_dir' path is set correctly"); + } + + //+------------------------------- + + $cnt = 0; + $start = ""; + + $dh = opendir( $INFO['html_dir'].'emoticons' ) or die("Could not open the emoticons directory for reading, check paths and permissions"); + while ( $file = readdir( $dh ) ) + { + if ( !preg_match( "/^..?$|^index|htm$|html$|^\./i", $file ) ) + { + $emos[] = array( $file, $file ); + + if ($cnt == 0) + { + $cnt = 1; + $start = $file; + } + } + } + closedir( $dh ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'emo_add' ), + 2 => array( 'act' , 'op' ), + ) ); + + + $SKIN->td_header[] = array( "Before" , "40%" ); + $SKIN->td_header[] = array( "After" , "40%" ); + $SKIN->td_header[] = array( "+ Clickable" , "20%" ); + + //+------------------------------- + + $ADMIN->html .= " + "; + + $ADMIN->html .= $SKIN->start_table( "Add a new Emoticon" ); + + $ADMIN->html .= $SKIN->add_td_row( array( $SKIN->form_input('before'), + $SKIN->form_dropdown('after', $emos, "", "onChange='show_emo()'") . "  ", + $SKIN->form_dropdown( 'click', array( 0 => array( 1, 'Yes' ), 1 => array( 0, 'No' ) ) ) + ) ); + + $ADMIN->html .= $SKIN->end_form('Add Emoticon'); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + } + + //------------------------------------------------------------- + // BADWORD FUNCTIONS + //-------------------------------------------------------------- + + + function doedit_badword() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['before'] == "") + { + $ADMIN->error("You must enter a word to replace, silly!"); + } + + if ($IN['id'] == "") + { + $ADMIN->error("You must pass a valid filter id, silly!"); + } + + $IN['match'] = $IN['match'] ? 1 : 0; + + strlen($IN['swop']) > 1 ? $IN['swop'] : ""; + + $db_string = $DB->compile_db_update_string( array( 'type' => $IN['before'], + 'swop' => $IN['after'], + 'm_exact' => $IN['match'], + ) ); + + $DB->query("UPDATE ibf_badwords SET $db_string WHERE wid='".$IN['id']."'"); + + $std->boink_it($SKIN->base_url."&act=op&code=bw"); + exit(); + + + } + + //===================================================== + + function edit_badword() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_detail = "You may edit the chosen filter below"; + $ADMIN->page_title = "Bad Word Filter"; + + //+------------------------------- + + if ($IN['id'] == "") + { + $ADMIN->error("You must pass a valid filter id, silly!"); + } + + //+------------------------------- + + $DB->query("SELECT * FROM ibf_badwords WHERE wid='".$IN['id']."'"); + + if ( ! $r = $DB->fetch_row() ) + { + $ADMIN->error("We could not find that filter in the database"); + } + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'bw_doedit' ), + 2 => array( 'act' , 'op' ), + 3 => array( 'id' , $IN['id'] ), + ) ); + + + + $SKIN->td_header[] = array( "Before" , "40%" ); + $SKIN->td_header[] = array( "After" , "40%" ); + $SKIN->td_header[] = array( "Method" , "20%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Edit a filter" ); + + $ADMIN->html .= $SKIN->add_td_row( array( $SKIN->form_input('before', stripslashes($r['type']) ), + $SKIN->form_input('after' , stripslashes($r['swop']) ), + $SKIN->form_dropdown( 'match', array( 0 => array( 1, 'Exact' ), 1 => array( 0, 'Loose' ) ), $r['m_exact'] ) + ) ); + + $ADMIN->html .= $SKIN->end_form('Edit Filter'); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + } + + //===================================================== + + function remove_badword() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['id'] == "") + { + $ADMIN->error("You must pass a valid filter id, silly!"); + } + + $DB->query("DELETE FROM ibf_badwords WHERE wid='".$IN['id']."'"); + + $std->boink_it($SKIN->base_url."&act=op&code=bw"); + exit(); + + + } + + //===================================================== + + function add_badword() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['before'] == "") + { + $ADMIN->error("You must enter a word to replace, silly!"); + } + + $IN['match'] = $IN['match'] ? 1 : 0; + + strlen($IN['swop']) > 1 ? $IN['swop'] : ""; + + $db_string = $DB->compile_db_insert_string( array( 'type' => $IN['before'], + 'swop' => $IN['after'], + 'm_exact' => $IN['match'], + ) ); + + $DB->query("INSERT INTO ibf_badwords (".$db_string['FIELD_NAMES'].") VALUES(".$db_string['FIELD_VALUES'].")"); + + $std->boink_it($SKIN->base_url."&act=op&code=bw"); + exit(); + + + } + + //===================================================== + + function badword() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->page_detail = "You can add/edit and remove bad word filters in this section.
The badword filter allows you to globally replace words from a members post, signature and topic title.

Loose matching: If you entered 'hell' as a bad word, it will replace 'hell' and 'hello' with either your replacement if entered or 6 hashes (case insensitive)

Exact matching: If you entered 'hell' as a bad word, it will replace 'hell' only with either your replacement if entered or 6 hashes (case insensitive)"; + $ADMIN->page_title = "Bad Word Filter"; + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'bw_add' ), + 2 => array( 'act' , 'op' ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( "Before" , "30%" ); + $SKIN->td_header[] = array( "After" , "30%" ); + $SKIN->td_header[] = array( "Method" , "20%" ); + $SKIN->td_header[] = array( "Edit" , "10%" ); + $SKIN->td_header[] = array( "Remove" , "10%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Current Filters" ); + + $DB->query("SELECT * from ibf_badwords"); + + if ( $DB->get_num_rows() ) + { + while ( $r = $DB->fetch_row() ) + { + $words[] = $r; + } + + usort($words, array( 'ad_settings', 'perly_word_sort' ) ); + + foreach($words as $idx => $r) + { + + $replace = $r['swop'] ? stripslashes($r['swop']) : '######'; + + $method = $r['m_exact'] ? 'Exact' : 'Loose'; + + $ADMIN->html .= $SKIN->add_td_row( array( stripslashes($r['type']), + $replace, + $method, + "
Edit
", + "
Remove
", + ) ); + } + + } + + $ADMIN->html .= $SKIN->end_table(); + + + $SKIN->td_header[] = array( "Before" , "40%" ); + $SKIN->td_header[] = array( "After" , "40%" ); + $SKIN->td_header[] = array( "Method" , "20%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Add a new filter" ); + + $ADMIN->html .= $SKIN->add_td_row( array( $SKIN->form_input('before'), + $SKIN->form_input('after'), + $SKIN->form_dropdown( 'match', array( 0 => array( 1, 'Exact' ), 1 => array( 0, 'Loose' ) ) ) + ) ); + + $ADMIN->html .= $SKIN->end_form('Add Filter'); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + } + + //------------------------------------------------------------- + // NEWS + //-------------------------------------------------------------- + + function news() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $this->common_header('donews', 'News Export Set-Up', 'You may change the configuration below'); + + $DB->query("SELECT id, name FROM ibf_forums WHERE subwrap = 0"); + + $form_array = array(); + + while ( $r = $DB->fetch_row() ) + { + $form_array[] = array( $r['id'], $r['name'] ); + } + + $ADMIN->html .= $SKIN->add_td_row( array( "Export news topics from which forum?" , + $SKIN->form_dropdown( "news_forum_id", $form_array, $INFO['news_forum_id'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Show a 'Latest News' link on the board index?" , + $SKIN->form_yes_no( "index_news_link", $INFO['index_news_link'] ) + ) ); + + + $this->common_footer(); + + + } + + //------------------------------------------------------------- + // PM + //-------------------------------------------------------------- + + function pm() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $this->common_header('dopm', 'Messenger Set up', 'You may change the configuration below'); + + + $ADMIN->html .= $SKIN->add_td_row( array( "Max. No. of storable messages?
Leave blank to not impose a limit" , + $SKIN->form_input( "max_messages", $INFO['max_messages'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow IBF Code in messages?" , + $SKIN->form_yes_no( "msg_allow_code", $INFO['msg_allow_code'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow HTML in messages?" , + $SKIN->form_yes_no( "msg_allow_html", $INFO['msg_allow_html'] ) + ) ); + + + $this->common_footer(); + + + } + + //------------------------------------------------------------- + // URLs and ADDRESSES + //-------------------------------------------------------------- + + function url() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $this->common_header('dourl', 'URL\'s, Paths and Addresses', 'You may change the configuration below'); + + + $ADMIN->html .= $SKIN->add_td_row( array( "Board incoming email address" , + $SKIN->form_input( "email_in", $INFO['email_in'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Board outgoing email address" , + $SKIN->form_input( "email_out", $INFO['email_out'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Board Name" , + $SKIN->form_input( "board_name", $INFO['board_name'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Board Address" , + $SKIN->form_input( "board_url", $INFO['board_url'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Website Name" , + $SKIN->form_input( "home_name", $INFO['home_name'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Website Address" , + $SKIN->form_input( "home_url", $INFO['home_url'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "HTML URL
For images, etc" , + $SKIN->form_input( "html_url", $INFO['html_url'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Upload URL" , + $SKIN->form_input( "upload_url", $INFO['upload_url'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Upload Directory" , + $SKIN->form_input( "upload_dir", $INFO['upload_dir'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Print HTTP headers?
(Some NT installs require this off)" , + $SKIN->form_yes_no( "print_headers", $INFO['print_headers'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "DISABLE GZIP encoding?
(GZIP enables faster page transfer and lower bandwidth use)" , + $SKIN->form_yes_no( "disable_gzip", $INFO['disable_gzip'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Type of auto-redirect?
(This is for quick no page redirects)" , + $SKIN->form_dropdown( 'header_redirect', + array( + 0 => array( 'location', 'Location type (*nix savvy)' ), + 1 => array( 'refresh' , 'Refresh (Windows savvy)' ), + ), + $INFO['header_redirect'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Debug level" , + $SKIN->form_dropdown( "debug_level", + array( + 0 => array( 0, '0: None - Don\'t show any debug information' ), + 1 => array( 1, '1: Show server load, page generation times and query count' ), + 2 => array( 2, '2: Show level 1 (above) and GET and POST information'), + 3 => array( 3, '3: Show level 1 + 2 and database queries'), + ), + $INFO['debug_level'] ) + ) ); + + + $this->common_footer(); + + + } + + + + //------------------------------------------------------------- + // CPU SAVING + //-------------------------------------------------------------- + + function cpu() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $this->common_header('docpu', 'CPU Saving', 'You can opt to turn some features off to minimize the resource footprint'); + + + $ADMIN->html .= $SKIN->add_td_row( array( "Server Load Limit
Will display 'busy' message when limit hit
Can be left blank for no limit" , + $SKIN->form_input( "load_limit", $INFO['load_limit'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Show Active Users?" , + $SKIN->form_yes_no( "show_active", $INFO['show_active'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Show Birthdays?" , + $SKIN->form_yes_no( "show_birthdays", $INFO['show_birthdays'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Show Board Totals?" , + $SKIN->form_yes_no( "show_totals", $INFO['show_totals'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow users (where allowed) to use search?" , + $SKIN->form_yes_no( "allow_search", $INFO['allow_search'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Mark topics a user has posted when displaying a forum?" , + $SKIN->form_yes_no( "show_user_posted", $INFO['show_user_posted'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Print HTTP no-cache headers?
(This will stop browsers caching pages)" , + $SKIN->form_yes_no( "nocache", $INFO['nocache'] ) + ) ); + + $this->common_footer(); + + + } + + //------------------------------------------------------------- + // DATES + //-------------------------------------------------------------- + + function dates() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $this->common_header('dodates', 'Dates', 'Define date formats'); + + $time_array = array(); + + require $root_path."lang/en/lang_ucp.php"; + + foreach( $lang as $off => $words ) + { + if (preg_match("/^time_(\S+)$/", $off, $match)) + { + $time_select[] = array( $match[1], $words ); + } + } + + $d_date = $std->get_date(time(), 'LONG'); + + $ADMIN->html .= $SKIN->add_td_row( array( "Native Server Time Zone
If you have chosen the correct timezone and the clock is an hour out, this is because of daylight savings time and your members can correct this by editing their 'Board settings' via their User Control Panel." , + $SKIN->form_dropdown( "time_offset", $time_select, $INFO['time_offset'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Server Time Adjustment (in minutes)
You fine tune the server time. If you need to subtract minutes from the server time, start the number with a '-' (no quotes)." , + $SKIN->form_input( "time_adjust", $INFO['time_adjust'] ) . "
Board time (inc. above time zone and current adj.) is now: $d_date" + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Short time format
Same configuration as PHP Date" , + $SKIN->form_input( "clock_short", $INFO['clock_short'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Join date time format
Same configuration as PHP Date" , + $SKIN->form_input( "clock_joined", $INFO['clock_joined'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Long time format
Same configuration as PHP Date" , + $SKIN->form_input( "clock_long", $INFO['clock_long'] ) + ) ); + + $this->common_footer(); + + + } + + //------------------------------------------------------------- + // AVATARS + //-------------------------------------------------------------- + + function avatars() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $this->common_header('doavatars', 'User Profiles', 'Define user profile permissions'); + + $INFO['avatar_ext'] = preg_replace( "/\|/", ",", $INFO['avatar_ext'] ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow members to choose skins?" , + $SKIN->form_yes_no( "allow_skins", $INFO['allow_skins'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow the use of avatars?" , + $SKIN->form_yes_no( "avatars_on", $INFO['avatars_on'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allowed image extensions
Seperate with comma (gif,png,jpeg) etc" , + $SKIN->form_input( "avatar_ext", $INFO['avatar_ext'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow users to use remote URL avatars?" , + $SKIN->form_yes_no( "avatar_url", $INFO['avatar_url'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Max. file size for avatar uploads? (K)" , + $SKIN->form_input( "avup_size_max", $INFO['avup_size_max'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Maximum avatar dimensions
(WIDTHxHEIGHT)" , + $SKIN->form_input( "avatar_dims", $INFO['avatar_dims'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Default sizes for gallery avatars
(WIDTHxHEIGHT)" , + $SKIN->form_input( "avatar_def", $INFO['avatar_def'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "No. of posts a user must have before change of member title is allowed?" , + $SKIN->form_input( "post_titlechange", $INFO['post_titlechange'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Maximum length (in bytes) for the location field entry" , + $SKIN->form_input( "max_location_length", $INFO['max_location_length'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Maximum length (in bytes) for the interests field entry" , + $SKIN->form_input( "max_interest_length", $INFO['max_interest_length'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Maximum length (in bytes) for user signatures" , + $SKIN->form_input( "max_sig_length", $INFO['max_sig_length'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow HTML in signatures?" , + $SKIN->form_yes_no( "sig_allow_html", $INFO['sig_allow_html'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow IBF Code in signatures?" , + $SKIN->form_yes_no( "sig_allow_ibc", $INFO['sig_allow_ibc'] ) + ) ); + + //-------- + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow GUESTS to view signatures?" , + $SKIN->form_yes_no( "guests_sig", $INFO['guests_sig'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow GUESTS to view posted images?" , + $SKIN->form_yes_no( "guests_img", $INFO['guests_img'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow GUESTS to view user avatars?" , + $SKIN->form_yes_no( "guests_ava", $INFO['guests_ava'] ) + ) ); + + + $this->common_footer(); + + + } + + + //------------------------------------------------------------- + // TOPICS and POSTS + //-------------------------------------------------------------- + + function post() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $INFO['img_ext'] = preg_replace( "/\|/", ",", $INFO['img_ext'] ); + + $this->common_header('dopost', 'Topics, Posts and Posting', 'Configure the viewable post elements and limits.'); + + $ADMIN->html .= $SKIN->add_td_row( array( "Number of topics per forum page" , + $SKIN->form_input( "display_max_topics", $INFO['display_max_topics'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Number of posts per topic page" , + $SKIN->form_input( "display_max_posts", $INFO['display_max_posts'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Number of posts needed to make a 'hot topic'?" , + $SKIN->form_input( "hot_topic", $INFO['hot_topic'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "No. emoticons per clickable table row" , + $SKIN->form_input( "emo_per_row", $INFO['emo_per_row'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Max. no. emoticons per post" , + $SKIN->form_input( "max_emos", $INFO['max_emos'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Max. no. images per post" , + $SKIN->form_input( "max_images", $INFO['max_images'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Max. size of post (in kilobytes [k])" , + $SKIN->form_input( "max_post_length", $INFO['max_post_length'] ) + ) ); + + // + + $ADMIN->html .= $SKIN->add_td_row( array( "Max. width of posted Flash movies (in pixels)" , + $SKIN->form_input( "max_w_flash", $INFO['max_w_flash'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Max. height of posted Flash movies (in pixels)" , + $SKIN->form_input( "max_h_flash", $INFO['max_h_flash'] ) + ) ); + + // + + $ADMIN->html .= $SKIN->add_td_row( array( "Valid postable image extensions
(Seperate with comma (gif,jpeg,jpg) etc" , + $SKIN->form_input( "img_ext", $INFO['img_ext'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Show uploaded images in post?" , + $SKIN->form_yes_no( "show_img_upload", $INFO['show_img_upload'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Topic prefix for PINNED topics" , + $SKIN->form_input( "pre_pinned", $INFO['pre_pinned'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Topic prefix for MOVED topics" , + $SKIN->form_input( "pre_moved", $INFO['pre_moved'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Topic prefix for POLLS" , + $SKIN->form_input( "pre_polls", $INFO['pre_polls'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Stop shouting in topic titles?
(Will turn: CLICK HERE into Click Here)" , + $SKIN->form_yes_no( "etfilter_shout", $INFO['etfilter_shout'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Remove excess exclamation/question marks in topic titles?
(Will turn: This!!!!! into This!)" , + $SKIN->form_yes_no( "etfilter_punct", $INFO['etfilter_punct'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Guest names prefix
(This is for when a guest posts with a members name, it allows for a visual difference to prevent confusion)" , + $SKIN->form_input( "guest_name_pre", $INFO['guest_name_pre'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Guest names suffix
(This is for when a guest posts with a members name, it allows for a visual difference to prevent confusion)" , + $SKIN->form_input( "guest_name_suf", $INFO['guest_name_suf'] ) + ) ); + + $this->common_footer(); + + + } + + //------------------------------------------------------------- + // SECURITY + //-------------------------------------------------------------- + + function secure() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $this->common_header('dosecure', 'Security', 'Define the level of security your board possess by using the configurations below'); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow dynamic images?
If 'yes' users can post scripted image generators" , + $SKIN->form_yes_no( "allow_dynamic_img", $INFO['allow_dynamic_img'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Session Expiration (in seconds)
Removes inactive sessions over the limit you specify" , + $SKIN->form_input( "session_expiration", $INFO['session_expiration'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Match users browsers while validating?" , + $SKIN->form_yes_no( "match_browser", $INFO['match_browser'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow duplicate emails when user registers?
Will not check for existing email address" , + $SKIN->form_yes_no( "allow_dup_email", $INFO['allow_dup_email'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow images to be posted?
Advanced programmers can force images to run as scripts. IBF limits damage by this method however." , + $SKIN->form_yes_no( "allow_images", $INFO['allow_images'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow flash movies in posts and avatars?
Flash has a built in scripting language" , + $SKIN->form_yes_no( "allow_flash", $INFO['allow_flash'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "New registration email validation?
Make admin manually preview all new accounts or make new users validate their email address" , + $SKIN->form_dropdown( "reg_auth_type", + array( + 0 => array( 'user' , 'User Email Validation' ), + 1 => array( 'admin', 'Admin Validation' ), + 2 => array( '0' , 'None' ) + ), + $INFO['reg_auth_type'] + ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Get notified when a new user registers via email?" , + $SKIN->form_dropdown( "new_reg_notify", + array( + 0 => array( '1' , 'Yes' ), + 1 => array( '0' , 'No' ) + ), + $INFO['new_reg_notify'] + ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Use secure mail form for member to member mails?
Hides users email addresses" , + $SKIN->form_yes_no( "use_mail_form", $INFO['use_mail_form'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Flood control delay (in seconds)
Make users wait before posting again
Can be left blank for no flood control" , + $SKIN->form_input( "flood_control", $INFO['flood_control'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Allow users to browse the Active Users list?" , + $SKIN->form_yes_no( "allow_online_list", $INFO['allow_online_list'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Force guests to log in before allowing access to the board?" , + $SKIN->form_yes_no( "force_login", $INFO['force_login'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Disable new registrations?" , + $SKIN->form_yes_no( "no_reg", $INFO['no_reg'] ) + ) ); + + $this->common_footer(); + + + } + + //------------------------------------------------------------- + // COOKIES: Yum Yum! + //-------------------------------------------------------------- + + function cookie() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $this->common_header('docookie', 'Cookies', 'All of these fields can be left blank. Experiment to find the correct settings for your host'); + + $ADMIN->html .= $SKIN->add_td_row( array( "Cookie Domain
Hint: use .your-domain.com for global cookies" , + $SKIN->form_input( "cookie_domain", $INFO['cookie_domain'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Cookie Name Prefix
Allows multiple boards on one host." , + $SKIN->form_input( "cookie_id", $INFO['cookie_id'] ) + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( "Cookie Path
Relative path from domain to root IBF dir" , + $SKIN->form_input( "cookie_path", $INFO['cookie_path'] ) + ) ); + + $this->common_footer(); + + + } + + //------------------------------------------------------------- + // + // Save config. Does the hard work, so you don't have to. + // + //-------------------------------------------------------------- + + function save_config( $new ) + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + $master = array(); + + if ( is_array($new) ) + { + if ( count($new) > 0 ) + { + foreach( $new as $field ) + { + + // Handle special.. + + if ($field == 'img_ext' or $field == 'avatar_ext') + { + $HTTP_POST_VARS[ $field ] = preg_replace( "/[\.\s]/", "" , $HTTP_POST_VARS[ $field ] ); + $HTTP_POST_VARS[ $field ] = preg_replace( "/,/" , '|', $HTTP_POST_VARS[ $field ] ); + } + + $HTTP_POST_VARS[ $field ] = preg_replace( "/'/", "'", stripslashes($HTTP_POST_VARS[ $field ]) ); + + $master[ $field ] = stripslashes($HTTP_POST_VARS[ $field ]); + } + + $ADMIN->rebuild_config($master); + } + } + + $ADMIN->done_screen("Forum Configurations updated", "Administration CP Home", "act=index" ); + + + + } + //------------------------------------------------------------- + // + // Common header: Saves writing the same stuff out over and over + // + //-------------------------------------------------------------- + + function common_header( $formcode = "", $section = "", $extra = "" ) + { + + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $extra = $extra ? $extra."
" : $extra; + + $ADMIN->page_detail = $extra . "Please check the data you are entering before submitting the changes"; + $ADMIN->page_title = "Board Settings ($section)"; + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , $formcode ), + 2 => array( 'act' , 'op' ), + ) ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( "Settings" ); + + } + + //------------------------------------------------------------- + // + // Common footer: Saves writing the same stuff out over and over + // + //-------------------------------------------------------------- + + function common_footer( $button="Submit Changes" ) + { + + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $ADMIN->html .= $SKIN->end_form($button); + + $ADMIN->html .= $SKIN->end_table(); + + $ADMIN->output(); + + } +} + + +?> \ No newline at end of file diff --git a/upload/sources/Admin/ad_skin_import.php b/upload/sources/Admin/ad_skin_import.php new file mode 100644 index 00000000..8ef112bb --- /dev/null +++ b/upload/sources/Admin/ad_skin_import.php @@ -0,0 +1,1161 @@ + Import functions +| > Module written by Matt Mecham +| > Date started: 22nd April 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + + +$idx = new ad_langs(); + + +class ad_langs { + + var $base_url; + + function ad_langs() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + switch($IN['code']) + { + + case 'doimport': + $this->doimport(); + break; + + case 'import': + $this->import(); + break; + + case 'remove': + $this->remove(); + break; + + + //------------------------- + default: + $this->list_current(); + break; + } + + } + + + //--------------------------------------------- + // Remove archived files + //--------------------------------------------- + + function remove() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['id'] == "") + { + $ADMIN->error("You did not select a tar-chive to import!"); + } + + $this->tar_with_path = $INFO['base_dir']."archive_in/".$IN['id']; + + if ( ! unlink($this->tar_with_path) ) + { + $ADMIN->error("Could not remove that file, please check the CHMOD permissions"); + } + + $std->boink_it($ADMIN->base_url."&act=import"); + exit(); + + + } + + + //--------------------------------------------- + // Import switcheroo + //--------------------------------------------- + + function import() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['id'] == "") + { + $ADMIN->error("You did not select a tar-chive to import!"); + } + + $this->tar_with_path = $INFO['base_dir']."archive_in/".$IN['id']; + + $this->work_path = $INFO['base_dir']."archive_in"; + + if (! file_exists($this->tar_with_path) ) + { + $ADMIN->error( "That archive is not found on the server, it may have been deleted by another admin"); + } + + $this->tar_file = $IN['id']; + + $this->name_translated = preg_replace( "/^(css|image|set|wrap|tmpl)-(.+?)\.(\S+)$/", "\\2", $this->tar_file ); + $this->name_translated = preg_replace( "/_/", " ", $this->name_translated ); + + require $root_dir."sources/lib/tar.php"; + + $this->tar = new tar(); + + switch($IN['type']) + { + case 'css': + $this->css_import(); + break; + + case 'wrap': + $this->wrap_import(); + break; + + case 'image': + $this->image_import(); + break; + + case 'tmpl': + $this->template_import(); + break; + case 'set': + $this->set_import(); + break; + + //--------- + default: + $ADMIN->error("Unrecognised archive type"); + break; + } + + + } + + function set_import() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $templates_dir = $INFO['base_dir']."style_templates"; + $images_dir = $INFO['base_dir']."style_images"; + $css_dir = $INFO['base_dir']."style_sheets"; + $skins_dir = $INFO['base_dir']."Skin"; + + if (! is_writeable($images_dir) ) + { + $ADMIN->error("Cannot write to the $images_dir directory, please set sufficient CHMOD permissions to allow this. IBF cannot do this for you."); + } + + if (! is_writeable($css_dir) ) + { + $ADMIN->error("Cannot write to the $css_dir directory, please set sufficient CHMOD permissions to allow this. IBF cannot do this for you."); + } + + if (! is_dir($templates_dir) ) + { + $ADMIN->error("Cannot write to the $templates_dir directory, It is not there."); + } + + if (! is_writeable($templates_dir) ) + { + $ADMIN->error("Cannot write to the $templates_dir directory, please set sufficient CHMOD permissions to allow this. IBF cannot do this for you."); + } + + if (! is_dir($skins_dir) ) + { + $ADMIN->error("Cannot write to the $skins_dir directory, It is not there."); + } + + if (! is_writeable($skins_dir) ) + { + $ADMIN->error("Cannot write to the $skins_dir directory, please set sufficient CHMOD permissions to allow this. IBF cannot do this for you."); + } + + //------------------------------------------------------ + + $this->tar->new_tar( $this->work_path, $this->tar_file ); + + $files = $this->tar->list_files(); + + if (! $this->check_archive($files) ) + { + $ADMIN->error("That is not a valid tar-achive, please re-upload in binary and try again"); + } + + //------------------------------------------------------ + + $DB->query("SELECT COUNT(*) as count FROM ibf_tmpl_names"); + + $tmpl_count = $DB->fetch_row(); + + //------------------------------------------------------ + // Attempt to create a new work directory + //------------------------------------------------------ + + $new_dir = preg_replace( "/^(.+?)\.tar$/", "\\1", $this->tar_file ); + + $this->new_dir = $new_dir; + + if ( ! mkdir($this->work_path."/".$new_dir, 0777) ) + { + $ADMIN->error("Directory creation failed, cannot import skin set. Please check the permission in 'archive_in'"); + } + + @chmod($this->work_path."/".$new_dir, 0777); + + $next_id = array( 'css' => 0, 'wrap' => 0, 'templates' => 0, 'images' => 0 ); + + //------------------------------------------------------ + // Add a dummy entries into the DB to get the next insert ID + //------------------------------------------------------ + + $DB->query("INSERT INTO ibf_tmpl_names SET skname=\"".$this->name_translated." (Set Import).{$tmpl_count['count']}\""); + + $next_id['templates'] = $DB->get_insert_id(); + + //------------------------------------------------------ + + $DB->query("INSERT INTO ibf_css SET css_name=\"".$this->name_translated." (Set Import)\""); + + $next_id['css'] = $DB->get_insert_id(); + + //------------------------------------------------------ + + $DB->query("INSERT INTO ibf_templates SET name=\"".$this->name_translated." (Set Import)\""); + + $next_id['wrap'] = $DB->get_insert_id(); + + //------------------------------------------------------ + + $DB->query("INSERT INTO ibf_images SET setname=\"".$this->name_translated." (Set Import)\""); + + $next_id['images'] = $DB->get_insert_id(); + + //------------------------------------------------------ + // Attempt to create the new directories + //------------------------------------------------------ + + if (! mkdir($templates_dir."/".$next_id['templates'], 0777) ) + { + $this->import_error("Could not create a new directory in style_templates", $next_id); + } + + @chmod($templates_dir."/".$next_id['templates'], 0777); + + //----------------------------------------------------- + + if (! mkdir($images_dir."/".$next_id['images'], 0777) ) + { + $this->import_error("Could not create a new directory in style_images", $next_id); + } + + @chmod($images_dir."/".$next_id['images'], 0777); + + //----------------------------------------------------- + + if (! mkdir($skins_dir."/s".$next_id['templates'], 0777) ) + { + $this->import_error("Could not create a new directory in Skin", $next_id); + } + + @chmod($skins_dir."/s".$next_id['templates'], 0777); + + //------------------------------------------------------ + + $this->tar->extract_files($this->work_path."/".$new_dir); + + if ($this->tar->error != "") + { + $this->import_error($this->tar->error, $next_id); + } + + //------------------------------------------------------ + // Make sure config file is present and correct and stuff + //------------------------------------------------------ + + if ( ! file_exists($this->work_path."/".$new_dir."/templates/config.php") ) + { + $this->import_error("Master template set configuration file 'config.php' is missing from this archive, terminating import", $next_id); + } + + //------------------------------------------------------ + + if ( ! file_exists($this->work_path."/".$new_dir."/img_conf.inc") ) + { + $this->import_error("Image and macro set configuration file 'img_conf.inc' is missing from this archive, terminating import", $next_id); + } + + require $this->work_path."/".$new_dir."/img_conf.inc"; + + $image_config = $config; + + unset($config); + + //------------------------------------------------------ + + if ( file_exists($this->work_path."/".$new_dir."/templates_conf.inc") ) + { + require $this->work_path."/".$new_dir."/templates_conf.inc"; + + $template_config = array( 'author' => stripslashes($config['author']), + 'email' => stripslashes($config['email']), + 'url' => stripslashes($config['url']), + ); + + $skin_set_config = array( + 'tbl_width' => stripslashes($config['tbl_width']), + 'tbl_border' => stripslashes($config['tbl_border']), + ); + + $db_string = $DB->compile_db_update_string( $template_config ); + + $DB->query("UPDATE ibf_tmpl_names SET $db_string WHERE skid='{$next_id['templates']}'"); + } + + //------------------------------------------------------ + // Import the CSS + //------------------------------------------------------ + + if ($FH = fopen( $this->work_path."/".$new_dir."/stylesheet.css", 'r' ) ) + { + $css = fread($FH, filesize($this->work_path."/".$new_dir."/stylesheet.css") ); + fclose($FH); + + //------------------------- + // Swop Binary to Ascii + //------------------------- + + $css = preg_replace( "/\r/", "\n", stripslashes($css) ); + + $css_string = $DB->compile_db_update_string( array( + 'css_name' => stripslashes( $this->name_translated )." (Import)", + 'css_text' => $css, + ) ); + + $DB->query("UPDATE ibf_css SET $css_string WHERE cssid='{$next_id['css']}'"); + + + if ( $FHD = fopen( $INFO['base_dir']."style_sheets/stylesheet_".$next_id['css'].".css", 'w') ) + { + fwrite($FHD, $css, strlen($css) ); + fclose($FHD); + } + else + { + $this->import_error("Could not write new style sheet to 'style_sheets' directory, please check the permission and re-try", $next_id); + } + + } + else + { + $this->import_error("Could not read the uploaded CSS archive file, please check the permissions on that file and try again", $next_id); + } + + //------------------------------------------------------ + // Import the board wrapper + //------------------------------------------------------ + + if ($FH = fopen( $this->work_path."/".$new_dir."/wrapper.html", 'r' ) ) + { + $text = fread($FH, filesize($this->work_path."/".$new_dir."/wrapper.html") ); + fclose($FH); + + //------------------------- + // Swop Binary to Ascii + //------------------------- + + $text = preg_replace( "/\r/", "\n", stripslashes($text) ); + + $wrap_string = $DB->compile_db_update_string( array( + 'name' => stripslashes( $this->name_translated )." (Import)", + 'template' => $text, + ) ); + + $DB->query("UPDATE ibf_templates SET $wrap_string WHERE tmid='{$next_id['wrap']}'"); + + } + else + { + $this->import_error("Could not read the uploaded board wrapper archive file, please check the permissions on that file and try again", $next_id); + } + + //------------------------------------------------------ + // Attempt to copy over the image files + //------------------------------------------------------ + + if (! $ADMIN->copy_dir($this->work_path."/".$new_dir."/images", $images_dir."/".$next_id['images']) ) + { + $this->import_error("Could not import images, terminating the import", $next_id); + } + + //------------------------------------------------------ + // Fix up the images db table + //------------------------------------------------------ + + $new_array = array(); + + foreach($image_config as $k => $v) + { + if ( ($k == 'imid') or ($k == 'setname') ) + { + continue; + } + + $v = stripslashes($v); + + $v = preg_replace( "#/%img_dir%/#", "/".$next_id['images']."/", $v ); + + $new_array[ $k ] = $v; + } + + $db_string = $DB->compile_db_update_string( $new_array ); + + $DB->query("UPDATE ibf_images SET $db_string WHERE imid='{$next_id['images']}'"); + + unset($db_string); + + //------------------------------------------------------ + // Attempt to copy over the template files + //------------------------------------------------------ + + if (! $ADMIN->copy_dir($this->work_path."/".$new_dir."/templates", $templates_dir."/".$next_id['templates']) ) + { + $this->import_error("Could not import templates, terminating the import", $next_id); + } + + $tmpl_string = $DB->compile_db_update_string( $template_config ); + + $DB->query("UPDATE ibf_tmpl_names SET $tmpl_string WHERE skid='{$next_id['templates']}'"); + + //------------------------------------------------------ + // Add a new row to the skins table. + //------------------------------------------------------ + + $DB->query("SELECT MAX(sid) as new_id FROM ibf_skins"); + + $set = $DB->fetch_row(); + + $set['new_id']++; + + $new_name = stripslashes( $this->name_translated )." (Import)".$set['new_id']; + + $skin_string = $DB->compile_db_insert_string( array( 'sname' => $new_name, + 'sid' => $set['new_id'], + 'set_id' => $next_id['templates'], + 'tmpl_id' => $next_id['wrap'], + 'img_id' => $next_id['images'], + 'css_id' => $next_id['css'], + 'tbl_width' => $skin_set_config['tbl_width'], + 'tbl_border' => $skin_set_config['tbl_border'], + 'hidden' => 0, + 'default_set' => 0 + ) ); + + $DB->query("INSERT INTO ibf_skins (".$skin_string['FIELD_NAMES'].") VALUES(".$skin_string['FIELD_VALUES'].")"); + + //------------------------------------------------------ + // Resynchronise the PHP files wid' da' HTML templates + //------------------------------------------------------ + + $ADMIN->rm_dir($this->work_path."/".$new_dir); + + $templates_dir .= "/" .$next_id['templates']; + $skins_dir .= "/s".$next_id['templates']; + + $errors = array(); + + $errors = $this->rebuild_phpskin( $templates_dir, $skins_dir ); + + if ( is_array($errors) ) + { + if (count($errors > 0)) + { + $ADMIN->html .= $SKIN->start_table("Errors and warnings"); + + $ADMIN->html .= $SKIN->add_td_basic( implode("
", $errors) ); + + $ADMIN->html .= $SKIN->end_table(); + } + } + + $ADMIN->done_screen("Skin set Imported", "Manage Skin sets", "act=sets" ); + + } + + + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + + function template_import() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $templates_dir = $INFO['base_dir']."style_templates"; + + $skins_dir = $INFO['base_dir']."Skin"; + + if (! is_dir($templates_dir) ) + { + $ADMIN->error("Cannot write to the $images_dir directory, It is not there."); + } + + if (! is_writeable($templates_dir) ) + { + $ADMIN->error("Cannot write to the $images_dir directory, please set sufficient CHMOD permissions to allow this. IBF cannot do this for you."); + } + + if (! is_dir($skins_dir) ) + { + $ADMIN->error("Cannot write to the $skins_dir directory, It is not there."); + } + + if (! is_writeable($skins_dir) ) + { + $ADMIN->error("Cannot write to the $skins_dir directory, please set sufficient CHMOD permissions to allow this. IBF cannot do this for you."); + } + + //------------------------------------------------------ + + $this->tar->new_tar( $this->work_path, $this->tar_file ); + + $files = $this->tar->list_files(); + + if (! $this->check_archive($files) ) + { + $ADMIN->error("That is not a valid tar-achive, please re-upload in binary and try again"); + } + + //------------------------------------------------------ + // Add a dummy entry into the DB to get the next insert ID + //------------------------------------------------------ + + $DB->query("SELECT COUNT(*) as count FROM ibf_tmpl_names"); + + $count = $DB->fetch_row(); + + $DB->query("INSERT INTO ibf_tmpl_names SET skname=\"".$this->name_translated." (Import).{$count['count']}\""); + + $new_id = $DB->get_insert_id(); + + if ($new_id == "") + { + $ADMIN->error("Could not write to the database"); + } + + //------------------------------------------------------ + // Attempt a mkdir + //------------------------------------------------------ + + if (! mkdir($templates_dir."/".$new_id, 0777) ) + { + $DB->query("DELETE FROM ibf_tmpl_names WHERE skid='$new_id'"); + + $ADMIN->error("Could not create a new directory in style_templates"); + } + + @chmod($templates_dir."/".$new_id, 0777); + + //----------------------------------------------------- + + if (! mkdir($skins_dir."/s".$new_id, 0777) ) + { + $DB->query("DELETE FROM ibf_tmpl_names WHERE skid='$new_id'"); + + $ADMIN->error("Could not create a new directory in Skin"); + } + + @chmod($skins_dir."/s".$new_id, 0777); + + //------------------------------------------------------ + + $this->tar->extract_files($templates_dir."/".$new_id); + + if ($this->tar->error != "") + { + $DB->query("DELETE FROM ibf_tmpl_names WHERE skid='$new_id'"); + + $ADMIN->error( $this->tar->error ); + } + + //------------------------------------------------------ + // Make sure config file is present and correct and stuff + //------------------------------------------------------ + + if ( ! file_exists($templates_dir."/".$new_id."/config.php") ) + { + $DB->query("DELETE FROM ibf_tmpl_names WHERE skid='$new_id'"); + + $ADMIN->error( "Master template set configuration file 'config.php' is missing from this archive, terminating import" ); + } + + //------------------------------------------------------ + + if ( file_exists($templates_dir."/".$new_id."/conf.inc") ) + { + require $templates_dir."/".$new_id."/conf.inc"; + + $string = array( 'author' => stripslashes($config['author']), + 'email' => stripslashes($config['email']), + 'url' => stripslashes($config['url']), + ); + + $db_string = $DB->compile_db_update_string( $string ); + + $DB->query("UPDATE ibf_tmpl_names SET $db_string WHERE skid='$new_id'"); + } + + //------------------------------------------------------ + // Resynchronise the PHP files wid' da' HTML templates + + $templates_dir .= "/".$new_id; + $skins_dir .= "/s".$new_id; + + $errors = $this->rebuild_phpskin( $templates_dir, $skins_dir ); + + if (count($errors > 0)) + { + $ADMIN->html .= $SKIN->start_table("Errors and warnings"); + + $ADMIN->html .= $SKIN->add_td_basic( implode("
", $errors) ); + + $ADMIN->html .= $SKIN->end_table(); + } + + $ADMIN->done_screen("Template set Imported", "Manage Template sets", "act=templ" ); + + } + + + //------------------------------------------------------------------- + + function image_import() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $images_dir = $INFO['base_dir']."style_images"; + + if (! is_dir($images_dir) ) + { + $ADMIN->error("Cannot write to the $images_dir directory, It is not there."); + } + + if (! is_writeable($images_dir) ) + { + $ADMIN->error("Cannot write to the $images_dir directory, please set sufficient CHMOD permissions to allow this. IBF cannot do this for you."); + } + + //------------------------------------------------------ + + $this->tar->new_tar( $this->work_path, $this->tar_file ); + + $files = $this->tar->list_files(); + + if (! $this->check_archive($files) ) + { + $ADMIN->error("That is not a valid tar-achive, please re-upload in binary and try again"); + } + + //------------------------------------------------------ + // Add a dummy entry into the DB to get the next insert ID + //------------------------------------------------------ + + $DB->query("INSERT INTO ibf_images SET setname=\"".$this->name_translated." (Import)\""); + + $new_id = $DB->get_insert_id(); + + if ($new_id == "") + { + $ADMIN->error("Could not write to the database"); + } + + //------------------------------------------------------ + // Attempt a mkdir + //------------------------------------------------------ + + if (! mkdir($images_dir."/".$new_id, 0777) ) + { + $DB->query("DELETE FROM ibf_images WHERE imid='$new_id'"); + + $ADMIN->error("Could not create a new directory in style_images"); + } + + @chmod($images_dir."/".$new_id, 0777); + + //------------------------------------------------------ + + $this->tar->extract_files($images_dir."/".$new_id); + + if ($this->tar->error != "") + { + $DB->query("DELETE FROM ibf_images WHERE imid='$new_id'"); + + $ADMIN->error( $this->tar->error ); + } + + //------------------------------------------------------ + + if ( ! file_exists($images_dir."/".$new_id."/conf.inc") ) + { + $DB->query("DELETE FROM ibf_images WHERE imid='$new_id'"); + + $ADMIN->error("Could not locate the configuration file!"); + } + + //------------------------------------------------------ + + require $images_dir."/".$new_id."/conf.inc"; + + $new_array = array(); + + foreach($config as $k => $v) + { + if ( ($k == 'imid') or ($k == 'setname') ) + { + continue; + } + + $v = stripslashes($v); + + $v = preg_replace( "#/%img_dir%/#", "/$new_id/", $v ); + + $new_array[ $k ] = $v; + } + + //------------------------------------------------------ + + // Update the DB + + $db_string = $DB->compile_db_update_string( $new_array ); + + $DB->query("UPDATE ibf_images SET $db_string WHERE imid='$new_id'"); + + @unlink($images_dir."/".$new_id."/conf.inc"); + + $ADMIN->done_screen("Image & Macro Imported", "Manage Image & Macro sets", "act=image" ); + + } + + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + + function wrap_import() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + // Attempt to open the template file... + + if ($FH = fopen( $this->tar_with_path, 'r' ) ) + { + $text = fread($FH, filesize($this->tar_with_path) ); + fclose($FH); + + //------------------------- + // Swop Binary to Ascii + //------------------------- + + $text = preg_replace( "/\r/", "\n", stripslashes($text) ); + + $string = $DB->compile_db_insert_string( array( + 'name' => stripslashes( $this->name_translated )." (Import)", + 'template' => $text, + ) ); + + $DB->query("INSERT INTO ibf_templates (".$string['FIELD_NAMES'].") VALUES(".$string['FIELD_VALUES'].")"); + + } + else + { + $ADMIN->error("Could not read the uploaded board wrapper archive file, please check the permissions on that file and try again"); + } + + $ADMIN->done_screen("Board Wrapper Imported", "Manage Board Wrappers", "act=wrap" ); + + } + + //------------------------------------------------------------------- + + + function css_import() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if (! is_dir($INFO['base_dir']."style_sheets") ) + { + $ADMIN->error("Cannot write to the {$INFO['base_dir']}style_sheets directory, It is not there."); + } + + if (! is_writeable($INFO['base_dir']."style_sheets") ) + { + $ADMIN->error("Cannot write to the {$INFO['base_dir']}style_sheets directory, please set sufficient CHMOD permissions to allow this. IBF cannot do this for you."); + } + + + // Attempt to open the CSS file... + + if ($FH = fopen( $this->tar_with_path, 'r' ) ) + { + $css = fread($FH, filesize($this->tar_with_path) ); + fclose($FH); + + //------------------------- + // Swop Binary to Ascii + //------------------------- + + $css = preg_replace( "/\r/", "\n", stripslashes($css) ); + + $string = $DB->compile_db_insert_string( array( + 'css_name' => stripslashes( $this->name_translated )." (Import)", + 'css_text' => $css, + ) ); + + $DB->query("INSERT INTO ibf_css (".$string['FIELD_NAMES'].") VALUES(".$string['FIELD_VALUES'].")"); + + if ( $new_id = $DB->get_insert_id() ) + { + if ( $FHD = fopen( $INFO['base_dir']."style_sheets/stylesheet_".$new_id.".css", 'w') ) + { + fwrite($FHD, $css, strlen($css) ); + fclose($FHD); + } + else + { + $DB->query("DELETE FROM ibf_css WHERE cssid='$new_id'"); + $ADMIN->error("Could not write new style sheet to 'style_sheets' directory, please check the permission and re-try"); + } + } + else + { + $ADMIN->error("Could not write to the database."); + } + } + else + { + $ADMIN->error("Could not read the uploaded CSS archive file, please check the permissions on that file and try again"); + } + + $ADMIN->done_screen("CSS information Imported", "Manage Uploaded Archives", "act=import" ); + + } + + + + + //---------------------------------------------------- + + function check_archive($files) + { + if (count($files) > 0) + { + foreach($files as $giles) + { + if ( ! preg_match( "/^(?:[\(\)\:\;\~\.\w\d\+\-\_\/]+)$/", $giles) ) + { + return FALSE; + } + } + } + else + { + return FALSE; + } + + return TRUE; + } + + + //------------------------------------------------------------- + // SHOW ALL LANGUAGE PACKS + //------------------------------------------------------------- + + function list_current() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $form_array = array(); + + $ADMIN->page_detail = "You can select which archives to import onto your board in this section. All archives must be uploaded into the 'archive_in' directory"; + $ADMIN->page_title = "Import Skin Archive Manager"; + + + + //+------------------------------- + + $files = array(); + + $dir = $INFO['base_dir']."/archive_in"; + + if ( is_dir($dir) ) + { + $handle = opendir($dir); + + while (($filename = readdir($handle)) !== false) + { + if (($filename != ".") && ($filename != "..")) + { + if (preg_match("/^(css|image|set|wrap|tmpl).+?\.(tar|html|css)$/", $filename)) + { + $files[] = $filename; + } + } + } + + closedir($handle); + + } + + //+------------------------------- + + $SKIN->td_header[] = array( "Name" , "30%" ); + $SKIN->td_header[] = array( "Type" , "20%" ); + $SKIN->td_header[] = array( "File Name" , "30%" ); + $SKIN->td_header[] = array( "Import" , "10%" ); + $SKIN->td_header[] = array( "Remove" , "10%" ); + + $ADMIN->html .= $SKIN->start_table( "Current Archives Uploaded" ); + + if ( count($files) > 0 ) + { + foreach($files as $file) + { + + $type = array( 'css' => 'Style Sheet', + 'image' => 'Image & Macro set', + 'set' => 'Skin Set Collection', + 'wrap' => 'Board Wrapper', + 'tmpl' => 'Template set' + ); + + $rtype = preg_replace( "/^(css|image|set|wrap|tmpl).+?\.(\S+)$/" , "\\1", $file ); + + $rname = preg_replace( "/^(css|image|set|wrap|tmpl)-(.+?)\.(\S+)$/", "\\2", $file ); + + $rname = preg_replace( "/_/", " ", $rname ); + + + $ADMIN->html .= $SKIN->add_td_row( array( "$rname", + "
{$type[$rtype]}
", + "
$file
", + "
Import
", + "
Remove
", + ) ); + } + + } + + $ADMIN->html .= $SKIN->end_table(); + + + //+------------------------------- + //+------------------------------- + + $ADMIN->output(); + + } + + function unconvert_tags($t="") + { + if ($t == "") + { + return ""; + } + + $t = preg_replace( "/{ibf\.script_url}/i" , '{$ibforums->base_url}' , $t); + $t = preg_replace( "/{ibf\.session_id}/i" , '{$ibforums->session_id}' , $t); + $t = preg_replace( "/{ibf\.skin\.(\w+)}/" , '{$ibforums->skin[\''."\\1".'\']}' , $t); + $t = preg_replace( "/{ibf\.lang\.(\w+)}/" , '{$ibforums->lang[\''."\\1".'\']}' , $t); + $t = preg_replace( "/{ibf\.vars\.(\w+)}/" , '{$ibforums->vars[\''."\\1".'\']}' , $t); + $t = preg_replace( "/{ibf\.member\.(\w+)}/" , '{$ibforums->member[\''."\\1".'\']}' , $t); + + return $t; + + } + + function rebuild_phpskin($templates_dir, $skins_dir) + { + + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $errors = array(); + + require $templates_dir."/config.php"; + + if ( $handle = opendir($templates_dir) ) + { + + while (($filename = readdir($handle)) !== false) + { + if (($filename != ".") && ($filename != "..")) + { + if ( preg_match( "/^index\./", $filename ) ) + { + continue; + } + + //------------------------------------------- + + if ( preg_match( "/\.html$/", $filename ) ) + { + + $name = preg_replace( "/\.html$/", "", $filename ); + + + if ($FHD = fopen($templates_dir."/".$filename, 'r') ) + { + $text = fread($FHD, filesize($templates_dir."/".$filename) ); + fclose($FHD); + } + else + { + $errors[] = "Could not open $filename, skipping file..."; + continue; + } + + //---------------------------------------------------- + + $need = count($skin[$name]); + $start = 0; + $end = 0; + + if ($need < 1) + { + $errors[] = "Error recalling function data for $filename, skipping..."; + continue; + } + + // check to make sure the splitter tags are intact + + foreach($skin[$name] as $func_name => $data) + { + if ( preg_match("//", $text) ) + { + $start++; + } + + //+------------------------------- + + if ( preg_match("//", $text) ) + { + $end++; + } + } + + if ($start != $end) + { + $errors[] = "Some start or end template splitter comments are missing in $filename, skipping file...."; + continue; + } + + if ($start != $need) + { + $errors[] = "Some template splitter comments are missing in $filename, skipping file..."; + continue; + } + + //+------------------------------- + // Convert the tags back to php native + //+------------------------------- + + $text = $this->unconvert_tags($text); + + //+------------------------------- + // Start parsing the php skin file + //+------------------------------- + + $final = "<"."?php\n\n". + "class $name {\n\n"; + + foreach($skin[$name] as $func_name => $data) + { + + $top = "\n\nfunction $func_name($data) {\n". + "global \$ibforums;\n". + "return <<\s*\n/", "$top", $text); + + + //+------------------------------- + + $text = preg_replace("/\s*\s*\n/", "$bum", $text); + } + + $end = "\n\n}\n?".">"; + + $final .= $text.$end; + + if ($fh = fopen( $skins_dir."/".$name.".php", 'w' ) ) + { + fwrite($fh, $final, strlen($final) ); + fclose($fh); + @chmod( $skins_dir."/".$name.".php", 0777 ); + } + else + { + $errors[] = "Could not save information to $phpskin, please ensure that the CHMOD permissions are correct."; + } + + $end = ""; + $final = ""; + $top = ""; + + } // if *.php + + } // if not dir + + } // while loop + + closedir($handle); + + } + else + { + $errors[] = "Could not open the templates directory!"; + } + + return $errors; + + } + + + function import_error( $error, $next_id) + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $DB->query("DELETE FROM ibf_images WHERE imid='{$next_id['images']}'"); + $DB->query("DELETE FROM ibf_tmpl_names WHERE skid='{$next_id['templates']}'"); + $DB->query("DELETE FROM ibf_css WHERE cssid='{$next_id['css']}'"); + $DB->query("DELETE FROM ibf_templates WHERE tmid='{$next_id['wrap']}'"); + + @rmdir($INFO['base_dir']."/style_images/".$next_id['images']); + @rmdir($INFO['base_dir']."/style_templates/".$next_id['templates']); + @rmdir($INFO['base_dir']."/Skin/s".$next_id['templates']); + + $ADMIN->rm_dir($this->work_path."/".$this->new_dir); + + $ADMIN->error( $error ); + + } + + +} + + +?> \ No newline at end of file diff --git a/upload/sources/Admin/ad_stylesets.php b/upload/sources/Admin/ad_stylesets.php new file mode 100644 index 00000000..6bcd0f16 --- /dev/null +++ b/upload/sources/Admin/ad_stylesets.php @@ -0,0 +1,862 @@ + Help Control functions +| > Module written by Matt Mecham +| > Date started: 2nd April 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + + +$idx = new ad_settings(); + + +class ad_settings { + + var $base_url; + + function ad_settings() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + switch($IN['code']) + { + case 'wrapper': + $this->list_wrappers(); + break; + + case 'add': + $this->do_form('add'); + break; + + case 'edit': + $this->do_form('edit'); + break; + + case 'doadd': + $this->save_skin('add'); + break; + + case 'doedit': + $this->save_skin('edit'); + break; + + case 'remove': + $this->remove(); + break; + + //------------------------- + case 'memskins': + $this->mem_skins(); + break; + + case 'export': + $this->export(); + break; + + default: + $this->list_sets(); + break; + } + + } + + //---------------------------------------------------- + + function export() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing skin set ID, go back and try again"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_skins WHERE uid='".$IN['id']."'"); + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_images WHERE imid='".$row['img_id']."'"); + + if ( ! $img = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_css WHERE cssid='".$row['css_id']."'"); + + if ( ! $css = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + + //+------------------------------- + + $DB->query("SELECT * from ibf_tmpl_names WHERE skid='".$row['set_id']."'"); + + if ( ! $tmpl = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_templates WHERE tmid='".$row['tmpl_id']."'"); + + if ( ! $wrap = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + + //+------------------------------- + + if ($INFO['base_dir'] == './') + { + $INFO['base_dir'] = str_replace( '\\', '/', getcwd() ) . '/'; + } + + $archive_dir = $INFO['base_dir']."archive_out"; + $images_dir = $INFO['base_dir']."style_images/".$img['imid']; + $css_file = $INFO['base_dir']."style_sheets/stylesheet_{$css['cssid']}.css"; + $templates_dir = $INFO['base_dir']."style_templates/".$tmpl['skid']; + + require $root_dir."sources/lib/tar.php"; + + if (!is_dir($archive_dir)) + { + $ADMIN->error("Could not locate $archive_dir, is the directory there?"); + } + + if (!is_writeable($archive_dir)) + { + $ADMIN->error("Cannot write in $archive_dir, CHMOD via FTP to 0755 or 0777 to enable this script to write into it. IBF cannot do this for you"); + } + + if (!file_exists($css_file)) + { + $ADMIN->error("Could not locate $css_file, is the directory there?"); + } + + if (!is_dir($templates_dir)) + { + $ADMIN->error("Could not locate $templates_dir, is the directory there?"); + } + + if (!is_dir($images_dir)) + { + $ADMIN->error("Could not locate $images_dir, is the directory there?"); + } + + //+------------------------------- + // Set up the dir structure + //+------------------------------- + + $css_name = "stylesheet.css"; + $wrap_name = "wrapper.html"; + + $img_dir = 'images'; + $templ_dir = 'templates'; + + $pack_name = preg_replace( "/\s{1,}/", "_", $row['sname'] ); + + $new_dir = "set-".$pack_name; + + //+------------------------------- + + if ( ! mkdir($archive_dir."/".$new_dir, 0777) ) + { + $ADMIN->error("Directory creation failed, cannot export skin set. Please check the permission in 'archive_out'"); + } + + //+------------------------------- + + if ( ! mkdir($archive_dir."/".$new_dir."/".$img_dir, 0777) ) + { + $ADMIN->error("Directory creation failed, cannot export skin set. Please check the permission in 'archive_out'"); + } + + //+------------------------------- + + if ( ! mkdir($archive_dir."/".$new_dir."/".$templ_dir, 0777) ) + { + $ADMIN->error("Directory creation failed, cannot export skin set. Please check the permission in 'archive_out'"); + } + + //+------------------------------- + // Make the wrapper file... + //+------------------------------- + + $wrap['template'] = preg_replace("/\r/", "\n", $wrap['template'] ); + + $FH = fopen($archive_dir."/".$new_dir."/".$wrap_name, 'w'); + fwrite($FH, $wrap['template'], strlen($wrap['template'])); + fclose($FH); + + @chmod($archive_dir."/".$new_dir."/".$wrap_name, 0777); + + //+------------------------------- + // Make the css file... + //+------------------------------- + + if ( ! copy($css_file, $archive_dir."/".$new_dir."/".$css_name) ) + { + $ADMIN->error("COPY FAILED ON STYLE SHEET $css_name, maybe the script has insufficient permissions?"); + } + + @chmod($archive_dir."/".$new_dir."/".$css_name, 0777); + + //+------------------------------- + // Copy over the images... + //+------------------------------- + + if ( ! $ADMIN->copy_dir($images_dir, $archive_dir."/".$new_dir."/".$img_dir) ) + { + $ADMIN->error( $ADMIN->errors ); + } + + // Generate the config file.. + + $file_content = " $v) + { + + $v = preg_replace( "#style_images/".$img['imid']."/#", "style_images/%img_dir%/", $v ); + + $file_content .= "\n\$config['$k'] = \"".addslashes($v)."\";"; + } + + $file_content .= "\n\n?".">"; + + $FH = fopen($archive_dir."/".$new_dir."/"."img_conf.inc", 'w'); + fwrite($FH, $file_content, strlen($file_content)); + fclose($FH); + + //+------------------------------- + // Copy over the skin templates... + //+------------------------------- + + if ( ! $ADMIN->copy_dir($templates_dir, $archive_dir."/".$new_dir."/".$templ_dir) ) + { + $ADMIN->error( $ADMIN->errors ); + } + + // Generate the config file.. + + $file_content = " \"".addslashes($tmpl['author'])."\", ". + "'email'=>\"".addslashes($tmpl['email'])."\", ". + "'tbl_border'=>\"".addslashes($row['tbl_border'])."\", ". + "'tbl_width'=>\"".addslashes($row['tbl_width'])."\", ". + "'url'=>\"".addslashes($tmpl['url'])."\")\n\n?".">"; + + $FH = fopen($archive_dir."/".$new_dir."/"."templates_conf.inc", 'w'); + fwrite($FH, $file_content, strlen($file_content)); + fclose($FH); + + //+------------------------------- + // Add files and write tarball + //+------------------------------- + + $tar = new tar(); + + $tar->new_tar( $archive_dir, $new_dir.".tar" ); + $tar->add_directory( $archive_dir."/".$new_dir ); + $tar->write_tar(); + + // Check for errors. + + if ($tar->error != "") + { + $ADMIN->error($tar->error); + } + + // remove original unarchived directory + + $ADMIN->rm_dir($archive_dir."/".$new_dir); + + $ADMIN->done_screen("Skin Pack Export Created

You can download the tar-chive here", "Manage Skin Sets", "act=sets" ); + + + } + + //---------------------------------------------- + + function mem_skins() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + $DB->query("SELECT sid FROM ibf_skins WHERE uid='".$IN['oid']."'"); + $old = $DB->fetch_row(); + + if ($IN['nid'] == 'n') + { + $DB->query("UPDATE ibf_members SET skin=NULL WHERE skin='".$old['sid']."'"); + } + else + { + $DB->query("SELECT sid FROM ibf_skins WHERE uid='".$IN['nid']."'"); + $new = $DB->fetch_row(); + $DB->query("UPDATE ibf_members SET skin='".$new['sid']."' WHERE skin='".$old['sid']."'"); + } + + $ADMIN->done_screen("Member Skin Choices Updated", "Manage Skin Sets", "act=sets" ); + + } + + + //------------------------------------------------------------- + // REMOVE WRAPPERS + //------------------------------------------------------------- + + function remove() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + //+------------------------------- + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing skin set ID, go back and try again"); + } + + //+------------------------------- + + $DB->query("SELECT * FROM ibf_skins WHERE uid='".$IN['id']."'"); + + if (! $skin = $DB->fetch_row() ) + { + $ADMIN->error("Could not query that skin set information from the DB"); + } + + //+------------------------------- + + if ($skin['default_set'] == 1) + { + $ADMIN->error("You can not remove this skin set as it is set as the default. Set another skin as default and try again"); + } + + //+------------------------------- + + // Update the members skins.. + + $DB->query("UPDATE ibf_members SET skin='' WHERE skin='".$skin['sid']."'"); + + // Update the forums DB + + $DB->query("SELECT id FROM ibf_forums WHERE skin_id='".$skin['sid']."'"); + + if ( $DB->get_num_rows() ) + { + $arr = array(); + + while ( $i = $DB->fetch_row() ) + { + $arr['forum_skin_'.$i['id']] = ''; + } + + $DB->query("UPDATE ibf_forums SET skin_id='' WHERE skin_id='".$skin['sid']."'"); + + // Remove it from the config file.. + + $ADMIN->rebuild_config($arr); + + } + + // Remove skin from the DB + + $DB->query("DELETE FROM ibf_skins WHERE uid='".$IN['id']."'"); + + $std->boink_it($SKIN->base_url."&act=sets"); + + exit(); + + + } + + + + //------------------------------------------------------------- + // ADD / EDIT SKIN SETS + //------------------------------------------------------------- + + function save_skin( $type='add' ) + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + //+------------------------------- + + if ($type == 'edit') + { + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing skin set ID, go back and try again"); + } + } + + if ($IN['sname'] == "") + { + $ADMIN->error("You must specify a name for this skin pack ID"); + } + + if ($IN['tbl_width'] == "") + { + $ADMIN->error("You must specify a table width"); + } + + $barney = array( 'sname' => stripslashes($HTTP_POST_VARS['sname']), + 'set_id' => $IN['template'], + 'tmpl_id' => $IN['wrapper'], + 'img_id' => $IN['image'], + 'css_id' => $IN['css'], + 'tbl_border' => $IN['tbl_border'], + 'tbl_width' => $IN['tbl_width'], + 'hidden' => $IN['hidden'], + 'default_set'=> $IN['default_set'], + ); + + if ($type == 'add') + { + + $DB->query("SELECT MAX(sid) as new_id FROM ibf_skins"); + + $row = $DB->fetch_row(); + + $barney['sid'] = $row['new_id'] + 1; + + $db_string = $DB->compile_db_insert_string( $barney ); + + $DB->query("INSERT INTO ibf_skins (".$db_string['FIELD_NAMES'].") VALUES(".$db_string['FIELD_VALUES'].")"); + + if ($IN['default_set'] == 1) + { + $DB->query("UPDATE ibf_skins SET default_set=0 WHERE sid <> '".$barney['sid']."'"); + } + + $std->boink_it($SKIN->base_url."&act=sets"); + + exit(); + + } + else + { + $db_string = $DB->compile_db_update_string( $barney ); + + $DB->query("UPDATE ibf_skins SET $db_string WHERE uid='".$IN['id']."'"); + + if ($IN['default_set'] == 1) + { + $DB->query("UPDATE ibf_skins SET default_set=0 WHERE uid <> '".$IN['id']."'"); + } + + $ADMIN->done_screen("Skin Set Updated", "Manage Skin Sets", "act=sets" ); + } + + + } + + //------------------------------------------------------------- + // ADD / EDIT SETS + //------------------------------------------------------------- + + function do_form( $type='add' ) + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + //+------------------------------- + + $css = array(); + $wrappers = array(); + $templates = array(); + $images = array(); + + //+------------------------------- + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing wrapper ID, go back and try again"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_skins WHERE uid='".$IN['id']."'"); + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + //+------------------------------- + + $DB->query("SELECT imid, setname FROM ibf_images"); + + while( $img = $DB->fetch_row() ) + { + $images[] = array( $img['imid'], $img['setname'] ); + } + + //+------------------------------- + + $DB->query("SELECT cssid, css_name FROM ibf_css"); + + while ( $c = $DB->fetch_row() ) + { + $css[] = array( $c['cssid'], $c['css_name'] ); + } + + //+------------------------------- + + $DB->query("SELECT tmid, name FROM ibf_templates"); + + while ( $t = $DB->fetch_row() ) + { + $wrappers[] = array( $t['tmid'], $t['name'] ); + } + + //+------------------------------- + + $DB->query("SELECT skid, skname FROM ibf_tmpl_names"); + + while ( $s = $DB->fetch_row() ) + { + $templates[] = array( $s['skid'], $s['skname'] ); + } + + + //+------------------------------- + + if ($type == 'add') + { + $code = 'doadd'; + $button = 'Create Skin Set'; + $row['sname'] = $row['sname'].".2"; + $row['default_set'] = 0; + } + else + { + $code = 'doedit'; + $button = 'Edit Skin Set'; + } + + //+------------------------------- + + $ADMIN->page_detail = "You may mix n' match which skin resources you wish to apply to this skin set."; + $ADMIN->page_title = "Manage Skin Sets"; + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , $code ), + 2 => array( 'act' , 'sets' ), + 3 => array( 'id' , $IN['id'] ), + ), "theAdminForm", "onSubmit=\"return no_specialchars('sets')\"" ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( $button ); + + $ADMIN->html .= $SKIN->js_no_specialchars(); + + $ADMIN->html .= $SKIN->add_td_row( array( + "Skin Set Title", + $SKIN->form_input('sname', $row['sname']), + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( + "Use Templates:", + $SKIN->form_dropdown('template', $templates, $row['set_id']), + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( + "Use Image & Macro Set:", + $SKIN->form_dropdown('image', $images, $row['img_id']), + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( + "Use Stylesheet:", + $SKIN->form_dropdown('css', $css, $row['css_id']), + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( + "Use Wrapper:", + $SKIN->form_dropdown('wrapper', $wrappers, $row['tmpl_id']), + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( + "Basic Table Width:", + $SKIN->form_input('tbl_width', $row['tbl_width']), + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( + "Basic Table Border Colour:", + $SKIN->form_input('tbl_border', $row['tbl_border']), + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( + "Hide from Members?
Useful if you want to make a forum only skin", + $SKIN->form_yes_no('hidden', $row['hidden']), + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( + "Set as default skin set?
Used for unallocted forum and member skins", + $SKIN->form_yes_no('default_set', $row['default_set']), + ) ); + + $ADMIN->html .= $SKIN->end_form($button); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + //+------------------------------- + + $ADMIN->output(); + + + } + + //------------------------------------------------------------- + // SHOW WRAPPERS + //------------------------------------------------------------- + + function list_sets() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $form_array = array(); + + $forums = array(); + $forum_skins = array(); + + $ADMIN->page_detail = "You may add/edit and remove skin sets.

Skin sets are groups of style resources. You can mix n' match board wrappers, image and macro sets, stylesheets and skin templates. If you wish to edit any of the resources, please choose the resource you wish to manage from the menu bar on the left."; + $ADMIN->page_title = "Manage Skin Sets"; + + //+------------------------------- + + $DB->query("SELECT id, name FROM ibf_forums"); + + while ( $f = $DB->fetch_row() ) + { + $forums[ $f['id'] ] = $f['name']; + + if ($INFO['forum_skin_'.$f['id']] != "") + { + $forum_skins[ $INFO['forum_skin_'.$f['id']] ][] = $f['name']; + } + } + + + $SKIN->td_header[] = array( "Title" , "40%" ); + $SKIN->td_header[] = array( "No. Members" , "20%" ); + $SKIN->td_header[] = array( "Export" , "10%" ); + $SKIN->td_header[] = array( "Edit" , "10%" ); + $SKIN->td_header[] = array( "Remove" , "10%" ); + $SKIN->td_header[] = array( "Hidden" , "5%" ); + $SKIN->td_header[] = array( "Default" , "5%" ); + + //+------------------------------- + + $DB->query("select ibf_skins.*, count(ibf_members.id) as mcount from ibf_skins left join ibf_members on(ibf_members.skin=ibf_skins.sid) where (ibf_members.skin is not null or ibf_skins.default_set = 1) group by ibf_skins.sid order by ibf_skins.sname"); + + $used_ids = array(); + + if ( $DB->get_num_rows() ) + { + + $ADMIN->html .= $SKIN->start_table( "Current Skins Used by Members" ); + + while ( $r = $DB->fetch_row() ) + { + $extra = ""; + + if ( is_array($forum_skins[ $r['sid'] ]) ) + { + if ( count($forum_skins[ $r['sid'] ]) > 0 ) + { + $extra = "
(Used in forums: ".implode( ",", $forum_skins[ $r['sid'] ] )." )"; + } + } + + $default = ' '; + $hidden = ' '; + + if ($r['hidden'] == 1) + { + $hidden = "X"; + } + + if ($r['default_set'] == 1) + { + $default = "X"; + } + + $ADMIN->html .= $SKIN->add_td_row( array( "".stripslashes($r['sname'])."$extra", + "
".$r['mcount']."
", + "
Export
", + "
Edit
", + "
Remove
", + "
$hidden
", + "
$default
", + ) ); + + $used_ids[] = $r['uid']; + + $form_array[] = array( $r['uid'], $r['sname'] ); + + } + + $ADMIN->html .= $SKIN->end_table(); + } + + if ( count($used_ids) > 0 ) + { + + $DB->query("SELECT * FROM ibf_skins WHERE uid NOT IN(".implode(",",$used_ids).")"); + + if ( $DB->get_num_rows() ) + { + + $SKIN->td_header[] = array( "Title" , "60%" ); + $SKIN->td_header[] = array( "Export" , "10%" ); + $SKIN->td_header[] = array( "Edit" , "10%" ); + $SKIN->td_header[] = array( "Remove" , "10%" ); + $SKIN->td_header[] = array( "Hidden" , "5%" ); + $SKIN->td_header[] = array( "Default", "5%" ); + + $ADMIN->html .= $SKIN->start_table( "Skin Sets not used by Members" ); + + while ( $r = $DB->fetch_row() ) + { + + $extra = ""; + + if ( is_array($forum_skins[ $r['sid'] ]) ) + { + if ( count($forum_skins[ $r['sid'] ]) > 0 ) + { + $extra = "
(Used in forums: ".implode( ",", $forum_skins[ $r['sid'] ] )." )"; + } + } + + $default = ' '; + $hidden = ' '; + + if ($r['hidden'] == 1) + { + $hidden = "X"; + } + + if ($r['default_set'] == 1) + { + $default = "X"; + } + + $ADMIN->html .= $SKIN->js_checkdelete(); + + + $ADMIN->html .= $SKIN->add_td_row( array( "".stripslashes($r['sname'])."$extra", + "
Export
", + "
Edit
", + "
Remove
", + "
$hidden
", + "
$default
", + ) ); + + $form_array[] = array( $r['uid'], $r['sname'] ); + + } + + $ADMIN->html .= $SKIN->end_table(); + } + } + + //+------------------------------- + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'add' ), + 2 => array( 'act' , 'sets' ), + ) ); + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + $ADMIN->html .= $SKIN->start_table( "Create New Skin Set" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->add_td_row( array( "Base new skin set on..." , + $SKIN->form_dropdown( "id", $form_array) + ) ); + + $ADMIN->html .= $SKIN->end_form("Create new Skin Set"); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'memskins' ), + 2 => array( 'act' , 'sets' ), + ) ); + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + $ADMIN->html .= $SKIN->start_table( "Swop members skin choice" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->add_td_row( array( "Where members use skin...", + $SKIN->form_dropdown( "oid", $form_array) + ) ); + + $form_array[] = array( 'n', 'None (Will use whatever is set as default)' ); + + $ADMIN->html .= $SKIN->add_td_row( array( "update to use skin...", + $SKIN->form_dropdown( "nid", $form_array) + ) ); + + $ADMIN->html .= $SKIN->end_form("Update members skin choice"); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + //+------------------------------- + + $ADMIN->output(); + + } + + +} + + +?> \ No newline at end of file diff --git a/upload/sources/Admin/ad_stylesheets.php b/upload/sources/Admin/ad_stylesheets.php new file mode 100644 index 00000000..a7c57dd8 --- /dev/null +++ b/upload/sources/Admin/ad_stylesheets.php @@ -0,0 +1,502 @@ + CSS management functions +| > Module written by Matt Mecham +| > Date started: 4th April 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new ad_settings(); + + +class ad_settings { + + var $base_url; + + function ad_settings() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + switch($IN['code']) + { + case 'wrapper': + $this->list_sheets(); + break; + + case 'add': + $this->do_form('add'); + break; + + case 'edit': + $this->do_form('edit'); + break; + + case 'doadd': + $this->save_wrapper('add'); + break; + + case 'doedit': + $this->save_wrapper('edit'); + break; + + case 'remove': + $this->remove(); + break; + + case 'export': + $this->export(); + break; + + //------------------------- + default: + $this->list_sheets(); + break; + } + + } + + function export() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing CSS ID, go back and try again"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_css WHERE cssid='".$IN['id']."'"); + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + //+------------------------------- + + $archive_dir = $INFO['base_dir']."/archive_out"; + + $css_file = $INFO['base_dir']."/style_sheets/stylesheet_{$row['cssid']}.css"; + + if (!is_dir($archive_dir)) + { + $ADMIN->error("Could not locate $archive_dir, is the directory there?"); + } + + if (!is_writeable($archive_dir)) + { + $ADMIN->error("Cannot write in $archive_dir, CHMOD via FTP to 0755 or 0777 to enable this script to write into it. IBF cannot do this for you"); + } + + if (!file_exists($css_file)) + { + $ADMIN->error("Cannot locate $css_file, please ensure that the file is in the proper directory"); + } + + //+------------------------------- + // Attempt to copy the files to the + // working directory... + //+------------------------------- + + $l_name = preg_replace( "/\s{1,}/", "_", $row['css_name'] ); + + $file_name = "css-".$l_name.".css"; + + if ( ! copy($css_file, $archive_dir."/".$file_name) ) + { + $ADMIN->error("COPY FAILED ON STYLE SHEET $file_name, maybe the script has insufficient permissions?"); + } + + @chmod($archive_dir."/".$file_name, 0777); + + $ADMIN->done_screen("Style Sheet Export Created

You can download the CSS resource here", "Manage Style Sheets", "act=style" ); + + + } + + + //------------------------------------------------------------- + // REMOVE WRAPPERS + //------------------------------------------------------------- + + function remove() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + //+------------------------------- + + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing stylesheet ID, go back and try again"); + } + + $DB->query("DELETE FROM ibf_css WHERE cssid='".$IN['id']."'"); + + @unlink( $root_path."style_sheets/stylesheet_{$IN['id']}.css" ); + + $std->boink_it($SKIN->base_url."&act=style"); + + exit(); + + + } + + + + //------------------------------------------------------------- + // ADD / EDIT WRAPPERS + //------------------------------------------------------------- + + function save_wrapper( $type='add' ) + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + //+------------------------------- + + if ($type == 'edit') + { + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing CSS ID, go back and try again"); + } + + $file = $root_path."style_sheets/stylesheet_".$IN['id'].".css"; + + if ( ! is_writeable($file) ) + { + $ADMIN->error("IBF does not have permission to write to that file. Try setting the CHMOD on $file to 0777 and try again. You can do this via FTP"); + } + + } + + if ($IN['name'] == "") + { + $ADMIN->error("You must specify a name for this stylesheet"); + } + + if ($IN['css'] == "") + { + $ADMIN->error("You can't have an empty stylesheet, can you?"); + } + + $css = stripslashes($HTTP_POST_VARS['css']); + + $barney = array( 'css_name' => stripslashes($HTTP_POST_VARS['name']), + 'css_text' => $css, + ); + + if ($type == 'add') + { + $db_string = $DB->compile_db_insert_string( $barney ); + + $DB->query("INSERT INTO ibf_css (".$db_string['FIELD_NAMES'].") VALUES(".$db_string['FIELD_VALUES'].")"); + + $new_id = $DB->get_insert_id(); + + $nfile = $root_path."style_sheets/stylesheet_".$new_id.".css"; + + if ($fh = fopen( $nfile, 'w' ) ) + { + fwrite( $fh, $css, strlen($css) ); + fclose( $fh ); + + @chmod( $nfile, 0777 ); + } + else + { + $DB->query("DELETE FROM ibf_css WHERE cssid='$new_id'"); + + $ADMIN->error("Could not prepare $file for creation - please check the CHMOD value of the 'style_sheets' directory and where possible CHMOD to 0777 via FTP"); + } + + $std->boink_it($SKIN->base_url."&act=style"); + + exit(); + + } + else + { + $db_string = $DB->compile_db_update_string( $barney ); + + if ($fh = fopen( $file, 'w' ) ) + { + fwrite( $fh, $css, strlen($css) ); + fclose( $fh ); + + @chmod( $file, 0777 ); + + $DB->query("UPDATE ibf_css SET $db_string WHERE cssid='".$IN['id']."'"); + + $ADMIN->done_screen("Stylesheet updated", "Manage Style Sheets", "act=style" ); + } + else + { + + $ADMIN->error("Could not prepare $file for writing - please check the CHMOD value of the 'style_sheets' directory"); + } + + } + + + } + + //------------------------------------------------------------- + // ADD / EDIT WRAPPERS + //------------------------------------------------------------- + + function do_form( $type='add' ) + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + //+------------------------------- + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing wrapper ID, go back and try again"); + } + + //+------------------------------- + + $DB->query("SELECT cssid, css_name FROM ibf_css WHERE cssid='".$IN['id']."'"); + + if ( ! $cssinfo = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the CSS details from the database"); + } + + //+------------------------------- + + $file = $root_path."style_sheets/stylesheet_".$IN['id'].".css"; + + if ( ! file_exists($file) ) + { + $ADMIN->error("Could not load the stylesheet. No file found at $file"); + } + + if ( ! is_readable($file) ) + { + $ADMIN->error("IBF does not have permission to read from that file. Try setting the CHMOD on $file to 0777 and try again. You can do this via FTP"); + } + + //+------------------------------- + + $fh = fopen( $file, 'r' ); + $css = fread( $fh, filesize($file) ); + fclose($fh); + + if ($type == 'add') + { + $code = 'doadd'; + $button = 'Create StyleSheet'; + $cssinfo['css_name'] = $cssinfo['css_name'].".2"; + } + else + { + // Availability test + + if ( ! is_writeable($file) ) + { + $ADMIN->error("IBF does not have permission to write to that file. Try setting the CHMOD on $file to 0777 and try again. You can do this via FTP"); + } + + $code = 'doedit'; + $button = 'Edit Stylesheet'; + } + + //+------------------------------- + + $ADMIN->page_detail = "You may use CSS fully when adding or editing stylesheets."; + $ADMIN->page_title = "Manage Style Sheets"; + + //+------------------------------- + + $ADMIN->html .= $SKIN->js_no_specialchars(); + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , $code ), + 2 => array( 'act' , 'style' ), + 3 => array( 'id' , $IN['id'] ), + ), "theAdminForm", "onSubmit=\"return no_specialchars('csssheet')\"" ); + + //+------------------------------- + + $SKIN->td_header[] = array( " " , "20%" ); + $SKIN->td_header[] = array( " " , "80%" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->start_table( $button ); + + $ADMIN->html .= $SKIN->add_td_row( array( + "Stylesheet Title", + $SKIN->form_input('name', $cssinfo['css_name']), + ) ); + + $ADMIN->html .= $SKIN->add_td_row( array( + "Content", + $SKIN->form_textarea('css', $css, "70", "30"), + ) ); + + $ADMIN->html .= $SKIN->end_form($button); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + //+------------------------------- + + $ADMIN->output(); + + + } + + //------------------------------------------------------------- + // SHOW STYLE SHEETS + //------------------------------------------------------------- + + function list_sheets() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + $form_array = array(); + $show_array = array(); + + $ADMIN->page_detail = "You may add/edit and remove stylesheets.

Style Sheets are CSS files. This is where you can change the colours, fonts and font sizes throughout the board."; + $ADMIN->page_title = "Manage Stylesheets"; + + //+------------------------------- + + $SKIN->td_header[] = array( "Title" , "40%" ); + $SKIN->td_header[] = array( "Allocation" , "30%" ); + $SKIN->td_header[] = array( "Export" , "10%" ); + $SKIN->td_header[] = array( "Edit" , "10%" ); + $SKIN->td_header[] = array( "Remove" , "10%" ); + + //+------------------------------- + + $DB->query("SELECT DISTINCT(c.cssid), c.css_name, s.sname from ibf_css c, ibf_skins s WHERE s.css_id=c.cssid ORDER BY c.css_name ASC"); + + $used_ids = array(); + + if ( $DB->get_num_rows() ) + { + + $ADMIN->html .= $SKIN->start_table( "Current Stylesheets In Use" ); + + while ( $r = $DB->fetch_row() ) + { + + $show_array[ $r['cssid'] ] .= stripslashes($r['sname'])."
"; + + if ( in_array( $r['cssid'], $used_ids ) ) + { + continue; + } + + $ADMIN->html .= $SKIN->add_td_row( array( "".stripslashes($r['css_name'])."", + "<#X-{$r['cssid']}#>", + "
Export
", + "
Edit
", + "Deallocate before removing", + ) ); + + $used_ids[] = $r['cssid']; + + $form_array[] = array( $r['cssid'], $r['css_name'] ); + + } + + foreach( $show_array as $idx => $string ) + { + $string = preg_replace( "/
$/", "", $string ); + + $ADMIN->html = preg_replace( "/<#X-$idx#>/", "$string", $ADMIN->html ); + } + + $ADMIN->html .= $SKIN->end_table(); + } + + if ( count($used_ids) > 0 ) + { + + $DB->query("SELECT cssid, css_name FROM ibf_css WHERE cssid NOT IN(".implode(",",$used_ids).")"); + + if ( $DB->get_num_rows() ) + { + + $SKIN->td_header[] = array( "Title" , "70%" ); + $SKIN->td_header[] = array( "Export" , "10%" ); + $SKIN->td_header[] = array( "Edit" , "10%" ); + $SKIN->td_header[] = array( "Remove" , "10%" ); + + $ADMIN->html .= $SKIN->start_table( "Current Unallocated Stylesheets" ); + + $ADMIN->html .= $SKIN->js_checkdelete(); + + + while ( $r = $DB->fetch_row() ) + { + + $ADMIN->html .= $SKIN->add_td_row( array( "".stripslashes($r['css_name'])."", + "
Export
", + "
Edit
", + "
Remove
", + ) ); + + $form_array[] = array( $r['cssid'], $r['css_name'] ); + + } + + $ADMIN->html .= $SKIN->end_table(); + } + } + + //+------------------------------- + //+------------------------------- + + $ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'add' ), + 2 => array( 'act' , 'style' ), + ) ); + + $SKIN->td_header[] = array( " " , "40%" ); + $SKIN->td_header[] = array( " " , "60%" ); + + $ADMIN->html .= $SKIN->start_table( "Create New Stylesheet" ); + + //+------------------------------- + + $ADMIN->html .= $SKIN->add_td_row( array( "Base new stylesheet on..." , + $SKIN->form_dropdown( "id", $form_array) + ) ); + + $ADMIN->html .= $SKIN->end_form("Create new stylesheet"); + + $ADMIN->html .= $SKIN->end_table(); + + //+------------------------------- + //+------------------------------- + + $ADMIN->output(); + + } + + +} + + +?> \ No newline at end of file diff --git a/upload/sources/Admin/ad_templates.php b/upload/sources/Admin/ad_templates.php new file mode 100644 index 00000000..b84da90b --- /dev/null +++ b/upload/sources/Admin/ad_templates.php @@ -0,0 +1,1558 @@ + Skin -> Templates functions +| > Module written by Matt Mecham +| > Date started: 15th April 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + + + +$idx = new ad_settings(); + + +class ad_settings { + + var $base_url; + + function ad_settings() { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + switch($IN['code']) + { + case 'add': + $this->add_templates(); + break; + + case 'edit': + $this->do_form('edit'); + break; + + case 'edit2': + $this->show_file(); + break; + + case 'doedit': + $this->do_edit(); + break; + + case 'remove': + $this->remove(); + break; + + case 'tools': + $this->tools(); + break; + + case 'editinfo': + $this->edit_info(); + break; + + case 'export': + $this->export(); + break; + + //------------------------- + default: + $this->list_current(); + break; + } + + } + + function export() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP; + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing template set ID, go back and try again"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_tmpl_names WHERE skid='".$IN['id']."'"); + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + //+------------------------------- + + $archive_dir = $INFO['base_dir']."/archive_out"; + $templates_dir = $INFO['base_dir']."/style_templates/".$row['skid']; + + require $root_dir."sources/lib/tar.php"; + + if (!is_dir($archive_dir)) + { + $ADMIN->error("Could not locate $archive_dir, is the directory there?"); + } + + if (!is_writeable($archive_dir)) + { + $ADMIN->error("Cannot write in $archive_dir, CHMOD via FTP to 0755 or 0777 to enable this script to write into it. IBF cannot do this for you"); + } + + if (!is_dir($templates_dir)) + { + $ADMIN->error("Could not locate $templates_dir, is the directory there?"); + } + + //+------------------------------- + // Attempt to copy the files to the + // working directory... + //+------------------------------- + + $l_name = preg_replace( "/\s{1,}/", "_", $row['skname'] ); + + $new_dir = "tmpl-".$l_name; + + if ( ! $ADMIN->copy_dir($templates_dir, $archive_dir."/".$new_dir) ) + { + $ADMIN->error( $ADMIN->errors ); + } + + // Generate the config file.. + + $file_content = " \"".addslashes($row['author'])."\", ". + "'email'=>\"".addslashes($row['email'])."\", ". + "'url'=>\"".addslashes($row['url'])."\")\n\n?".">"; + + $FH = fopen($archive_dir."/".$new_dir."/"."conf.inc", 'w'); + fwrite($FH, $file_content, strlen($file_content)); + fclose($FH); + + // Add files and write tarball + + $tar = new tar(); + + $tar->new_tar( $archive_dir, $new_dir.".tar" ); + $tar->add_directory( $archive_dir."/".$new_dir ); + $tar->write_tar(); + + // Check for errors. + + if ($tar->error != "") + { + $ADMIN->error($tar->error); + } + + // remove original unarchived directory + + $ADMIN->rm_dir($archive_dir."/".$new_dir); + + $ADMIN->done_screen("Template Pack Export Created

You can download the tar-chive here", "Manage Template Sets", "act=templ" ); + + + } + + //+-------------------------------------------------------------------------------- + //+-------------------------------------------------------------------------------- + + function tools_rebuildphp() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing template set ID, go back and try again"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_tmpl_names WHERE skid='".$IN['id']."'"); + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + $templates_dir = $root_path."style_templates/".$IN['id']; + + $skin_dir = $root_path."Skin/s".$IN['id']; + + $errors = array(); + + $flag = 0; + + if (! file_exists( $root_path."style_templates/".$IN['id']."/config.php" ) ) + { + $ADMIN->error("Could not locate the template set configuration file, make sure 'config.php' resides in the templates directory you are editing. If + it is not there, you can copy one from another directory."); + } + + //+------------------------------- + + require $root_path."style_templates/".$IN['id']."/config.php"; + + //+------------------------------- + + + if ( ! is_writeable($skin_dir) ) + { + $ADMIN->error("Cannot write into '$skin_dir', please check the CHMOD value, and if needed, CHMOD to 0777 via FTP. IBF cannot do this for you."); + } + + if ( ! is_writeable($templates_dir) ) + { + $ADMIN->error("Cannot write into '$templates_dir', please check the CHMOD value, and if needed, CHMOD to 0777 via FTP. IBF cannot do this for you."); + } + + if ( is_dir($templates_dir) ) + { + if ( $handle = opendir($templates_dir) ) + { + + while (($filename = readdir($handle)) !== false) + { + if (($filename != ".") && ($filename != "..")) + { + if ( preg_match( "/^index\./", $filename ) ) + { + continue; + } + + //------------------------------------------- + + if ( preg_match( "/\.html$/", $filename ) ) + { + + $name = preg_replace( "/\.html$/", "", $filename ); + + if ( file_exists($skin_dir."/".$name.".php") ) + { + if (! is_writeable($skin_dir."/".$name.".php") ) + { + $errors[] = "Cannot write to $name".".php, skipping file..."; + continue; + } + } + + if ($FHD = fopen($templates_dir."/".$filename, 'r') ) + { + $text = fread($FHD, filesize($templates_dir."/".$filename) ); + fclose($FHD); + } + else + { + $errors[] = "Could not open $filename, skipping file..."; + continue; + } + + //---------------------------------------------------- + + $need = count($skin[$name]); + $start = 0; + $end = 0; + + if ($need < 1) + { + $errors[] = "Error recalling function data for $filename, skipping..."; + continue; + } + + // check to make sure the splitter tags are intact + + foreach($skin[$name] as $func_name => $data) + { + if ( preg_match("//", $text) ) + { + $start++; + } + + //+------------------------------- + + if ( preg_match("//", $text) ) + { + $end++; + } + } + + if ($start != $end) + { + $errors[] = "Some start or end template splitter comments are missing in $filename, skipping file...."; + continue; + } + + if ($start != $need) + { + $errors[] = "Some template splitter comments are missing in $filename, skipping file..."; + continue; + } + + //+------------------------------- + // Convert the tags back to php native + //+------------------------------- + + $text = $this->unconvert_tags($text); + + //+------------------------------- + // Start parsing the php skin file + //+------------------------------- + + $final = "<"."?php\n\n". + "class $name {\n\n"; + + foreach($skin[$name] as $func_name => $data) + { + + $top = "\n\nfunction $func_name($data) {\n". + "global \$ibforums;\n". + "return <<\s*\n/", "$top", $text); + + + //+------------------------------- + + $text = preg_replace("/\s*\s*\n/", "$bum", $text); + } + + $end = "\n\n}\n?".">"; + + $final .= $text.$end; + + if ($fh = fopen( $skin_dir."/".$name.".php", 'w' ) ) + { + fwrite($fh, $final, strlen($final) ); + fclose($fh); + } + else + { + $errors[] = "Could not save information to $phpskin, please ensure that the CHMOD permissions are correct."; + } + + $end = ""; + $final = ""; + $top = ""; + + } // if *.php + + } // if not dir + + } // while loop + + closedir($handle); + + } + else + { + $errors[] = "Could not open directory $templates_dir for reading!"; + } + } + else + { + $errors[] = "$templates_dir is not a directory, please check the \$root_path variable in admin.php"; + } + + if (count($errors > 0)) + { + $ADMIN->html .= $SKIN->start_table("Errors and warnings"); + + $ADMIN->html .= $SKIN->add_td_basic( implode("
", $errors) ); + + $ADMIN->html .= $SKIN->end_table(); + } + + $ADMIN->done_screen("Source PHP Skin files updated from the editable templates", "Manage Template sets", "act=templ" ); + + + } + + + + function edit_info() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing template set ID, go back and try again"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_tmpl_names WHERE skid='".$IN['id']."'"); + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + $final['skname'] = stripslashes($HTTP_POST_VARS['skname']); + + if (isset($HTTP_POST_VARS['author'])) + { + $final['author'] = stripslashes($HTTP_POST_VARS['author']); + $final['email'] = stripslashes($HTTP_POST_VARS['email']); + $final['url'] = stripslashes($HTTP_POST_VARS['url']); + } + + $db_string = $DB->compile_db_update_string( $final ); + + $DB->query("UPDATE ibf_tmpl_names SET $db_string WHERE skid='".$IN['id']."'"); + + $ADMIN->done_screen("Template information updated", "Manage Template sets", "act=templ" ); + + } + + //+------------------------------- + //+------------------------------- + + function do_edit() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + $text = stripslashes($HTTP_POST_VARS['template']); + + if ($IN['id'] == "") + { + $ADMIN->error("You must specify an existing template set ID, go back and try again"); + } + + //+------------------------------- + + $DB->query("SELECT * from ibf_tmpl_names WHERE skid='".$IN['id']."'"); + + if ( ! $row = $DB->fetch_row() ) + { + $ADMIN->error("Could not query the information from the database"); + } + + //+------------------------------- + + $real_name = preg_replace( "/\.html/", "", $IN['name'] ); + + //+------------------------------- + + $template = $root_path."style_templates/".$IN['id']."/".$IN['name']; + $phpskin = $root_path."Skin/s".$IN['id']."/".$real_name.".php"; + + //+------------------------------- + + if (! file_exists( $root_path."style_templates/".$IN['id']."/config.php" ) ) + { + $ADMIN->error("Could not locate the template set configuration file, make sure 'config.php' resides in the templates directory you are editing. If + it is not there, you can copy one from another directory."); + } + + //+------------------------------- + + require $root_path."style_templates/".$IN['id']."/config.php"; + + //+------------------------------- + + if ( ! is_writeable($template) ) + { + $ADMIN->error("Cannot write into '$template', please check the CHMOD value, and if needed, CHMOD to 0777 via FTP. IBF cannot do this for you."); + } + + if ( ! is_writeable($phpskin) ) + { + $ADMIN->error("Cannot write into '$phpskin', please check the CHMOD value, and if needed, CHMOD to 0777 via FTP. IBF cannot do this for you."); + } + + //+------------------------------- + // Ok, make sure we actually have + // some info to parse here. + //+------------------------------- + + if ($text == "") + { + $ADMIN->error("You can't delete the template in this manner"); + } + + //+------------------------------- + // Swop back < and > + //+------------------------------- + + $text = preg_replace("/</", "<", $text); + $text = preg_replace("/>/", ">", $text); + $text = preg_replace("/&/", "&", $text); + + //+------------------------------- + // Convert \r to nowt + //+------------------------------- + + $text = preg_replace("/\r/", "", $text); + + //+------------------------------- + // Make sure we have enough subs + // left. Check to make sure we've + // not removed and start and end tags + //+------------------------------- + + $start = 0; + $end = 0; + + $need = count($skin[$real_name]); + + // + + // check to make sure the splitter tags are intact + + foreach($skin[$real_name] as $func_name => $data) + { + if ( preg_match("//", $text) ) + { + $start++; + } + + //+------------------------------- + + if ( preg_match("//", $text) ) + { + $end++; + } + } + + if ($start != $end) + { + $ADMIN->error("Some start or end template splitter comments are missing, please go back and try again"); + } + + if ($start != $need) + { + $ADMIN->error("Some template splitter comments are missing, please go back and try again"); + } + + //+------------------------------- + // Save the template back to disk + //+------------------------------- + + if ($fh = fopen( "$template", 'w' ) ) + { + fwrite( $fh, $text, strlen($text) ); + fclose($fh); + } + else + { + $ADMIN->error("Could not save information to $template, please ensure that the CHMOD permissions are correct."); + } + + //+------------------------------- + // Convert the tags back to php native + //+------------------------------- + + $text = $this->unconvert_tags($text); + + //+------------------------------- + // Start parsing the php skin file + //+------------------------------- + + $final = "<"."?php\n\n". + "class $real_name {\n\n"; + + foreach($skin[$real_name] as $func_name => $data) + { + + $top = "\n\nfunction $func_name($data) {\n". + "global \$ibforums;\n". + "return <<\s*\n/", "$top", $text); + + + //+------------------------------- + + $text = preg_replace("/\s*\s*\n/", "$bum", $text); + } + + $end = "\n\n}\n?".">"; + + $final .= $text.$end; + + if ($fh = fopen( "$phpskin", 'w' ) ) + { + fwrite($fh, $final, strlen($final) ); + fclose($fh); + } + else + { + $ADMIN->error("Could not save information to $phpskin, please ensure that the CHMOD permissions are correct."); + } + + $ADMIN->done_screen("Template file updated", "Manage Templates in template set: {$row['skname']}", "act=templ&code=edit&id={$IN['id']}" ); + + } + + //------------------------------------------------------------------------------------ + //------------------------------------------------------------------------------------ + + function tools() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + if ($IN['id'] == "") + { + $ADMIN->error("You must choose a valid skin file to perform this operation on"); + } + + if ($IN['tool'] == 'conf') + { + $this->tools_conf(); + } + else if ($IN['tool'] == 'tmpl') + { + $this->tools_build_tmpl(); + } + else + { + $this->tools_rebuildphp(); + } + + } + + //------------------------------------------------------------------------------------ + + function tools_build_tmpl() + { + global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS; + + // Rebuilds the skin.html editable files from the PHP source files + + $templates_dir = $root_path."style_templates/".$IN['id']; + + $skin_dir = $root_path."Skin/s".$IN['id']; + + $errors = array(); + + $flag = 0; + + + if ( ! is_writeable($skin_dir) ) + { + $ADMIN->error("Cannot write into '$skin_dir', please check the CHMOD value, and if needed, CHMOD to 0777 via FTP. IBF cannot do this for you."); + } + + if ( ! is_writeable($templates_dir) ) + { + $ADMIN->error("Cannot write into '$templates_dir', please check the CHMOD value, and if needed, CHMOD to 0777 via FTP. IBF cannot do this for you."); + } + + if ( is_dir($skin_dir) ) + { + if ( $handle = opendir($skin_dir) ) + { + + while (($filename = readdir($handle)) !== false) + { + if (($filename != ".") && ($filename != "..")) + { + + if ( preg_match( "/\.php$/", $filename ) ) + { + + $name = preg_replace( "/^(\S+)\.(\S+)$/", "\\1", $filename ); + + if ( file_exists($templates_dir."/".$name.".html") ) + { + if (! is_writeable($templates_dir."/".$name.".html") ) + { + $errors[] = "Cannot write to $name".".html, skipping file..."; + } + } + + $farray = file($skin_dir."/".$filename) or die("Could not open $skin_dir/$filename for reading"); + + //$tfh = fopen($skin_dir."/".$filename , 'r') + + //---------------------------------------------------- + + $functions = array(); + + foreach($farray as $f) + { + + // Skip javascript functions... + + if ( preg_match( "/ + "; + } + + + + function js_no_specialchars() + { + return " + + "; + } + + + //+-------------------------------------------------------------------- + //+-------------------------------------------------------------------- + // FORM ELEMENTS + //+-------------------------------------------------------------------- + //+-------------------------------------------------------------------- + + function start_form($hiddens="", $name='theAdminForm', $js="") { + global $IN, $INFO; + + $form = "
+ "; + + if (is_array($hiddens)) + { + foreach ($hiddens as $k => $v) { + $form .= "\n"; + } + } + + return $form; + + } + + //+-------------------------------------------------------------------- + + function form_hidden($hiddens="") { + + if (is_array($hiddens)) + { + foreach ($hiddens as $k => $v) { + $form .= "\n"; + } + } + + return $form; + } + + + //+-------------------------------------------------------------------- + + function end_form($text = "", $js = "") + { + // If we have text, we print another row of TD elements with a submit button + + $html = ""; + $colspan = ""; + + if ($text != "") + { + if ($this->td_colspan > 0) + { + $colspan = " colspan='".$this->td_colspan."' "; + } + + $html .= "\n"; + } + + $html .= "
"; + + return $html; + + } + + //+-------------------------------------------------------------------- + + function form_input($name, $value="", $type='text', $js="") { + + if ($js != "") + { + $js = ' '.$js.' '; + } + + return ""; + + } + + //+-------------------------------------------------------------------- + + function form_textarea($name, $value="", $cols='60', $rows='5', $wrap='soft') { + + return ""; + + } + + //+-------------------------------------------------------------------- + + function form_dropdown($name, $list=array(), $default_val="", $js="") { + + if ($js != "") + { + $js = ' '.$js.' '; + } + + $html = "\n\n"; + + return $html; + + + } + + //+-------------------------------------------------------------------- + + function form_yes_no( $name, $default_val="" ) { + + $yes = "Yes   "; + $no = "   No"; + + + if ($default_val == 1) + { + $yes = "Yes   "; + } + else + { + $no = "   No"; + } + + + return $yes.'   '.$no; + + } + + //+-------------------------------------------------------------------- + + function build_group_perms( $read='*', $write='*', $reply='*' ) { + global $DB; + + + $html = " + + + + "; + + + + $html .= " + + + + + + + + \n"; + + //+------------------------------------------------------------------------- + + if ($read == '*') + { + $html .= "\n"; + } + else + { + $html .= "\n"; + } + + //+------------------------------------------------------------------------- + + if ($reply == '*') + { + $html .= "\n"; + } + else + { + $html .= "\n"; + } + + //+------------------------------------------------------------------------- + + if ($write == '*') + { + $html .= "\n"; + } + else + { + $html .= "\n"; + } + + //+------------------------------------------------------------------------- + + + $html .= " + + + + \n"; + + $DB->query("SELECT g_id, g_title FROM ibf_groups ORDER BY g_title ASC"); + + + while ( $data = $DB->fetch_row() ) + { + + $html .= " + \n"; + + if ($read == '*') + { + $html .= ""; + } + else if ( preg_match( "/(^|,)".$data['g_id']."(,|$)/", $read ) ) + { + $html .= ""; + } + else + { + $html .= ""; + } + + //+---------------------------------------------------------------------------------------- + + if ($reply == '*') + { + $html .= ""; + } + else if ( preg_match( "/(?:^|,)".$data['g_id']."(?:,|$)/", $reply ) ) + { + $html .= ""; + } + else + { + $html .= ""; + } + + //+---------------------------------------------------------------------------------------- + + if ($write == '*') + { + $html .= ""; + } + else if ( preg_match( "/(?:^|,)".$data['g_id']."(?:,|$)/", $write ) ) + { + $html .= ""; + } + else + { + $html .= ""; + } + + $html .= "\n\n"; + } + + $html .= "
Member GroupRead TopicsReply to TopicsStart Topics
ALL MEMBER GROUPS
(current and future)

OR adjust the member groups individually below
 
{$data['g_title']}Read Read Read Reply Reply Reply Start Start Start 
 
\n\n"; + + return $html; + + } + + + //+-------------------------------------------------------------------- + //+-------------------------------------------------------------------- + // SCREEN ELEMENTS + //+-------------------------------------------------------------------- + //+-------------------------------------------------------------------- + + function add_subtitle($title="",$id="subtitle", $colspan="") { + + if ($colspan != "") + { + $colspan = " colspan='$colspan' "; + } + + return "\n$title\n"; + + } + + //+-------------------------------------------------------------------- + + function start_table( $title="") { + + + if ($title != "") + { + $this->has_title = 1; + $html .= " + • $title + + + + "; + } + + + + $html .= " +
+ + +
+ "; + + + if (isset($this->td_header[0])) + { + $html .= "\n"; + + foreach ($this->td_header as $td) + { + if ($td[1] != "") + { + $width = " width='{$td[1]}' "; + } + else + { + $width = ""; + } + + $html .= "\n"; + + $this->td_colspan++; + } + + $html.= "\n"; + } + + return $html; + + } + + //+-------------------------------------------------------------------- + + + function add_td_row( $array, $css="" ) { + + if (is_array($array)) + { + $html = "\n"; + + $count = count($array); + + $this->td_colspan = $count; + + for ($i = 0; $i < $count ; $i++ ) + { + + $td_col = $i % 2 ? 'tdrow2' : 'tdrow1'; + + if ($css != "") + { + $td_col = $css; + } + + if (is_array($array[$i])) + { + $text = $array[$i][0]; + $colspan = $array[$i][1]; + + $html .= "\n"; + } + else + { + $html .= "\n"; + } + } + + $html .= "\n"; + + return $html; + } + + } + + //+-------------------------------------------------------------------- + + function add_td_basic($text="",$align="left",$id="tdrow1") { + + $html = ""; + $colspan = ""; + + if ($text != "") + { + if ($this->td_colspan > 0) + { + $colspan = " colspan='".$this->td_colspan."' "; + } + + + $html .= "\n"; + } + + return $html; + + } + + //+-------------------------------------------------------------------- + + function add_td_spacer() { + + if ($this->td_colspan > 0) + { + $colspan = " colspan='".$this->td_colspan."' "; + } + + return ""; + + } + + + + //+-------------------------------------------------------------------- + + function end_table() { + + $this->td_header = array(); // Reset TD headers + + if ($this->has_title == 1) + { + $this->has_title = 0; + + return "
{$td[0]}
".$text."".$array[$i]."
$text
"; + } + else + { + return ""; + } + + } + + + //+-------------------------------------------------------------------- + + + + + + //+-------------------------------------------------------------------- + //+-------------------------------------------------------------------- + + + + function print_top($title="",$desc="") { + + return " + Menu + + + + + + + + + + + +
+ + + + + + + +
Invision Board Administration
+ + + + + + "; + + } + + //+-------------------------------------------------------------------- + + function print_foot() { + + return " + +
$title
$desc
 
+
+
© 2002 Invision Board (www.invisionboard.com)
+ + "; + } + + + //+-------------------------------------------------------------------- + + + + + //{ background-color:#C2CFDF; font-weight:bold; font-size:12px; color:#000055 } + + + function menu_top() { + global $INFO; + + return " + Menu + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + +
Administration Menu
+
+ + Expand All | Reduce All +
+ ACP Home | Board Home +
+ + + + +
"; + + } + + //+-------------------------------------------------------------------- + + function menu_foot() { + + return "
+
+
+ + "; + } + + + //+-------------------------------------------------------------------- + + + function menu_cat_expanded($name="", $links="", $id = "") { + global $IN; + + return " + + + + + $links +
+ + + + + +
  Collapse Category  $name
+
+
"; + + + } + + //+-------------------------------------------------------------------- + + + function menu_cat_collapsed($name="", $id = "", $desc="") { + global $IN; + + return " + + + + + + +
+ + + + + +
  Expand Category  $name
+
$desc
+
"; + + } + + //+-------------------------------------------------------------------- + + function menu_cat_link($url="", $name="") { + + return "   $name"; + + } + + + //+-------------------------------------------------------------------- + + function frame_set() { + global $IN, $ibforums; + + $frames = " + Invision Board Administration Center + + + + + + + + "; + + return $frames; + + } + + +} + + + + + + +?> \ No newline at end of file diff --git a/upload/sources/Boards.php b/upload/sources/Boards.php new file mode 100644 index 00000000..c496e74f --- /dev/null +++ b/upload/sources/Boards.php @@ -0,0 +1,708 @@ + Board index module +| > Module written by Matt Mecham +| > Date started: 17th February 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new Boards; + +class Boards { + + var $output = ""; + var $base_url = ""; + var $html = ""; + var $output = ""; + var $forums = array(); + var $mods = array(); + var $cats = array(); + var $children = array(); + var $nav; + + var $news_topic_id = ""; + var $news_forum_id = ""; + var $news_title = ""; + + function Boards() { + global $ibforums, $DB, $std, $print, $skin_universal; + + require "./Skin/".$ibforums->skin_id."/skin_boards.php"; + + $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; + + // Get more words for this invocation! + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_boards', $ibforums->lang_id); + + $this->html = new skin_boards(); + + if (! $ibforums->member['id'] ) + { + $ibforums->input['last_visit'] = time(); + } + + $this->output .= $this->html->PageTop( $std->get_date( $ibforums->input['last_visit'], 'LONG' ) ); + + // Get the forums and category info from the DB + + $last_c_id = -1; + + $DB->query("SELECT f.*, c.id as cat_id, c.position as cat_position, c.state as cat_state, c.name as cat_name, c.description as cat_desc, ". + "c.image, c.url from ibf_forums f, ibf_categories c order by c.position, f.position"); + + + while ( $r = $DB->fetch_row() ) + { + if ($last_c_id != $r['cat_id']) + { + $this->cats[ $r['cat_id'] ] = array( 'id' => $r['cat_id'], + 'position' => $r['cat_position'], + 'state' => $r['cat_state'], + 'name' => $r['cat_name'], + 'description' => $r['cat_desc'], + 'image' => $r['image'], + 'url' => $r['url'], + ); + + $last_c_id = $r['cat_id']; + } + + if ($r['parent_id'] > 0) + { + $this->children[ $r['parent_id'] ][$r['id']] = $r; + } + else + { + $this->forums[ $r['id'] ] = $r; + } + } + + $DB->query("SELECT forum_id, member_name, member_id FROM ibf_moderators"); + + while ( $mod = $DB->fetch_row() ) + { + $this->mods[ $mod['forum_id'] ][] = array( 'name' => $mod['member_name'], + 'id' => $mod['member_id'], + ); + } + + //----------------------------------- + // What are we doing? + //----------------------------------- + + if ($ibforums->input['c'] != "") + { + $this->show_single_cat(); + $this->nav[] = $this->cats[ $ibforums->input['c'] ]['name']; + } + else if ($ibforums->input['sub'] == 1) + { + $this->show_subforum(); + $this->nav[] = $this->forums[ $ibforums->input['f'] ]['name']; + } + else + { + $this->process_all_cats(); + } + + //*********************************************/ + // Add in show online users + //*********************************************/ + + $active = array( 'TOTAL' => 0 , + 'NAMES' => "", + 'GUESTS' => 0 , + 'MEMBERS' => 0 , + 'ANON' => 0 , + ); + + $stats_html = ""; + + if ($ibforums->vars['show_active']) + { + + // Get the users from the DB + + $time = time() - 900; + + $DB->query("SELECT s.member_id, s.member_name, s.login_type, g.suffix, g.prefix FROM ibf_sessions s, ibf_groups g WHERE running_time > '$time' AND g.g_id=s.member_group ORDER BY running_time DESC"); + + // cache all printed members so we don't double print them + $cached = array(); + while ($result = $DB->fetch_row() ) + { + if ($result['member_id'] == 0) + { + $active['GUESTS']++; + } + else + { + if (empty( $cached[ $result['member_id'] ] ) ) + { + $cached[ $result['member_id'] ] = 1; + if ($result['login_type'] == 1) + { + $active['ANON']++; + } + else + { + $active['MEMBERS']++; + $active['NAMES'] .= " >vars['php_ext']}?s={$ibforums->session_id}&act=Profile&MID={$result['member_id']}'>{$result['prefix']}{$result['member_name']}{$result['suffix']}"; + } + } + + } + } + + $active['TOTAL'] = $active['MEMBERS'] + $active['GUESTS'] + $active['ANON']; + + // Show a link? + + if ($ibforums->vars['allow_online_list']) + { + $active['LINK'] = '[ '."".$ibforums->lang['browser_user_list']."".' ]'; + } + + $stats_html .= $this->html->ActiveUsers($active); + + + //----------------------------------------------- + // Are we viewing the calendar? + //----------------------------------------------- + + if ($ibforums->vars['show_birthdays']) + { + + $user_time = time() + ($ibforums->vars['TIME_ZONE'] * 3600) + ($ibforums->member['TIME_ADJUST'] * 3600 ); + + $date = getdate($user_time); + + $day = $date['mday']; + $month = $date['mon']; + $year = $date['year']; + + $birthstring = ""; + $count = 0; + + $DB->query("SELECT id, name, bday_day as DAY, bday_month as MONTH, bday_year as YEAR from ibf_members WHERE bday_day='$day' and bday_month='$month'"); + + while ($user = $DB->fetch_row()) + { + $birthstring .= ">{$user['name']} "; + if ($user['YEAR']) + { + $pyear = $year - $user['YEAR']; // $year = 2002 and $user['YEAR'] = 1976 + $birthstring .= "($pyear) "; + } + $count++; + } + + $lang = $ibforums->lang['no_birth_users']; + + if ($count > 0) { + $lang = ($count > 1) ? $ibforums->lang['birth_users'] : $ibforums->lang['birth_user']; + } + else + { + $count = ""; + } + + $stats_html .= $this->html->birthdays( $birthstring, $count, $lang ); + } + + } + + //*********************************************/ + // Add in show stats + //*********************************************/ + + + if ($ibforums->vars['show_totals']) + { + + $DB->query("SELECT * FROM ibf_stats"); + $stats = $DB->fetch_row(); + + // Update the most active count if needed + + if ($active['TOTAL'] > $stats['MOST_COUNT']) + { + $DB->query("UPDATE ibf_stats SET MOST_DATE='".time()."', MOST_COUNT='".$active[TOTAL]."'"); + $stats['MOST_COUNT'] = $active[TOTAL]; + $stats['MOST_DATE'] = time(); + } + + $most_time = $std->get_date( $stats['MOST_DATE'], 'LONG' ); + + $ibforums->lang['most_online'] = preg_replace( "/<#NUM#>/" , $stats['MOST_COUNT'] , $ibforums->lang['most_online'] ); + $ibforums->lang['most_online'] = preg_replace( "/<#DATE#>/", $most_time , $ibforums->lang['most_online'] ); + + $total_posts = $stats['TOTAL_REPLIES']+$stats['TOTAL_TOPICS']; + + $ibforums->lang['total_word_string'] = preg_replace( "/<#posts#>/" , "$total_posts" , $ibforums->lang['total_word_string'] ); + $ibforums->lang['total_word_string'] = preg_replace( "/<#reg#>/" , $stats['MEM_COUNT'] , $ibforums->lang['total_word_string'] ); + $ibforums->lang['total_word_string'] = preg_replace( "/<#mem#>/" , $stats['LAST_MEM_NAME'] , $ibforums->lang['total_word_string'] ); + + $stats_html .= $this->html->ShowStats($ibforums->lang['total_word_string']); + + } + + if ($stats_html != "") + { + $this->output .= $this->html->stats_header(); + $this->output .= $stats_html; + $this->output .= $this->html->stats_footer(); + } + + + // Add in board info footer + $this->output .= $this->html->BoardInformation(); + + // Check for news forum. + + if ($this->news_title and $this->news_topic_id and $this->news_forum_id) + { + $t_html = $this->html->newslink( $this->news_forum_id, stripslashes($this->news_title) , $this->news_topic_id); + $this->output = preg_replace( "//" , "$t_html" , $this->output ); + } + + $print->add_output("$this->output"); + $print->do_output( array( 'TITLE' => $ibforums->vars['board_name']." (Powered by Invision Board)", 'JS' => 0, 'NAV' => $this->nav ) ); + + } + + //*********************************************/ + // + // SHOW A SUB FORUM + // + //*********************************************/ + + function show_subforum() { + + global $std, $DB, $ibforums; + + $fid = $ibforums->input['f']; + + if (!is_array( $this->forums[ $fid ] ) ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) ); + } + + if ( (isset($this->children[ $fid ])) and (count($this->children[ $fid ]) > 0 ) ) + { + foreach ($this->children[ $fid ] as $idx => $data) + { + $temp_html .= $this->process_forum($data['id'], $data); + } + } + else + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) ); + } + + if ($temp_html != "") + { + $this->output .= $this->html->subheader(); + $this->output .= $temp_html; + $this->output .= $this->html->end_this_cat(); + } + else + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) ); + } + unset($temp_html); + + $this->output .= $this->html->end_all_cats(); + } + + + //*********************************************/ + // + // PROCESS ALL CATEGORIES + // + //*********************************************/ + + function process_all_cats() { + + global $std, $DB, $ibforums; + + foreach ($this->cats as $cat_id => $cat_data) + { + + //---------------------------- + // Is this category turned on? + //---------------------------- + + if (! $cat_data['state'] ) + { + continue; + } + + foreach ($this->forums as $forum_id => $forum_data) + { + if ($forum_data['category'] == $cat_id) + { + //----------------------------------- + // We store the HTML in a temp var so + // we can make sure we have cats for + // this forum, or hidden forums with a + // cat will show the cat strip - we don't + // want that, no - we don't. + //----------------------------------- + + $temp_html .= $this->process_forum($forum_id, $forum_data); + } + } + + if ($temp_html != "") + { + $this->output .= $this->html->CatHeader_Expanded($cat_data); + $this->output .= $temp_html; + $this->output .= $this->html->end_this_cat(); + } + + unset($temp_html); + } + + $this->output .= $this->html->end_all_cats(); + + } + + + //*********************************************/ + // + // SHOW A SINGLE CATEGORY + // + //*********************************************/ + + function show_single_cat() { + + global $std, $DB, $ibforums; + + $cat_id = $ibforums->input['c']; + + if (!is_array( $this->cats[ $cat_id ] ) ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) ); + } + + $cat_data = $this->cats[ $cat_id ]; + + //---------------------------- + // Is this category turned on? + //---------------------------- + + if (! $cat_data['state'] ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) ); + } + + foreach ($this->forums as $forum_id => $forum_data) + { + if ($forum_data['category'] == $cat_id) + { + //----------------------------------- + // We store the HTML in a temp var so + // we can make sure we have cats for + // this forum, or hidden forums with a + // cat will show the cat strip - we don't + // want that, no - we don't. + //----------------------------------- + + $temp_html .= $this->process_forum($forum_id, $forum_data); + } + } + + if ($temp_html != "") + { + $this->output .= $this->html->CatHeader_Expanded($cat_data); + $this->output .= $temp_html; + $this->output .= $this->html->end_this_cat(); + } + else + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) ); + } + unset($temp_html); + + $this->output .= $this->html->end_all_cats(); + } + + //*********************************************/ + // + // RENDER A FORUM + // + //*********************************************/ + + function process_forum($forum_id="", $forum_data="") + { + global $std, $ibforums; + + + if ($forum_data['subwrap'] == 1) + { + + $printed_children = 0; + + //-------------------------------------- + // This is a sub cat forum... + //-------------------------------------- + + // Do we have any sub forums here? + + if ( (isset($this->children[ $forum_data['id'] ])) and (count($this->children[ $forum_data['id'] ]) > 0 ) ) + { + + $newest = array(); + + foreach($this->children[ $forum_data['id'] ] as $idx => $data) + { + //-------------------------------------- + // Check permissions... + //-------------------------------------- + + if ($data['read_perms'] != '*') + { + if ( ! preg_match( "/(^|,)".$ibforums->member['mgroup']."(,|$)/", $data['read_perms'] ) ) + { + continue; + } + } + + // Do the news stuff first + + if (isset($data['last_title']) and $data['last_id'] != "") + { + + if ( ( $ibforums->vars['index_news_link'] == 1 ) and (! empty($ibforums->vars['news_forum_id']) ) and ($ibforums->vars['news_forum_id'] == $data['id']) ) + { + + $this->news_topic_id = $data['last_id']; + $this->news_forum_id = $data['id']; + $this->news_title = $data['last_title']; + + } + + } + + if ($data['last_post'] > $newest['last_post']) + { + + $newest['last_post'] = $data['last_post']; + $newest['fid'] = $data['id']; + + if (strlen($data['last_title']) > 30) + { + $data['last_title'] = str_replace( "!" , "!", $data['last_title'] ); + $data['last_title'] = str_replace( """, "\"", $data['last_title'] ); + $data['last_title'] = substr($data['last_title'],0,27) . "..."; + $data['last_title'] = preg_replace( '/&(#(\d+;?)?)?\.\.\.$/', '...', $data['last_title'] ); + } + if ($data['password'] != "") + { + $newest['last_topic'] = $ibforums->lang['f_protected']; + } + else + { + $newest['last_topic'] = "vars['php_ext']}?s={$ibforums->session_id}&act=ST&f={$data['id']}&t={$data['last_id']}&view=getlastpost'>{$data['last_title']}"; + } + + if ( isset($data['last_poster_name'])) + { + $newest['last_poster'] = $data['last_poster_id'] ? "vars['php_ext']}?s={$ibforums->session_id}&act=Profile&CODE=03&MID={$data['last_poster_id']}'>{$data['last_poster_name']}" + : $data['last_poster_name']; + } + + } + + $newest['posts'] += $data['posts']; + $newest['topics'] += $data['topics']; + $newest['status'] = $data['status']; + + $printed_children++; + + } + + if ($printed_children < 1) + { + // If we don't have permission to view any forums + // then simply return and the row won't be printed + + return ""; + + } + + // Fix up the last of the data + + $newest['img_new_post'] = $this->new_posts($newest, 1); + + $newest['last_post'] = $std->get_date($newest['last_post'], 'LONG'); + + $newest['last_topic'] = $newest['last_topic'] ? $newest['last_topic'] : $ibforums->lang['f_none']; + + $newest['last_poster'] = $newest['last_poster'] ? $newest['last_poster'] : $ibforums->lang['f_none']; + + foreach($newest as $k => $v) + { + $forum_data[$k] = $v; + } + + return $this->html->ForumRow($forum_data); + + } + else + { + return ""; + } + + } + else + { + + //-------------------------------------- + // Check permissions... + //-------------------------------------- + + if ($forum_data['read_perms'] != '*') + { + if ( ! preg_match( "/(^|,)".$ibforums->member['mgroup']."(,|$)/", $forum_data['read_perms'] ) ) + { + return ""; + } + } + + $forum_data['img_new_post'] = $this->new_posts($forum_data); + + $forum_data['last_post'] = $std->get_date($forum_data['last_post'], 'LONG'); + + $forum_data['last_topic'] = $ibforums->lang['f_none']; + + if (isset($forum_data['last_title']) and $forum_data['last_id'] != "") + { + + if ( ( $ibforums->vars['index_news_link'] == 1 ) and (! empty($ibforums->vars['news_forum_id']) ) and ($ibforums->vars['news_forum_id'] == $forum_data['id']) ) + { + + $this->news_topic_id = $forum_data['last_id']; + $this->news_forum_id = $forum_data['id']; + $this->news_title = $forum_data['last_title']; + + } + + $forum_data['last_title'] = str_replace( "!" , "!", $forum_data['last_title'] ); + $forum_data['last_title'] = str_replace( """, "\"", $forum_data['last_title'] ); + + + if (strlen($forum_data['last_title']) > 30) + { + $forum_data['last_title'] = substr($forum_data['last_title'],0,27) . "..."; + $forum_data['last_title'] = preg_replace( '/&(#(\d+;?)?)?\.\.\.$/', '...', $forum_data['last_title'] ); + } + + if ($forum_data['password'] != "") + { + $forum_data['last_topic'] = $ibforums->lang['f_protected']; + } + else + { + $forum_data['last_topic'] = "vars['php_ext']}?s={$ibforums->session_id}&act=ST&f={$forum_data['id']}&t={$forum_data['last_id']}&view=getlastpost'>{$forum_data['last_title']}"; + } + } + + if ( isset($forum_data['last_poster_name'])) + { + $forum_data['last_poster'] = $forum_data['last_poster_id'] ? "vars['php_ext']}?s={$ibforums->session_id}&act=Profile&CODE=03&MID={$forum_data['last_poster_id']}'>{$forum_data['last_poster_name']}" + : $forum_data['last_poster_name']; + } + else + { + $forum_data['last_poster'] = $ibforums->lang['f_none']; + } + + //--------------------------------- + // Moderators + //--------------------------------- + + $forum_data['moderator'] = ""; + + if (isset($this->mods[ $forum_data['id'] ] ) ) + { + $forum_data['moderator'] = $ibforums->lang['forum_leader'].' '; + + if (is_array($this->mods[ $forum_data['id'] ]) ) + { + foreach ($this->mods[ $forum_data['id'] ] as $moderator) + { + $forum_data['moderator'] .= "vars['php_ext']}?s={$ibforums->session_id}&act=Profile&CODE=03&MID={$moderator['id']}'>{$moderator['name']}, "; + } + $forum_data['moderator'] = preg_replace( "!,\s+$!", "", $forum_data['moderator'] ); + } + else + { + $forum_data['moderator'] .= "vars['php_ext']}?s={$ibforums->session_id}&act=Profile&CODE=03&MID={$this->mods[$forum_data['id']]['id']}'>{$this->mods[$forum_data['id']]['name']}"; + } + } + + + return $this->html->ForumRow($forum_data); + + } + + } + + + function new_posts($forum_data, $sub=0) { + global $ibforums, $std; + + $rtime = $ibforums->input['last_visit']; + + $fid = $forum_data['fid'] == "" ? $forum_data['id'] : $forum_data['fid']; + + if ( $ftime = $std->my_getcookie('fread_'.$fid ) ) + { + $rtime = $ftime > $rtime ? $ftime : $rtime; + } + + if ($sub == 0) + { + if ( ! $forum_data['status'] ) + { + return $ibforums->skin['C_LOCKED']; + } + + $sub_cat_img = ''; + } + else + { + $sub_cat_img = '_CAT'; + } + + if ($forum_data['password'] and $sub == 0) + { + return $forum_data['last_post'] > $rtime ? $ibforums->skin['C_ON_RES'] + : $ibforums->skin['C_OFF_RES']; + } + + return $forum_data['last_post'] > $rtime ? $ibforums->skin['C_ON'.$sub_cat_img] + : $ibforums->skin['C_OFF'.$sub_cat_img]; + } + +} + +?> diff --git a/upload/sources/Drivers/mySQL.php b/upload/sources/Drivers/mySQL.php new file mode 100644 index 00000000..3f862249 --- /dev/null +++ b/upload/sources/Drivers/mySQL.php @@ -0,0 +1,244 @@ + mySQL DB abstraction module +| > Module written by Matt Mecham +| > Date started: 14th February 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + + +class db_driver { + + var $obj = array ( "sql_database" => "" , + "sql_user" => "root" , + "sql_pass" => "" , + "sql_host" => "localhost", + "sql_port" => "" , + "persistent" => "0" , + "sql_tbl_prefix" => "ibf_" , + "cached_queries" => array(), + ); + + var $query_id = ""; + var $connection_id = ""; + var $query_count = 0; + var $record_row = array(); + + /*========================================================================*/ + // Connect to the database + /*========================================================================*/ + + function connect() { + + if ($this->obj['persistent']) + { + $this->connection_id = mysql_pconnect( $this->obj['sql_host'] , + $this->obj['sql_user'] , + $this->obj['sql_pass'] + ); + } + else + { + $this->connection_id = mysql_connect( $this->obj['sql_host'] , + $this->obj['sql_user'] , + $this->obj['sql_pass'] + ); + } + + if ( !mysql_select_db($this->obj['sql_database'], $this->connection_id) ) + { + echo ("ERROR: Cannot find database ".$this->obj['sql_database']); + } + } + + + + /*========================================================================*/ + // Process a query + /*========================================================================*/ + + function query($the_query) { + + //-------------------------------------- + // Change the table prefix if needed + //-------------------------------------- + + if ($this->obj['sql_tbl_prefix'] != "ibf_") + { + $the_query = preg_replace("/ibf_(\S+?)([\s\.,]|$)/", $this->obj['sql_tbl_prefix']."\\1\\2", $the_query); + } + + $this->query_id = mysql_query($the_query, $this->connection_id); + + if (! $this->query_id ) + { + $this->fatal_error("mySQL query error: $the_query"); + } + + $this->query_count++; + + $this->obj['cached_queries'][] = $the_query; + + return $this->query_id; + } + + + /*========================================================================*/ + // Fetch a row based on the last query + /*========================================================================*/ + + function fetch_row($query_id = "") { + + if ($query_id == "") + { + $query_id = $this->query_id; + } + + $this->record_row = mysql_fetch_array($query_id, MYSQL_ASSOC); + + return $this->record_row; + + } + + /*========================================================================*/ + // Fetch the number of rows affected by the last query + /*========================================================================*/ + + function get_affected_rows() { + return mysql_affected_rows($this->connection_id); + } + + /*========================================================================*/ + // Fetch the number of rows in a result set + /*========================================================================*/ + + function get_num_rows() { + return mysql_num_rows($this->query_id); + } + + /*========================================================================*/ + // Fetch the last insert id from an sql autoincrement + /*========================================================================*/ + + function get_insert_id() { + return mysql_insert_id($this->connection_id); + } + + /*========================================================================*/ + // Return the amount of queries used + /*========================================================================*/ + + function get_query_cnt() { + return $this->query_count; + } + + /*========================================================================*/ + // Free the result set from mySQLs memory + /*========================================================================*/ + + function free_result($query_id="") { + + if ($query_id == "") { + $query_id = $this->query_id; + } + + @mysql_free_result($query_id); + } + + /*========================================================================*/ + // Shut down the database + /*========================================================================*/ + + function close_db() { + return mysql_close($this->connection_id); + } + + /*========================================================================*/ + // Basic error handler + /*========================================================================*/ + + function fatal_error($the_error) { + global $INFO; + + $the_error .= "\n\nmySQL error: ".mysql_error()."\n"; + $the_error .= "mySQL error code: ".mysql_errno()."\n"; + $the_error .= "Date: ".date("l dS of F Y h:i:s A"); + + $out = "Invision Board Database Error + +  

There appears to be an error with the {$INFO['board_name']} database.
+ You can try to refresh the page by clicking here, if this + does not fix the error, you can contact the board administrator by clicking here +

Error Returned
+

We apologise for any inconvenience
"; + + + echo($out); + die(""); + } + + /*========================================================================*/ + // Create an array from a multidimensional array returning formatted + // strings ready to use in an INSERT query, saves having to manually format + // the (INSERT INTO table) ('field', 'field', 'field') VALUES ('val', 'val') + /*========================================================================*/ + + function compile_db_insert_string($data) { + + $field_names = ""; + $field_values = ""; + + foreach ($data as $k => $v) { + $v = preg_replace( "/'/", "\\'", $v ); + $field_names .= "$k,"; + $field_values .= "'$v',"; + } + + $field_names = preg_replace( "/,$/" , "" , $field_names ); + $field_values = preg_replace( "/,$/" , "" , $field_values ); + + return array( 'FIELD_NAMES' => $field_names, + 'FIELD_VALUES' => $field_values, + ); + } + + /*========================================================================*/ + // Create an array from a multidimensional array returning a formatted + // string ready to use in an UPDATE query, saves having to manually format + // the FIELD='val', FIELD='val', FIELD='val' + /*========================================================================*/ + + function compile_db_update_string($data) { + + $return_string = ""; + + foreach ($data as $k => $v) { + $v = preg_replace( "/'/", "\\'", $v ); + $return_string .= $k . "='".$v."',"; + } + + $return_string = preg_replace( "/,$/" , "" , $return_string ); + + return $return_string; + } + +} // end class + + +?> \ No newline at end of file diff --git a/upload/sources/Forums.php b/upload/sources/Forums.php new file mode 100644 index 00000000..c73048f9 --- /dev/null +++ b/upload/sources/Forums.php @@ -0,0 +1,653 @@ + Forum topic index module +| > Module written by Matt Mecham +| > Date started: 14th February 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new Forums; + +class Forums { + + var $output = ""; + var $base_url = ""; + var $html = ""; + var $moderator = array(); + var $forum = array(); + var $show_dots = ""; + var $nav_extra = ""; + var $read_array = array(); + + //+---------------------------------------------------------------- + // + // Our constructor, load words, load skin, get DB forum/cat data + // + //+---------------------------------------------------------------- + + function Forums() { + global $ibforums, $DB, $std, $print, $skin_universal; + + require "./Skin/".$ibforums->skin_id."/skin_forum.php"; + + $ibforums->input['f'] = intval($ibforums->input['f']); + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_forum', $ibforums->lang_id); + + $this->html = new skin_forum(); + + + + // Get the forum info based on the forum ID, and get the category name, ID, etc. + + $DB->query("SELECT f.*, c.id as cat_id, c.name as cat_name from ibf_forums f, ibf_categories c WHERE f.id=".$ibforums->input['f']." and c.id=f.category"); + + $this->forum = $DB->fetch_row(); + + //---------------------------------------- + // Error out if we can not find the forum + //---------------------------------------- + + if (!$this->forum['id']) + { + $std->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + + //---------------------------------------- + // If this is a sub forum, we need to get + // the cat details, and parent details + //---------------------------------------- + + if ($this->forum['parent_id'] > 0) + { + + $DB->query("SELECT f.id as forum_id, f.name as forum_name, c.id, c.name FROM ibf_forums f, ibf_categories c WHERE f.id='".$this->forum['parent_id']."' AND c.id=f.category"); + + $row = $DB->fetch_row(); + + $this->forum['cat_id'] = $row['id']; + $this->forum['cat_name'] = $row['name']; + + $this->nav_extra = "{$row['forum_name']}"; + } + + //---------------------------------------- + // + // If this is a sub forum, bounce back. + // + //---------------------------------------- + + if ($this->forum['subwrap'] == 1) + { + $std->boink_it($ibforums->base_url."&sub=1&f=".$this->forum['id']); + exit(); + } + + //-------------------------------------------------------------------------------- + //-------------------------------------------------------------------------------- + + $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; + + $this->forum['FORUM_JUMP'] = $std->build_forum_jump(); + $this->forum['FORUM_JUMP'] = preg_replace( "!#Forum Jump#!", $ibforums->lang['forum_jump'], $this->forum['FORUM_JUMP']); + + + + // Are we viewing the forum, or viewing the forum rules? + + if ($ibforums->input['act'] == 'SR') + { + $this->show_rules(); + } else { + $this->show_forum(); + } + + } + + //+---------------------------------------------------------------- + // + // Show the forum rules on a seperate page + // + //+---------------------------------------------------------------- + + function show_rules() { + global $DB, $ibforums, $std, $print; + + //+-------------------------------------------- + // Do we have permission to view these rules? + //+-------------------------------------------- + + $bad_entry = $this->check_access(); + + if ($bad_entry == 1) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_view_topic') ); + } + + //+-------------------------------------------- + // Get the rules from the DB + //+-------------------------------------------- + + $DB->query("SELECT * FROM ibf_rules WHERE fid='".$ibforums->input['f']."'"); + + if ( $rules = $DB->fetch_row() ) + { + $rules['title'] = stripslashes($rules['title']); + $rules['body'] = stripslashes($rules['body']); + + $this->output .= $this->html->show_rules($rules); + + $print->add_output("$this->output"); + $print->do_output( array( 'TITLE' => "IBForums -> ".$this->forum['name'], + 'JS' => 0, + 'NAV' => array( + "{$this->forum['cat_name']}", + ), + ) ); + } + else + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_view_topic') ); + } + } + + //+---------------------------------------------------------------- + // + // Forum view check for authentication + // + //+---------------------------------------------------------------- + + function show_forum() { + global $ibforums; + // are we checking for user authentication via the log in form + // for a private forum w/password protection? + + $ibforums->input['L'] == 1 ? $this->authenticate_user() : $this->render_forum(); + } + + //+---------------------------------------------------------------- + // + // Authenicate the log in for a password protected forum + // + //+---------------------------------------------------------------- + + function authenticate_user() { + global $std, $ibforums, $print; + + if ($ibforums->input['f_password'] == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'pass_blank' ) ); + } + + if ($ibforums->input['f_password'] != $this->forum['password']) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'wrong_pass' ) ); + } + + $std->my_setcookie( "iBForum".$this->forum['id'], $ibforums->input['f_password'] ); + + $print->redirect_screen( $ibforums->lang['logged_in'] , "act=SF&f=".$this->forum['id'] ); + + } + + //+---------------------------------------------------------------------------------- + + function check_access() { + global $ibforums, $HTTP_COOKIE_VARS; + + $return = 1; + + if ($this->forum['read_perms'] == '*') + { + $return = 0; + } + else if (preg_match( "/(^|,)".$ibforums->member['mgroup']."(,|$)/", $this->forum['read_perms'] ) ) + { + $return = 0; + } + + if ($this->forum['password']) + { + if ($HTTP_COOKIE_VARS[ $ibforums->vars['cookie_id'].'iBForum'.$this->forum['id'] ] == $this->forum['password']) + { + $return = 0; + } + else + { + $this->forum_login(); + } + } + + return $return; + + } + + //+---------------------------------------------------------------------------------- + + function forum_login() { + global $ibforums, $std, $DB, $HTTP_COOKIE_VARS, $print; + + if (empty($ibforums->member['id'])) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_guests' ) ); + } + + $this->output = $this->html->Forum_log_in( $this->forum['id'] ); + + $print->add_output("$this->output"); + + $print->do_output( array( 'TITLE' => $ibforums->vars['board_name']." -> ".$this->forum['name'], + 'JS' => 0, + 'NAV' => array( + "{$this->forum['cat_name']}", + "{$this->forum['name']}", + ), + ) ); + + } + + //+---------------------------------------------------------------- + // + // Main render forum engine + // + //+---------------------------------------------------------------- + + function render_forum() { + global $ibforums, $DB, $std, $print, $HTTP_COOKIE_VARS; + + $bad_entry = $this->check_access(); + + if ($bad_entry == 1) + { + $std->Error( array( LEVEL => 1, MSG => 'no_permission') ); + } + + if ( $read = $std->my_getcookie('topicsread') ) + { + $this->read_array = unserialize(stripslashes($read)); + } + + if ( $forum = $std->my_getcookie('fread_'.$ibforums->input['f']) ) + { + $ibforums->input['last_visit'] = $forum > $ibforums->input['last_visit'] ? $forum : $ibforums->input['last_visit']; + } + + $prune_value = $std->select_var( array( + 1 => $ibforums->input['prune_day'], + 2 => $this->forum['prune'] , + 3 => '100' ) + ); + + $sort_key = $std->select_var( array( + 1 => $ibforums->input['sort_key'], + 2 => $this->forum['sort_key'] , + 3 => 'last_post' ) + ); + + $sort_by = $std->select_var( array( + 1 => $ibforums->input['sort_by'], + 2 => $this->forum['sort_order'] , + 3 => 'Z-A' ) + ); + + $First = $std->select_var( array( + 1 => $ibforums->input['st'], + 2 => 0 ) + ); + + // Figure out sort order, day cut off, etc + + $Prune = $prune_value != 100 ? (time() - ($prune_value * 60 * 60 * 24)) : 0; + + $sort_keys = array( 'last_post' => 'sort_by_date', + 'title' => 'sort_by_topic', + 'starter_name' => 'sort_by_poster', + 'posts' => 'sort_by_replies', + 'views' => 'sort_by_views', + 'start_date' => 'sort_by_start', + 'last_poster_name' => 'sort_by_last_poster', + ); + + $prune_by_day = array( '1' => 'show_today', + '5' => 'show_5_days', + '7' => 'show_7_days', + '10' => 'show_10_days', + '15' => 'show_15_days', + '20' => 'show_20_days', + '25' => 'show_25_days', + '30' => 'show_30_days', + '60' => 'show_60_days', + '90' => 'show_90_days', + '100' => 'show_all', + ); + + $sort_by_keys = array( 'Z-A' => 'descending_order', + 'A-Z' => 'ascending_order', + ); + + //+---------------------------------------------------------------- + // check for any form funny business by wanna-be hackers + //+---------------------------------------------------------------- + + if ( (!isset($sort_keys[$sort_key])) and (!isset($prune_by_day[$prune_value])) and (!isset($sort_by_keys[$sort_by])) ) + { + $std->Error( array( LEVEL=> 5, MSG =>'incorrect_use') ); + } + + $r_sort_by = $sort_by == 'A-Z' ? 'ASC' : 'DESC'; + + //+---------------------------------------------------------------- + // Query the database to see how many topics there are in the forum + //+---------------------------------------------------------------- + + $DB->query("SELECT COUNT(tid) as max FROM ibf_topics WHERE forum_id='".$this->forum['id']."' and approved='1' and (last_post > $Prune or pinned=1)"); + $total_possible = $DB->fetch_row(); + + //+---------------------------------------------------------------- + // Generate the forum page span links + //+---------------------------------------------------------------- + + $this->forum['SHOW_PAGES'] + = $std->build_pagelinks( array( TOTAL_POSS => $total_possible[max], + PER_PAGE => $ibforums->vars['display_max_topics'], + CUR_ST_VAL => $ibforums->input['st'], + L_SINGLE => $ibforums->lang['single_page_forum'], + L_MULTI => $ibforums->lang['multi_page_forum'], + BASE_URL => $this->base_url."&act=SF&f=".$this->forum['id']."&prune_day=$prune_value&sort_by=$sort_by&sort_order=$sort_order", + ) + ); + + + //+---------------------------------------------------------------- + // Do we have any rules to show? + //+---------------------------------------------------------------- + + if ($this->forum['show_rules']) + { + $DB->query("SELECT * from ibf_rules WHERE fid='".$this->forum['id']."'"); + + if ( $rules = $DB->fetch_row() ) + { + $rules['title'] = stripslashes($rules['title']); + $rules['body'] = stripslashes($rules['body']); + $this->output .= $rules['show_all'] ? $this->html->show_rules_full($rules) : $this->html->show_rules_link($rules); + } + } + + //+---------------------------------------------------------------- + // Generate the poll button + //+---------------------------------------------------------------- + + $this->forum['POLL_BUTTON'] = $this->forum['allow_poll'] + ? "{$ibforums->skin['A_POLL']}" + : ''; + + //+---------------------------------------------------------------- + // Start printing the page + //+---------------------------------------------------------------- + + $this->output .= $this->html->PageTop($this->forum); + + //+---------------------------------------------------------------- + // Do we have any topics to show? + //+---------------------------------------------------------------- + + if ($total_possible['max'] < 1) + { + $this->output .= $this->html->show_no_matches(); + } + + $total_topics_printed = 0; + + if ( ($ibforums->vars['show_user_posted'] == 1) and ($ibforums->member['id']) ) + { + $query = "SELECT DISTINCT ibf_posts.author_id, ibf_topics.* from ibf_topics LEFT JOIN ibf_posts ON (ibf_topics.tid = ibf_posts.topic_id AND ibf_posts.author_id = '".$ibforums->member['id']."') WHERE ibf_topics.forum_id='".$this->forum['id']."' and (ibf_topics.last_post > '$Prune' OR ibf_topics.pinned='1') and ibf_topics.approved='1'"; + } + else + { + $query = "SELECT * from ibf_topics WHERE forum_id='".$this->forum['id']."' and approved='1' and (last_post > '$Prune' OR pinned='1')"; + } + + //+---------------------------------------------------------------- + // Do we have permission to view other posters topics? + //+---------------------------------------------------------------- + + if (!$ibforums->member['g_other_topics']) + { + $query .= " and starter_id='".$ibforums->member['id']."'"; + } + + //+---------------------------------------------------------------- + // Finish off the query + //+---------------------------------------------------------------- + + $First = $First ? $First : 0; + + $query .= " ORDER BY pinned DESC, $sort_key $r_sort_by LIMIT $First,".$ibforums->vars['display_max_topics']; + + $DB->query($query); + + //+---------------------------------------------------------------- + // Grab the rest of the topics and print them + //+---------------------------------------------------------------- + + while ( $topic = $DB->fetch_row() ) + { + $this->output .= $this->render_entry( $topic ); + $total_topics_printed++; + } + + //+---------------------------------------------------------------- + // Finish off the rest of the page + //+---------------------------------------------------------------- + + $ibforums->lang['showing_text'] = preg_replace( "/<#MATCHED_TOPICS#>/", $total_topics_printed , $ibforums->lang['showing_text'] ); + $ibforums->lang['showing_text'] = preg_replace( "/<#TOTAL_TOPICS#>/" , $total_possible['max'] , $ibforums->lang['showing_text'] ); + + $sort_key_html = "\n"; + $sort_by_html = "" , $ibforums->lang['sort_text'] ); + $ibforums->lang['sort_text'] = preg_replace( "!<#ORDER_HTML#>!" , "$sort_by_html" , $ibforums->lang['sort_text'] ); + $ibforums->lang['sort_text'] = preg_replace( "!<#PRUNE_HTML#>!" , "$prune_day_html" , $ibforums->lang['sort_text'] ); + + $this->output .= $this->html->TableEnd($this->forum); + + //+---------------------------------------------------------------- + // Are we a moderator? + //+---------------------------------------------------------------- + + if ( ($ibforums->member['id']) and ($ibforums->member['g_is_supmod'] != 1) ) + { + $DB->query("SELECT mid FROM ibf_moderators WHERE forum_id='".$this->forum['id']."' and member_id='".$ibforums->member['id']."'"); + $this->moderator = $DB->fetch_row(); + } + + //+---------------------------------------------------------------- + // Do we have to print the moderators CP link? + //+---------------------------------------------------------------- + + if ($ibforums->member['g_is_supmod'] or $this->moderator['mid']) + { + $this->output .= $this->html->Mod_Panel( $this->forum['id'] ); + } + + //+---------------------------------------------------------------- + // Print it + //+---------------------------------------------------------------- + + $print->add_output("$this->output"); + $print->do_output( array( 'TITLE' => $ibforums->vars['board_name']." -> ".$this->forum['name'], + 'JS' => 0, + 'NAV' => array( + "{$this->forum['cat_name']}", + $this->nav_extra, + "{$this->forum['name']}", + ), + ) ); + + + + } + + //+---------------------------------------------------------------- + // + // Crunches the data into pwetty html + // + //+---------------------------------------------------------------- + + function render_entry($topic) { + global $DB, $std, $ibforums; + + $topic['last_text'] = $ibforums->lang['last_post_by']; + + $topic['last_poster'] = ($topic['last_poster_id'] != 0) + ? "{$topic['last_poster_name']}" + : "-".$topic['last_poster_name']."-"; + + $topic['starter'] = ($topic['starter_id'] != 0) + ? "{$topic['starter_name']}" + : "-".$topic['starter_name']."-"; + + if ($topic['poll_state']) + { + $topic['prefix'] = $ibforums->vars['pre_polls'].' '; + } + + if ( ($ibforums->member['id']) and ($topic['author_id']) ) + { + $show_dots = 1; + } + + $topic['folder_img'] = $std->folder_icon($topic, $show_dots, $this->read_array[$topic['tid']]); + + $topic['topic_icon'] = $topic['icon_id'] ? '' + : ' '; + + $topic['start_date'] = $std->get_date( $topic['start_date'], 'LONG' ); + + + $pages = 1; + + if ($topic['posts']) + { + if ( (($topic['posts'] + 1) % $ibforums->vars['display_max_posts']) == 0 ) + { + $pages = ($topic['posts'] + 1) / $ibforums->vars['display_max_posts']; + } + else + { + $number = ( ($topic['posts'] + 1) / $ibforums->vars['display_max_posts'] ); + $pages = ceil( $number); + } + + } + + if ($pages > 1) { + $topic['PAGES'] = "({$ibforums->lang['topic_sp_pages']} "; + for ($i = 0 ; $i < $pages ; ++$i ) { + $real_no = $i * $ibforums->vars['display_max_posts']; + $page_no = $i + 1; + if ($page_no == 4) { + $topic['PAGES'] .= "vars['display_max_posts'] . "'>...$pages "; + break; + } else { + $topic['PAGES'] .= "$page_no "; + } + } + $topic['PAGES'] .= ")"; + } + + if ($topic['posts'] < 0) $topic['posts'] = 0; + + $last_time = $this->read_array[ $topic['tid'] ] > $ibforums->input['last_visit'] ? $this->read_array[ $topic['tid'] ] : $ibforums->input['last_visit']; + + if ($last_time && ($topic['last_post'] > $last_time)) + { + $topic['go_last_page'] = "" . $ibforums->skin['GO_LAST_ON'] . ""; + $topic['go_new_post'] = "" . $ibforums->skin['NEW_POST'] . ""; + + } + else + { + $topic['go_last_page'] = "" . $ibforums->skin['GO_LAST_OFF'] . ""; + $topic['go_new_post'] = ""; + } + + + $topic['last_post'] = $std->get_date( $topic['last_post'], 'SHORT' ); + + //+---------------------------------------------------------------- + + if ($topic['state'] == 'link') + { + $t_array = explode("&", $topic['moved_to']); + $topic['tid'] = $t_array[0]; + $topic['forum_id'] = $t_array[1]; + $topic['title'] = $topic['title']; + $topic['views'] = '--'; + $topic['posts'] = '--'; + $topic['prefix'] = $ibforums->vars['pre_moved']." "; + $topic['go_new_post'] = ""; + } + + if ($topic['pinned'] == 1) + { + $topic['prefix'] = $ibforums->vars['pre_pinned']; + $topic['topic_icon'] = $ibforums->skin['B_PIN']; + + } + + return $this->html->RenderRow( $topic ); + } + + + //+---------------------------------------------------------------- + // + // Returns the last action date + // + //+---------------------------------------------------------------- + + function get_last_date($topic) { + global $ibforums, $std; + + return $std->get_date( $topic['last_post'], 'SHORT' ); + + } + + +} + +?> diff --git a/upload/sources/Help.php b/upload/sources/Help.php new file mode 100644 index 00000000..b2edf132 --- /dev/null +++ b/upload/sources/Help.php @@ -0,0 +1,183 @@ + Access the help files +| > Module written by Matt Mecham +| > Date started: 24th February 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new Help; + +class Help { + + var $output = ""; + var $page_title = ""; + var $nav = array(); + var $html = ""; + + + + function Help() { + global $ibforums, $DB, $std, $print; + + + if ($ibforums->input['CODE'] == "") $ibforums->input['CODE'] = '00'; + + //-------------------------------------------- + // Require the HTML and language modules + //-------------------------------------------- + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_help', $ibforums->lang_id ); + + require "./Skin/".$ibforums->skin_id."/skin_help.php"; + + $this->html = new skin_help(); + + $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; + + + + //-------------------------------------------- + // What to do? + //-------------------------------------------- + + switch($ibforums->input['CODE']) { + case '01': + $this->show_section(); + break; + case '02': + $this->do_search(); + break; + default: + $this->show_titles(); + break; + } + + // If we have any HTML to print, do so... + + $print->add_output("$this->output"); + $print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) ); + + } + + function show_titles() { + global $ibforums, $DB, $std; + + $seen = array(); + + $this->output = $this->html->start( $ibforums->lang['page_title'], $ibforums->lang['help_txt'], $ibforums->lang['choose_file'] ); + + $DB->query("SELECT id, title, description from ibf_faq ORDER BY title ASC"); + + $cnt = 0; + + while ($row = $DB->fetch_row() ) { + + if (isset($seen[ $row['title'] ]) ) { + continue; + } else { + $seen[ $row['title'] ] = 1; + } + + $row['CELL_COLOUR'] = $cnt % 2 ? 'row1' : 'row2'; + + $cnt++; + + $this->output .= $this->html->row($row); + + } + + $this->output .= $this->html->end(); + + $this->page_title = $ibforums->lang['page_title']; + $this->nav = array( $ibforums->lang['page_title'] ); + + } + + function show_section() { + global $ibforums, $DB, $std; + + $id = $ibforums->input['HID']; + + if (! preg_match( "/^(\d+)$/" , $id ) ) { + $std->Error( array( LEVEL => 1, MSG => 'no_search_id') ); + } + + $DB->query("SELECT id, title, text from ibf_faq WHERE ID='$id'"); + $topic = $DB->fetch_row(); + + $this->output = $this->html->start( $ibforums->lang['help_topic'], $ibforums->lang['topic_text'], $topic['title'] ); + $this->output .= $this->html->display( $std->text_tidy( $topic['text'] ) ); + + $this->output .= $this->html->end(); + + $this->page_title = $ibforums->lang['help_topic']; + $this->nav = array( "{$ibforums->lang['help_topics']}", $ibforums->lang['help_topic'] ); + + } + + function do_search() { + global $ibforums, $DB, $std; + + if (empty( $ibforums->input['search_q'] ) ) { + $std->Error( array( LEVEL => 1, MSG => 'search_no_input') ); + } + + $search_string = strtolower( str_replace( "*" , "%", $ibforums->input['search_q'] ) ); + $search_string = preg_replace( "/[<>\!\@£\$\^&\+\=\=\[\]\{\}\(\)\"':;\.,\/]/", "", $search_string ); + + $seen = array(); + + $this->output = $this->html->start( $ibforums->lang['search_results'], $ibforums->lang['results_txt'], $ibforums->lang['search_results'] ); + + $DB->query("SELECT id, title from ibf_faq WHERE LOWER(title) LIKE '%$search_string%' or LOWER(text) LIKE '%$search_string%' ORDER BY title ASC"); + + $cnt = 0; + + while ($row = $DB->fetch_row() ) { + + if (isset($seen[ $row['title'] ]) ) { + continue; + } else { + $seen[ $row['title'] ] = 1; + } + + $row['CELL_COLOUR'] = $cnt % 2 ? 'row1' : 'row2'; + + $cnt++; + + $this->output .= $this->html->row($row); + + } + + if ($cnt == 0) { + $this->output .= $this->html->no_results(); + } + + $this->output .= $this->html->end(); + + $this->page_title = $ibforums->lang['page_title']; + $this->nav = array( "{$ibforums->lang['help_topics']}", $ibforums->lang['results_title'] ); + + } + + +} + +?> diff --git a/upload/sources/Login.php b/upload/sources/Login.php new file mode 100644 index 00000000..2343119f --- /dev/null +++ b/upload/sources/Login.php @@ -0,0 +1,427 @@ + Log in / log out module +| > Module written by Matt Mecham +| > Date started: 14th February 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new Login; + +class Login { + + var $output = ""; + var $page_title = ""; + var $nav = array(); + var $login_html = ""; + + function Login() { + global $ibforums, $DB, $std, $print; + + // Make sure our code number is numerical only + + //$ibforums->input['CODE'] = preg_replace("/^([0-9]+)$/", "$1", $ibforums->input[CODE]); + + // Require the HTML and language modules + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_login', $ibforums->lang_id); + + require "./Skin/".$ibforums->skin_id."/skin_login.php"; + $this->login_html = new skin_login(); + + + // Are we enforcing log ins? + + if ($ibforums->vars['force_login'] == 1) + { + $msg = 'admin_force_log_in'; + } + else + { + $msg = ""; + } + + // What to do? + + switch($ibforums->input['CODE']) { + case '01': + $this->do_log_in(); + break; + case '02': + $this->log_in_form(); + break; + case '03': + $this->do_log_out(); + break; + + case '04': + $this->markforum(); + break; + + case '05': + $this->markboard(); + break; + + case '06': + $this->delete_cookies(); + break; + + default: + $this->log_in_form($msg); + break; + } + + // If we have any HTML to print, do so... + + $print->add_output("$this->output"); + $print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) ); + + } + + function delete_cookies() + { + global $ibforums, $DB, $std, $HTTP_COOKIE_VARS; + + if (is_array($HTTP_COOKIE_VARS)) + { + foreach( $HTTP_COOKIE_VARS as $cookie => $value) + { + if (preg_match( "/^(".$ibforums->vars['cookie_id']."fread.*$)/", $cookie, $match)) + { + $std->my_setcookie( str_replace( $ibforums->vars['cookie_id'], "", $match[0] ) , '-1', -1 ); + } + + if (preg_match( "/^(".$ibforums->vars['cookie_id']."ibforum.*$)/i", $cookie, $match)) + { + $std->my_setcookie( str_replace( $ibforums->vars['cookie_id'], "", $match[0] ) , '-', -1 ); + } + } + } + + $std->my_setcookie('pass_hash' , '-1'); + $std->my_setcookie('member_id' , '-1'); + $std->my_setcookie('session_id', '-1'); + $std->my_setcookie('topicsread', '-1'); + $std->my_setcookie('anonlogin' , '-1'); + + $std->boink_it($ibforums->base_url); + exit(); + } + + + function markboard() + { + global $ibforums, $DB, $std; + + if(! $ibforums->member['id']) + { + $std->Error( array( LEVEL => 1, MSG => 'no_guests') ); + } + + $DB->query("UPDATE ibf_members SET last_visit='".time()."', last_activity='".time()."' WHERE id='".$ibforums->member['id']."'"); + + $std->boink_it($ibforums->base_url); + exit(); + } + + + function markforum() { + global $ibforums, $DB, $std; + + $ibforums->input['f'] = preg_replace( "/^(\d+)$/", "\\1", $ibforums->input['f'] ); + + if ($ibforums->input['f'] == "") + { + $std->Error( array( LEVEL => 1, MSG => 'missing_files' ) ); + } + + $std->my_setcookie( "fread_".$ibforums->input['f'], time() ); + + $std->boink_it($ibforums->base_url); + exit(); + + } + + + + + function log_in_form($message="") { + global $ibforums, $DB, $std, $print, $HTTP_REFERER; + + //+-------------------------------------------- + //| Are they banned? + //+-------------------------------------------- + + if ($ibforums->vars['ban_ip']) + { + $ips = explode( "|", $ibforums->vars['ban_ip'] ); + foreach ($ips as $ip) + { + $ip = preg_replace( "/\*/", '.*' , $ip ); + if (preg_match( "/$ip/", $ibforums->input['IP_ADDRESS'] )) + { + $std->Error( array( LEVEL => 1, MSG => 'you_are_banned' ) ); + } + } + } + + //+-------------------------------------------- + + if ($message != "") + { + $message = $ibforums->lang[ $message ]; + $message = preg_replace( "/<#NAME#>/", "{$ibforums->input[UserName]}", $message ); + + $this->output .= $this->login_html->errors($message); + } + + $this->login_html->IN[REFERER] = $HTTP_REFERER; + + $this->output .= $this->login_html->ShowForm( $ibforums->lang['please_log_in'] ); + + $this->nav = array( $ibforums->lang['log_in'] ); + $this->page_title = $ibforums->lang['log_in']; + + $print->add_output("$this->output"); + $print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) ); + + exit(); + + } + + function do_log_in() { + global $DB, $ibforums, $std, $print, $sess, $HTTP_USER_AGENT, $HTTP_POST_VARS; + + $url = ""; + + //------------------------------------------------- + // Make sure the username and password were entered + //------------------------------------------------- + + if ($HTTP_POST_VARS['UserName'] == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_username' ) ); + } + + if ($HTTP_POST_VARS['PassWord'] == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'pass_blank' ) ); + } + + + //------------------------------------------------- + // Check for input length + //------------------------------------------------- + + if (strlen($ibforums->input['UserName']) > 32) + { + $std->Error( array( LEVEL => 1, MSG => 'username_long' ) ); + } + + if (strlen($ibforums->input['PassWord']) > 32) + { + $std->Error( array( LEVEL => 1, MSG => 'pass_too_long' ) ); + } + + $username = strtolower($ibforums->input['UserName']); + $password = md5( $ibforums->input['PassWord'] ); + + //------------------------------------------------- + // Attempt to get the user details + //------------------------------------------------- + + $DB->query("SELECT id, name, mgroup, password, new_pass FROM ibf_members WHERE LOWER(name)='$username'"); + + if ($DB->get_num_rows()) + { + $member = $DB->fetch_row(); + + if ( empty($member['id']) or ($member['id'] == "") ) + { + $this->log_in_form( 'wrong_name' ); + } + + if ($member['password'] != $password) + { + $this->log_in_form( 'wrong_pass' ); + } + + //------------------------------ + + if ($ibforums->input['CookieDate']) + { + $std->my_setcookie("member_id" , $member['id'], 1); + $std->my_setcookie("pass_hash" , $password, 1); + } + + //------------------------------ + + if ($ibforums->input['s']) + { + $session_id = $ibforums->input['s']; + + // Delete any old sessions with this users IP addy that doesn't match our + // session ID. + + $DB->query("DELETE FROM ibf_sessions WHERE ip_address='".$ibforums->input['IP_ADDRESS']."' AND id <> '$session_id'"); + + $db_string = $DB->compile_db_update_string( array ( + 'member_name' => $member['name'], + 'member_pass' => "", + 'member_id' => $member['id'], + 'running_time' => time(), + 'member_group' => $member['mgroup'], + 'login_type' => $ibforums->input['Privacy'] ? 1 : 0 + ) ); + + $db_query = "UPDATE ibf_sessions SET $db_string WHERE id='".$ibforums->input['s']."'"; + } + else + { + $session_id = md5( uniqid(microtime()) ); + + // Delete any old sessions with this users IP addy. + + $DB->query("DELETE FROM ibf_sessions WHERE ip_address='".$ibforums->input['IP_ADDRESS']."'"); + + $db_string = $DB->compile_db_insert_string( array ( + 'id' => $session_id, + 'member_name' => $member['name'], + 'member_pass' => "", + 'member_id' => $member['id'], + 'running_time' => time(), + 'member_group' => $member['mgroup'], + 'ip_address' => substr($ibforums->input['IP_ADDRESS'], 0, 50), + 'browser' => substr($HTTP_USER_AGENT, 0, 50), + 'start_session'=> time(), + 'login_type' => $ibforums->input['Privacy'] ? 1 : 0 + ) ); + + $db_query = "INSERT INTO ibf_sessions (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"; + } + + $DB->query( $db_query ); + + //----------------------------------- + // If a bogus reset passy action occured, + // and we managed to log in, we'll assume + // that the user did nothing, so we remove + // this new pass setting. + //----------------------------------- + + if ($member['new_pass'] != "") + { + $DB->query("UPDATE ibf_members SET new_pass='' WHERE id='".$member['id']."'"); + } + + $ibforums->member = $member; + $ibforums->session_id = $session_id; + + if ($ibforums->input['referer'] && ($ibforums->input['act'] != 'Reg')) + { + $url = $ibforums->input['referer']; + $url = preg_replace( "!^\?!" , "" , $url ); + $url = preg_replace( "!s=(\w){32}!", "" , $url ); + $url = preg_replace( "!act=(login|reg|lostpass)!i", "", $url ); + } + + //----------------------------------- + // set our privacy cookie + //----------------------------------- + + if ($ibforums->input['Privacy'] == 1) + { + $std->my_setcookie( "anonlogin", 1 ); + } + + //----------------------------------- + // Redirect them to either the board + // index, or where they came from + //----------------------------------- + + $print->redirect_screen( "{$ibforums->lang[thanks_for_login]} {$ibforums->member['name']}", $url ); + + + } + else + { + $this->log_in_form( 'wrong_name' ); + } + + } + + + + + + + function do_log_out() { + global $std, $ibforums, $DB, $print, $sess, $HTTP_COOKIE_VARS; + + /*if(! $ibforums->member['id']) + { + $std->Error( array( LEVEL => 1, MSG => 'no_guests') ); + }*/ + + // Update the DB + + $DB->query("UPDATE ibf_sessions SET ". + "member_name='',". + "member_id='0',". + "member_pass='',". + "login_type='0' ". + "WHERE id='". $sess->session_id ."'"); + + $DB->query("UPDATE ibf_members SET last_visit='".time()."', last_activity='".time()."' WHERE id='".$ibforums->member['id']."'"); + + // Set some cookies + + $std->my_setcookie( "member_id" , "0" ); + $std->my_setcookie( "pass_hash" , "0" ); + $std->my_setcookie( "anonlogin" , "-1" ); + + if (is_array($HTTP_COOKIE_VARS)) + { + foreach( $HTTP_COOKIE_VARS as $cookie => $value ) + { + if (preg_match( "/^(".$ibforums->vars['cookie_id']."fread.*$)/", $cookie, $match)) + { + $std->my_setcookie( str_replace( $ibforums->vars['cookie_id'], "", $match[0] ) , '-1', -1 ); + } + + if (preg_match( "/^(".$ibforums->vars['cookie_id']."ibforum.*$)/i", $cookie, $match)) + { + $std->my_setcookie( str_replace( $ibforums->vars['cookie_id'], "", $match[0] ) , '-', -1 ); + } + } + } + + // Redirect... + + $print->redirect_screen( $ibforums->lang['thanks_for_logout'], "" ); + + } + + + + + +} + +?> diff --git a/upload/sources/Memberlist.php b/upload/sources/Memberlist.php new file mode 100644 index 00000000..fa6d37ac --- /dev/null +++ b/upload/sources/Memberlist.php @@ -0,0 +1,290 @@ + Show all the members +| > Module written by Matt Mecham +| > Date started: 20th February 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new Memberlist; + +class Memberlist { + + var $output = ""; + var $page_title = ""; + var $nav = array(); + var $html = ""; + var $base_url = ""; + + var $first = 0; + var $max_results = 10; + var $sort_key = 'name'; + var $sort_order = 'asc'; + var $filter = 'ALL'; + + var $mem_titles = array(); + var $mem_groups = array(); + + + function Memberlist() { + global $ibforums, $DB, $std, $print; + + + if ($ibforums->input['CODE'] == "") $ibforums->input['CODE'] = 'listall'; + + //-------------------------------------------- + // Require the HTML and language modules + //-------------------------------------------- + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_mlist', $ibforums->lang_id ); + + require "./Skin/".$ibforums->skin_id."/skin_mlist.php"; + + $this->html = new skin_mlist(); + + $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; + + if ($ibforums->member['g_mem_info'] != 1) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); + } + + //-------------------------------------------- + // Get the member groups, member titles stuff + //-------------------------------------------- + + $DB->query("SELECT g_title, g_id, g_icon from ibf_groups ORDER BY g_title"); + + while ($row = $DB->fetch_row() ) + { + $this->mem_groups[ $row['g_id'] ] = array( 'TITLE' => $row['g_title'], + 'ICON' => $row['g_icon'], + ); + } + + unset($row); + + $DB->free_result(); + + $DB->query("SELECT title, id, posts, pips from ibf_titles ORDER BY posts DESC"); + + while ($row = $DB->fetch_row() ) + { + $this->mem_titles[ $row['id'] ] = array( 'TITLE' => $row['title'], + 'POSTS' => $row['posts'], + 'PIPS' => $row['pips'], + + ); + } + + unset($row); + + $DB->free_result(); + + $the_filter = array( 'ALL' => $ibforums->lang['show_all'] ); + + foreach($this->mem_groups as $id => $data) + { + if ($id == $ibforums->vars['guest_group']) continue; + if ($id == $ibforums->vars['auth_group']) continue; + if ($id == $ibforums->vars['ban_group']) continue; + $the_filter[$id] = $data['TITLE']; + } + + if (isset($ibforums->input['st'])) $this->first = $ibforums->input['st']; + if (isset($ibforums->input['max_results'])) $this->max_results = $ibforums->input['max_results']; + if (isset($ibforums->input['sort_key'])) $this->sort_key = $ibforums->input['sort_key']; + if (isset($ibforums->input['sort_order'])) $this->sort_order = $ibforums->input['sort_order']; + if (isset($ibforums->input['filter'])) $this->filter = $ibforums->input['filter']; + + $the_sort_key = array( 'name' => 'sort_by_name', + 'posts' => 'sort_by_posts', + 'joined' => 'sort_by_joined', + ); + + $the_max_results = array( 10 => '10', + 20 => '20', + 30 => '30', + 40 => '40', + 50 => '50', + ); + + $the_sort_order = array( 'desc' => 'descending_order', + 'asc' => 'ascending_order', + ); + + $filter_html = "\n"; + $max_results_html = "\n"; + + foreach ($the_sort_order as $k => $v) { + $sort_order_html .= $k == $this->sort_order ? "", $this->jump_html ); + + $this->output .= $this->html->archive_form( $this->jump_html ); + + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + + } + + function do_archive() { + global $ibforums, $DB, $std, $print; + + require "./sources/lib/emailer.php"; + + $this->email = new emailer(); + + //---------------------------------------- + // Did we specify a folder, or choose all? + //---------------------------------------- + + $folder_query = ""; + $msg_ids = array(); + + if ($ibforums->input['VID'] != 'all') + { + $folder_query = " AND vid='".$ibforums->input['VID']."'"; + } + + if ( $ibforums->input['dateline'] == 'all' ) + { + $time_cut = 0; + } + else + { + $time_cut = time() - ($ibforums->input['dateline'] * 60 * 60 *24); + } + + //---------------------------------------- + // Check the input... + //---------------------------------------- + + $ibforums->input['number'] = preg_replace( "/^(\d+)$/", "\\1", $ibforums->input['number'] ); + + if ($ibforums->input['number'] < 5) + { + $ibforums->input['number'] = 5; + } + + if ($ibforums->input['number'] > 50) + { + $ibforums->input['number'] = 50; + } + + $type = 'html'; + $file_name = "pm_archive.html"; + $ctype = "text/html"; + + if ($ibforums->input['type'] == 'xls') + { + $type = 'xls'; + $file_name = "xls_importable.txt"; + $ctype = "text/plain"; + } + + $output = ""; + + //---------------------------------------- + // Start the datafile.. + //---------------------------------------- + + if ($type == 'html') + { + $output .= $this->html->archive_html_header(); + } + + require "./sources/lib/post_parser.php"; + + $this->parser = new post_parser(); + + //---------------------------------------- + // Get the messages... + //---------------------------------------- + + $archive_query = $DB->query("SELECT mg.*, m.name, m.id from ibf_messages mg, ibf_members m WHERE mg.member_id=m.id AND mg.member_id='".$this->member['id']."' AND mg.msg_date > $time_cut".$folder_query." ORDER BY mg.msg_date LIMIT 0,".$ibforums->input['number']); + + if ( $DB->get_num_rows($archive_query) ) + { + while ( $r = $DB->fetch_row($archive_query) ) + { + $info = array(); + + $msg_ids[] = $r['msg_id']; + + $from_member = $DB->query("SELECT id, name FROM ibf_members WHERE id='".$r['from_id']."'"); + + $from_mem = $DB->fetch_row($from_member); + + $info['msg_date'] = $std->get_date( $r['msg_date'], 'LONG' ); + $info['msg_title'] = $r['title']; + $info['msg_sender'] = $from_mem['name']; + $info['msg_content'] = $this->parser->convert( array( 'TEXT' => $r['message'], + 'SMILIES' => 0, + 'CODE' => $ibforums->vars['msg_allow_code'], + 'HTML' => $ibforums->vars['msg_allow_html'] + ) + ); + + if ($type == 'xls') + { + $output .= '"'.$this->strip_quotes($info['msg_title']).'","'.$this->strip_quotes($info['msg_date']).'","'.$this->strip_quotes($info['msg_sender']).'","'.$this->strip_quotes($info['msg_content']).'"'."\r"; + } + else + { + $output .= $this->html->archive_html_entry($info); + } + + } + + if ($type == 'html') + { + $output .= $this->html->archive_html_footer(); + } + + $num_msg = count( $msg_ids ); + + if ($ibforums->input['delete'] == 'yes') + { + $msg_str = implode( ",", $msg_ids ); + + if (!empty($msg_str)) + { + $DB->query("DELETE FROM ibf_messages WHERE msg_id IN ($msg_str)"); + + $DB->query("UPDATE ibf_members SET msg_total=msg_total-$num_msg WHERE id ='".$this->member['id']."'"); + } + + } + + $this->email->get_template("pm_archive"); + + $this->email->build_message( array( + 'NAME' => $this->member['name'], + ) + ); + + $this->email->subject = $ibforums->lang['arc_email_subject']; + $this->email->to = $this->member['email']; + $this->email->add_attachment( $output, $file_name, $ctype ); + $this->email->send_mail(); + + + $ibforums->lang['arc_complete'] = preg_replace( "/<#NUM#>/", "$num_msg", $ibforums->lang['arc_complete'] ); + + $this->output .= $this->html->archive_complete(); + + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + + } + else + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_archive_messages' ) ); + } + + + } + + function strip_quotes($text) { + + return preg_replace( "/\"/", '\\\"', $text ); + + } + + /**********************************************************/ + // PREFS: + // + // Create/delete/edit messenger folders + /**********************************************************/ + + function prefs() { + global $ibforums, $DB, $std, $print; + + $this->output .= $this->html->prefs_header(); + + $count = 0; + + foreach( $this->msg_stats['dir_data'] as $k => $v ) + { + $extra = ""; + if ($v['id'] == 'in' or $v['id'] == 'sent') + { + $extra = "  ( ".$v['real']." - ".$ibforums->lang['cannot_remove']." )"; + } + $this->output .= $this->html->prefs_row( array( 'ID' => $v['id'], 'REAL' => $v['real'], 'EXTRA' => $extra ) ); + $count++; + } + + $this->output .= $this->html->prefs_add_dirs(); + + for ($i = $count; $i < $count+3; $i++) + { + $this->output .= $this->html->prefs_row( array( 'ID' => 'dir_'.$i, 'REAL' => '', 'EXTRA' => '' ) ); + } + + $this->output .= $this->html->prefs_footer(); + + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + + } + + function do_prefs() { + global $ibforums, $DB, $std, $print; + + // Check to ensure than we've not tried to remove the inbox and sent items directories. + + if ( ($ibforums->input['sent'] == "") or ($ibforums->input['in'] == "") ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'cannot_remove_dir' ) ); + } + + + $v_dir = 'in:'.$ibforums->input['in'].'|sent:'.$ibforums->input['sent']; + + // Fetch the rest of the dirs + + + $ids = array(); + + foreach ($ibforums->input as $key => $value) + { + if ( preg_match( "/^dir_(\d+)$/", $key, $match ) ) + { + if ($ibforums->input[$match[0]]) + { + $v_dir .= '|'.$match[0].':'.trim($ibforums->input[$match[0]]); + } + } + } + + $DB->query("UPDATE ibf_members SET vdirs='$v_dir' WHERE id='".$this->member['id']."'"); + + $std->boink_it($ibforums->base_url."&act=Msg&CODE=07"); + exit; + + } + + /**********************************************************/ + // DELETE_MEMBER: + // + // Removes a member from address book. + /**********************************************************/ + + function del_member() { + global $ibforums, $DB, $std, $print; + + if (!$ibforums->input['MID']) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) ); + } + + if (! preg_match( "/^(\d+)$/", $ibforums->input['MID'] ) ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) ); + } + + $DB->query("DELETE FROM ibf_contacts WHERE member_id='".$this->member['id']."' AND contact_id='".$ibforums->input['MID']."'"); + + $std->boink_it($this->base_url."&act=Msg&CODE=02"); + exit; + } + + /**********************************************************/ + // EDIT_MEMBER: + // + // Edit a member from address book. + /**********************************************************/ + + function edit_member() { + global $ibforums, $DB, $std, $print; + + if (!$ibforums->input['MID']) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) ); + } + + if (! preg_match( "/^(\d+)$/", $ibforums->input['MID'] ) ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) ); + } + + + $DB->query("SELECT * FROM ibf_contacts WHERE member_id='".$this->member['id']."' AND contact_id='".$ibforums->input['MID']."'"); + $memb = $DB->fetch_row(); + + if (!$memb['contact_id']) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) ); + } + + $html = ""; + + $this->output .= $this->html->address_edit( array( 'SELECT' => $html, 'MEMBER' => $memb ) ); + + + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."", + "".$ibforums->lang['t_book']."" ); + + } + + /**********************************************************/ + // DO_EDIT_MEMBER: + // + // Edit a member from address book. + /**********************************************************/ + + function do_edit() { + global $ibforums, $DB, $std, $print; + + if (!$ibforums->input['MID']) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) ); + } + + if (! preg_match( "/^(\d+)$/", $ibforums->input['MID'] ) ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) ); + } + + $ibforums->input['allow_msg'] = $ibforums->input['allow_msg'] == 'yes' ? 1 : 0; + + $DB->query("SELECT * FROM ibf_contacts WHERE member_id='".$this->member['id']."' AND contact_id='".$ibforums->input['MID']."'"); + $memb = $DB->fetch_row(); + + if (!$memb['contact_id']) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) ); + } + + $DB->query("UPDATE ibf_contacts SET contact_desc='".$ibforums->input['mem_desc']."', allow_msg='".$ibforums->input['allow_msg']."' WHERE id='".$memb['id']."'"); + + $std->boink_it($this->base_url."&act=Msg&CODE=02"); + exit; + + } + + + + /**********************************************************/ + // CONTACT: + // + // Shows the address book. + /**********************************************************/ + + function contact() { + global $ibforums, $DB, $std, $print; + + $this->output .= $this->html->Address_header(); + + $DB->query("SELECT * FROM ibf_contacts WHERE member_id='".$this->member['id']."' ORDER BY contact_name ASC"); + + if ( $DB->get_num_rows() ) + { + + $this->output .= $this->html->Address_table_header(); + while ( $row = $DB->fetch_row() ) + { + $row['text'] = $row['allow_msg'] + ? $ibforums->lang['can_contact'] + : $ibforums->lang['cannot_contact']; + + $this->output .= $this->html->render_address_row($row); + } + $this->output .= $this->html->end_address_table(); + + } + else + { + $this->output .= $this->html->Address_none(); + + } + + // Do we have a name to enter? + + $name_to_enter = ""; + + if ($ibforums->input['MID']) + { + if ( preg_match( "/^(\d+)$/", $ibforums->input['MID'] ) ) + { + $DB->query("SELECT name, id FROM ibf_members WHERE id='".$ibforums->input['MID']."'"); + $memb = $DB->fetch_row(); + + if ($memb['id']) + { + $name_to_enter = $memb['name']; + } + } + } + + $this->output .= $this->html->address_add($name_to_enter); + + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + + } + + + /**********************************************************/ + // ADD MEMBER: + // + // Adds a member to the addy book. + /**********************************************************/ + + function add_member() { + global $ibforums, $DB, $std, $print; + + if (! $ibforums->input['mem_name']) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) ); + } + + $DB->query("SELECT name, id FROM ibf_members WHERE LOWER(name)='".$ibforums->input['mem_name']."'"); + $memb = $DB->fetch_row(); + + if (! $memb['id']) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_user' ) ); + } + + //-------------------------------------- + // Do we already have this member in our + // address book? + //-------------------------------------- + + $DB->query("SELECT contact_id FROM ibf_contacts WHERE member_id='".$this->member['id']."' AND contact_id='".$memb['id']."'"); + + if ( $DB->get_num_rows() ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'member_in_add_book' ) ); + } + + //-------------------------------------- + // Insert it into the DB + //-------------------------------------- + + $ibforums->input['allow_msg'] = $ibforums->input['allow_msg'] == 'yes' ? 1 : 0; + + $db_string = $std->compile_db_string( array( + 'member_id' => $this->member['id'], + 'contact_name' => $memb['name'], + 'allow_msg' => $ibforums->input['allow_msg'], + 'contact_desc' => $ibforums->input['mem_desc'], + 'contact_id' => $memb['id'] + ) ); + + $DB->query("INSERT INTO ibf_contacts (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"); + unset($db_string); + + // BUH BYE! + + $std->boink_it($this->base_url."&act=Msg&CODE=02"); + exit; + } + + + + /********************************************************************************************************************/ + // Mutli Act: + // + // Removes or moves messages. + /**********************************************************/ + + function multi_act() { + global $ibforums, $DB, $std, $print; + + //-------------------------------------- + // Get the ID's to delete + //-------------------------------------- + + $ids = array(); + + foreach ($ibforums->input as $key => $value) + { + if ( preg_match( "/^msgid-(\d+)$/", $key, $match ) ) + { + if ($ibforums->input[$match[0]]) + { + $ids[] = $match[1]; + } + } + } + + $affected_ids = count($ids); + + if ( $affected_ids > 0 ) + { + $id_string = implode( ",", $ids ); + + if ($ibforums->input['delete']) + { + $DB->query("DELETE FROM ibf_messages WHERE member_id='".$this->member['id']."' AND msg_id IN ($id_string)"); + $DB->query("UPDATE ibf_members SET msg_total=msg_total-$affected_ids WHERE id='".$this->member['id']."'"); + $std->boink_it($this->base_url."&act=Msg&CODE=01&VID={$this->vid}"); + exit; + + } + else if ($ibforums->input['move']) + { + $DB->query("UPDATE ibf_messages SET vid='".$this->vid."' WHERE member_id='".$this->member['id']."' AND msg_id IN ($id_string)"); + $std->boink_it($this->base_url."&act=Msg&CODE=01&VID={$this->vid}"); + exit; + } + else + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_msg_chosen' ) ); + } + } + else + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_msg_chosen' ) ); + } + + } + + + + /**********************************************************/ + // DELETE MESSAGE: + // + // Removes a message. + // Yes. there is no small print. + /**********************************************************/ + + function delete() { + global $ibforums, $DB, $std, $print; + + //-------------------------------------- + // check for a msg ID + //-------------------------------------- + + if (!$ibforums->input['MSID']) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_msg_chosen' ) ); + } + + if (! preg_match( "/^\d+$/" , $ibforums->input['MSID'] ) ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'invalid_use' ) ); + } + + //-------------------------------------- + // Delete it from the DB + //-------------------------------------- + + $DB->query("DELETE FROM ibf_messages WHERE msg_id='".$ibforums->input['MSID']."' AND member_id='".$this->member['id']."'"); + + $DB->query("UPDATE ibf_members SET msg_total=msg_total-1 WHERE id='".$this->member['id']."'"); + + // BYE! + + $std->boink_it($this->base_url."&act=Msg&CODE=01&VID={$this->vid}"); + exit; + } + + + /**********************************************************/ + // VIEW MESSAGE: + // + // Views a message, thats it. No, it doesn't do anything else + // I don't know why. It just does. Accept it and move on dude. + /**********************************************************/ + + function view_msg() { + global $ibforums, $DB, $std, $print; + + //-------------------------------------- + // check for a msg ID + //-------------------------------------- + + if (!$ibforums->input['MSID']) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_such_msg' ) ); + } + + if (! preg_match( "/^\d+$/" , $ibforums->input['MSID'] ) ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'invalid_use' ) ); + } + + //-------------------------------------- + // Get the message from the DB + // Check to make sure it exists + //-------------------------------------- + + $DB->query("SELECT * FROM ibf_messages WHERE msg_id='".$ibforums->input['MSID']."' and member_id='".$this->member['id']."'"); + $msg = $DB->fetch_row(); + + if (!$msg['msg_id']) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_such_msg' ) ); + } + + //-------------------------------------- + // Are we tracking this message? + //-------------------------------------- + + if ($msg['read_state'] == -1) + { + + $r_time = $std->get_date( $msg['msg_date'], 'LONG' ); + $r_post = "{$ibforums->lang['read_rec_text']} $r_time
{$msg['message']}

{$this->member['name']} {$ibforums->lang['mem_read_msg']}"; + + $db_string = $std->compile_db_string( array( + 'member_id' => $msg['from_id'], + 'msg_date' => time(), + 'read_state' => 0, + 'title' => $ibforums->lang['read_rec_title'].' '.$msg['title'], + 'message' => $r_post, + 'from_id' => $this->member['id'], + 'vid' => 'in', + 'recipient_id' => 'N/A', + ) ); + + $DB->query("INSERT INTO ibf_messages (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"); + $new_id = $DB->get_insert_id(); + unset($db_string); + + //----------------------------------------------------- + + $DB->query("UPDATE ibf_members SET ". + "msg_total = msg_total + 1, ". + "new_msg = new_msg + 1, ". + "msg_from_id='" .$this->member['id'] . "', ". + "msg_msg_id='" . $new_id . "' ". + "WHERE id='" . $msg['from_id'] . "'"); + + } + + //-------------------------------------- + // Is this an unread message? + //-------------------------------------- + + if ($msg['read_state'] < 1) + { + $DB->query("UPDATE ibf_messages SET read_state='1' WHERE msg_id='".$ibforums->input['MSID']."'"); + } + + + //-------------------------------------- + // Start formatting the member and msg + //-------------------------------------- + + require "./sources/lib/post_parser.php"; + + $this->parser = new post_parser(); + + + $msg['msg_date'] = $std->get_date( $msg['msg_date'], 'LONG' ); + + + $DB->query("SELECT g.g_title as member_group, m.id, m.joined, m.name, m.title, m.posts, m.mgroup, m.email, m.signature, m.avatar, m.avatar_size, m.hide_email, m.aim_name, m.icq_number ". + "FROM ibf_members m, ibf_groups g WHERE id='".$msg['from_id']."' and g.g_id=m.mgroup"); + + $member = $DB->fetch_row(); + + $member = $this->parse_member( $member, $msg ); + + $msg['message'] = $this->parser->convert( array( TEXT => $msg['message'], + SMILIES => 1, + CODE => $ibforums->vars['msg_allow_code'], + HTML => $ibforums->vars['msg_allow_html'] + ) + ); + + if (!$ibforums->vars[SIG_SEP]) $ibforums->vars[SIG_SEP] = "

--------------------
"; + + if ($this->member['view_sigs']) + { + $member['signature'] = $ibforums->vars[SIG_SEP] . $this->parser->convert( array( TEXT => $member['signature'], + SMILIES => 0, + CODE => $ibforums->vars['sig_allow_ibc'], + HTML => $ibforums->vars['sig_allow_html'], + SIGNATURE => 1, + ) + ); + } + else + { + $member['signature'] = ""; + } + + $member['VID'] = $this->msg_stats['current_id']; + + $this->output .= $this->html->Render_msg( array( + 'msg' => $msg, + 'member' => $member, + 'jump' => $this->jump_html + ) ); + + + $this->page_title = $ibforums->lang['t_welcome']; + + $this->nav = array( "".$ibforums->lang['t_title']."", + "".$this->msg_stats['current_dir']."" + ); + + } + + /**********************************************************/ + // SEND MESSAGE: + // + // Sends a message. Yes, it's that simple. Why so much code? + // Because typing "send a message to member X" doesnt actually + // do anything. + /**********************************************************/ + + function send() { + global $ibforums; + + $ibforums->input['MODE'] ? $this->send_msg() : $this->send_form(); + + } + + //+----------------------------------------------------------- + + function send_form($preview=0) { + global $ibforums, $DB, $std, $print, $HTTP_POST_VARS; + + //-------------------------------------- + // Get some more HTML and words, oh yes. + //-------------------------------------- + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_post', $ibforums->lang_id); + + require "./Skin/".$ibforums->skin_id."/skin_post.php"; + $post_html = new skin_post(); + + if ($preview == 1) + { + + require "./sources/lib/post_parser.php"; + + $this->parser = new post_parser(); + + $old_msg = $this->parser->convert( array( TEXT => $ibforums->input['Post'], + SMILIES => 1, + CODE => $ibforums->vars['msg_allow_code'], + HTML => $ibforums->vars['msg_allow_html'] + ) + ); + + $this->output .= $this->html->preview($old_msg); + + } + + //-------------------------------------- + // Load the contacts + //-------------------------------------- + + $contacts = ""; + + $DB->query("SELECT * FROM ibf_contacts WHERE member_id='".$this->member['id']."' ORDER BY contact_name"); + + if ( $DB->get_num_rows() ) + { + $contacts = "\n"; + } + else + { + $contacts = $ibforums->lang['address_list_empty']; + } + + $this->html->class['LANG']['max_msg'] = preg_replace( "/<#MAX_MSG_SIZE#>/", $ibforums->vars['MAX_MSG_SIZE'], $this->html->class['LANG']['max_msg'] ); + $this->html->class['LANG']['the_max_msg'] = $ibforums->vars['MAX_MSG_SIZE'] * 1024; + + $name_to_enter = ""; + $old_message = ""; + $old_title = ""; + + //-------------------------------------- + // Did we come from a button with a user ID? + //-------------------------------------- + + if (!empty($ibforums->input['MID'])) + { + $DB->query("SELECT name, id FROM ibf_members WHERE id='".$ibforums->input['MID']."'"); + $name = $DB->fetch_row(); + + if ($name['id']) + { + $name_to_enter = $name['name']; + } + } + + //-------------------------------------- + // Are we quoting an old message? + //-------------------------------------- + + if ($preview == 1) + { + $old_message = stripslashes($HTTP_POST_VARS['Post']); + $old_title = preg_replace( "/'/", "'", stripslashes($HTTP_POST_VARS['msg_title']) ); + + } + else if (!empty($ibforums->input['MSID'])) + { + $DB->query("SELECT message, title from ibf_messages WHERE msg_id='".$ibforums->input['MSID']."' and member_id='".$this->member['id']."'"); + $old_msg = $DB->fetch_row(); + if ($old_msg['title']) + { + $old_message = '[QUOTE]'.$old_msg['message'].'[/QUOTE]'."\n"; + $old_message = preg_replace( "/
/", "\n", $old_message ); + $old_title = "Re:".$old_msg['title']; + $old_title = preg_replace( "/^(?:Re\:){1,}/i", "Re:", $old_title ); + } + } + + + //-------------------------------------- + // Build up the HTML for the send form + //-------------------------------------- + + $this->output .= $this->html->Send_form( array ( + 'CONTACTS' => $contacts, + 'MEMBER' => $this->member, + 'N_ENTER' => $name_to_enter, + 'O_TITLE' => $old_title, + ) ); + + $post_html->class['LANG']['the_max_length'] = $ibforums->vars['MAX_MSG_SIZE'] * 1024; + $post_html->class['LANG']['ib_state'] = $ibforums->vars['MSG_ALLOW_CODE'] ? $post_html->class['LANG']['ib_on'] : $post_html->class['LANG']['ib_off']; + $post_html->class['LANG']['html_state'] = $ibforums->vars['MSG_ALLOW_HTML'] ? $post_html->class['LANG']['html_on'] : $post_html->class['LANG']['html_off']; + + $ibforums->lang['the_max_length'] = $ibforums->vars['max_post_length'] * 1024; + + $this->output .= $post_html->postbox_buttons($old_message); + + $this->output .= $this->html->send_form_footer(); + + //-------------------------------------- + // Add in the smilies box + //-------------------------------------- + + $show_table = 0; + $count = 0; + $smilies = "\n"; + + // Get the smilies from the DB + + $DB->query("SELECT * FROM ibf_emoticons WHERE clickable='1'"); + + while ($elmo = $DB->fetch_row() ) { + + $show_table++; + $count++; + + $smilies .= "vars['EMOTICONS_URL']."/".$elmo['image']."\" alt='smilie' border='0'> \n"; + + if ($count == $ibforums->vars['emo_per_row']) { + $smilies .= "\n\n"; + $count = 0; + } + } + + if ($count != $ibforums->vars['emo_per_row']) { + for ($i = $count ; $i < $ibforums->vars['emo_per_row'] ; ++$i) { + $smilies .= " \n"; + } + $smilies .= ""; + } + + $table = $post_html->smilie_table(); + + if ($show_table != 0) { + $table = preg_replace( "//", $smilies, $table ); + $this->output = preg_replace( "//", $table, $this->output ); + } + + + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + + + } + + + + + + //+----------------------------------------------------------- + + + + + + function send_msg() { + global $ibforums, $DB, $std, $print; + + $ibforums->input['from_contact'] = $ibforums->input['from_contact'] ? $ibforums->input['from_contact'] : '-'; + + //---------------------------------------------------------------- + if ( strlen($ibforums->input['msg_title']) < 2 ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_msg_title' ) ); + } + //---------------------------------------------------------------- + if ( strlen($ibforums->input['Post']) < 2 ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_msg' ) ); + } + //---------------------------------------------------------------- + if ($ibforums->input['from_contact'] == '-' and $ibforums->input['entered_name'] == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_chosen_member' ) ); + } + //---------------------------------------------------------------- + + //-------------------------------------- + // Attempt to get the reciepient details + //-------------------------------------- + + $to_member = array(); + + if ($ibforums->input['from_contact'] == '-') + { + $query = "LOWER(name)='".$ibforums->input['entered_name']."'"; + } + else + { + $query = "id='".$ibforums->input['from_contact']."'"; + } + + $DB->query("SELECT name, id, view_pop, mgroup FROM ibf_members WHERE ".$query); + $to_member = $DB->fetch_row(); + + if (empty($to_member['id'])) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_to_member' ) ); + } + + //-------------------------------------- + // Can the reciepient use the PM system? + //-------------------------------------- + + $DB->query("SELECT g_use_pm FROM ibf_groups WHERE g_id='".$to_member['mgroup']."'"); + $allow = $DB->fetch_row(); + + if ($allow['g_use_pm'] != 1) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_usepm_member' ) ); + } + + //-------------------------------------- + // Has the reciepient blocked us? + //-------------------------------------- + + $DB->query("SELECT contact_id, allow_msg FROM ibf_contacts WHERE contact_id='".$this->member['id']."' AND member_id='".$to_member['id']."'"); + $can_msg = $DB->fetch_row(); + + if ( (isset($can_msg['contact_id'])) and ($can_msg['allow_msg'] != 1) ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'msg_blocked' ) ); + } + + //-------------------------------------- + // Do we have enough room to store a + // saved copy? + //-------------------------------------- + + if ($ibforums->input['add_sent'] and $ibforums->vars['max_messages']) + { + if ( ($this->msg_stats['msg_total'] + 1) >= $ibforums->vars['max_messages'] ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'max_message_from' ) ); + } + } + + //-------------------------------------- + // Is this a preview? + //-------------------------------------- + + if ($ibforums->input['preview'] != "") + { + $ibforums->input['MID'] = $to_member['id']; + $this->send_form(1); + return; + } + + //-------------------------------------- + // Sort out tracking and pop us status + //-------------------------------------- + + $show_popup = $to_member['view_pop']; + + $track_id = 0; + + if ($ibforums->input['add_tracking']) + { + $track_id = -1; + } + + //-------------------------------------- + // Get the recipient msg_stats + //-------------------------------------- + + $DB->query("SELECT msg_total FROM ibf_members WHERE id='".$to_member['id']."'"); + $to_msg_stats = $DB->fetch_row(); + + //-------------------------------------- + // Does the target member have enough room + // in their inbox for a new message? + //-------------------------------------- + + if ( (($to_msg_stats['msg_total']) >= $ibforums->vars['max_messages']) and ($ibforums->vars['max_messages'] != "") ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'max_message_to' ) ); + } + + //-------------------------------------- + // Enter the info into the DB + // Target user side. + //-------------------------------------- + + $db_string = $std->compile_db_string( array( + 'member_id' => $to_member['id'], + 'msg_date' => time(), + 'read_state' => $track_id, + 'title' => $ibforums->input['msg_title'], + 'message' => $ibforums->input['Post'], + 'from_id' => $this->member['id'], + 'vid' => 'in', + 'recipient_id' => $to_member['id'], + ) ); + + $DB->query("INSERT INTO ibf_messages (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"); + $new_id = $DB->get_insert_id(); + unset($db_string); + + //----------------------------------------------------- + + $DB->query("UPDATE ibf_members SET ". + "msg_total = msg_total + 1, " . + "new_msg = new_msg + 1, " . + "msg_from_id='" .$this->member['id'] . "', ". + "msg_msg_id='" . $new_id . "', ". + "show_popup='" . $show_popup . "' ". + "WHERE id='" . $to_member['id'] . "'"); + + //----------------------------------------------------- + // Add the data to the current members DB if we are + // adding it to our "sent items" folder + //----------------------------------------------------- + + if ($ibforums->input['add_sent']) + { + + $DB->query("UPDATE ibf_members SET ". + "msg_total = msg_total + 1 ". + "WHERE id='" . $this->member['id'] . "'"); + + $db_string = $std->compile_db_string( array( + 'member_id' => $this->member['id'], + 'msg_date' => time(), + 'read_state' => 0, + 'title' => $ibforums->lang['saved_sent_msg'].' '.$ibforums->input['msg_title'], + 'message' => $ibforums->input['Post'], + 'from_id' => $this->member['id'], + 'vid' => 'sent', + 'recipient_id' => $to_member['id'], + ) ); + + + $DB->query("INSERT INTO ibf_messages (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"); + unset($db_string); + } + + $text = preg_replace( "/<#FROM_MEMBER#>/" , $this->member['name'] , $ibforums->lang['sent_text'] ); + $text = preg_replace( "/<#TO_MEMBER#>/" , $to_member['name'] , $text ); + $text = preg_replace( "/<#MESSAGE_TITLE#>/" , $ibforums->input['msg_title'], $text ); + + $print->redirect_screen( $text , "&act=Msg&CODE=01" ); + + } + + + /**********************************************************/ + // MSG LIST: + // + // Views the inbox / folder of choice + /**********************************************************/ + + function msg_list() { + global $ibforums, $DB, $std, $print; + + $sort_key = $ibforums->input['sort_key'] ? $ibforums->input['sort_key'] : 'msg_date'; + $sort_order = $ibforums->input['sort_order'] ? $ibforums->input['sort_order'] : 'Z-A'; + + $sort_order = 'Z-A' ? 'DESC' : 'ASC'; + + //--------------------------------------------- + // Get the number of messages we have in total. + //--------------------------------------------- + + $DB->query("SELECT COUNT(*) as msg_total FROM ibf_messages WHERE member_id='".$this->member['id']."'"); + $total = $DB->fetch_row(); + + $total['msg_total'] = $total['msg_total'] > 0 ? $total['msg_total'] : 0; + + if ($ibforums->member['msg_total'] == "") + { + $DB->query("UPDATE ibf_members SET msg_total='".$total['msg_total']."' WHERE id='".$this->member['id']."'"); + } + + //--------------------------------------------- + // Make sure we've not exceeded our alloted allowance. + //--------------------------------------------- + + $info['full_messenger'] = ""; + $info['full_percent'] = ""; + $info['space_free'] = "Unlimited"; + $info['total_messages'] = $total['msg_total']; + + if ($ibforums->vars['max_messages'] > 0) + { + if ($total['msg_total'] >= $ibforums->vars['max_messages']) + { + $info['full_messenger'] = "".$ibforums->lang['folders_full'].""; + } + + $info['full_percent'] = $total['msg_total'] ? sprintf( "%.0f", ( ($total['msg_total'] / $ibforums->vars['max_messages']) * 100) ) : 0; + $info['full_percent'] = "(". $info['full_percent'] .'% '. $ibforums->lang['total_capacity'] . ")"; + $info['space_free'] = $ibforums->vars['max_messages'] - $total['msg_total']; + } + + + //--------------------------------------------- + // Print the header + //--------------------------------------------- + + if ($this->vid == 'sent') + { + $ibforums->lang['message_from'] = $ibforums->lang['message_to']; + + $DB->query("SELECT m.*, mp.name as from_name FROM ibf_messages m, ibf_members mp WHERE member_id='".$this->member['id']."' AND vid='".$this->vid."' and mp.id=m.recipient_id ORDER BY $sort_key $sort_order"); + + } + else + { + $DB->query("SELECT m.*, mp.name as from_name FROM ibf_messages m, ibf_members mp WHERE member_id='".$this->member['id']."' AND vid='".$this->vid."' and mp.id=m.from_id ORDER BY $sort_key $sort_order"); + } + + $this->output .= $this->html->inbox_table_header( $this->msg_stats['current_dir'], $info ); + + //--------------------------------------------- + // Get the messages + //--------------------------------------------- + + + if ( $DB->get_num_rows() ) + { + while( $row = $DB->fetch_row() ) + { + $row['icon'] = $row['read_state'] == 1 ? $ibforums->skin['M_READ'] : $ibforums->skin['M_UNREAD']; + $row['date'] = $std->get_date( $row['msg_date'] , 'LONG' ); + + if ($this->vid != 'sent') + { + $row['add_to_contacts'] = "[ vars['php_ext']}?s={$ibforums->session_id}&act=Msg&CODE=02&MID={$row['from_id']}'>{$ibforums->lang[add_to_book]} ]"; + } + else + { + $row['from_id'] = $row['recipient_id']; + } + + $d_array = array( 'msg' => $row, 'member' => $this->member, 'stat' => $this->msg_stats ); + + $this->output .= $this->html->inbox_row( $d_array ); + } + } + else + { + $this->output .= $this->html->No_msg_inbox(); + } + + $sorted_by = 'from_' . $sort_key; + $this->output .= $this->html->end_inbox( $this->jump_html ); + + //--------------------------------------------- + // Update the message stats if we have to + //--------------------------------------------- + + if ($this->msg_stats['current_id'] == 'in') + { + $DB->query("UPDATE ibf_members SET ". + "new_msg='0' ". + "WHERE id='".$this->member['id']."'"); + } + + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + + + } + + +//+------------------------------------------------------------------------------------ + + /*********************************************************************/ + // Parse the member info + /*********************************************************************/ + + function parse_member($member=array(), $row=array()) { + global $ibforums, $std, $DB; + + $member['name'] = "{$member['name']}"; + + $member['avatar'] = $std->get_avatar( $member['avatar'], $ibforums->member['view_avs'], $member['avatar_size'] ); + + $member['MEMBER_JOINED'] = $ibforums->lang['m_joined'].' '.$std->get_date( $member['joined'], 'JOINED' ); + + $member['MEMBER_GROUP'] = $ibforums->lang['m_group'].' '.$member['member_group']; + + $member['MEMBER_POSTS'] = $ibforums->lang['m_posts'].' '.$member['posts']; + + $member['PROFILE_ICON'] = "{$ibforums->skin['P_PROFILE']} "; + + $member['MESSAGE_ICON'] = "{$ibforums->skin['P_MSG']} "; + + if (!$member['hide_email']) { + $member['EMAIL_ICON'] = "{$ibforums->skin['P_EMAIL']} "; + } + + if ( $member['website'] and $member['website'] = preg_match( "/^http:\/\/\S+$/", $member['WEBSITE'] ) ) { + $member['WEBSITE_ICON'] = "{$ibforums->skin['P_WEBSITE']} "; + } + + if ($member['icq_number']) { + $member['ICQ_ICON'] = "base_url}&act=ICQ&MID={$member['id']}','Pager','450','330','0','1','1','1')\">{$ibforums->skin[P_ICQ]} "; + } + + if ($member['aim_name']) { + $member['AOL_ICON'] = "base_url}&act=AOL&MID={$member['id']}','Pager','450','330','0','1','1','1')\">{$ibforums->skin[P_AOL]} "; + } + + //----------------------------------------------------- + + return $member; + + } + + + +} + +?> diff --git a/upload/sources/Moderate.php b/upload/sources/Moderate.php new file mode 100644 index 00000000..a4ecac9e --- /dev/null +++ b/upload/sources/Moderate.php @@ -0,0 +1,1332 @@ + Moderation core module +| > Module written by Matt Mecham +| > Date started: 19th February 2002 +| +| > Module Version 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new Moderate; + +class Moderate { + + var $output = ""; + var $base_url = ""; + var $html = ""; + + var $moderator = ""; + var $forum = array(); + var $topic = array(); + + var $upload_dir = ""; + + + /***********************************************************************************/ + // + // Our constructor, load words, load skin, print the topic listing + // + /***********************************************************************************/ + + function Moderate() { + + global $ibforums, $DB, $std, $print, $skin_universal, $HTTP_POST_VARS; + + // Make sure this is a POST request, not a naughty IMG redirect + + if ($ibforums->input['CODE'] != '04' && $ibforums->input['CODE'] != '20' && $ibforums->input['CODE'] != '22') + { + + if ($HTTP_POST_VARS['act'] == '') + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'incorrect_use') ); + } + + } + + require "./Skin/".$ibforums->skin_id."/skin_mod.php"; + + //------------------------------------- + // Compile the language file + //------------------------------------- + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_mod', $ibforums->lang_id); + + $this->html = new skin_mod(); + + //------------------------------------- + // Check the input + //------------------------------------- + + if ($ibforums->input['t']) + { + $ibforums->input['t'] = $std->is_number($ibforums->input['t']); + if (! $ibforums->input['t'] ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files') ); + } + else + { + $DB->query("SELECT tid, title, description, posts, state, starter_id, pinned, forum_id from ibf_topics WHERE tid='".$ibforums->input['t']."'"); + $this->topic = $DB->fetch_row(); + + if (empty($this->topic['tid'])) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files') ); + } + } + } + + if ($ibforums->input['p']) + { + $ibforums->input['p'] = $std->is_number($ibforums->input['p']); + if (! $ibforums->input['p'] ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files') ); + } + } + + $ibforums->input['f'] = $std->is_number($ibforums->input['f']); + if (! $ibforums->input['f'] ) + { + $std->Error( array( 'LEVEL' => 1,'MSG' => 'missing_files') ); + } + + $ibforums->input['st'] = $ibforums->input['st'] ? $std->is_number($ibforums->input['st']) : 0; + + + //------------------------------------- + // Get the forum info based on the forum ID, get the category name, ID, and get the topic details + //------------------------------------- + + $DB->query("SELECT f.*, c.name as cat_name, c.id as cat_id from ibf_forums f, ibf_categories c WHERE f.id=".$ibforums->input['f']." and c.id=f.category"); + + $this->forum = $DB->fetch_row(); + + + //------------------------------------- + // Error out if we can not find the forum + //------------------------------------- + + if (!$this->forum['id']) + { + $std->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + + $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; + + if ($ibforums->member['id']) + { + if ($ibforums->member['g_is_supmod'] != 1) + { + $DB->query("SELECT * FROM ibf_moderators WHERE forum_id='".$this->forum['id']."' AND member_id='".$ibforums->member['id']."'"); + $this->moderator = $DB->fetch_row(); + } + } + + $this->upload_dir = $ibforums->vars['upload_dir']; + + //------------------------------------- + // Convert the code ID's into something + // use mere mortals can understand.... + //------------------------------------- + + switch ($ibforums->input['CODE']) { + case '02': + $this->move_form(); + break; + case '03': + $this->delete_form(); + break; + case '04': + $this->delete_post(); + break; + case '05': + $this->edit_form(); + break; + case '00': + $this->close_topic(); + break; + case '01': + $this->open_topic(); + break; + case '08': + $this->delete_topic(); + break; + case '12': + $this->do_edit(); + break; + case '14': + $this->do_move(); + break; + case '15': + $this->pin_topic(); + break; + case '16': + $this->unpin_topic(); + break; + case '17': + $this->rebuild_topic(); + break; + //------------------------- + case '20': + $this->poll_edit_form(); + break; + case '21': + $this->poll_edit_do(); + break; + //------------------------- + case '22': + $this->poll_delete_form(); + break; + case '23': + $this->poll_delete_do(); + break; + //------------------------- + default: + $this->moderate_error(); + break; + } + + // If we have any HTML to print, do so... + + $print->add_output("$this->output"); + $print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) ); + + } + + + /*************************************************/ + // EDIT POLL FORM: + // --------------- + // + /*************************************************/ + + + function poll_delete_form() { + global $std, $ibforums, $DB, $print; + + $passed = 0; + + if ($ibforums->member['g_is_supmod'] == 1) { + $passed = 1; + } + + else if ($this->moderator['delete_topic'] == 1) { + $passed = 1; + } + else { + $passed = 0; + } + + if ($passed != 1) $this->moderate_error(); + + if (empty($this->topic['tid'])) + { + $this->moderate_error(); + } + + $DB->query("SELECT * FROM ibf_polls WHERE tid='".$this->topic['tid']."'"); + $poll_data = $DB->fetch_row(); + + if (! $poll_data['pid']) + { + $this->moderate_error(); + } + + $this->output = $this->html_start_form( array( 1 => array( 'CODE', '23' ), + 2 => array( 't' , $this->topic['tid'] ), + 3 => array( 'f' , $this->forum['id'] ), + ) ); + + $this->output .= $this->html->table_top( $ibforums->lang['pd_top']." ".$this->forum['name']." > ".$this->topic['title'] ); + + $this->output .= $this->html->mod_exp( $ibforums->lang['pd_text'] ); + + $this->output .= $this->html->end_form( $ibforums->lang['pd_submit'] ); + + $this->page_title = $ibforums->lang['pd_top'].$this->topic['title']; + + $this->nav = array ( "{$this->forum['name']}", + "topic['tid']}'>{$this->topic['title']}" + ); + } + + function poll_delete_do() { + global $std, $ibforums, $DB, $print; + + $passed = 0; + + if ($ibforums->member['g_is_supmod'] == 1) { + $passed = 1; + } + + else if ($this->moderator['delete_topic'] == 1) { + $passed = 1; + } + else { + $passed = 0; + } + + if ($passed != 1) $this->moderate_error(); + + if (empty($this->topic['tid'])) + { + $this->moderate_error(); + } + + // Remove the poll + + $DB->query("DELETE FROM ibf_polls WHERE tid='".$this->topic['tid']."'"); + + // Remove from poll votes + + $DB->query("DELETE FROM ibf_voters WHERE tid='".$this->topic['tid']."'"); + + // Update topic + + $DB->query("UPDATE ibf_topics SET poll_state='', last_vote='', total_votes='' WHERE tid='".$this->topic['tid']."'"); + + // Boing! + + $print->redirect_screen( $ibforums->lang['pd_redirect'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid']."&st=".$ibforums->input['st'] ); + + } + + + function poll_edit_do() { + global $std, $ibforums, $DB, $print; + + $passed = 0; + + if ($ibforums->member['g_is_supmod'] == 1) + { + $passed = 1; + } + + else if ($this->moderator['edit_post'] == 1) + { + $passed = 1; + } + else + { + $passed = 0; + } + + if ($passed != 1) $this->moderate_error(); + + if (empty($this->topic['tid'])) + { + $this->moderate_error(); + } + + $DB->query("SELECT * FROM ibf_polls WHERE tid='".$this->topic['tid']."'"); + $poll_data = $DB->fetch_row(); + + if (! $poll_data['pid']) + { + $this->moderate_error(); + } + + $poll_answers = unserialize(stripslashes($poll_data['choices'])); + + reset($poll_answers); + $new_poll_array = array(); + + foreach ($poll_answers as $entry) + { + $id = $entry[0]; + $choice = $ibforums->input['POLL_'.$id]; + $votes = $entry[2]; + + $new_poll_array[] = array( $id, $choice, $votes); + } + + $poll_data['choices'] = addslashes(serialize($new_poll_array)); + + $DB->query("UPDATE ibf_polls SET ". + "choices='" . $poll_data['choices'] . "' ". + "WHERE tid='" . $this->topic['tid'] . "'"); + + //------------------------ + + // Update the topic table to change the poll_only value. + + $poll_state = $ibforums->input['pollonly'] == 1 ? 'closed' : 'open'; + + $DB->query("UPDATE ibf_topics SET poll_state='$poll_state' WHERE tid='".$this->topic['tid']."'"); + + $this->moderate_log("Edited a Poll"); + + $print->redirect_screen( $ibforums->lang['pe_done'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid']."&st=".$ibforums->input['st'] ); + + } + + + //-------------------------------------- + + + function poll_edit_form() { + global $std, $ibforums, $DB, $print; + + $passed = 0; + + if ($ibforums->member['g_is_supmod'] == 1) { + $passed = 1; + } + + else if ($this->moderator['edit_post'] == 1) { + $passed = 1; + } + else { + $passed = 0; + } + + if ($passed != 1) $this->moderate_error(); + + if (empty($this->topic['tid'])) + { + $this->moderate_error(); + } + + $DB->query("SELECT * FROM ibf_polls WHERE tid='".$this->topic['tid']."'"); + $poll_data = $DB->fetch_row(); + + if (! $poll_data['pid']) + { + $this->moderate_error(); + } + + $this->output = $this->html_start_form( array( 1 => array( 'CODE', '21' ), + 2 => array( 't' , $this->topic['tid'] ), + 3 => array( 'f' , $this->forum['id'] ), + ) ); + + $this->output .= $this->html->table_top( $ibforums->lang['pe_top']." ".$this->forum['name']." > ".$this->topic['title'] ); + + $poll_answers = unserialize(stripslashes($poll_data['choices'])); + + reset($poll_answers); + + foreach ($poll_answers as $entry) + { + $id = $entry[0]; + $choice = $entry[1]; + $votes = $entry[2]; + + $this->output .= $this->html->poll_entry($id, $choice); + + } + + $this->output .= $this->html->poll_select_form(); + + $this->output .= $this->html->end_form( $ibforums->lang['pe_submit'] ); + + $this->page_title = $ibforums->lang['pe_top'].$this->topic['title']; + + $this->nav = array ( "{$this->forum['name']}", + "topic['tid']}'>{$this->topic['title']}" + ); + } + + /*************************************************/ + // MOVE FORM: + // --------------- + // + /*************************************************/ + + function move_form() { + global $std, $ibforums, $DB, $print; + + $passed = 0; + + if ($ibforums->member['g_is_supmod'] == 1) { + $passed = 1; + } + + else if ($this->moderator['move_topic'] == 1) { + $passed = 1; + } + else { + $passed = 0; + } + + if ($passed != 1) $this->moderate_error(); + + if (empty($this->topic['tid'])) + { + $this->moderate_error(); + } + + $this->output = $this->html_start_form( array( 1 => array( 'CODE', '14' ), + 2 => array( 'tid' , $this->topic['tid'] ), + 3 => array( 'sf' , $this->forum['id'] ), + ) ); + + $jump_html = $std->build_forum_jump('no_html'); + + $this->output .= $this->html->table_top( $ibforums->lang['top_move']." ".$this->forum['name']." > ".$this->topic['title'] ); + $this->output .= $this->html->mod_exp( $ibforums->lang['move_exp'] ); + $this->output .= $this->html->move_form( $jump_html , $this->forum['name']); + $this->output .= $this->html->end_form( $ibforums->lang['submit_move'] ); + + $this->page_title = $ibforums->lang['t_move'].": ".$this->topic['title']; + + $this->nav = array ( "{$this->forum['name']}", + "topic['tid']}'>{$this->topic['title']}" + ); + } + + /*************************************************/ + + function do_move() { + global $std, $ibforums, $DB, $print; + + $passed = 0; + + if ($ibforums->member['g_is_supmod'] == 1) { + $passed = 1; + } + + else if ($this->moderator['move_topic'] == 1) { + $passed = 1; + } + else { + $passed = 0; + } + + if ($passed != 1) $this->moderate_error(); + + //---------------------------------- + // Check for input.. + //---------------------------------- + + if ($ibforums->input['sf'] == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'move_no_source' ) ); + } + + //---------------------------------- + + if ($ibforums->input['move_id'] == "" or $ibforums->input['move_id'] == -1) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'move_no_forum' ) ); + } + + //---------------------------------- + + if ($ibforums->input['move_id'] == $ibforums->input['sf']) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'move_same_forum' ) ); + } + + //---------------------------------- + + $DB->query("SELECT id, subwrap FROM ibf_forums WHERE id IN(".$ibforums->input['sf'].",".$ibforums->input['move_id'].")"); + + if ($DB->get_num_rows() != 2) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'move_no_forum' ) ); + } + + //----------------------------------- + // Check for an attempt to move into a subwrap forum + //----------------------------------- + + while ( $f = $DB->fetch_row() ) + { + if ($f['subwrap'] == 1) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'move_no_forum' ) ); + } + } + + + $DB->query("SELECT * FROM ibf_topics WHERE tid='".$ibforums->input['tid']."'"); + + if ( ! $this->topic = $DB->fetch_row() ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'move_no_forum' ) ); + } + + //---------------------------------- + // We know that $this->topic is set.. + //---------------------------------- + + $source = $ibforums->input['sf']; + $moveto = $ibforums->input['move_id']; + $tid = $ibforums->input['tid']; + + //---------------------------------- + // Update the topic + //---------------------------------- + + $DB->query("UPDATE ibf_topics SET forum_id='$moveto' WHERE forum_id='$source' AND tid='$tid'"); + + //---------------------------------- + // Update the posts + //---------------------------------- + + $DB->query("UPDATE ibf_posts SET forum_id='$moveto' WHERE forum_id='$source' AND topic_id='$tid'"); + + //---------------------------------- + // Update the polls + //---------------------------------- + + $DB->query("UPDATE ibf_polls SET forum_id='$moveto' WHERE forum_id='$source' AND tid='$tid'"); + + //---------------------------------- + // Are we leaving a link? + //---------------------------------- + + if ($ibforums->input['leave'] == 'y') + { + //---------------------------------- + // Insert a new "link" topic... + //---------------------------------- + + $db_string = $DB->compile_db_insert_string( array ( + 'title' => $this->topic['title'], + 'description' => $this->topic['description'], + 'state' => 'link', + 'posts' => 0, + 'views' => 0, + 'starter_id' => $this->topic['starter_id'], + 'start_date' => $this->topic['start_date'], + 'starter_name' => $this->topic['starter_name'], + 'last_post' => $this->topic['last_post'], + 'forum_id' => $source, + 'approved' => 1, + 'pinned' => 0, + 'moved_to' => $this->topic['tid'].'&'.$moveto, + 'last_poster_id' => $this->topic['last_poster_id'], + 'last_poster_name' => $this->topic['last_poster_name'] + ) ); + + $DB->query("INSERT INTO ibf_topics (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"); + + } + + $this->moderate_log("Moved a topic"); + + // Resync the forums.. + + $this->recount($source); + + $this->recount($moveto); + + $print->redirect_screen( $ibforums->lang['p_moved'], "act=SF&f=".$this->forum['id']."&st=".$ibforums->input['st'] ); + + } + + + /*************************************************/ + + function delete_post() { + global $std, $ibforums, $DB, $print; + + $passed = 0; + + if ($ibforums->member['g_is_supmod'] == 1) + { + $passed = 1; + } + else if ($ibforums->member['g_delete_own_posts'] == 1) + { + $passed = 1; + } + else if ($this->moderator['delete_post'] == 1) + { + $passed = 1; + } + else + { + $passed = 0; + } + + if ($passed != 1) $this->moderate_error(); + + + // Get this post id. + + $DB->query("SELECT pid,attach_file, attach_id, post_date, new_topic from ibf_posts WHERE forum_id='".$this->forum['id']."' AND topic_id='".$this->topic['tid']."' and pid='".$ibforums->input['p']."'"); + if ( ! $post = $DB->fetch_row() ) + { + $this->moderate_error(); + } + + // Check to make sure that this isn't the first post in the topic.. + + if ($post['new_topic'] == 1) + { + $this->moderate_error('no_delete_post'); + } + + //--------------------------------------- + // Is there an attachment to this post? + //--------------------------------------- + + if ($post['attach_id'] != "") + { + if (is_file($this->upload_dir."/".$post['attach_id'])) + { + unlink ($this->upload_dir."/".$post['attach_id']); + } + } + + //--------------------------------------- + // delete the post + //--------------------------------------- + + $DB->query("DELETE from ibf_posts WHERE topic_id='".$this->topic['tid']."' and pid='".$post['pid']."'"); + + //--------------------------------------- + // Update the stats + //--------------------------------------- + + $DB->query("UPDATE ibf_stats SET TOTAL_REPLIES=TOTAL_REPLIES-1"); + + //--------------------------------------- + // Get the latest post details + //--------------------------------------- + + $DB->query("SELECT post_date, author_id, author_name from ibf_posts WHERE topic_id='".$this->topic['tid']."' and queued <> 1 ORDER BY pid DESC"); + $last_post = $DB->fetch_row(); + + $DB->query("UPDATE ibf_topics SET last_post='" .$last_post['post_date'] ."', ". + "last_poster_id='" .$last_post['author_id'] ."', ". + "last_poster_name='" .$last_post['author_name'] ."', ". + "posts=posts-1 WHERE tid='".$this->topic['tid']."'"); + + //--------------------------------------- + // If we deleted the last post in a topic that was + // the last post in a forum, best update that :D + //--------------------------------------- + + if ($this->forum['last_id'] == $this->topic['tid']) + { + $DB->query("SELECT title, tid, last_post, last_poster_id, last_poster_name " + ."FROM ibf_topics WHERE forum_id='".$this->forum['id']."' AND approved=1 " + ."ORDER BY last_post DESC LIMIT 0,1"); + + $tt = $DB->fetch_row(); + + $db_string = $DB->compile_db_update_string( array( + last_title => $tt['title'] ? $tt['title'] : "", + last_id => $tt['tid'] ? $tt['tid'] : "", + last_post => $tt['last_post'] ? $tt['last_post'] : "", + last_poster_name => $tt['last_poster_name'] ? $tt['last_poster_name'] : "", + last_poster_id => $tt['last_poster_id'] ? $tt['last_poster_id'] : "", + ) ); + + $DB->query("UPDATE ibf_forums SET ".$db_string.",posts=posts-1 WHERE id='".$this->forum['id']."'"); + } + + $this->moderate_log("Deleted a post"); + + $print->redirect_screen( $ibforums->lang['post_deleted'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid']."&st=".$ibforums->input['st'] ); + + + } + + function rebuild_topic() {} + + /*************************************************/ + // DELETE TOPIC: + // --------------- + // + /*************************************************/ + + function delete_form() { + global $std, $ibforums, $DB, $print; + + $passed = 0; + + if ($ibforums->member['g_is_supmod'] == 1) { + $passed = 1; + } + + else if ($this->topic['starter_id'] == $ibforums->member['id']) + { + if ($ibforums->member['g_delete_own_topics'] == 1) + { + $passed = 1; + } + } + + else if ($this->moderator['delete_topic'] == 1) { + $passed = 1; + } + else { + $passed = 0; + } + + if ($passed != 1) $this->moderate_error(); + + if (empty($this->topic['tid'])) { + $this->moderate_error(); + } + + $this->output = $this->html->delete_js(); + + $this->output .= $this->html_start_form( array( 1 => array( 'CODE', '08' ), + 2 => array( 't', $this->topic['tid'] ) + ) ); + + $this->output .= $this->html->table_top( $ibforums->lang['top_delete']." ".$this->forum['name']." > ".$this->topic['title'] ); + $this->output .= $this->html->mod_exp( $ibforums->lang['delete_topic'] ); + $this->output .= $this->html->end_form( $ibforums->lang['submit_delete'] ); + + $this->page_title = $ibforums->lang['t_delete'].": ".$this->topic['title']; + + $this->nav = array ( "{$this->forum['name']}", + "topic['tid']}'>{$this->topic['title']}" + ); + } + + function delete_topic() { + global $std, $ibforums, $DB, $print; + + $passed = 0; + + if ($ibforums->member['g_is_supmod'] == 1) { + $passed = 1; + } + + else if ($this->topic['starter_id'] == $ibforums->member['id']) + { + if ($ibforums->member['g_delete_own_topics'] == 1) + { + $passed = 1; + } + } + + else if ($this->moderator['delete_topic'] == 1) { + $passed = 1; + } + else { + $passed = 0; + } + + if ($passed != 1) $this->moderate_error(); + + if (empty($this->topic['tid'])) { + $this->moderate_error(); + } + + // Do we have a linked topic to remove? + + $DB->query("SELECT tid FROM ibf_topics WHERE state='link' AND moved_to='".$this->topic['tid'].'&'.$this->forum['id']."'"); + + if ( $linked_topic = $DB->fetch_row() ) + { + $DB->query("DELETE FROM ibf_topics WHERE tid='".$linked_topic['tid']."'"); + } + + + // Remove polls assigned to this topic + + $DB->query("DELETE FROM ibf_polls WHERE tid='".$this->topic['tid']."'"); + + // Remove poll voters + + $DB->query("DELETE FROM ibf_voters WHERE tid='".$this->topic['tid']."'"); + + // Remove the topic itself + + $DB->query("DELETE FROM ibf_topics WHERE tid='".$this->topic['tid']."'"); + + // Get the attach ID's and filenames + + $DB->query("SELECT attach_id, attach_hits, attach_file FROM ibf_posts WHERE attach_id <> '' AND topic_id='".$this->topic['tid']."'"); + + // Remove the attachments + + if ( $DB->get_num_rows() ) + { + while ( $r = $DB->fetch_row() ) + { + if (is_file($this->upload_dir."/".$r['attach_id'])) + { + @unlink ($this->upload_dir."/".$r['attach_id']); + } + } + } + + // Remove the posts + + $DB->query("DELETE FROM ibf_posts WHERE topic_id='".$this->topic['tid']."'"); + + //------------------------------------------------ + // Update the forum topic/post and stat counters. + // + // We also need to make sure the last forum id and + // title is correct. + //------------------------------------------------ + + $DB->query("SELECT COUNT(tid) as tcount from ibf_topics WHERE approved=1"); + $topics = $DB->fetch_row(); + + $DB->query("SELECT COUNT(pid) as pcount from ibf_posts WHERE queued <> 1"); + $posts = $DB->fetch_row(); + + $DB->query("SELECT COUNT(tid) as tcount from ibf_topics WHERE approved=1 and forum_id='".$this->forum['id']."'"); + $f_topics = $DB->fetch_row(); + + $DB->query("SELECT COUNT(pid) as pcount from ibf_posts WHERE queued <> 1 and forum_id='".$this->forum['id']."'"); + $f_posts = $DB->fetch_row(); + + $this->forum['topics'] = $f_topics['tcount']; + $this->forum['posts'] = $f_posts['pcount'] - $f_topics['tcount']; + + $DB->query("SELECT title, tid, last_post, last_poster_id, last_poster_name " + ."FROM ibf_topics WHERE forum_id='".$this->forum['id']."' AND approved=1 " + ."ORDER BY last_post DESC LIMIT 0,1"); + + $tt = $DB->fetch_row(); + + $db_string = $DB->compile_db_update_string( array( + last_title => $tt['title'] ? $tt['title'] : "", + last_id => $tt['tid'] ? $tt['tid'] : "", + last_post => $tt['last_post'] ? $tt['last_post'] : "", + last_poster_name => $tt['last_poster_name'] ? $tt['last_poster_name'] : "", + last_poster_id => $tt['last_poster_id'] ? $tt['last_poster_id'] : "", + topics => $this->forum['topics'], + posts => $this->forum['posts'] + ) ); + + $DB->query("UPDATE ibf_forums SET $db_string WHERE id='".$this->forum['id']."'"); + + // Update the main board stats. + + $posts = $posts['pcount'] - $topics['tcount']; + + $DB->query("UPDATE ibf_stats SET TOTAL_TOPICS='".$topics['tcount']."', TOTAL_REPLIES='".$posts."'"); + + $this->moderate_log("Deleted a topic"); + + $print->redirect_screen( $ibforums->lang['p_deleted'], "act=SF&f=".$this->forum['id'] ); + + } + + + /*************************************************/ + // EDIT TOPIC: + // --------------- + // + /*************************************************/ + + function edit_form() { + global $std, $ibforums, $DB, $print; + + $passed = 0; + + if ($ibforums->member['g_is_supmod'] == 1) { + $passed = 1; + } + + else if ($this->moderator['edit_topic'] == 1) { + $passed = 1; + } + else { + $passed = 0; + } + + if ($passed != 1) $this->moderate_error(); + + if (empty($this->topic['tid'])) + { + $this->moderate_error(); + } + + $this->output = $this->html_start_form( array( 1 => array( 'CODE', '12' ), + 2 => array( 't', $this->topic['tid'] ) + ) ); + + $this->output .= $this->html->table_top( $ibforums->lang['top_edit']." ".$this->forum['name']." > ".$this->topic['title'] ); + $this->output .= $this->html->mod_exp( $ibforums->lang['edit_topic'] ); + $this->output .= $this->html->topictitle_fields( $this->topic['title'], $this->topic['description'] ); + $this->output .= $this->html->end_form( $ibforums->lang['submit_edit'] ); + + $this->page_title = $ibforums->lang['t_edit'].": ".$this->topic['title']; + + $this->nav = array ( "{$this->forum['name']}", + "topic['tid']}'>{$this->topic['title']}" + ); + } + + function do_edit() { + global $std, $ibforums, $DB, $print; + + $passed = 0; + + if ($ibforums->member['g_is_supmod'] == 1) { + $passed = 1; + } + + else if ($this->moderator['edit_topic'] == 1) { + $passed = 1; + } + else { + $passed = 0; + } + + if ($passed != 1) $this->moderate_error(); + + if (empty($this->topic['tid'])) { + $this->moderate_error(); + } + + if ($ibforums->input['TopicTitle'] == "") { + $std->Error( array( 'LEVEL' => 2, 'MSG' => 'no_topic_title' ) ); + } + + $topic_title = preg_replace( "/'/", "/\\'/", $ibforums->input['TopicTitle'] ); + $topic_desc = preg_replace( "/'/", "/\\'/", $ibforums->input['TopicDesc'] ); + + $DB->query("UPDATE ibf_topics SET title='$topic_title', description='$topic_desc' WHERE tid='".$this->topic['tid']."'"); + + if ($this->topic['tid'] == $this->forum['last_id']) + { + $DB->query("UPDATE ibf_forums SET last_title='$topic_title' WHERE id='".$this->forum['id']."'"); + } + + $this->moderate_log("Edited a topic title"); + + $print->redirect_screen( $ibforums->lang['p_edited'], "act=SF&f=".$this->forum['id'] ); + + + } + + + /*************************************************/ + // OPEN TOPIC: + // --------------- + // + /*************************************************/ + + function open_topic() { + global $std, $ibforums, $DB, $print; + + if ($this->topic['state'] == 'open') { + $this->moderate_error(); + } + + $passed = 0; + + if ($ibforums->member['g_is_supmod'] == 1) { + $passed = 1; + } + + else if ($this->topic['starter_id'] == $ibforums->member['id']) { + if ($ibforums->member['g_open_close_topics'] == 1) { + $passed = 1; + } + } + else + { + $passed = 0; + } + + if ($this->moderator['open_topic'] == 1) { + $passed = 1; + } + + + if ($passed != 1) $this->moderate_error(); + + $this->alter_topic( array( 'TOPIC' => $this->topic['tid'], 'FIELD' => 'state', 'VALUE' => 'open' ) ); + + $this->moderate_log("Opened Topic"); + + $print->redirect_screen( $ibforums->lang['p_opened'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid']."&st=".$ibforums->input['st'] ); + + } + + + + /*************************************************/ + // CLOSE TOPIC: + // --------------- + // + /*************************************************/ + + function close_topic() { + global $std, $ibforums, $DB, $print; + + $passed = 0; + + if ($ibforums->member['g_is_supmod'] == 1) { + $passed = 1; + } + + else if ($this->topic['starter_id'] == $ibforums->member['id']) { + if ($ibforums->member['g_open_close_topics'] == 1) { + $passed = 1; + } + } + else + { + $passed = 0; + } + + if ($this->moderator['close_topic'] == 1) { + $passed = 1; + } + + + if ($passed != 1) $this->moderate_error(); + + $this->alter_topic( array( 'TOPIC' => $this->topic['tid'], 'FIELD' => 'state', 'VALUE' => 'closed' ) ); + + $this->moderate_log("Locked Topic"); + + $print->redirect_screen( $ibforums->lang['p_closed'], "act=SF&f=".$this->forum['id'] ); + + } + + + /*************************************************/ + // PIN TOPIC: + // --------------- + // + /*************************************************/ + + function pin_topic() { + global $std, $ibforums, $DB, $print; + + if ($this->topic['PIN_STATE'] == 1) { + $this->moderate_error(); + } + + $passed = 0; + + if ($ibforums->member['g_is_supmod'] == 1) { + $passed = 1; + } + + else if ($this->moderator['pin_topic'] == 1) { + $passed = 1; + } + else { + $passed = 0; + } + + if ($passed != 1) $this->moderate_error(); + + $this->alter_topic( array( 'TOPIC' => $this->topic['tid'], 'FIELD' => 'pinned', 'VALUE' => '1' ) ); + + $this->moderate_log("Pinned Topic"); + + $print->redirect_screen( $ibforums->lang['p_pinned'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid']."&st=".$ibforums->input['st'] ); + + } + + /*************************************************/ + // UNPIN TOPIC: + // --------------- + // + /*************************************************/ + + function unpin_topic() { + global $std, $ibforums, $DB, $print; + + if ($this->topic['pinned'] == 0) { + $this->moderate_error(); + } + + $passed = 0; + + if ($ibforums->member['g_is_supmod'] == 1) { + $passed = 1; + } + + else if ($this->moderator['unpin_topic'] == 1) { + $passed = 1; + } + else { + $passed = 0; + } + + if ($passed != 1) $this->moderate_error(); + + $this->alter_topic( array( 'TOPIC' => $this->topic['tid'], 'FIELD' => 'pinned', 'VALUE' => '0' ) ); + + $this->moderate_log("Unpinned Topic"); + + $print->redirect_screen( $ibforums->lang['p_unpinned'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid']."&st=".$ibforums->input['st'] ); + + } + +//+--------------------------------------------------------------------------------------------- + + + /*************************************************/ + // MODERATE ERROR: + // --------------- + // + // Function for error messages in this script + // + /*************************************************/ + + function moderate_error($msg = 'moderate_no_permission') { + global $std; + + $std->Error( array( 'LEVEL' => 2, 'MSG' => $msg ) ); + + // Make sure we exit.. + + exit(); + } + + /*************************************************/ + // MODERATE LOG: + // --------------- + // + // Function for adding the mod action to the DB + // + /*************************************************/ + + function moderate_log($title = 'unknown') { + global $std, $ibforums, $DB, $HTTP_REFERER, $QUERY_STRING; + + $db_string = $std->compile_db_string( array ( + 'forum_id' => $ibforums->input['f'], + 'topic_id' => $ibforums->input['t'], + 'post_id' => $ibforums->input['p'], + 'member_id' => $ibforums->member['id'], + 'member_name' => $ibforums->member['name'], + 'ip_address' => $ibforums->input['IP_ADDRESS'], + 'http_referer'=> $HTTP_REFERER, + 'ctime' => time(), + 'topic_title' => $this->topic['title'], + 'action' => $title, + 'query_string'=> $QUERY_STRING, + ) + ); + + $DB->query("INSERT INTO ibf_moderator_logs (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"); + + } + + + /*************************************************/ + // Re Count topics for the forums: + // --------------- + // + // Handles simple moderation functions, saves on + // writing the same code over and over. + // ASS_U_ME's that the requesting user has been + // authenticated by this stage. + // + /*************************************************/ + + function recount($fid="") { + global $ibforums, $root_path, $DB, $std; + + if ($fid == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'move_no_source' ) ); + } + + // Get the topics.. + + $DB->query("SELECT COUNT(tid) as count FROM ibf_topics WHERE approved=1 and forum_id='".$fid."'"); + $topics = $DB->fetch_row(); + + // Get the posts.. + + $DB->query("SELECT COUNT(pid) as count FROM ibf_posts WHERE queued <> 1 and forum_id='".$fid."'"); + $posts = $DB->fetch_row(); + + // Get the forum last poster.. + + $DB->query("SELECT tid, title, last_poster_id, last_poster_name, last_post FROM ibf_topics WHERE approved=1 and forum_id='".$fid."' ORDER BY last_post DESC LIMIT 0,1"); + $last_post = $DB->fetch_row(); + + // Reset this forums stats + + $db_string = $DB->compile_db_update_string( array ( + 'last_poster_id' => $last_post['last_poster_id'], + 'last_poster_name' => $last_post['last_poster_name'], + 'last_post' => $last_post['last_post'], + 'last_title' => $last_post['title'], + 'last_id' => $last_post['tid'], + 'topics' => $topics['count'], + 'posts' => $posts['count'] + ) ); + + $DB->query("UPDATE ibf_forums SET $db_string WHERE id='".$fid."'"); + + } + + + /*************************************************/ + // ALTER TOPIC: + // --------------- + // + // Handles simple moderation functions, saves on + // writing the same code over and over. + // ASS_U_ME's that the requesting user has been + // authenticated by this stage. + // + /*************************************************/ + + function alter_topic( $data = array() ) { + global $ibforums, $DB; + + if ( $data['FIELD'] == "" ) return -1; + if ( $data['VALUE'] == "" ) return -1; + if ( $data['TOPIC'] == "" ) return -1; + + if ($data['TOPIC'] < 1) return -1; + + $data['VALUE'] = preg_replace( "/'/", "\\'", $data['VALUE'] ); + + $DB->query("UPDATE ibf_topics SET ".$data['FIELD']."='".$data['VALUE']."' WHERE tid='".$data['TOPIC']."'"); + } + + /*****************************************************/ + // HTML: start form. + // ------------------ + // Returns the HTML for the
opening tag + /*****************************************************/ + + function html_start_form($additional_tags=array()) { + global $ibforums; + + $form = "". + "". + "". + "". + ""; + + // Any other tags to add? + + if (isset($additional_tags)) { + foreach($additional_tags as $k => $v) { + $form .= "\n"; + } + } + + return $form; + } + +} + +?> diff --git a/upload/sources/Online.php b/upload/sources/Online.php new file mode 100644 index 00000000..2f92dd08 --- /dev/null +++ b/upload/sources/Online.php @@ -0,0 +1,281 @@ + Show online users +| > Module written by Matt Mecham +| > Date started: 12th March 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new Online; + +class Online { + + var $output = ""; + var $page_title = ""; + var $nav = array(); + var $html = ""; + var $first = 0; + var $perpage = 25; + + var $forums = array(); + var $cats = array(); + var $sessions = array(); + var $where = array(); + + var $seen_name = array(); + + + + function Online() { + global $ibforums, $DB, $std, $print; + + + if ($ibforums->input['CODE'] == "") $ibforums->input['CODE'] = 'listall'; + + //-------------------------------------------- + // Require the HTML and language modules + //-------------------------------------------- + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_online', $ibforums->lang_id); + + require "./Skin/".$ibforums->skin_id."/skin_online.php"; + + $this->html = new skin_online(); + + $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; + + //-------------------------------------------- + // Build up our language hash + //-------------------------------------------- + + foreach ($ibforums->lang as $k => $v) { + if ( preg_match( "/^WHERE_(\w+)$/", $k, $match ) ) { + $this->where[ $match[1] ] = $ibforums->lang[$k]; + } + } + + unset($match); + + //-------------------------------------------- + // What to do? + //-------------------------------------------- + + switch($ibforums->input['CODE']) { + case 'listall': + $this->list_all(); + break; + case '02': + $this->list_forum(); + break; + default: + $this->list_all(); + break; + } + + // If we have any HTML to print, do so... + + $print->add_output("$this->output"); + $print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) ); + + } + + + /*****************************************************/ + // list_all + // ------------------ + // List all online users + /*****************************************************/ + + function list_all() { + global $ibforums, $DB, $std; + + $this->first = 0; + + if (!empty($ibforums->input['st'])) + { + $this->first = $ibforums->input['st']; + } + + $last_cat_id = -1; + + $DB->query("SELECT f.id, f.name, f.read_perms, f.password, c.id as cat_id, c.name as cat_name from ibf_forums f, ibf_categories c where c.id=f.category ORDER BY c.position, f.position"); + + + while ( $i = $DB->fetch_row() ) + { + if ($last_cat_id != $i['cat_id']) + { + // Print the category + + $last_cat_id = $i['cat_id']; + + $this->cats[ $i['cat_id'] ] = $this->cats['cat_name']; + + } + + $this->forums[ $i['id'] ] = array( 'name' => $i['name'], + 'read_perms' => $i['read_perms'], + 'password' => $i['password'], + ); + + } + + $DB->free_result(); + + $t_time = time() - 900; + + $DB->query("SELECT COUNT(id) as total_sessions FROM ibf_sessions WHERE login_type <> 1 AND running_time > $t_time"); + $max = $DB->fetch_row(); + + $DB->free_result(); + + $links = $std->build_pagelinks( array( 'TOTAL_POSS' => $max['total_sessions'], + 'PER_PAGE' => 25, + 'CUR_ST_VAL' => $this->first, + 'L_SINGLE' => "", + 'L_MULTI' => $ibforums->lang['pages'], + 'BASE_URL' => $this->base_url."&act=Online&CODE=listall" + ) + ); + + $this->output = $this->html->Page_header($links); + + // Grab all the current sessions. + + $DB->query("SELECT s.id, s.member_name, s.member_id, s.running_time, s.location, s.member_group, g.prefix, g.suffix FROM ibf_sessions s, ibf_groups g WHERE login_type <> 1 AND running_time > $t_time AND s.member_group=g.g_id ORDER BY running_time DESC LIMIT ".$this->first.",25"); + + while( $sess = $DB->fetch_row() ) { + + //---------------------------------------------------- + // Is this a member, and have we seen them before? + // Proxy servers, etc can confuse the session handler, + // creating duplicate session IDs for the same user when + // their IP address changes. + //---------------------------------------------------- + + if (! empty($sess['member_name']) ) + { + if (isset($this->seen_name[ $sess['member_name'] ]) ) + { + continue; + } + else + { + $this->seen_name[ $sess['member_name'] ] = 1; + } + } + + if (isset($sess['location'])) + { + + $line = ""; + + list($act, $fid, $tid, $pid) = explode( ",", $sess['location'] ); + + if (isset($act)) + { + $line = isset($this->where[ $act ]) ? $this->where[ $act ] : $ibforums->lang['board_index']; + + } + + + if ($fid != "") + { + $pass = 0; + + if ($this->forums[ $fid ]['read_perms'] == '*') + { + $pass = 1; + } + else if (preg_match( "/(^|,)".$ibforums->member['mgroup']."(,|$)/", $this->forums[ $fid ]['read_perms']) ) + { + $pass = 1; + } + + if ($pass == 1) + { + if ($tid != "") + { + $line .= " {$this->forums[ $fid ]['name']}"; + } + else + { + $line .= " {$this->forums[ $fid ]['name']}"; + } + } + else + { + $line .= " ".$ibforums->lang['n_a']; + } + } + + } + else + { + $line .= " {$ibforums->lang['board_index']}"; + } + + + $sess['where_line'] = $line; + + if (isset($sess['member_id'])) + { + $sess['member_name'] = "{$sess['prefix']}{$sess['member_name']}{$sess['suffix']}"; + } + + $sess['running_time'] = $std->get_date( $sess['running_time'], 'LONG' ); + + $this->output .= $this->do_html_row($sess); + + } + + $this->output .= $this->html->Page_end($links); + + $this->page_title = $ibforums->lang['page_title']; + $this->nav = array( $ibforums->lang['page_title']); + + } + + function do_html_row($sess) { + global $ibforums; + + if ($sess['member_name'] and $sess['member_id']) + { + $sess['msg_icon'] = "{$ibforums->skin['P_MSG']}"; + } + else + { + $sess['member_name'] = $sess['prefix'].$ibforums->lang['guest'].$sess['suffix']; + $sess['msg_icon'] = ' '; + } + + return $this->html->show_row($sess); + } + + + function list_forum() { } + + + + + + +} + +?> diff --git a/upload/sources/Post.php b/upload/sources/Post.php new file mode 100644 index 00000000..f66096ed --- /dev/null +++ b/upload/sources/Post.php @@ -0,0 +1,930 @@ + Post core module +| > Module written by Matt Mecham +| > Date started: 14th February 2002 +| +| > Module Version 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new Post; + +class Post { + + var $output = ""; + var $base_url = ""; + var $html = ""; + var $parser = ""; + var $moderator = array(); + var $forum = array(); + var $topic = array(); + var $category = array(); + var $mem_groups = array(); + var $mem_titles = array(); + var $obj = array(); + var $email = ""; + + /***********************************************************************************/ + // + // Our constructor, load words, load skin, print the topic listing + // + /***********************************************************************************/ + + function Post() { + + + global $ibforums, $DB, $std, $print, $skin_universal; + + require "./Skin/".$ibforums->skin_id."/skin_post.php"; + + require "./sources/lib/post_parser.php"; + + $this->parser = new post_parser(1); + + + //-------------------------------------- + // Compile the language file + //-------------------------------------- + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_post', $ibforums->lang_id); + + $this->html = new skin_post(); + + //-------------------------------------- + // Check the input + //-------------------------------------- + + if ($ibforums->input['t']) + { + $ibforums->input['t'] = $std->is_number($ibforums->input['t']); + if (! $ibforums->input['t'] ) + { + $std->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + } + + if ($ibforums->input['p']) + { + $ibforums->input['p'] = $std->is_number($ibforums->input['p']); + if (! $ibforums->input['p'] ) + { + $std->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + } + + $ibforums->input['f'] = $std->is_number($ibforums->input['f']); + if (! $ibforums->input['f'] ) + { + $std->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + + $ibforums->input['st'] = $ibforums->input['st'] ? $std->is_number($ibforums->input['st']) : 0; + + // Did the user press the "preview" button? + + $this->obj['preview_post'] = $ibforums->input['preview']; + + + //-------------------------------------- + // Get the forum info based on the forum ID, get the category name, ID, and get the topic details + //-------------------------------------- + + $DB->query("SELECT f.*, c.id as cat_id, c.name as cat_name from ibf_forums f, ibf_categories c WHERE f.id=".$ibforums->input[f]." and c.id=f.category"); + + $this->forum = $DB->fetch_row(); + + if ($this->forum['read_perms'] != '*') + { + if (! preg_match("/(^|,)".$ibforums->member['mgroup']."(,|$)/", $this->forum['read_perms'] ) ) + { + $std->Error( array( LEVEL => 1, MSG => 'no_view_topic') ); + } + + } + + // Is this forum switched off? + + if ( ! $this->forum['status'] ) + { + $std->Error( array( LEVEL => 1, MSG => 'forum_read_only') ); + } + + //-------------------------------------- + // Is this a password protected forum? + //-------------------------------------- + + $pass = 0; + + if ($this->forum['password'] != "") + { + if ( ! $c_pass = $std->my_getcookie('iBForum'.$this->forum['id']) ) + { + $pass = 0; + } + + if ( $c_pass == $this->forum['password'] ) + { + $pass = 1; + } + else + { + $pass = 0; + } + } + else + { + $pass = 1; + } + + if ($pass == 0) + { + $std->Error( array( LEVEL => 1, MSG => 'no_view_topic') ); + } + + //-------------------------------------- + + if ($this->forum['parent_id'] > 0) + { + + $DB->query("SELECT f.id as forum_id, f.name as forum_name, c.id, c.name FROM ibf_forums f, ibf_categories c WHERE f.id='".$this->forum['parent_id']."' AND c.id=f.category"); + + $row = $DB->fetch_row(); + + $this->forum['cat_id'] = $row['id']; + $this->forum['cat_name'] = $row['name']; + + } + + + //-------------------------------------- + // Error out if we can not find the forum + //-------------------------------------- + + if (!$this->forum['id']) + { + $std->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + + $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; + + //-------------------------------------- + // Is this forum moderated? + //-------------------------------------- + + $this->obj['moderate'] = $this->forum['preview_posts'] ? 1 : 0; + // Can we bypass it? + if ($ibforums->member['g_avoid_q']) + { + $this->obj['moderate'] = 0; + } + + //-------------------------------------- + // Are we allowed to post at all? + //-------------------------------------- + + if ($ibforums->member['id']) + { + if (!$ibforums->member['allow_post']) + { + $std->Error( array( LEVEL => 1, MSG => 'posting_off') ); + } + + // Flood check.. + + if ( $ibforums->input['CODE'] != "08" and $ibforums->input['CODE'] != "09" ) + { + if ( $ibforums->vars['flood_control'] > 0 ) + { + if ($ibforums->member['g_avoid_flood'] != 1) + { + if ( time() - $ibforums->member['last_post'] < $ibforums->vars['flood_control'] ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'flood_control' , 'EXTRA' => $ibforums->vars['flood_control'] ) ); + } + } + } + + } + + } + + if ($ibforums->member['id'] != 0 and $ibforums->member['g_is_supmod'] == 0) + { + $DB->query("SELECT * from ibf_moderators WHERE member_id='".$ibforums->member['id']."' AND forum_id='".$this->forum['id']."'"); + $this->moderator = $DB->fetch_row(); + } + + //-------------------------------------- + // Convert the code ID's into something + // use mere mortals can understand.... + //-------------------------------------- + + $this->obj['action_codes'] = array ( '00' => array( '0' , 'new_post' ), + '01' => array( '1' , 'new_post' ), + '02' => array( '0' , 'reply_post' ), + '03' => array( '1' , 'reply_post' ), + '06' => array( '0' , 'q_reply_post' ), + '07' => array( '1' , 'q_reply_post' ), + '08' => array( '0' , 'edit_post' ), + '09' => array( '1' , 'edit_post' ), + '10' => array( '0' , 'poll' ), + '11' => array( '1' , 'poll' ), + ); + + // Make sure our input CODE element is legal. + + if (! isset($this->obj['action_codes'][ $ibforums->input['CODE'] ]) ) + { + $std->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + + // Require and run our associated library file for this action. + // this imports an extended class for this Post class. + + require "./sources/lib/post_" . $this->obj['action_codes'][ $ibforums->input['CODE'] ][1] . ".php"; + + $post_functions = new post_functions(&$this); + + // If the first CODE array bit is set to "0" - show the relevant form. + // If it's set to "1" process the input. + + // We pass a reference to this classes object so we can manipulate this classes + // data from our sub class. + + if ($this->obj['action_codes'][ $ibforums->input['CODE'] ][0]) + { + // Make sure we have a "Guest" Name.. + + if (!$ibforums->member['id']) + { + + $ibforums->input['UserName'] = trim($ibforums->input['UserName']); + $ibforums->input['UserName'] = str_replace( "
", "", $ibforums->input['UserName']); + $ibforums->input['UserName'] = $ibforums->input['UserName'] ? $ibforums->input['UserName'] : 'Guest'; + + if ($ibforums->input['UserName'] != 'Guest') + { + $DB->query("SELECT id FROM ibf_members WHERE LOWER(name)='".trim(strtolower($ibforums->input['UserName']))."'"); + + if ( $DB->get_num_rows() ) + { + $ibforums->input['UserName'] = $ibforums->vars['guest_name_pre'].$ibforums->input['UserName'].$ibforums->vars['guest_name_suf']; + } + } + + } + + //------------------------------------------------------------------------- + // Stop the user hitting the submit button in the hope that multiple topics + // or replies will be added. Or if the user accidently hits the button + // twice. + //------------------------------------------------------------------------- + + if ( $this->obj['preview_post'] == "" ) + { + + if ( preg_match( "/Post,.*,(01|03|07|11)$/", $ibforums->location ) ) + { + if ( time() - $ibforums->lastclick < 2 ) + { + if ( $ibforums->input['CODE'] == '01' or $ibforums->input['CODE'] == '11' ) + { + // Redirect to the newest topic in the forum + + + $DB->query("SELECT tid from ibf_topics WHERE forum_id='".$this->forum['id']."' AND approved=1 " + ."ORDER BY last_post DESC LIMIT 0,1"); + + $topic = $DB->fetch_row(); + + $std->boink_it($ibforums->base_url."&act=ST&f=".$this->forum['id']."&t=".$topic['tid']); + exit(); + } + else + { + // It's a reply, so simply show the topic... + + $std->boink_it($ibforums->base_url."&act=ST&f=".$this->forum['id']."&t=".$ibforums->input['t']."&view=getlastpost"); + exit(); + } + } + } + + } + + //---------------------------------- + + $post_functions->process(&$this); + } + else + { + $post_functions->show_form(&$this); + } + + + + } + + /*****************************************************/ + // topic tracker + // ------------------ + // Checks and sends out the emails as needed. + /*****************************************************/ + + function topic_tracker($tid="", $post="", $poster="") + { + global $ibforums, $DB, $std; + + require "./sources/lib/emailer.php"; + + $this->email = new emailer(); + + //-------------------------- + + if ($tid == "") + { + return TRUE; + } + + // Configure the date + $getdate = time() - (60*60*24); + + // Get the email addy's, topic ids and email_full stuff - oh yeah. + + $DB->query("SELECT tr.trid, tr.topic_id, m.name, m.email, m.id, m.email_full, m.language, t.title, t.forum_id FROM ibf_tracker tr, ibf_topics t,ibf_members m WHERE tr.topic_id='$tid' AND tr.member_id=m.id AND t.tid=tr.topic_id AND (tr.last_sent < '$getdate' or tr.last_sent=0)"); + + if ( $DB->get_num_rows() ) + { + $trids = array(); + + while ( $r = $DB->fetch_row() ) + { + + $r['language'] = $r['language'] ? $r['language'] : 'en'; + + // We don't want to be notified of our own posts, so.. + + if ($r['id'] == $ibforums->member['id']) + { + continue; + } + + //----------------------------------------------------- + + if ($r['email_full'] == 1) + { + + $this->email->get_template("subs_with_post", $r['language']); + + $this->email->build_message( array( + 'TOPIC_ID' => $r['topic_id'], + 'FORUM_ID' => $r['forum_id'], + 'TITLE' => $r['title'], + 'NAME' => $r['name'], + 'POSTER' => $poster, + 'POST' => $post, + ) + ); + + $this->email->subject = $ibforums->lang['tt_subject']; + $this->email->to = $r['email']; + $this->email->send_mail(); + + } + else + { + + $this->email->get_template("subs_no_post", $r['language']); + + $this->email->build_message( array( + 'TOPIC_ID' => $r['topic_id'], + 'FORUM_ID' => $r['forum_id'], + 'TITLE' => $r['title'], + 'NAME' => $r['name'], + 'POSTER' => $poster, + ) + ); + + $this->email->subject = $ibforums->lang['tt_subject']; + $this->email->to = $r['email']; + + $this->email->send_mail(); + + } + + $trids[] = $r['trid']; + } + + // Update the DB wid' da new time, innit. + + $trid_string = implode( ",", $trids ); + + if ( count($trids) > 0 ) + { + + $DB->query("UPDATE ibf_tracker SET last_sent='".time()."' WHERE trid IN(".$trid_string.")"); + } + + } + + return TRUE; + + } + + /*****************************************************/ + // compile post + // ------------------ + // Compiles all the incoming information into an array + // which is returned to the accessor + /*****************************************************/ + + function compile_post() { + global $ibforums, $std, $REQUEST_METHOD, $HTTP_POST_VARS; + + $ibforums->vars['max_post_length'] = $ibforums->vars['max_post_length'] ? $ibforums->vars['max_post_length'] : 2140000; + + // sort out some of the form data, check for posting length, etc. + // THIS MUST BE CALLED BEFORE CHECKING ATTACHMENTS + + $ibforums->input['enablesig'] = $ibforums->input['enablesig'] == 'yes' ? 1 : 0; + $ibforums->input['enableemo'] = $ibforums->input['enableemo'] == 'yes' ? 1 : 0; + + // Do we have a valid post? + + if (strlen( trim($HTTP_POST_VARS['Post']) ) < 1) { + $std->Error( array( LEVEL => 1, MSG => 'no_post') ); + } + + if (strlen( $HTTP_POST_VARS['Post'] ) > ($ibforums->vars['max_post_length']*1024)) { + $std->Error( array( LEVEL => 1, MSG => 'post_too_long') ); + } + + $post = array( + 'author_id' => $ibforums->member['id'] ? $ibforums->member['id'] : 0, + 'use_sig' => $ibforums->input['enablesig'], + 'use_emo' => $ibforums->input['enableemo'], + 'ip_address' => $ibforums->input['IP_ADDRESS'], + 'post_date' => time(), + 'icon_id' => $ibforums->input['iconid'], + 'post' => $this->parser->convert( array( TEXT => $ibforums->input['Post'], + SMILIES => $ibforums->input['enableemo'], + CODE => $this->forum['use_ibc'], + HTML => $this->forum['use_html'] + ) + ), + 'author_name' => $ibforums->member['id'] ? $ibforums->member['name'] : $ibforums->input['UserName'], + 'forum_id' => $this->forum['id'], + 'topic_id' => "", + 'queued' => $this->obj['moderate'], + 'attach_id' => "", + 'attach_hits' => "", + 'attach_type' => "", + ); + + // If we had any errors, parse them back to this class + // so we can track them later. + + $this->obj['post_errors'] = $this->parser->error; + + return $post; + } + + /*****************************************************/ + // process upload + // ------------------ + // checks for an entry in the upload field, and uploads + // the file if it meets our criteria. This also inserts + // a new row into the attachments database if successful + /*****************************************************/ + + function process_upload() { + + global $ibforums, $std, $HTTP_POST_FILES, $DB, $FILE_UPLOAD; + + //------------------------------------------------- + // Set up some variables to stop carpals developing + //------------------------------------------------- + + $FILE_NAME = $HTTP_POST_FILES['FILE_UPLOAD']['name']; + $FILE_SIZE = $HTTP_POST_FILES['FILE_UPLOAD']['size']; + $FILE_TYPE = $HTTP_POST_FILES['FILE_UPLOAD']['type']; + + // Naughty Opera adds the filename on the end of the + // mime type - we don't want this. + + $FILE_TYPE = preg_replace( "/^(.+?);.*$/", "\\1", $FILE_TYPE ); + + $attach_data = array( 'attach_id' => "", + 'attach_hits' => "", + 'attach_type' => "", + 'attach_file' => "", + ); + + //------------------------------------------------- + // Return if we don't have a file to upload + //------------------------------------------------- + + // Naughty Mozilla likes to use "none" to indicate an empty upload field. + // I love universal languages that aren't universal. + + if ($HTTP_POST_FILES['FILE_UPLOAD']['name'] == "" or !$HTTP_POST_FILES['FILE_UPLOAD']['name'] or ($HTTP_POST_FILES['FILE_UPLOAD']['name'] == "none") ) return $attach_data; + + //------------------------------------------------- + // Return empty handed if we don't have permission to use + // uploads + //------------------------------------------------- + + if ( (!$this->forum['use_attach']) and ($ibforums->member['g_attach_max'] < 1) ) return $attach_data; + + //------------------------------------------------- + // Load our mime types config file. + //------------------------------------------------- + + require "./conf_mime_types.php"; + + //------------------------------------------------- + // Are we allowing this type of file? + //------------------------------------------------- + + if ($mime_types[ $FILE_TYPE ][0] != 1) + { + $this->obj['post_errors'] = 'invalid_mime_type'; + return $attach_data; + } + + //------------------------------------------------- + // Check the file size + //------------------------------------------------- + + if ($FILE_SIZE > ($ibforums->member['g_attach_max']*1024)) + { + $std->Error( array( LEVEL => 1, MSG => 'upload_to_big') ); + } + + //------------------------------------------------- + // Make the uploaded file safe + //------------------------------------------------- + + $FILE_NAME = preg_replace( "/[^\w\.]/", "_", $FILE_NAME ); + + $real_file_name = "post-".$this->forum['id']."-".time(); // Note the lack of extension! + + if (preg_match( "/\.(cgi|pl|js|asp|php|html|htm|jsp|jar)/", $FILE_NAME )) + { + $FILE_TYPE = 'text/plain'; + } + + //------------------------------------------------- + // Add on the extension... + //------------------------------------------------- + + $ext = '.ibf'; + + switch($FILE_TYPE) + { + case 'image/gif': + $ext = '.gif'; + break; + case 'image/jpeg': + $ext = '.jpg'; + break; + case 'image/pjpeg': + $ext = '.jpg'; + break; + case 'image/x-png': + $ext = '.png'; + break; + default: + $ext = '.ibf'; + break; + } + + $real_file_name .= $ext; + + //------------------------------------------------- + // If we are previewing the post, we don't want to + // add the attachment to the database, so we return + // the array with the filename. We would have returned + // earlier if there was an error + //------------------------------------------------- + + if ($this->obj['preview_post']) + { + return array( 'FILE_NAME' => $FILE_NAME ); + } + + //------------------------------------------------- + // Copy the upload to the uploads directory + //------------------------------------------------- + + if (! @move_uploaded_file( $HTTP_POST_FILES['FILE_UPLOAD']['tmp_name'], $ibforums->vars['upload_dir']."/".$real_file_name) ) + { + $this->obj['post_errors'] = 'upload_failed'; + return $attach_data; + } + + //------------------------------------------------- + // set the array, and enter the info into the DB + // We don't have an extension on the file in the + // hope that it make it more difficult to execute + // a script on our server. + //------------------------------------------------- + + $attach_data['attach_id'] = $real_file_name; + $attach_data['attach_hits'] = 0; + $attach_data['attach_type'] = $FILE_TYPE; + $attach_data['attach_file'] = $FILE_NAME; + + return $attach_data; + } + + + + /*****************************************************/ + // check_upload_ability + // ------------------ + // checks to make sure the requesting browser can accept + // file uploads, also checks if the member group can + // accept uploads and returns accordingly. + /*****************************************************/ + + function check_upload_ability() { + global $ibforums; + + if ($this->forum['use_attach'] and $ibforums->member['g_attach_max'] > 0) + { + $this->obj['can_upload'] = 1; + $this->obj['form_extra'] = " enctype='multipart/form-data'"; + $this->obj['hidden_field'] = ""; + } + + } + + /*****************************************************/ + // HTML: mod_options. + // ------------------ + // Returns the HTML for the mod options drop down box + /*****************************************************/ + + function mod_options() { + global $ibforums, $DB; + + $can_close = 0; + $can_pin = 0; + + $html = "". + "". + "". + "". + $this->obj['hidden_field']; + + // Any other tags to add? + + if (isset($additional_tags)) { + foreach($additional_tags as $k => $v) { + $form .= "\n"; + } + } + + return $form; + } + + /*****************************************************/ + // HTML: name fields. + // ------------------ + // Returns the HTML for either text inputs or membername + // depending if the member is a guest. + /*****************************************************/ + + function html_name_field() { + global $ibforums; + + return $ibforums->member['id'] ? $this->html->nameField_reg() : $this->html->nameField_unreg( $ibforums->input[UserName] ); + } + + /*****************************************************/ + // HTML: Post body. + // ------------------ + // Returns the HTML for post area, code buttons and + // post icons + /*****************************************************/ + + function html_post_body($raw_post="") { + global $ibforums; + + $ibforums->lang['the_max_length'] = $ibforums->vars['max_post_length'] * 1024; + + return $this->html->postbox_buttons($raw_post); + + } + + /*****************************************************/ + // HTML: Post Icons + // ------------------ + // Returns the HTML for post area, code buttons and + // post icons + /*****************************************************/ + + function html_post_icons($post_icon="") { + global $ibforums; + + if ($ibforums->input['iconid']) + { + $post_icon = $ibforums->input['iconid']; + } + + $ibforums->lang['the_max_length'] = $ibforums->vars['max_post_length'] * 1024; + + $html = $this->html->PostIcons(); + + if ($post_icon) { + $html = preg_replace( "/name=[\"']iconid[\"']\s*value=[\"']$post_icon\s?[\"']/", "name='iconid' value='$post_icon' checked", $html ); + $html = preg_replace( "/name=[\"']iconid[\"']\s*value=[\"']0[\"']\s*checked/i" , "name='iconid' value='0'", $html ); + } + return $html; + } + + /*****************************************************/ + // HTML: add smilie box. + // ------------------ + // Inserts the clickable smilies box + /*****************************************************/ + + function html_add_smilie_box() { + global $ibforums, $DB; + + $show_table = 0; + $count = 0; + $smilies = "\n"; + + // Get the smilies from the DB + + $DB->query("SELECT * FROM ibf_emoticons WHERE clickable='1'"); + + while ($elmo = $DB->fetch_row() ) { + + $show_table++; + $count++; + + $smilies .= "vars['EMOTICONS_URL']."/".$elmo['image']."\" alt='smilie' border='0'> \n"; + + if ($count == $ibforums->vars['emo_per_row']) { + $smilies .= "\n\n"; + $count = 0; + } + } + + if ($count != $ibforums->vars['emo_per_row']) { + for ($i = $count ; $i < $ibforums->vars['emo_per_row'] ; ++$i) { + $smilies .= " \n"; + } + $smilies .= ""; + } + + $table = $this->html->smilie_table(); + + if ($show_table != 0) { + $table = preg_replace( "//", $smilies, $table ); + $this->output = preg_replace( "//", $table, $this->output ); + } + + } + + /*****************************************************/ + // HTML: topic summary. + // ------------------ + // displays the last 10 replies to the topic we're + // replying in. + /*****************************************************/ + + function html_topic_summary($topic_id) { + + global $ibforums, $std, $DB; + + if (! $topic_id ) return; + + $cached_members = array(); + + $this->output .= $this->html->TopicSummary_top(); + + //-------------------------------------------------------------- + // Get the posts + // This section will probably change at some point + //-------------------------------------------------------------- + + $post_query = $DB->query("SELECT post, pid, post_date, author_id, author_name FROM ibf_posts WHERE topic_id='$topic_id' and queued <> 1 ORDER BY pid DESC LIMIT 0,10"); + + while ( $row = $DB->fetch_row($post_query) ) + { + + $row['author'] = $row['author_name']; + + $row['date'] = $std->get_date( $row['post_date'], 'LONG' ); + + $this->output .= $this->html->TopicSummary_body( $row ); + } + + $this->output .= $this->html->TopicSummary_bottom(); + + } + + /*****************************************************/ + // Moderators log + // ------------------ + // Simply adds the last action to the mod logs + /*****************************************************/ + + function moderate_log($title = 'unknown', $topic_title) { + global $std, $ibforums, $DB, $HTTP_REFERER, $QUERY_STRING; + + $db_string = $std->compile_db_string( array ( + 'forum_id' => $ibforums->input['f'], + 'topic_id' => $ibforums->input['t'], + 'post_id' => $ibforums->input['p'], + 'member_id' => $ibforums->member['id'], + 'member_name' => $ibforums->member['name'], + 'ip_address' => $ibforums->input['IP_ADDRESS'], + 'http_referer'=> $HTTP_REFERER, + 'ctime' => time(), + 'topic_title' => $topic_title, + 'action' => $title, + 'query_string'=> $QUERY_STRING, + ) + ); + + $DB->query("INSERT INTO ibf_moderator_logs (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"); + + } + +} + +?> \ No newline at end of file diff --git a/upload/sources/Profile.php b/upload/sources/Profile.php new file mode 100644 index 00000000..abc33f8b --- /dev/null +++ b/upload/sources/Profile.php @@ -0,0 +1,301 @@ + User Profile functions +| > Module written by Matt Mecham +| > Date started: 28th February 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new Profile; + +class Profile { + + var $output = ""; + var $page_title = ""; + var $nav = array(); + var $html = ""; + var $parser; + + var $member = array(); + var $m_group = array(); + + var $jump_html = ""; + var $parser = ""; + + var $links = array(); + + var $bio = ""; + var $notes = ""; + var $size = "m"; + + var $lib; + + function Profile() { + global $ibforums, $DB, $std, $print; + + require "./sources/lib/post_parser.php"; + + $this->parser = new post_parser(); + + //-------------------------------------------- + // Make sure our code number is numerical only + //-------------------------------------------- + + //$ibforums->input['CODE'] = preg_replace("/^([0-9]+)$/", "$1", $ibforums->input['CODE']); + + if ($ibforums->input['CODE'] == "") $ibforums->input['CODE'] = 00; + + //-------------------------------------------- + // Require the HTML and language modules + //-------------------------------------------- + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_profile' , $ibforums->lang_id ); + + require "./Skin/".$ibforums->skin_id."/skin_profile.php"; + $this->html = new skin_profile; + + $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; + $this->base_url_nosess = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}"; + + //-------------------------------------------- + // Check viewing permissions, etc + //-------------------------------------------- + + $this->member = $ibforums->member; + $this->m_group = $ibforums->member; + + + //-------------------------------------------- + // What to do? + //-------------------------------------------- + + + switch($ibforums->input['CODE']) { + case '03': + $this->view_profile(); + break; + + //------------------------------ + default: + $this->view_profile(); + break; + } + + // If we have any HTML to print, do so... + + + $print->add_output("$this->output"); + $print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 1, NAV => $this->nav ) ); + + } + + function view_profile() { + global $ibforums, $DB, $std, $print; + + $info = array(); + + if ($ibforums->member['g_mem_info'] != 1) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); + } + + //-------------------------------------------- + // Check input.. + //-------------------------------------------- + + $id = preg_replace( "/^(\d+)$/", "\\1", $ibforums->input['MID'] ); + + if ( empty($id) ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'incorrect_use' ) ); + } + + //-------------------------------------------- + // Prepare Query... + //-------------------------------------------- + + $DB->query("SELECT m.*, g.g_id, g.g_title as group_title FROM ibf_members m, ibf_groups g WHERE m.id='$id' and m.mgroup=g.g_id"); + $member = $DB->fetch_row(); + + if (empty($member['id'])) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'incorrect_use' ) ); + } + + // Play it safe + + $member['password'] = ""; + + //-------------------------------------------- + // Find the most posted in forum that the viewing + // member has access to by this members profile + //-------------------------------------------- + + $DB->query("SELECT id, read_perms FROM ibf_forums"); + + $forum_ids = array('0'); + + while ( $r = $DB->fetch_row() ) + { + if ($r['read_perms'] == '*') + { + $forum_ids[] = $r['id']; + } + else if ( preg_match( "/(^|,)".$this->member['mgroup']."(,|$)/", $r['read_perms']) ) + { + $forum_ids[] = $r['id']; + } + } + + $forum_id_str = implode( ",", $forum_ids ); + + $percent = 0; + + $DB->query("SELECT DISTINCT(p.forum_id), f.name, COUNT(p.author_id) as f_posts FROM ibf_posts p, ibf_forums f ". + "WHERE p.forum_id IN ($forum_id_str) AND p.author_id='".$member['id']."' AND p.forum_id=f.id GROUP BY p.forum_id ORDER BY f_posts DESC"); + + $favourite = $DB->fetch_row(); + + $DB->query("SELECT COUNT(pid) as total_posts FROM ibf_posts WHERE author_id='".$member['id']."'"); + + $total_posts = $DB->fetch_row(); + + $DB->query("SELECT TOTAL_TOPICS, TOTAL_REPLIES FROM ibf_stats"); + + $stats = $DB->fetch_row(); + + $board_posts = $stats['TOTAL_TOPICS'] + $stats['TOTAL_REPLIES']; + + if ($total_posts['total_posts'] > 0) + { + $percent = round( $favourite['f_posts'] / $total_posts['total_posts'] * 100 ); + } + + if ($member['posts']) + { + $info['posts_day'] = round( $member['posts'] / (((time() - $member['joined']) / 86400)), 1); + $info['total_pct'] = sprintf( '%.2f', ( $member['posts'] / $board_posts * 100 ) ); + } + + if ($info['posts_day'] > $member['posts']) + { + $info['posts_day'] = $member['posts']; + } + + $info['posts'] = $member['posts'] ? $member['posts'] : 0; + $info['name'] = $member['name']; + $info['mid'] = $member['id']; + $info['fav_forum'] = $favourite['name']; + $info['fav_id'] = $favourite['forum_id']; + $info['fav_posts'] = $favourite['f_posts']; + $info['percent'] = $percent; + $info['group_title'] = $member['group_title']; + $info['board_posts'] = $board_posts; + $info['joined'] = $std->get_date( $member['joined'], 'LONG' ); + + $info['member_title'] = $member['title'] ? $member['title'] : $ibforums->lang['no_info']; + + $info['aim_name'] = $member['aim_name'] ? $member['aim_name'] : $ibforums->lang['no_info']; + $info['icq_number'] = $member['icq_number'] ? $member['icq_number'] : $ibforums->lang['no_info']; + $info['yahoo'] = $member['yahoo'] ? $member['yahoo'] : $ibforums->lang['no_info']; + $info['location'] = $member['location'] ? $member['location'] : $ibforums->lang['no_info']; + $info['interests'] = $member['interests'] ? $member['interests'] : $ibforums->lang['no_info']; + $info['msn_name'] = $member['msnname'] ? $member['msnname'] : $ibforums->lang['no_info']; + + $ibforums->vars['time_adjust'] = $ibforums->vars['time_adjust'] == "" ? 0 : $ibforums->vars['time_adjust']; + + if ($member['dst_in_use'] == 1) + { + $member['time_offset'] += 1; + } + + $info['local_time'] = $member['time_offset'] != "" ? gmdate( "h:i A", time() + ($member['time_offset']*3600) + ($ibforums->vars['time_adjust'] * 60) ) : $ibforums->lang['no_info']; + + $info['avatar'] = $std->get_avatar( $member['avatar'] , 1, $member['avatar_size'] ); + + $info['signature'] = $member['signature']; + + if ( $member['website'] and preg_match( "/^http:\/\/\S+$/", $member['website'] ) ) { + $info['homepage'] = "{$member['website']}"; + } + else + { + $info['homepage'] = $ibforums->lang['no_info']; + } + + + if ($member['bday_month']) + { + $info['birthday'] = $member['bday_day']." ".$ibforums->lang[ 'M_'.$member['bday_month'] ]." ".$member['bday_year']; + } + else + { + $info['birthday'] = $ibforums->lang['no_info']; + } + + + if (!$member['hide_email']) { + $info['email'] = "{$ibforums->lang['click_here']}"; + } + else + { + $info['email'] = $ibforums->lang['private']; + } + + $info['base_url'] = $this->base_url; + + $this->output .= $this->html->show_profile( $info ); + + // Is this our profile? + + if ($member['id'] == $this->member['id']) + { + $this->output = preg_replace( "//e", "\$this->html->user_edit(\$info)", $this->output ); + } + + // Can mods edit this profile? + + if ($ibforums->member['id']) + { + if ($ibforums->member['g_is_supmod'] == 1) + { + $pass = 1; + } + else + { + $DB->query("SELECT * FROM ibf_moderators WHERE edit_user=1 AND member_id='".$ibforums->member['id']."'"); + if ( $this->moderator = $DB->fetch_row() ) + { + $pass = 1; + } + } + } + + + + $this->page_title = $ibforums->lang['page_title']; + $this->nav = array( $ibforums->lang['page_title'] ); + + } + + + +} + +?> \ No newline at end of file diff --git a/upload/sources/Register.php b/upload/sources/Register.php new file mode 100644 index 00000000..e6e4830b --- /dev/null +++ b/upload/sources/Register.php @@ -0,0 +1,710 @@ + Registration functions +| > Module written by Matt Mecham +| > Date started: 16th February 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new Register; + +class Register { + + var $output = ""; + var $page_title = ""; + var $nav = array(); + var $html = ""; + var $email = ""; + + function Register() { + global $ibforums, $DB, $std, $print; + + //-------------------------------------------- + // Make sure our code number is numerical only + //-------------------------------------------- + + //$ibforums->input['CODE'] = preg_replace("/^([0-9]+)$/", "$1", $ibforums->input['CODE']); + + if ($ibforums->input['CODE'] == "") $ibforums->input['CODE'] = 00; + + //-------------------------------------------- + // Require the HTML and language modules + //-------------------------------------------- + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_register', $ibforums->lang_id ); + + require "./Skin/".$ibforums->skin_id."/skin_register.php"; + $this->html = new skin_register(); + + $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; + $this->base_url_nosess = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}"; + + //-------------------------------------------- + // Get the emailer module + //-------------------------------------------- + + require "./sources/lib/emailer.php"; + + $this->email = new emailer(); + + //-------------------------------------------- + // What to do? + //-------------------------------------------- + + switch($ibforums->input['CODE']) { + case '00': + $this->show_reg_form(); + break; + + case '02': + $this->create_account(); + break; + + case '03': + $this->validate_user(); + break; + + case '05': + $this->show_manual_form(); + break; + + case '06': + $this->show_manual_form('lostpass'); + break; + + case '07': + $this->show_manual_form('newemail'); + break; + + case '10': + $this->lost_password_start(); + break; + case '11': + $this->lost_password_end(); + break; + + default: + $this->show_reg_form(); + break; + } + + // If we have any HTML to print, do so... + + $print->add_output("$this->output"); + $print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) ); + + } + + /*****************************************************/ + // lost_password_start + // ------------------ + // Simply shows the lostpassword form + // What do you want? Blood? + /*****************************************************/ + + function lost_password_start() + { + global $ibforums, $DB, $std; + + $this->page_title = $ibforums->lang['lost_pass_form']; + + $this->nav = array( $ibforums->lang['lost_pass_form'] ); + + $this->output .= $this->html->lost_pass_form(); + } + + + + + function lost_password_end() + { + global $ibforums, $DB, $std, $HTTP_POST_VARS, $print; + + if ($HTTP_POST_VARS['member_name'] == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_username' ) ); + } + + //------------------------------------------------------------ + // Check for input and it's in a valid format. + //------------------------------------------------------------ + + $member_name = trim(strtolower($ibforums->input['member_name'])); + + if ($member_name == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_username' ) ); + } + + //------------------------------------------------------------ + // Attempt to get the user details from the DB + //------------------------------------------------------------ + + $DB->query("SELECT name, id, email, mgroup, validate_key FROM ibf_members WHERE LOWER(name)='$member_name'"); + + if ( !$DB->get_num_rows() ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_such_user' ) ); + } + else + { + $member = $DB->fetch_row(); + + //------------------------------------------------------------ + // Is there a validation key? If so, we'd better not touch it + //------------------------------------------------------------ + + if ($member['mgroup'] == $ibforums->vars['auth_group']) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'val_key_present' ) ); + } + + if ($member['id'] == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_such_user' ) ); + } + + $new_pass = $std->make_password(); + $validate_key = $std->make_password(); + $md5_pass = md5($new_pass); + + //------------------------------------------------------------ + // Update the DB for this member. + //------------------------------------------------------------ + + $DB->query("UPDATE ibf_members SET new_pass='$md5_pass', validate_key='$validate_key' WHERE id='".$member['id']."'"); + + //------------------------------------------------------------ + // Send out the email. + //------------------------------------------------------------ + + $this->email->get_template("lost_pass"); + + $this->email->build_message( array( + 'NAME' => $member['name'], + 'PASSWORD' => $new_pass, + 'MAN_LINK' => $this->base_url_nosess."?act=Reg&CODE=06", + 'EMAIL' => $member['email'], + 'ID' => $member['id'], + 'CODE' => $validate_key, + ) + ); + + $this->email->subject = $ibforums->lang['lp_subject'].' '.$ibforums->vars['BOARDNAME']; + $this->email->to = $member['email']; + + $this->email->send_mail(); + + $std->my_setcookie( 'pass_hash' , '-1', 0 ); + + $print->redirect_screen( $ibforums->lang['lp_redirect'], 'act=Reg&CODE=06' ); + } + + } + + /*****************************************************/ + // show_reg_form + // ------------------ + // Simply shows the registration form, no - really! Thats + // all it does. It doesn't make the tea or anything. + // Just the registration form, no more - no less. + // Unless your server went down, then it's just useless. + /*****************************************************/ + + function show_reg_form() { + global $ibforums, $DB, $std; + + if ($ibforums->vars['no_reg'] == 1) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'reg_off' ) ); + } + + if ($ibforums->vars['reg_auth_type']) + { + $ibforums->lang['std_text'] .= "
" . $ibforums->lang['email_validate_text']; + } + + $this->page_title = $ibforums->lang['registration_form']; + $this->nav = array( $ibforums->lang['registration_form'] ); + + $this->output .= $this->html->ShowForm( array( 'TEXT' => $ibforums->lang['std_text'], 'RULES' => $ibforums->lang['click_wrap'] ) ); + + } + + /*****************************************************/ + // create_account + // ------------------ + // Now this is a really good subroutine. It adds the member + // to the members table in the database. Yes, really fancy + // this one. It also finds the time to see if we need to + // check any email verification type malarky before we + // can use this brand new account. It's like buying a new + // car and getting it towed home and being told the keys + // will be posted later. Although you can't polish this + // routine while you're waiting. + /*****************************************************/ + + function create_account() { + global $ibforums, $std, $DB, $print; + + if ($ibforums->vars['no_reg'] == 1) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'reg_off' ) ); + } + + // Trim off the username and password + + $in_username = trim($ibforums->input['UserName']); + $in_password = trim($ibforums->input['PassWord']); + $in_email = strtolower( trim($ibforums->input['EmailAddress']) ); + + $ibforums->input['EmailAddress_two'] = strtolower( trim($ibforums->input['EmailAddress_two']) ); + + if ($ibforums->input['EmailAddress_two'] != $in_email) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'email_addy_mismatch' ) ); + } + + //+-------------------------------------------- + //| Check for errors in the input. + //+-------------------------------------------- + + if (empty($in_username)) $std->Error( array( LEVEL => 1, MSG => 'no_username' ) ); + if (strlen($in_username) < 3) $std->Error( array( LEVEL => 1, MSG => 'username_short' ) ); + if (strlen($in_username) > 32) $std->Error( array( LEVEL => 1, MSG => 'username_long' ) ); + + if (empty($in_password)) $std->Error( array( LEVEL => 1, MSG => 'pass_blank' ) ); + if (strlen($in_password) < 3) $std->Error( array( LEVEL => 1, MSG => 'pass_too_short' ) ); + if (strlen($in_password) > 32) $std->Error( array( LEVEL => 1, MSG => 'pass_too_long' ) ); + if ($ibforums->input['PassWord_Check'] != $in_password) $std->Error( array( LEVEL => 1, MSG => 'pass_no_match' ) ); + + if (strlen($in_email) < 6) $std->Error( array( LEVEL => 1, MSG => 'invalid_email' ) ); + + //+-------------------------------------------- + //| Check the email address + //+-------------------------------------------- + + $in_email = $std->clean_email($in_email); + + if (! $in_email ) + { + $std->Error( array( LEVEL => 1, MSG => 'invalid_email' ) ); + } + + //+-------------------------------------------- + //| Is this name already taken? + //+-------------------------------------------- + + $DB->query("SELECT id FROM ibf_members WHERE LOWER(name)='".strtolower($in_username)."'"); + $name_check = $DB->fetch_row(); + + if ($name_check['id']) + { + $std->Error( array( LEVEL => 1, MSG => 'user_exists' ) ); + } + + if (strtolower($in_username) == 'guest') + { + $std->Error( array( LEVEL => 1, MSG => 'user_exists' ) ); + } + + //+-------------------------------------------- + //| Is this email addy taken? + //+-------------------------------------------- + + if (! $ibforums->vars['allow_dup_email'] ) + { + $DB->query("SELECT id FROM ibf_members WHERE email='".$in_email."'"); + $email_check = $DB->fetch_row(); + if ($email_check['id']) + { + $std->Error( array( LEVEL => 1, MSG => 'email_exists' ) ); + } + } + + //+-------------------------------------------- + //| Are they in the reserved names list? + //+-------------------------------------------- + + if ($ibforums->vars['ban_names']) + { + $names = explode( "|" , $ibforums->vars['ban_names'] ); + foreach ($names as $n) + { + if (preg_match( "/$n/i", $in_username )) + { + $std->Error( array( LEVEL => 1, MSG => 'user_exists' ) ); + break; + } + } + } + + //+-------------------------------------------- + //| Are they banned? + //+-------------------------------------------- + + if ($ibforums->vars['ban_ip']) + { + $ips = explode( "|", $ibforums->vars['ban_ip'] ); + foreach ($ips as $ip) + { + $ip = preg_replace( "/\*/", '.*' , $ip ); + if (preg_match( "/$ip/", $ibforums->input['IP_ADDRESS'] )) + { + $std->Error( array( LEVEL => 1, MSG => 'you_are_banned' ) ); + } + } + } + + if ($ibforums->vars['ban_email']) + { + $ips = explode( "|", $ibforums->vars['ban_email'] ); + foreach ($ips as $ip) + { + $ip = preg_replace( "/\*/", '.*' , $ip ); + if (preg_match( "/$ip/", $in_email )) + { + $std->Error( array( LEVEL => 1, MSG => 'you_are_banned' ) ); + } + } + } + + + //+-------------------------------------------- + //| Build up the hashes + //+-------------------------------------------- + + $mem_group = $ibforums->vars['member_group']; + + //+-------------------------------------------- + //| Are we asking the member or admin to preview? + //+-------------------------------------------- + + if ($ibforums->vars['reg_auth_type']) + { + $mem_group = $ibforums->vars['auth_group']; + } + + //+-------------------------------------------- + //| Find the highest member id, and increment it + //| auto_increment not used for guest id 0 val. + //+-------------------------------------------- + + $DB->query("SELECT MAX(id) as new_id FROM ibf_members"); + $r = $DB->fetch_row(); + + $member_id = $r['new_id'] + 1; + + $member = array( + 'id' => $member_id, + 'name' => $in_username, + 'password' => $in_password, + 'email' => $in_email, + 'mgroup' => $mem_group, + 'posts' => 0, + 'avatar' => 'noavatar', + 'joined' => time(), + 'ip_address' => $ibforums->input['IP_ADDRESS'], + 'time_offset' => $ibforums->vars['time_offset'], + 'view_sigs' => 1, + 'email_pm' => 1, + 'view_img' => 1, + 'view_avs' => 1, + 'allow_post' => 1, + 'view_pop' => 1, + 'vdirs' => "in:Inbox|sent:Sent Items", + 'msg_total' => 0, + 'new_msg' => 0, + ); + + + + //+-------------------------------------------- + //| Insert into the DB + //+-------------------------------------------- + + $member['password'] = md5( $member['password'] ); + + $db_string = $std->compile_db_string( $member ); + + $DB->query("INSERT INTO ibf_members (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"); + + unset($db_string); + + $validate_key = $std->make_password(); + $time = time(); + + + if ( ($ibforums->vars['reg_auth_type'] == 'user') or ($ibforums->vars['reg_auth_type'] == 'admin') ) { + + // We want to validate all reg's via email, after email verificiation has taken place, + // we restore their previous group and remove the validate_key + + $DB->query("UPDATE ibf_members SET validate_key='$validate_key', prev_group='".$ibforums->vars['member_group']."' " + ."WHERE id='$member_id'"); + + + if ( $ibforums->vars['reg_auth_type'] == 'user' ) + { + + $this->email->get_template("reg_validate"); + + $this->email->build_message( array( + 'THE_LINK' => $this->base_url_nosess."?act=Reg&CODE=03&uid=".urlencode($member_id)."&aid=".urlencode($validate_key), + 'NAME' => $member['name'], + 'PASSWORD' => $in_password, + 'MAN_LINK' => $this->base_url_nosess."?act=Reg&CODE=05", + 'EMAIL' => $member['email'], + 'ID' => $member_id, + 'CODE' => $validate_key, + ) + ); + + $this->email->subject = "Registration at ".$ibforums->vars['board_name']; + $this->email->to = $member['email']; + + $this->email->send_mail(); + + $this->output = $this->html->show_authorise( $member ); + + } + else if ( $ibforums->vars['reg_auth_type'] == 'admin' ) + { + $this->output = $this->html->show_preview( $member ); + } + + $this->page_title = $ibforums->lang['reg_success']; + + $this->nav = array( $ibforums->lang['nav_reg'] ); + } + + else + { + + // We don't want to preview, or get them to validate via email. + + $DB->query("UPDATE ibf_stats SET ". + "MEM_COUNT=MEM_COUNT+1, ". + "LAST_MEM_NAME='" . $member['name'] . "', ". + "LAST_MEM_ID='" . $member['id'] . "'"); + + if ($ibforums->vars['new_reg_notify']) { + + $date = $std->get_date( time(), 'LONG' ); + + $this->email->get_template("admin_newuser"); + + $this->email->build_message( array( + 'DATE' => $date, + 'MEMBER_NAME' => $member['name'], + ) + ); + + $this->email->subject = "New Registration at ".$ibforums->vars['board_name']; + $this->email->to = $ibforums->vars['email_in']; + $this->email->send_mail(); + } + + $text = $ibforums->lang['done_reg_2']; + $url = 'act=Login&CODE=00'; + + + $print->redirect_screen( $text, $url ); + } + + } + + /*****************************************************/ + // validate_user + // ------------------ + // Leave a message after the tone, and I'll amuse myself + // by pulling faces when hearing the message later. + /*****************************************************/ + + function validate_user() { + global $ibforums, $std, $DB, $print; + + //------------------------------------------------------------ + // Check for input and it's in a valid format. + //------------------------------------------------------------ + + $in_user_id = trim(urldecode($ibforums->input['uid'])); + $in_validate_key = trim(urldecode($ibforums->input['aid'])); + $in_type = trim($ibforums->input['type']); + + if ($in_type == "") + { + $in_type = 'reg'; + } + + //------------------------------------------------------------ + + if (! preg_match( "/^(?:[\d\w]){6,14}$/", $in_validate_key ) ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) ); + } + + //------------------------------------------------------------ + + if (! preg_match( "/^(?:\d){1,}$/", $in_user_id ) ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) ); + } + + //------------------------------------------------------------ + // Attempt to get the profile of the requesting user + //------------------------------------------------------------ + + $DB->query("SELECT id, name, validate_key, prev_group, mgroup, email, new_pass FROM ibf_members WHERE id='$in_user_id'"); + + if ( !$DB->get_num_rows() ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_mem' ) ); + } + + //------------------------------------------------------------ + + $member = $DB->fetch_row(); + + //------------------------------------------------------------ + + if ( $member['id'] == "" ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_mem' ) ); + } + + //------------------------------------------------------------ + if ( $member['validate_key'] == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_key' ) ); + } + else if ($member['validate_key'] != $in_validate_key) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_key_wrong' ) ); + } + else + { + //------------------------------------------------------------ + // Update the member... + //------------------------------------------------------------ + + if ($in_type == 'reg') + { + + if (empty($member['prev_group'])) + { + $member['prev_group'] = $ibforums->vars['member_group']; + } + + $DB->query("UPDATE ibf_members SET mgroup='".$member['prev_group']."', prev_group='', validate_key='', new_pass='' WHERE id='".$member['id']."'"); + + //------------------------------------------------------------ + // Update the stats... + //------------------------------------------------------------ + + $DB->query("UPDATE ibf_stats SET ". + "MEM_COUNT=MEM_COUNT+1, ". + "LAST_MEM_NAME='" . $member['name'] . "', ". + "LAST_MEM_ID='" . $member['id'] . "'"); + + if ($ibforums->vars['new_reg_notify']) { + + $date = $std->get_date( time(), 'LONG' ); + + $this->email->get_template("admin_newuser"); + + $this->email->build_message( array( + 'DATE' => $date, + 'MEMBER_NAME' => $member['name'], + ) + ); + + $this->email->subject = "New Registration at ".$ibforums->vars['board_name']; + $this->email->to = $ibforums->vars['email_in']; + $this->email->send_mail(); + } + + } + else if ($in_type == 'lostpass') + { + + if ($member['new_pass'] == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'lp_no_pass' ) ); + } + + $DB->query("UPDATE ibf_members SET password='".$member['new_pass']."', prev_group='', validate_key='', new_pass='' WHERE id='".$member['id']."'"); + + } + else if ($in_type == 'newemail') + { + if (empty($member['prev_group'])) + { + $member['prev_group'] = $ibforums->vars['member_group']; + } + + $DB->query("UPDATE ibf_members SET mgroup='".$member['prev_group']."', prev_group='', validate_key='', new_pass='' WHERE id='".$member['id']."'"); + } + + $text = $ibforums->lang['done_reg_2']; + $url = 'act=Login&CODE=00'; + + + $print->redirect_screen( $text, $url ); + } + + } + + /*****************************************************/ + // show_board_rules + // ------------------ + // o_O ^^ + /*****************************************************/ + + function show_board_rules() { + global $ibforums, $DB; + + $DB->query("SELECT RULES_TEXT from ib_forum_rules WHERE ID='00'"); + $rules = $DB->fetch_row(); + + $this->output = $this->html->show_rules($rules); + $this->page_title = $ibforums->lang['board_rules']; + $this->nav = array( $ibforums->lang['board_rules'] ); + + } + + /*****************************************************/ + // show_manual_form + // ------------------ + // This feature is not available in an auto option + /*****************************************************/ + + function show_manual_form($type='reg') { + global $ibforums; + + $this->output = $this->html->show_dumb_form($type); + $this->page_title = $ibforums->lang['activation_form']; + $this->nav = array( $ibforums->lang['activation_form'] ); + + } + + +} + +?> diff --git a/upload/sources/Search.php b/upload/sources/Search.php new file mode 100644 index 00000000..55138938 --- /dev/null +++ b/upload/sources/Search.php @@ -0,0 +1,1049 @@ + Searching procedures +| > Module written by Matt Mecham +| > Date started: 24th February 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +| +| MODULE NOTES: +| ------------- +| +| I've been deliberating whether we should implement some kind of WORD ID / +| search logging table for index. +| iB3 PERL had such a feature, but that was to aide the DBM searches, which +| were slow at best. +| The biggest complaint we had was that adding a word ID / search logging table +| effectively doubled the amount of space needed in the mySQL database. I've seen +| this complaint echo'd on the support boards of other forum software. +| The other downside to such a feature would be the overhaul needed to update it +| with new posts/topics and topic movement / deletion. +| +| I figure that people post more than they search, so a full table scan once per +| search request is offset against the CPU to keep the search log tables up to date +| +| I'm going to stick my neck out and go the full table scan route. It's not as effecient +| as a search table would be, but the benefits include no overhead updating it, and a smaller +| overall DB size - which is vital to some people on certain hosts. +| +| This may change if it becomes apparent that it's not very efficient in the long run ++-------------------------------------------------------------------------- +*/ + +// + +$idx = new Search; + +class Search { + + var $output = ""; + var $page_title = ""; + var $nav = array(); + var $html = ""; + + var $first = 0; + + var $search_type = 'posts'; + var $sort_order = 'desc'; + var $sort_key = 'last_post'; + var $search_in = 'posts'; + var $prune = '30'; + var $st_time = array(); + var $end_time = array(); + var $st_stamp = ""; + var $end_stamp = ""; + + function Search() { + global $ibforums, $DB, $std, $print; + + if (! $ibforums->vars['allow_search']) + { + $std->Error( array( LEVEL => 1, MSG => 'search_off') ); + } + + if ($ibforums->member['g_use_search'] != 1) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); + } + + + if ($ibforums->input['CODE'] == "") $ibforums->input['CODE'] = '00'; + + //-------------------------------------------- + // Require the HTML and language modules + //-------------------------------------------- + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_search', $ibforums->lang_id ); + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_forum' , $ibforums->lang_id ); + + require "./Skin/".$ibforums->skin_id."/skin_search.php"; + + $this->html = new skin_search(); + + $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; + + if (isset($ibforums->input['st']) ) + { + $this->first = $ibforums->input['st']; + } + + //-------------------------------------------- + // What to do? + //-------------------------------------------- + + if (! isset($ibforums->member['g_use_search']) ) + { + $std->Error( array( LEVEL => 1, MSG => 'cant_use_feature') ); + } + + switch($ibforums->input['CODE']) { + case '01': + $this->do_search(); + break; + case '03': + $this->get_new_posts(); + break; + case 'getactive': + $this->get_active(); + break; + case 'show': + $this->show_results(); + break; + default: + $this->show_form(); + break; + } + + // If we have any HTML to print, do so... + + $print->add_output("$this->output"); + $print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) ); + + } + + function show_form() { + global $DB, $std, $ibforums; + + $last_cat_id = -1; + + $the_hiddens = ""; + + $DB->query("SELECT f.id as forum_id, f.name as forum_name, f.position, f.read_perms, c.id as cat_id, c.name as cat_name from ibf_forums f, ibf_categories c where c.id=f.category ORDER BY c.position, f.position"); + + $forums = "\n" + ."\n\n"; + $links .= "\n"; + + foreach ( $link_array as $k => $v ) + { + $url = $v[0]; + $desc = $v[1]; + + if ($url != "" and $desc != "") + { + if (strlen($desc) > 45) + { + $desc = substr( $desc, 0, 42 ) . '...'; + } + + $links .= "\n"; + + } + } + } + + //-------------------------------------------- + // Print the top button menu + //-------------------------------------------- + + $print->add_output( $this->html->Menu_bar($this->base_url) ); + + $this->lib = new usercp_functions(&$this); + + + //-------------------------------------------- + // What to do? + //-------------------------------------------- + + + switch($ibforums->input['CODE']) { + case '00': + $this->splash(); + break; + case '01': + $this->personal(); + break; + //------------------------------ + case '02': + $this->email_settings(); + break; + case '03': + $this->do_email_settings(); + break; + //------------------------------ + case '04': + $this->board_prefs(); + break; + case '05': + $this->do_board_prefs(); + break; + //------------------------------ + case '06': + $this->skin_langs(); + break; + case '07': + $this->do_skin_langs(); + break; + //------------------------------ + case '08': + $this->email_change(); + break; + case '09': + $this->do_email_change(); + break; + //------------------------------ + case '21': + $this->do_personal(); + break; + case '20': + $this->update_notepad(); + break; + //------------------------------ + case '22': + $this->signature(); + break; + case '23': + $this->do_signature(); + break; + //------------------------------ + case '24': + $this->avatar(); + break; + case '25': + $this->do_avatar(); + break; + //------------------------------ + case '26': + $this->tracker(); + break; + case '27': + $this->do_delete_tracker(); + break; + //------------------------------ + case '28': + $this->pass_change(); + break; + case '29': + $this->do_pass_change(); + break; + //------------------------------ + default: + $this->splash(); + break; + } + + // If we have any HTML to print, do so... + + $fj = $std->build_forum_jump(); + $fj = preg_replace( "!#Forum Jump#!", $ibforums->lang['forum_jump'], $fj); + + $this->output .= $this->html->CP_end(); + + $this->output .= $this->html->forum_jump($fj, $links); + + $print->add_output("$this->output"); + $print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 1, NAV => $this->nav ) ); + + } + + + //*******************************************************************/ + //| pass change: + //| + //| Change the users password. + //*******************************************************************/ + + function pass_change() + { + global $ibforums, $DB, $std; + + $this->output .= $this->html->pass_change(); + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + + } + + function do_pass_change() + { + global $ibforums, $DB, $std, $HTTP_POST_VARS, $print; + + if ( $HTTP_POST_VARS['current_pass'] == "" or empty($HTTP_POST_VARS['current_pass']) ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) ); + } + + //-------------------------------------------- + + $cur_pass = trim($ibforums->input['current_pass']); + $new_pass = trim($ibforums->input['new_pass_1']); + $chk_pass = trim($ibforums->input['new_pass_2']); + + //-------------------------------------------- + + if ( ( empty($new_pass) ) or ( empty($chk_pass) ) ) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) ); + } + + //-------------------------------------------- + + if ($new_pass != $chk_pass) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'pass_no_match' ) ); + } + + //-------------------------------------------- + + if (md5($cur_pass) != $this->member['password']) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'wrong_pass' ) ); + } + + //-------------------------------------------- + + $md5_pass = md5($new_pass); + + //-------------------------------------------- + // Update the DB + //-------------------------------------------- + + $DB->query("UPDATE ibf_members SET password='$md5_pass' WHERE id='".$this->member['id']."'"); + + $DB->query("UPDATE ibf_sessions SET member_pass='$md5_pass' WHERE id='".$this->session_id."' and member_id='".$this->member['id']."'"); + + //-------------------------------------------- + // Update the cookie.. + //-------------------------------------------- + + $std->my_setcookie( 'pass_hash', $md5_pass, 1 ); + + //-------------------------------------------- + // Redirect... + //-------------------------------------------- + + $print->redirect_screen( $ibforums->lang['pass_redirect'], 'act=UserCP&CODE=00' ); + + } + + + //*******************************************************************/ + //| email change: + //| + //| Change the users email address + //*******************************************************************/ + + function email_change() { + global $ibforums, $DB, $std; + + $txt = $ibforums->lang['ce_current'].$this->member['email']; + + if ($ibforums->vars['reg_auth_type']) + { + $txt .= $ibforums->lang['ce_auth']; + } + + $this->output .= $this->html->email_change($txt); + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + + } + + function do_email_change() + { + global $ibforums, $DB, $std, $HTTP_POST_VARS, $print; + + if ($HTTP_POST_VARS['in_email_1'] == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) ); + } + + if ($HTTP_POST_VARS['in_email_2'] == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_guests' ) ); + } + + //-------------------------------------------- + + $email_one = strtolower( trim($ibforums->input['in_email_1']) ); + $email_two = strtolower( trim($ibforums->input['in_email_2']) ); + + if ($email_one != $email_two) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'email_addy_mismatch' ) ); + } + + //-------------------------------------------- + + $email_one = $std->clean_email($email_one); + + if ( $email_one == "" ) { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'invalid_email' ) ); + } + + //-------------------------------------------- + + if (! $ibforums->vars['allow_dup_email'] ) + { + $DB->query("SELECT id FROM ibf_members WHERE email='".$email_one."'"); + $email_check = $DB->fetch_row(); + if ($email_check['id']) + { + $std->Error( array( LEVEL => 1, MSG => 'email_exists' ) ); + } + } + + if ($ibforums->vars['reg_auth_type']) + { + $validate_key = $std->make_password(); + + //-------------------------------------------- + // Update the new email, but enter a validation key + // and put the member in "awaiting authorisation" + // and send an email.. + //-------------------------------------------- + + $DB->query("UPDATE ibf_members SET validate_key='$validate_key', prev_group='".$this->member['mgroup']."', mgroup='".$ibforums->vars['auth_group']."', email='$email_one' WHERE id='".$this->member['id']."'"); + + // Update their session with the new member group + + if ($ibforums->session_id) + { + $DB->query("UPDATE ibf_sessions SET member_name='', member_id='0', member_pass='', member_group='".$ibforums->vars['guest_group']."' WHERE member_id='".$this->member['id']."' and id='".$ibforums->session_id."'"); + } + + // Kill the cookies to stop auto log in + + $std->my_setcookie( 'pass_hash' , '-1', 0 ); + $std->my_setcookie( 'member_id' , '-1', 0 ); + $std->my_setcookie( 'session_id' , '-1', 0 ); + + // Dispatch the mail, and return to the activate form. + + $this->email->get_template("newemail"); + + $this->email->build_message( array( + 'NAME' => $this->member['name'], + 'MAN_LINK' => $this->base_url_nosess."?act=Reg&CODE=07", + 'ID' => $this->member['id'], + 'CODE' => $validate_key, + ) + ); + + $this->email->subject = $ibforums->lang['lp_subject'].' '.$ibforums->vars['board_name']; + $this->email->to = $email_one; + + $this->email->send_mail(); + + $print->redirect_screen( $ibforums->lang['ce_redirect'], 'act=Reg&CODE=07' ); + } + else + { + // No authorisation needed, change email addy and return + + $DB->query("UPDATE ibf_members SET email='$email_one' WHERE id='".$this->member['id']."'"); + + $std->boink_it($this->base_url."&act=UserCP&CODE=08"); + + } + } + + //*******************************************************************/ + //| tracker: + //| + //| Print the subscribed topics listings + //*******************************************************************/ + + function tracker() { + global $ibforums, $DB, $std, $print; + + $this->output .= $this->html->subs_header(); + + //---------------------------------------------------------- + // Query the DB for the subby toppy-ics - at the same time + // we get the forum and topic info, 'cos we rule. + //---------------------------------------------------------- + + $DB->query("SELECT s.trid, s.member_id, s.topic_id, s.last_sent, s.start_date as track_started, t.*, f.id as forum_id, f.name as forum_name, f.read_perms " + ."FROM ibf_tracker s, ibf_topics t, ibf_forums f " + ."WHERE s.member_id='".$this->member['id']."' AND t.tid=s.topic_id AND f.id=t.forum_id " + ."ORDER BY t.last_post DESC"); + + if ( $DB->get_num_rows() ) + { + + while( $topic = $DB->fetch_row() ) + { + + $topic['last_poster'] = ($topic['last_poster_id'] != 0) + ? "{$topic['last_poster_name']}" + : "-".$topic['last_poster_name']."-"; + + $topic['starter'] = ($topic['starter_id'] != 0) + ? "{$topic['starter_name']}" + : "-".$topic['starter_name']."-"; + + if ($topic['poll_state']) + { + $topic['prefix'] = $ibforums->vars['pre_polls'].' '; + } + + $topic['folder_icon'] = $std->folder_icon($topic); + + $topic['topic_icon'] = $topic['icon_id'] ? '' + : ' '; + + if ($topic['pinned']) + { + $topic['topic_icon'] = $ibforums->skin['B_PIN']; + } + + $topic['start_date'] = $std->get_date( $topic['track_started'], 'LONG' ); + + if ($topic['description']) + { + $topic['description'] = $topic['description'].'
'; + } + + + $pages = 1; + + if ($topic['posts']) + { + if ( (($topic['posts'] + 1) % $ibforums->vars['display_max_posts']) == 0 ) + { + $pages = ($topic['posts'] + 1) / $ibforums->vars['display_max_posts']; + } + else + { + $number = ( ($topic['posts'] + 1) / $ibforums->vars['display_max_posts'] ); + $pages = ceil( $number); + } + + } + + if ($pages > 1) { + $topic['PAGES'] = "({$ibforums->lang['topic_sp_pages']} "; + for ($i = 0 ; $i < $pages ; ++$i ) { + $real_no = $i * $ibforums->vars['display_max_posts']; + $page_no = $i + 1; + if ($page_no == 4) { + $topic['PAGES'] .= "vars['display_max_posts'] . "'>...$pages "; + break; + } else { + $topic['PAGES'] .= "$page_no "; + } + } + $topic['PAGES'] .= ")"; + } + + if ($topic['posts'] < 0) $topic['posts'] = 0; + + // Do the quick goto last page icon stuff + + $topic['last_post_date'] = $std->get_date( $topic['last_post'], 'LONG' ); + + $this->output .= $this->html->subs_row($topic); + } + + } + else + { + // no results + } + + $this->output .= $this->html->subs_end(); + + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + + } + + function do_delete_tracker() { + global $ibforums, $std, $DB; + + //-------------------------------------- + // Get the ID's to delete + //-------------------------------------- + + if ($ibforums->input['request_method'] != 'post') + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'poss_hack_attempt' ) ); + } + + $ids = array(); + + foreach ($ibforums->input as $key => $value) + { + if ( preg_match( "/^id-(\d+)$/", $key, $match ) ) + { + if ($ibforums->input[$match[0]]) + { + $ids[] = $match[1]; + } + } + } + + if ( count($ids) > 0 ) + { + $DB->query("DELETE from ibf_tracker WHERE member_id='".$this->member['id']."' and trid IN (".implode( ",", $ids ).")"); + } + + $std->boink_it($this->base_url."&act=UserCP&CODE=26"); + + } + + //*******************************************************************/ + //| SKIN LANGS: + //| + //| Change skin and languages prefs. + //*******************************************************************/ + + function skin_langs() { + global $ibforums, $DB, $std, $print; + + // A serialized array holds our langauge settings. + // The array is: 1 => array( '$dir', '$name'), 2 => ... etc + + + $lang_array = array(); + + $lang_select = ""; + + $this->output .= $this->html->skin_lang_header($lang_select); + + if ($ibforums->vars['allow_skins'] == 1) + { + + $DB->query("SELECT uid, sid, sname FROM ibf_skins WHERE hidden <> 1"); + + if ( $DB->get_num_rows() ) + { + + $skin_select = ""; + + } + + $this->output .= $this->html->settings_skin($skin_select); + } + + $this->output .= $this->html->skin_lang_end(); + + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + + } + + function do_skin_langs() { + + $this->lib->do_skin_langs(); + + } + + + //*******************************************************************/ + //| BOARD PREFS: + //| + //| Set up view avatar, sig, time zone, etc. + //*******************************************************************/ + + function board_prefs() { + global $ibforums, $DB, $std, $print; + + $time = $std->get_date( time(), 'LONG' ); + + // Do we have a user stored offset, or use the board default: + + $offset = ( $ibforums->member['time_offset'] != "" ) ? $ibforums->member['time_offset'] : $ibforums->vars['time_offset']; + + $time_select = ""; + + // Print out the header.. + + if ($ibforums->member['dst_in_use']) + { + $dst_check = 'checked'; + } + else + { + $dst_check = ''; + } + + $this->output .= $this->html->settings_header($this->member, $time_select, $time, $dst_check); + + $hide_sess = $std->my_getcookie('hide_sess'); + + // View avatars, signatures and images.. + + $view_ava = ""; + $view_img = ""; + $html_sess = "", + 'SIG' => $view_sig."", + 'AVA' => $view_ava."", + 'POP' => $view_pop."", + 'SESS' => $html_sess."", + ) ); + + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + + } + + + function do_board_prefs() { + + $this->lib->do_board_prefs(); + + } + + //*******************************************************************/ + //| EMAIL SETTINGS: + //| + //| Set up the email stuff. + //*******************************************************************/ + + function email_settings() { + global $ibforums, $DB, $std, $print; + + // PM_REMINDER: First byte = Email PM when received new + // Second byte= Show pop-up when new PM received + + + $info = array(); + + foreach ( array(hide_email, allow_admin_mails, email_full, email_pm) as $k ) + { + if (!empty($this->member[ $k ])) + { + $info[$k] = 'checked'; + } + } + + $this->output .= $this->html->email($info); + + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + + } + + function do_email_settings() { + + $this->lib->do_email_settings(); + + } + + + + //*******************************************************************/ + //| AVATAR: + //| + //| Displays the avatar choices + //*******************************************************************/ + + function avatar() { + global $ibforums, $DB, $std, $print; + + //------------------------------------------ + // Organise the dimensions + //------------------------------------------ + + list( $this->member['AVATAR_WIDTH'] , $this->member['AVATAR_HEIGHT'] ) = explode ("x", $this->member['avatar_size']); + list( $ibforums->vars['av_width'] , $ibforums->vars['av_height'] ) = explode ("x", $ibforums->vars['avatar_dims']); + list( $w, $h ) = explode ( "x", $ibforums->vars['avatar_def'] ); + + //------------------------------------------ + // Get the users current avatar to display + //------------------------------------------ + + $my_avatar = $std->get_avatar( $this->member['avatar'], 1, $this->member['avatar_size'] ); + + $my_avatar = $my_avatar ? $my_avatar : 'noavatar'; + + //------------------------------------------ + // Get the avatar gallery + //------------------------------------------ + + $avatar_gallery = array(); + + $dh = opendir( $ibforums->vars['html_dir'].'avatars' ); + while ( $file = readdir( $dh ) ) + { + if ( !preg_match( "/^..?$|^index/i", $file ) ) + { + $avatar_gallery[] = $file; + } + } + closedir( $dh ); + + //------------------------------------------ + // Get the avatar gallery selected + //------------------------------------------ + + $url_avatar = "http://"; + + $avatar_gall_selected = 'noavatar.gif'; + + $uploaded_avatar = 0; + + if ( ($this->member['avatar'] != "") and ($this->member['avatar'] != "noavatar") ) + { + if ( preg_match( "/^upload:/", $this->member['avatar'] ) ) + { + $uploaded_avatar = 1; + } + else if ( !preg_match( "/^http/i", $this->member['avatar'] ) ) + { + $avatar_gall_selected = $this->member['avatar']; + } + else + { + $url_avatar = $this->member['avatar']; + } + } + + $allowed_ext = '.' . implode (' .', explode( "|", $ibforums->vars['avatar_ext'] ) ); + + $show_avatar = ""; + + //------------------------------------------ + // Organise the avatar select box + //------------------------------------------ + + $av_html = ""; + + $formextra = ""; + $hidden_field = ""; + + if ($ibforums->member['g_avatar_upload'] == 1) + { + $formextra = " enctype='multipart/form-data'"; + $hidden_field = ""; + } + + $this->output .= $this->html->personal_avatar( array ( + 'MEMBER' => $this->member, + 'AVATARS' => $av_html, + 'SHOW_AVS' => $show_avatar, + 'CUR_AV' => $my_avatar + ) , $formextra, $hidden_field ); + if ($ibforums->vars['avatar_url']) + { + $this->output .= $this->html->personal_avatar_URL( $this->member, $url_avatar, $allowed_ext ); + + $text = $uploaded_avatar == 1 ? $ibforums->lang['avup_yes'] : $ibforums->lang['avup_no']; + + if ($ibforums->member['g_avatar_upload'] == 1) + { + $this->output = preg_replace( "//e", "\$this->html->avatar_upload_field(\$text)", $this->output ); + } + + } + + $this->output .= $this->html->personal_avatar_end(); + + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + + } + + function do_avatar() { + + $this->lib->do_avatar(); + + } + + //*******************************************************************/ + //| SIGNATURE: + //| + //| Displays the signature form + //*******************************************************************/ + + function signature() { + global $ibforums, $DB, $std, $print; + + $t_sig = $this->parser->unconvert( $this->member['signature'], $ibforums->vars['sig_allow_ibc'], $ibforums->vars['sig_allow_html'] ); + + $ibforums->lang['the_max_length'] = $ibforums->vars['max_sig_length'] ? $ibforums->vars['max_sig_length'] : 0; + + $this->output .= $this->html->signature($this->member['signature'], $t_sig); + + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + + } + + function do_signature() { + + $this->lib->do_signature(); + + } + + //*******************************************************************/ + //| PERSONAL: + //| + //| Displays the personal info form + //*******************************************************************/ + + function personal() { + global $ibforums, $DB, $std, $print; + + //----------------------------------------------- + // Check to make sure that we can edit profiles.. + //----------------------------------------------- + + if (empty($ibforums->member['g_edit_profile'])) + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'cant_use_feature' ) ); + } + + //----------------------------------------------- + // Format the birthday drop boxes.. + //----------------------------------------------- + + $date = getdate(); + + $day = ""; + $mon = ""; + $year = ""; + + for ( $i = 1 ; $i < 32 ; $i++ ) + { + $day .= "" : ">$i"; + } + + for ( $i = 1 ; $i < 13 ; $i++ ) + { + $mon .= "" : ">{$ibforums->lang['month'.$i]}"; + } + + $i = $date['year'] - 1; + $j = $date['year'] - 100; + + for ( $i ; $j < $i ; $i-- ) + { + $year .= "" : ">$i"; + } + + //----------------------------------------------- + // Format the interest / location boxes + //----------------------------------------------- + + $this->member['location'] = $this->parser->unconvert( $this->member['location'] ); + $this->member['interests'] = $this->parser->unconvert( $this->member['interests'] ); + + //----------------------------------------------- + // Format the siggie (no, not ciggie - smoking is + // bad boys and girls) + //----------------------------------------------- + + if ($ibforums->vars['sig_allow_html']) + { + $this->member['signature'] = $std->text_tidy($this->member['signature']); + } + else + { + $this->member['signature'] = $this->parser->unconvert($this->member['signature']); + } + + //----------------------------------------------- + // Suck up the HTML and swop some tags if need be + //----------------------------------------------- + + $this->output .= $this->html->personal_panel($this->member); + + if ( ($ibforums->vars['post_titlechange']) and ($this->member['posts'] > $ibforums->vars['post_titlechange']) ) + { + $t_html = $this->html->member_title($this->member['title']); + $this->output = preg_replace( "//", $t_html, $this->output ); + } + + $t_html = $this->html->birthday($day, $mon, $year); + + $this->output = preg_replace( "//", $t_html, $this->output ); + + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + + } + + function do_personal() { + + // Hand it straight to our library to keep this code clean and compact. + + $this->lib->do_profile(); + + } + + + + + //*******************************************************************/ + //| SPLASH: + //| + //| Displays the intro screen + //*******************************************************************/ + + function splash() { + global $ibforums, $DB, $std, $print; + + //----------------------------------------------- + // Format the basic data + //----------------------------------------------- + + $info['MEMBER_EMAIL'] = $this->member['email']; + $info['DATE_REGISTERED'] = $std->get_date( $this->member['joined'], 'LONG' ); + $info['MEMBER_POSTS'] = $this->member['posts']; + + $info['DAILY_AVERAGE'] = $ibforums->lang['no_posts']; + + if ($this->member['posts'] > 0 ) + { + $diff = time() - $this->member['joined']; + $days = ($diff / 3600) / 24; + $days = $days < 1 ? 1 : $days; + $info['DAILY_AVERAGE'] = sprintf('%.2f', ($this->member['posts'] / $days) ); + } + + //--------------------------------------------- + // Get the number of messages we have in total. + //--------------------------------------------- + + $DB->query("SELECT COUNT(*) as msg_total FROM ibf_messages WHERE member_id='".$this->member['id']."'"); + $total = $DB->fetch_row(); + + //--------------------------------------------- + // Make sure we've not exceeded our alloted allowance. + //--------------------------------------------- + + $info['full_messenger'] = ""; + $info['full_percent'] = ""; + $info['space_free'] = "Unlimited"; + $info['total_messages'] = $total['msg_total']; + + if ($ibforums->vars['max_messages'] > 0) + { + if ($total['msg_total'] >= $ibforums->vars['max_messages']) + { + $info['full_messenger'] = "".$ibforums->lang['folders_full'].""; + } + + $info['full_percent'] = $total['msg_total'] ? sprintf( "%.0f", ( ($total['msg_total'] / $ibforums->vars['max_messages']) * 100) ) : 0; + $info['full_percent'] = "(". $info['full_percent'] .'% '. $ibforums->lang['total_capacity'] . ")"; + $info['space_free'] = $ibforums->vars['max_messages'] - $total['msg_total']; + } + + + //----------------------------------------------- + // Write the data.. + //----------------------------------------------- + + $s_array = array( 's' => 5 , + 'm' => 7 , + 'l' => 15 + ); + + $info['NOTES'] = $this->notes ? $this->notes : $ibforums->lang['note_pad_empty']; + + $info['SIZE'] = $s_array[$this->size]; + + $info['SIZE_CHOICE'] = ""; + + //------------------------------------ + // If someone has cheated, fix it now. + //------------------------------------- + + if ( empty($info['SIZE']) ) + { + $info['SIZE'] = '5'; + } + + //------------------------------------- + // Make the choice HTML. + //------------------------------------- + + foreach ($s_array as $k => $v) + { + if ($v == $info['SIZE']) + { + $info['SIZE_CHOICE'] .= ""; + } + else + { + $info['SIZE_CHOICE'] .= ""; + } + } + + $info['NOTES'] = preg_replace( "/
/", "\n", $info['NOTES'] ); + + $this->output .= $this->html->splash($info); + + $this->page_title = $ibforums->lang['t_welcome']; + $this->nav = array( "".$ibforums->lang['t_title']."" ); + } + + + + + + + //*******************************************************************/ + //| UPDATE_NOTEPAD: + //| + //| Displays the intro screen + //*******************************************************************/ + + function update_notepad() { + global $ibforums, $DB, $std, $HTTP_POST_VARS; + + // Do we have an entry for this member? + + if ($HTTP_POST_VARS['act'] == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) ); + } + //+---------------------------------------- + + $DB->query("SELECT id from ibf_member_extra WHERE id='".$this->member['id']."'"); + + if ( $DB->get_num_rows() ) + { + $DB->query("UPDATE ibf_member_extra SET notes='".$ibforums->input['notes']."', ta_size='".$ibforums->input['ta_size']."' WHERE id='".$this->member['id']."'"); + } + else + { + $DB->query("INSERT INTO ibf_member_extra (id, notes, ta_size) ". + " VALUES ('".$this->member['id']."', '".$ibforums->input['notes']."', '".$ibforums->input['ta_size']."')"); + } + + $std->boink_it($this->base_url."&act=UserCP&CODE=00"); + exit; + } + +} + +?> \ No newline at end of file diff --git a/upload/sources/functions.php b/upload/sources/functions.php new file mode 100644 index 00000000..75ab6be3 --- /dev/null +++ b/upload/sources/functions.php @@ -0,0 +1,1769 @@ + Multi function library +| > Module written by Matt Mecham +| > Date started: 14th February 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + + +class FUNC { + + var $time_formats = array(); + var $time_options = array(); + var $offset = ""; + var $offset_set = 0; + + // Set up some standards to save CPU later + + function FUNC() { + global $INFO; + + $this->time_options = array( 'JOINED' => $INFO['clock_joined'], + 'SHORT' => $INFO['clock_short'], + 'LONG' => $INFO['clock_long'] + ); + + } + + /*-------------------------------------------------------------------------*/ + // + // Redirect using HTTP commands, not a page meta tag. + // + /*-------------------------------------------------------------------------*/ + + function boink_it($url) + { + global $ibforums; + + if ($ibforums->vars['header_redirect'] == 'refresh') + { + + @header("Refresh: 0;url=".$url); + } + else + { + @header("Location: ".$url); + } + exit(); + } + + /*-------------------------------------------------------------------------*/ + // + // Create a random 8 character password + // + /*-------------------------------------------------------------------------*/ + + function make_password() + { + $pass = ""; + $chars = array( + "1","2","3","4","5","6","7","8","9","0", + "a","A","b","B","c","C","d","D","e","E","f","F","g","G","h","H","i","I","j","J", + "k","K","l","L","m","M","n","N","o","O","p","P","q","Q","r","R","s","S","t","T", + "u","U","v","V","w","W","x","X","y","Y","z","Z"); + + $count = count($chars) - 1; + + srand((double)microtime()*1000000); + + for($i = 0; $i < 8; $i++) + { + $pass .= $chars[rand(0, $count)]; + } + + return($pass); + } + + /*-------------------------------------------------------------------------*/ + // + // Generate the appropriate folder icon for a topic + // + /*-------------------------------------------------------------------------*/ + + function folder_icon($topic, $dot="", $last_time=-1) { + global $ibforums; + + $last_time = $last_time > $ibforums->input['last_visit'] ? $last_time : $ibforums->input['last_visit']; + + if ($dot != "") + { + $dot = "_DOT"; + } + + if ($topic['state'] == 'closed') + { + return $ibforums->skin['B_LOCKED']; + } + + if ($topic['poll_state']) + { + + if ( ! $ibforums->member['id'] ) + { + return $ibforums->skin['B_POLL'.$dot]; + } + + if ($topic['last_post'] > $topic['last_vote']) + { + $topic['last_vote'] = $topic['last_post']; + } + + if ($last_time && ($topic['last_vote'] > $last_time )) + { + return $ibforums->skin['B_POLL'.$dot]; + } + if ($last_time && ($topic['last_vote'] < $last_time )) + { + return $ibforums->skin['B_POLL_NN'.$dot]; + } + + return $ibforums->skin['B_POLL']; + } + + + if ($topic['state'] == 'moved' or $topic['state'] == 'link') + { + return $ibforums->skin['B_MOVED']; + } + + if ( ! $ibforums->member['id'] ) + { + return $ibforums->skin['B_NORM'.$dot]; + } + + if (($topic['posts'] + 1 >= $ibforums->vars['hot_topic']) and ( (isset($last_time) ) && ($topic['last_post'] <= $last_time ))) + { + return $ibforums->skin['B_HOT_NN'.$dot]; + } + if ($topic['posts'] + 1 >= $ibforums->vars['hot_topic']) + { + return $ibforums->skin['B_HOT'.$dot]; + } + if ($last_time && ($topic['last_post'] > $last_time)) + { + return $ibforums->skin['B_NEW'.$dot]; + } + + return $ibforums->skin['B_NORM'.$dot]; + + } + + /*-------------------------------------------------------------------------*/ + // text_tidy: + // Takes raw text from the DB and makes it all nice and pretty - which also + // parses un-HTML'd characters. Use this with caution! + /*-------------------------------------------------------------------------*/ + + function text_tidy($txt = "") { + + $trans = get_html_translation_table(HTML_ENTITIES); + $trans = array_flip($trans); + + $txt = strtr( $txt, $trans ); + + $txt = preg_replace( "/\s{2}/" , "  " , $txt ); + $txt = preg_replace( "/\r/" , "\n" , $txt ); + $txt = preg_replace( "/\t/" , "  " , $txt ); + //$txt = preg_replace( "/\\n/" , "\n" , $txt ); + + return $txt; + + } + + /*-------------------------------------------------------------------------*/ + // compile_db_string: + // Takes an array of keys and values and formats them into a string the DB + // can use. + // $array = ( 'THIS' => 'this', 'THAT' => 'that' ); + // will be returned as THIS, THAT 'this', 'that' + /*-------------------------------------------------------------------------*/ + + function compile_db_string($data) { + + $field_names = ""; + $field_values = ""; + + foreach ($data as $k => $v) { + $v = preg_replace( "/'/", "\\'", $v ); + $field_names .= "$k,"; + $field_values .= "'$v',"; + } + + $field_names = preg_replace( "/,$/" , "" , $field_names ); + $field_values = preg_replace( "/,$/" , "" , $field_values ); + + return array( 'FIELD_NAMES' => $field_names, + 'FIELD_VALUES' => $field_values, + ); + } + + + + /*-------------------------------------------------------------------------*/ + // Build up page span links + /*-------------------------------------------------------------------------*/ + + function build_pagelinks($data) { + + $work = array(); + + $work['pages'] = 1; + + if ( ($data['TOTAL_POSS'] % $data['PER_PAGE']) == 0 ) { + $work['pages'] = $data['TOTAL_POSS'] / $data['PER_PAGE']; + } else { + $number = ($data['TOTAL_POSS'] / $data['PER_PAGE']); + $work['pages'] = ceil( $number); + } + + + $work['total_page'] = $work['pages']; + $work['current_page'] = $data['CUR_ST_VAL'] > 0 ? ($data['CUR_ST_VAL'] / $data['PER_PAGE']) + 1 : 1; + + if ($work['pages'] > 1) { + $work['first_page'] = "{$data['L_MULTI']} ({$work['pages']}) <"; + for( $i = 0; $i <= $work['pages'] - 1; ++$i ) { + $RealNo = $i * $data['PER_PAGE']; + $PageNo = $i+1; + if ($RealNo == $data['CUR_ST_VAL']) { + $work['page_span'] .= " [{$PageNo}]"; + } else { + if ($PageNo < ($work['current_page'] - 5) and ($work['current_page'] >= 6)) { + $work['st_dots'] = ' ...'; + continue; + } + $work['page_span'] .= " {$PageNo}"; + if ($PageNo >= ($work['current_page'] + 5)) { + $work['end_dots'] = '... '; + break; + } + } + } + $work['last_page'] = ">"; + $work['return'] = $work['first_page'].$work['st_dots'].$work['page_span'].' '.$work['end_dots'].$work['last_page']; + } else { + $work['return'] = $data['L_SINGLE']; + } + + return $work['return']; + } + + + + /*-------------------------------------------------------------------------*/ + // Build the forum jump menu + /*-------------------------------------------------------------------------*/ + + function build_forum_jump($html=1) { + global $INFO, $DB, $ibforums; + // $html = 0 means don't return the select html stuff + // $html = 1 means return the jump menu with select and option stuff + + $last_cat_id = -1; + + $DB->query("SELECT f.id as forum_id, f.parent_id, f.subwrap, f.name as forum_name, f.position, f.read_perms, c.id as cat_id, c.name from ibf_forums f, ibf_categories c where c.id=f.category ORDER BY c.position, f.position"); + + if ($html == 1) { + + $the_html = "vars['php_ext']}?s={$ibforums->session_id}&act=SF' method='GET' name='jumpmenu'>" + ."\n" + ." 
"; + } + + return $the_html; + + } + + function clean_email($email = "") { + + $email = preg_replace( "#[\n\r\*\'\"<>&\%\!\(\)\{\}\[\]\?\\/]#", "", $email ); + + if ( preg_match( "/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,4})(\]?)$/", $email) ) + { + return $email; + } + else + { + return FALSE; + } + } + + + /*-------------------------------------------------------------------------*/ + // SKIN, sort out the skin stuff + /*-------------------------------------------------------------------------*/ + + function load_skin() { + global $ibforums, $INFO, $DB; + + $id = -1; + $skin_set = 0; + + //------------------------------------------------ + // Do we have a skin for a particular forum? + //------------------------------------------------ + + if ($ibforums->input['f'] and $ibforums->input['act'] != 'UserCP') + { + if ( $ibforums->vars[ 'forum_skin_'.$ibforums->input['f'] ] != "" ) + { + $id = $ibforums->vars[ 'forum_skin_'.$ibforums->input['f'] ]; + + $skin_set = 1; + } + } + + //------------------------------------------------ + // Are we allowing user chooseable skins? + //------------------------------------------------ + + $extra = ""; + + if ($skin_set != 1 and $ibforums->vars['allow_skins'] == 1) + { + if (isset($ibforums->input['skinid'])) + { + $id = $ibforums->input['skinid']; + $extra = " AND s.hidden=0"; + $skin_set = 1; + } + else if ( $ibforums->member['skin'] != "" and intval($ibforums->member['skin']) >= 0 ) + { + $id = $ibforums->member['skin']; + + if ($id == 'Default') $id = -1; + + $skin_set = 1; + } + + } + + //------------------------------------------------ + // Load the info from the database. + //------------------------------------------------ + + if ( $id >= 0 and $skin_set == 1) + { + + $DB->query("SELECT s.*, i.*, t.template FROM ibf_templates t, ibf_skins s, ibf_images i ". + "WHERE s.sid='$id' AND t.tmid=s.tmpl_id AND i.imid=s.img_id".$extra); + + // Didn't get a row? + + if (! $DB->get_num_rows() ) + { + // Update this members profile + + if ( $ibforums->member['id'] ) + { + $DB->query("UPDATE ibf_members SET skin='-1' WHERE id='".$ibforums->member['id']."'"); + } + + $DB->query("SELECT s.*, i.*, t.template FROM ibf_templates t, ibf_skins s, ibf_images i ". + "WHERE s.default_set=1 AND t.tmid=s.tmpl_id AND i.imid=s.img_id"); + } + + } + else + { + $DB->query("SELECT s.*, i.*, t.template FROM ibf_templates t, ibf_skins s, ibf_images i ". + "WHERE s.default_set=1 AND t.tmid=s.tmpl_id AND i.imid=s.img_id"); + } + + if ( ! $row = $DB->fetch_row() ) + { + echo("Could not query the skin information!"); + exit(); + } + + return $row; + + } + + /*-------------------------------------------------------------------------*/ + // Require, parse and return an array containing the language stuff + /*-------------------------------------------------------------------------*/ + + function load_words($current_lang_array, $area, $lang_type) { + + require "./lang/".$lang_type."/".$area.".php"; + + foreach ($lang as $k => $v) + { + $current_lang_array[$k] = stripslashes($v); + } + + unset($lang); + + return $current_lang_array; + + } + + + /*-------------------------------------------------------------------------*/ + // Return a date or '--' if the date is undef. + // We use the rather nice gmdate function in PHP to synchronise our times + // with GMT. This gives us the following choices: + // + // If the user has specified a time offset, we use that. If they haven't set + // a time zone, we use the default board time offset (which should automagically + // be adjusted to match gmdate. + /*-------------------------------------------------------------------------*/ + + function get_date($date, $method) { + global $ibforums; + + if (!$date) + { + return '--'; + } + + if (empty($method)) + { + $method = 'LONG'; + } + + if ($this->offset_set == 0) + { + // Save redoing this code for each call, only do once per page load + + $this->offset = (($ibforums->member['time_offset'] != "") ? $ibforums->member['time_offset'] : $ibforums->vars['time_offset']) * 3600; + + if ($ibforums->vars['time_adjust'] != "" and $ibforums->vars['time_adjust'] != 0) + { + $this->offset += ($ibforums->vars['time_adjust'] * 60); + } + + if ($ibforums->member['dst_in_use']) + { + $this->offset += 3600; + } + + $this->offset_set = 1; + } + + + return gmdate($this->time_options[$method], ($date + $this->offset) ); + } + + /*-------------------------------------------------------------------------*/ + // Sets a cookie, abstract layer allows us to do some checking, etc + /*-------------------------------------------------------------------------*/ + + function my_setcookie($name, $value = "", $sticky = 1) { + global $INFO; + + $exipres = ""; + + if ($sticky == 1) + { + $expires = time() + 60*60*24*365; + } + + $INFO['cookie_domain'] = $INFO['cookie_domain'] == "" ? "" : $INFO['cookie_domain']; + $INFO['cookie_path'] = $INFO['cookie_path'] == "" ? "/" : $INFO['cookie_path']; + + $name = $INFO['cookie_id'].$name; + + @setcookie($name, urlencode($value), $expires, $INFO['cookie_path'], $INFO['cookie_domain']); + } + + /*-------------------------------------------------------------------------*/ + // Cookies, cookies everywhere and not a byte to eat. + /*-------------------------------------------------------------------------*/ + + function my_getcookie($name) + { + global $INFO, $HTTP_COOKIE_VARS; + + if (isset($HTTP_COOKIE_VARS[$INFO['cookie_id'].$name])) + { + return urldecode($HTTP_COOKIE_VARS[$INFO['cookie_id'].$name]); + } + else + { + return FALSE; + } + + } + + /*-------------------------------------------------------------------------*/ + // Makes incoming info "safe" + /*-------------------------------------------------------------------------*/ + + function parse_incoming() + { + global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_CLIENT_IP, $REQUEST_METHOD, $REMOTE_ADDR, $HTTP_PROXY_USER, $HTTP_X_FORWARDED_FOR; + $return = array(); + + if( is_array($HTTP_GET_VARS) ) + { + while( list($k, $v) = each($HTTP_GET_VARS) ) + { + //$k = $this->clean_key($k); + if( is_array($HTTP_GET_VARS[$k]) ) + { + while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) ) + { + $return[$k][ $this->clean_key($k2) ] = $this->clean_value($v2); + } + } + else + { + $return[$k] = $this->clean_value($v); + } + } + } + + // Overwrite GET data with post data + + if( is_array($HTTP_POST_VARS) ) + { + while( list($k, $v) = each($HTTP_POST_VARS) ) + { + //$k = $this->clean_key($k); + if ( is_array($HTTP_POST_VARS[$k]) ) + { + while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) ) + { + $return[$k][ $this->clean_key($k2) ] = $this->clean_value($v2); + } + } + else + { + $return[$k] = $this->clean_value($v); + } + } + } + + // Sort out the accessing IP + + $return['IP_ADDRESS'] = $this->select_var( array( + 1 => $HTTP_X_FORWARDED_FOR, + 2 => $HTTP_PROXY_USER, + 3 => $REMOTE_ADDR, + 4 => $_SERVER['REMOTE_ADDR'] + ) + ); + + // Make sure we take a valid IP address + + $return['IP_ADDRESS'] = preg_replace( "/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/", "\\1.\\2.\\3.\\4", $return['IP_ADDRESS'] ); + + $return['request_method'] = strtolower($REQUEST_METHOD); + + + return $return; + } + + /*-------------------------------------------------------------------------*/ + // Key Cleaner - ensures no funny business with form elements + /*-------------------------------------------------------------------------*/ + + function clean_key($key) { + + if ($key == "") + { + return ""; + } + $key = preg_replace( "/\.\./" , "" , $key ); + $key = preg_replace( "/\_\_(.+?)\_\_/" , "" , $key ); + $key = preg_replace( "/^([\w\.\-\_]+)$/", "$1", $key ); + return $key; + } + + function clean_value($val) { + + if ($val == "") + { + return ""; + } + $val = preg_replace( "/&/" , "&" , $val ); + $val = preg_replace( "//" , "-->" , $val ); + $val = preg_replace( "/ +
+ + + + + + + +
{$ibforums->lang['login_text']}
{$ibforums->lang[forgot_pass]} vars['php_ext']}?act=Reg&CODE=10'>{$ibforums->lang[pass_link]}
+
+ + + + + + + + +
+ + + + + + + + + + + + +
Please enter your old Ikonboard 3 Username and Password
Your Ikonboard 3 Username
Your Ikonboard 3 Password
+
+
+ + +
+ + + + + + + + + + + + + +
{$ibforums->lang[options]}
{$ibforums->lang[cookies]}{$ibforums->lang[cookie_yes]}
{$ibforums->lang[cookie_no]}
{$ibforums->lang[privacy]}{$ibforums->lang[anon_name]}
+ +
+
+
+ + +EOF; + + $this->output .= $html; + + $this->nav = array( "Upgrade my old Ikonboard Account" ); + $this->page_title = "Upgrade my old Ikonboard Account"; + + $print->add_output("$this->output"); + $print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) ); + + exit(); + + } + + function do_log_in() { + global $DB, $ibforums, $std, $print, $sess, $HTTP_USER_AGENT, $HTTP_POST_VARS; + + $url = ""; + + //------------------------------------------------- + // Make sure the username and password were entered + //------------------------------------------------- + + if ($HTTP_POST_VARS['UserName'] == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_username' ) ); + } + + if ($HTTP_POST_VARS['PassWord'] == "") + { + $std->Error( array( 'LEVEL' => 1, 'MSG' => 'pass_blank' ) ); + } + + + //------------------------------------------------- + // Check for input length + //------------------------------------------------- + + if (strlen($ibforums->input['UserName']) > 32) + { + $std->Error( array( LEVEL => 1, MSG => 'username_long' ) ); + } + + if (strlen($ibforums->input['PassWord']) > 32) + { + $std->Error( array( LEVEL => 1, MSG => 'pass_too_long' ) ); + } + + $username = strtolower($ibforums->input['UserName']); + $password = crypt( $ibforums->input['PassWord'], substr( strtolower($ibforums->input['UserName']), 0, 2) ); + + //------------------------------------------------- + // Attempt to get the user details + //------------------------------------------------- + + $DB->query("SELECT id, name, mgroup, password, new_pass FROM ibf_members WHERE LOWER(name)='$username'"); + + if ($DB->get_num_rows()) + { + $member = $DB->fetch_row(); + + if ( empty($member['id']) or ($member['id'] == "") ) + { + $this->log_in_form( 'wrong_name' ); + } + + if ($member['password'] != $password) + { + $this->log_in_form( 'wrong_pass' ); + } + + // SET REAL PASSY + + $real_pass = md5($ibforums->input['PassWord']); + + //------------------------------ + + if ($ibforums->input['s']) + { + $session_id = $ibforums->input['s']; + + // Delete any old sessions with this users IP addy that doesn't match our + // session ID. + + $DB->query("DELETE FROM ibf_sessions WHERE ip_address='".$ibforums->input['IP_ADDRESS']."' AND id <> '$session_id'"); + + $db_string = $DB->compile_db_update_string( array ( + 'member_name' => $member['name'], + 'member_pass' => $real_pass, + 'member_id' => $member['id'], + 'running_time' => time(), + 'member_group' => $member['mgroup'] + ) ); + + $db_query = "UPDATE ibf_sessions SET $db_string WHERE id='".$ibforums->input['s']."'"; + } + else + { + $session_id = md5( uniqid(microtime()) ); + + // Delete any old sessions with this users IP addy. + + $DB->query("DELETE FROM ibf_sessions WHERE ip_address='".$ibforums->input['IP_ADDRESS']."'"); + + $db_string = $DB->compile_db_insert_string( array ( + 'id' => $session_id, + 'member_name' => $member['name'], + 'member_pass' => $real_pass, + 'member_id' => $member['id'], + 'running_time' => time(), + 'member_group' => $member['mgroup'], + 'ip_address' => substr($ibforums->input['IP_ADDRESS'], 0, 50), + 'browser' => substr($HTTP_USER_AGENT, 0, 50), + 'start_session'=> time(), + ) ); + + $db_query = "INSERT INTO ibf_sessions (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"; + } + + $DB->query( $db_query ); + + //----------------------------------- + // RESET PASS IN MD5 + //----------------------------------- + + $DB->query("UPDATE ibf_members SET password='$real_pass' WHERE id='".$member['id']."'"); + + $ibforums->member = $member; + $ibforums->session_id = $session_id; + + //------------------------------ + + if ($ibforums->input['CookieDate']) + { + $std->my_setcookie("pass_hash" , $real_pass, 1); + $std->my_setcookie("member_id" , $member['id'], 1); + } + + //----------------------------------- + // set our privacy cookie + //----------------------------------- + + if ($ibforums->input[Privacy] == 1) + { + $std->my_setcookie( "anonlogin", 1 ); + } + + //----------------------------------- + // Redirect them to either the board + // index, or where they came from + //----------------------------------- + + $print->redirect_screen( "{$ibforums->lang[thanks_for_login]} {$ibforums->member['name']}", $url ); + + + } + else + { + $this->log_in_form( 'wrong_name' ); + } + + } + + + + + + + function do_log_out() { + global $std, $ibforums, $DB, $print; + + if(! $ibforums->member['id']) + { + $std->Error( array( LEVEL => 1, MSG => 'no_guests') ); + } + + // Update the DB + + $DB->query("UPDATE ibf_sessions SET ". + "member_name='NULL',". + "member_id='0',". + "member_pass='NULL',". + "login_type='0' ". + "WHERE id='". $ibforums->session_id ."'"); + + // Set some cookies + + $std->my_setcookie( "member_id" , "0" ); + $std->my_setcookie( "pass_hash" , "0" ); + $std->my_setcookie( "skin" , "-1" ); + + // Redirect... + + $print->redirect_screen( $ibforums->lang['thanks_for_logout'], "" ); + + } + + + + + +} + +?> diff --git a/upload/sources/misc/legends.php b/upload/sources/misc/legends.php new file mode 100644 index 00000000..1fe4aae0 --- /dev/null +++ b/upload/sources/misc/legends.php @@ -0,0 +1,108 @@ + Show all emo's / BB Tags module +| > Module written by Matt Mecham +| > Date started: 18th April 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new legends; + +class legends { + + var $output = ""; + var $base_url = ""; + var $html = ""; + + function legends() { + + //------------------------------------------------------ + // $is_sub is a boolean operator. + // If set to 1, we don't show the "topic subscribed" page + // we simply end the subroutine and let the caller finish + // up for us. + //------------------------------------------------------ + + global $ibforums, $DB, $std, $print, $skin_universal; + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_legends', $ibforums->lang_id ); + + require "./Skin/".$ibforums->skin_id."/skin_legends.php"; + $this->html = new skin_legends(); + + $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; + + + + //-------------------------------------------- + // What to do? + //-------------------------------------------- + + switch($ibforums->input['CODE']) + { + case 'emoticons': + $this->show_emoticons(); + break; + + default: + $this->show_emoticons(); + break; + } + + // If we have any HTML to print, do so... + + $print->pop_up_window( $this->page_title, $this->output ); + + } + + function show_emoticons() + { + global $ibforums, $DB, $std; + + $this->page_title = $ibforums->lang['emo_title']; + + $this->output .= $this->html->emoticon_javascript(); + + $this->output .= $this->html->page_header( $ibforums->lang['emo_title'], $ibforums->lang['emo_type'], $ibforums->lang['emo_img'] ); + + $DB->query("SELECT typed, image from ibf_emoticons"); + + if ( $DB->get_num_rows() ) + { + while ( $r = $DB->fetch_row() ) + { + $this->output .= $this->html->emoticons_row( stripslashes($r['typed']), stripslashes($r['image']) ); + + } + } + + $this->output .= $this->html->page_footer(); + + } + + + +} + +?> + + + + + diff --git a/upload/sources/misc/print_page.php b/upload/sources/misc/print_page.php new file mode 100644 index 00000000..43611156 --- /dev/null +++ b/upload/sources/misc/print_page.php @@ -0,0 +1,390 @@ + Topic display in printable format module +| > Module written by Matt Mecham +| > Date started: 25th March 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new Printable; + +class Printable { + + var $output = ""; + var $base_url = ""; + var $html = ""; + var $moderator = array(); + var $forum = array(); + var $topic = array(); + var $category = array(); + var $mem_groups = array(); + var $mem_titles = array(); + var $mod_action = array(); + var $poll_html = ""; + + /***********************************************************************************/ + // + // Our constructor, load words, load skin, print the topic listing + // + /***********************************************************************************/ + + function Printable() { + + + global $ibforums, $DB, $std, $print, $skin_universal; + + require "./Skin/".$ibforums->skin_id."/skin_printpage.php"; + + /***********************************/ + // Compile the language file + /***********************************/ + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_printpage', $ibforums->lang_id); + + $this->html = new skin_printpage(); + + /***********************************/ + // Check the input + /***********************************/ + + $ibforums->input['t'] = $std->is_number($ibforums->input['t']); + $ibforums->input['f'] = $std->is_number($ibforums->input['f']); + + if ($ibforums->input['t'] < 0 or $ibforums->input['f'] < 0) + { + $std->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + + //------------------------------------- + // Get the forum info based on the forum ID, get the category name, ID, and get the topic details + //------------------------------------- + + $DB->query("SELECT t.*, f.name as forum_name, f.id as forum_id, f.read_perms, f.password, f.reply_perms, f.start_perms, f.allow_poll, f.posts as forum_posts, f.topics as forum_topics, f.use_attach, c.name as cat_name, c.id as cat_id FROM ibf_topics t, ibf_forums f , ibf_categories c where t.tid='".$ibforums->input[t]."' and f.id = t.forum_id and f.category=c.id"); + + $this->topic = $DB->fetch_row(); + + $this->forum = array( 'id' => $this->topic['forum_id'] , + 'name' => $this->topic['forum_name'] , + 'posts' => $this->topic['forum_posts'] , + 'topics' => $this->topic['forum_topics'] , + 'read_perms' => $this->topic['read_perms'] , + 'allow_poll' => $this->topic['allow_poll'] , + 'use_attach' => $this->topic['use_attach'] , + 'password' => $this->topic['password'] + ); + + $this->category = array( 'name' => $this->topic['cat_name'], + 'id' => $this->topic['cat_id'] , + ); + + //------------------------------------- + // Error out if we can not find the forum + //------------------------------------- + + if (!$this->forum['id']) + { + $std->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + + //------------------------------------- + // Error out if we can not find the topic + //------------------------------------- + + if (!$this->topic['tid']) + { + $std->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + + + $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; + + + /***********************************/ + // Check viewing permissions, private forums, + // password forums, etc + /***********************************/ + + if ( (!$this->topic['pin_state']) and (!$ibforums->member['g_other_topics']) ) + { + $std->Error( array( LEVEL => 1, MSG => 'no_view_topic') ); + } + + $bad_entry = $this->check_access(); + + if ($bad_entry == 1) { + $std->Error( array( LEVEL => 1, MSG => 'no_view_topic') ); + } + + + + + + /***********************************/ + // Render the page top + /***********************************/ + + $this->output .= $this->html->pp_header( $this->forum['name'], $this->topic['title'], $this->topic['starter_name'] ); + + + /*******************************************************************************************/ + // Grab the posts we'll need + /*******************************************************************************************/ + + // Set a prohibitive limit delibrately for long topics. + + $max_posts = 300; + + $DB->query( "SELECT * FROM ibf_posts WHERE topic_id='".$this->topic['tid']."'". + " and queued !='1' ORDER BY pid LIMIT 0, ".$max_posts); + + // Loop through to pick out the correct member IDs. + // and push the post info into an array - maybe in the future + // we can add page spans, or maybe save to a PDF file? + + $the_posts = array(); + $mem_ids = ""; + $member_array = array(); + $cached_members = array(); + + while ($i = $DB->fetch_row() ) + { + $the_posts[] = $i; + if ($i['author_id'] != 0) + { + if (preg_match( "/'".$i['author_id']."',/", $mem_ids) ) + { + continue; + } + else + { + $mem_ids .= "'".$i['author_id']."',"; + } + } + } + + // Fix up the member_id string + $mem_ids = preg_replace( "/,$/", "", $mem_ids); + + // Get the member profiles needed for this topic + + if ($mem_ids != "") + { + $DB->query("SELECT id,name,mgroup,email,joined,ip_address,avatar,avatar_size,posts,aim_name,icq_number,signature, + website,yahoo,title,hide_email,msnname from ibf_members WHERE id in ($mem_ids)"); + + while ( $m = $DB->fetch_row() ) + { + if ($m['id'] and $m['name']) + { + if (isset($member_array[ $m['id'] ])) + { + continue; + } + else + { + $member_array[ $m['id'] ] = $m; + } + } + } + } + + /***********************************/ + // Format and print out the topic list + /***********************************/ + + $td_col_cnt = 0; + + foreach ($the_posts as $row) { + + $poster = array(); + + // Get the member info. We parse the data and cache it. + // It's likely that the same member posts several times in + // one page, so it's not efficient to keep parsing the same + // data + + if ($row['author_id'] != 0) + { + // Is it in the hash? + if ( isset($cached_members[ $row['author_id'] ]) ) + { + // Ok, it's already cached, read from it + $poster = $cached_members[ $row['author_id'] ]; + $row['name_css'] = 'normalname'; + } + else + { + // Ok, it's NOT in the cache, is it a member thats + // not been deleted? + if ($member_array[ $row['author_id'] ]) + { + $row['name_css'] = 'normalname'; + $poster = $member_array[ $row['author_id'] ]; + // Add it to the cached list + $cached_members[ $row['author_id'] ] = $poster; + } + else + { + // It's probably a deleted member, so treat them as a guest + $poster = $std->set_up_guest( $row['author_id'] ); + $row['name_css'] = 'unreg'; + } + } + } + else + { + // It's definately a guest... + $poster = $std->set_up_guest( $row['author_name'] ); + $row['name_css'] = 'unreg'; + } + + //-------------------------------------------------------------- + + $row['post_css'] = $td_col_count % 2 ? 'post1' : 'post2'; + + ++$td_col_count; + + //-------------------------------------------------------------- + + if (!$ibforums->skin[EDIT_FONT_SIZE]) $ibforums->skin[EDIT_FONT_SIZE] = 7; + + $row['post'] = preg_replace( "//", "Edited by \\1 on \\2", $row['post'] ); + + //-------------------------------------------------------------- + + if (!$ibforums->member['view_img']) + { + $row['post'] = preg_replace( "//", "(IMG:\\1)", $row['post'] ); + } + + + + $row['post_date'] = $std->get_date( $row['post_date'], 'LONG' ); + + $row['post'] = $this->parse_message($row['post']); + + + //-------------------------------------------------------------- + // Siggie stuff + //-------------------------------------------------------------- + + if (!$ibforums->vars[SIG_SEP]) $ibforums->vars[SIG_SEP] = "

--------------------
"; + + if ($poster['signature'] and $ibforums->member['view_sigs']) + { + if ($row['use_sig'] == 1) + { + $row['signature'] = "{$ibforums->vars[SIG_SEP]}{$poster['signature']}"; + } + + } + + $this->output .= $this->html->pp_postentry( $poster, $row ); + + } + + /***********************************/ + // Print the footer + /***********************************/ + + $this->output .= $this->html->pp_end(); + + /***********************************/ + // Print all the output + /***********************************/ + + $this->output .= "

Powered by Invision Board
© 2002 Invision PS
"; + + + echo($this->output); + + exit; + + + } + + + function parse_message($message="") { + + $message = preg_replace( "#.+?#", "\\1" , $message ); + + $message = preg_replace( "#(.+?)#", "\n\n------------ CODE SAMPLE ----------\n" , $message ); + $message = preg_replace( "#(.+?)#", "\n-----------------------------------\n\n" , $message ); + + $message = preg_replace( "#(.+?)#" , "\n\n------------ QUOTE ----------\n" , $message ); + $message = preg_replace( "#(.+?)#" , "\n\n------------ QUOTE ----------\n" , $message ); + $message = preg_replace( "#(.+?)#" , "\n-----------------------------\n\n" , $message ); + + $message = preg_replace( "#.+?#e" , "(FLASH MOVIE)" , $message ); + $message = preg_replace( "##" , "(IMAGE: \\1)" , $message ); + $message = preg_replace( "#(.+?)#" , "(URL: \\1://\\2)" , $message ); + $message = preg_replace( "#(.+?)#" , "(EMAIL: \\2)" , $message ); + + $message = preg_replace( "#(.+?)(.+?)(.+?)#e" , "\n\n--------------- SQL -----------\n\\2\n----------------\n\n", $message); + $message = preg_replace( "#(.+?)(.+?)(.+?)#e", "\n\n-------------- HTML -----------\n\\2\n----------------\n\n", $message); + + return $message; + + } + + function check_access() { + global $ibforums, $std, $HTTP_COOKIE_VARS; + + $return = 1; + + $this->m_group = $ibforums->member['mgroup']; + + if ($this->forum['read_perms'] == '*') + { + $return = 0; + } + else if (preg_match( "/(^|,)$this->m_group(,|$)/", $this->forum['read_perms'] ) ) + { + $return = 0; + } + + if ($this->forum['password'] != "") + { + + if ( ! $c_pass = $std->my_getcookie('iBForum'.$this->forum['id']) ) + { + return 1; + } + + if ( $c_pass == $this->forum['password'] ) + { + return 0; + } + else + { + return 1; + } + } + + return $return; + + } +} + +?> + + + + + diff --git a/upload/sources/misc/stats.php b/upload/sources/misc/stats.php new file mode 100644 index 00000000..6e2cdd65 --- /dev/null +++ b/upload/sources/misc/stats.php @@ -0,0 +1,336 @@ + Topic Tracker module +| > Module written by Matt Mecham +| > Date started: 6th March 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new stats; + +class stats { + + var $output = ""; + var $base_url = ""; + var $html = ""; + + function stats() { + + //------------------------------------------------------ + // $is_sub is a boolean operator. + // If set to 1, we don't show the "topic subscribed" page + // we simply end the subroutine and let the caller finish + // up for us. + //------------------------------------------------------ + + global $ibforums, $DB, $std, $print, $skin_universal; + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_stats', $ibforums->lang_id ); + + require "./Skin/".$ibforums->skin_id."/skin_stats.php"; + $this->html = new skin_stats(); + + $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; + + + + //-------------------------------------------- + // What to do? + //-------------------------------------------- + + switch($ibforums->input['CODE']) + { + case 'leaders': + $this->show_leaders(); + break; + case '02': + $this->do_search(); + break; + case 'id': + $this->show_queries(); + break; + default: + $this->show_today_posters(); + break; + } + + // If we have any HTML to print, do so... + + $print->add_output("$this->output"); + $print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) ); + + } + + function show_leaders() + { + global $ibforums, $DB, $std; + + $this->output .= $this->html->page_title( $ibforums->lang['forum_leaders'] ); + + //-------------------------------------------- + // Work out where our super mods are at + //-------------------------------------------- + + $sup_ids = array(); + + $DB->query("SELECT g_id from ibf_groups WHERE g_is_supmod = 1"); + + if ( $DB->get_num_rows() ) + { + while ( $i = $DB->fetch_row() ) + { + $sup_ids[] = $i['g_id']; + } + } + + //-------------------------------------------- + // Get our admins + //-------------------------------------------- + + $admin_ids = array(); + + $DB->query("SELECT id, name, email, hide_email, location, aim_name, icq_number from ibf_members WHERE mgroup='".$ibforums->vars['admin_group']."'"); + + $this->output .= $this->html->group_strip( $ibforums->lang['leader_admins'] ); + + while ( $member = $DB->fetch_row() ) + { + $this->output .= $this->html->leader_row( $this->parse_member( $member ), $ibforums->lang['leader_all_forums'] ); + + $admin_ids[] = $member['id']; + } + + $this->output .= $this->html->close_strip(); + + //-------------------------------------------- + // Do the bizz with the super men, er mods. + //-------------------------------------------- + + $admin_ids[] = '0'; + + if ( count($sup_ids) > 0 ) + { + + $DB->query("SELECT id, name, email, hide_email, location, aim_name, icq_number from ibf_members WHERE mgroup IN (".implode( ',', $sup_ids ).") and id NOT IN(".implode(',', $admin_ids).")"); + + if ( $DB->get_num_rows() ) + { + $this->output .= $this->html->group_strip( $ibforums->lang['leader_global'] ); + + while ( $member = $DB->fetch_row() ) + { + $this->output .= $this->html->leader_row( $this->parse_member( $member ), $ibforums->lang['leader_all_forums'] ); + } + + $this->output .= $this->html->close_strip(); + } + + } + + //-------------------------------------------- + // Do we have any moderators?. + //-------------------------------------------- + + $DB->query("SELECT m.id, m.name, m.email, m.hide_email, m.location, m.aim_name, m.icq_number, f.id as forum_id, f.read_perms, f.name as forum_name FROM ibf_members m, ibf_forums f, ibf_moderators mod " + ."WHERE m.id=mod.member_id and f.id=mod.forum_id"); + + $data = array(); + + while ( $i = $DB->fetch_row() ) + { + if ( preg_match( "/(^|,)".$ibforums->member['mgroup']."(,|$)/", $i['read_perms'] ) ) + { + $data[] = $i; + } + else if ( $i['read_perms'] == '*' ) + { + $data[] = $i; + } + } + + //------------------------ + + if ( count($data) > 0 ) + { + $mod_array = array(); + + $this->output .= $this->html->group_strip( $ibforums->lang['leader_mods'] ); + + foreach ( $data as $idx => $i ) + { + if ( !isset( $mod_array['member'][ $i['id'] ][ 'name' ] ) ) + { + // Member is not already set, lets add the member... + + $mod_array['member'][ $i['id'] ] = array( 'name' => $i['name'], + 'email' => $i['email'], + 'hide_email' => $i['hide_email'], + 'location' => $i['location'], + 'aim_name' => $i['aim_name'], + 'icq_number' => $i['icq_number'], + 'id' => $i['id'] + ); + + } + + // Add forum.. + + $mod_array['forums'][ $i['id'] ][] = "".$i['forum_name'].""; + } + + foreach( $mod_array['member'] as $id => $data ) + { + $this->output .= $this->html->leader_row( + $this->parse_member( $mod_array['member'][ $id ] ), + implode( "
", $mod_array['forums'][ $id ] ) + ); + + } + + $this->output .= $this->html->close_strip(); + + } + + $this->page_title = $ibforums->lang['forum_leaders']; + $this->nav = array( $ibforums->lang['forum_leaders'] ); + + } + + function show_queries() + { + global $ibforums, $DB, $std; + + // show DB queries in graphic format(depreciated) + // left here to stop other functions breaking + flush(); + header("Content-type: image/gif"); + echo base64_decode("R0lGODlhhgAfAMQAAAAAAP///+/v79/f38/Pz7+/v6+vr5+fn4+Pj4CAgHBwcGBgYFBQUEBAQDAwMCAgIBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAhgAfAAAF/2AgjmRpnmiqrmzrvnAsz3Rt33iu7/x8mL8AgcEgiBINg2i4EAiJxtEhmlKYrCpCY5uYYXurQ8GUGAQeB8NDYFgU1oFkwopWO4/jrImKKrgLDXkwDWAsCyICC0VCCARYCQUKRggGAgwiDY54I5ABBwpFBVEGAz+AWD+JiwUGDV0FXQGwAapGia4iBwwGWgeEhSq/CwgHDpgkCwO/sLNxyGabEAgJCwSHAcaEDn4/hMPFAUhvA80KP9/GCgoFDkYApA5tv8AnBLHGAUoBlyKAzrKQYs3zx2kMPm1CDhF6UECAE4QBqiVQAqkAgIsQnOCrpm8dtoQBlNHrI7DELwJwlv8FPCYETsF/hBQYmOjsAIAHRgj9CjimYqxP/yANAQBhDKFm80aSaIZPHyEB7UQk83RgwLWnUUl0+kXIgAIHD0MKQHAJ4rpOPkeYLbArnFFZVgQkVSpiAJYiKEVcWpRLgVwzDga02cdnE1dM/LQJGOKsCFS3bpsdOOQ4G4EBDP+BRTCX7r4lDyDoK3LxYsMGAFBBwEmgNABBW1kOO3Zgdc6WEH6gLWDxYgMzKHPnW72gWy4ICzrTbWLCQBDP0KP3eT7Cr/Tr2PuZEJS9u/fv4MOLH1/3DowBTgrLQK9CALQR7lewnxEfTKcRh8SoYAD4xpQs1AkRIBncwdBMDxXdQcj/fQIU6IxVO1yWQoPmLfFeg3g0NIKESwiyGC28xTKChiCS8OEA6pWQgAMNPBCHa4A04IAVnUA4WRde5YNLjq3gaMVMGcoIgTVRbJMAVDICFMBXosXBgAOXrJjkkg40qcADLIaTJYsOiIhNAxAMgJkD+GD5wFcPIKBCAl244cxWP4AlhZrVxHSJJHYuqcWSd0ZRESEHTPTjWbMgQM6RxjwWyBnhWCHTY4qKYEwCauaogIg5HvCJEjIFkJEAnyr3UmyxQSaCJI3t4xche636GQOuZvhKF8ZUA8sAyI3BTEmHdbIrSzNBAJmvIt73zyyH/YPCbm++ZepHcgWAAFuaXjIt6wPVSkutLgXNMksRxsxiTVG/OtOrriuZy8CKw6L7EkvIsiTqJqQaZQQDd0QLpBaGNqAmv8r862/A3c7qyQKH3FppQAPwk80xCfxATMOS/uNiJweoOc2cniBQjbTGwbRmT2PklgB/Wyhw1KGmDukpNC6HKULMYpLsbRegKjHLAyuGGAcoXfTKc0pAn6GysJ0IMHQXqfAcJjsJpCSvCgWYUXU+BwhQRiYIOFH11c8FEXYuUpBNjiw1h5RH1mqHVOMYY4lNtihlIEJMXZCQcrXbBIwRxAD33Uq2J4PPMC95iNdweOKMN+7445BfFwIAOw=="); + exit(); + } + + + + function show_today_posters() + { + global $ibforums, $DB, $std; + + $this->output .= $this->html->page_title( $ibforums->lang['todays_posters'] ); + + $this->output .= $this->html->top_poster_header(); + + $time_high = time(); + + $time_low = $time_high - (60*60*24); + + //-------------------------------------------- + // Query the DB + //-------------------------------------------- + + $DB->query("SELECT COUNT(pid) as count FROM ibf_posts WHERE post_date < $time_high and post_date > $time_low"); + $todays_posts = $DB->fetch_row(); + + if ($todays_posts['count'] > 0) + { + + $DB->query("SELECT COUNT(p.pid) as tpost, m.id, m.name, m.joined, m.posts FROM ibf_posts p, ibf_members m " + ."WHERE m.id > 0 AND m.id=p.author_id and post_date < $time_high and post_date > $time_low GROUP BY p.author_id ORDER BY tpost DESC LIMIT 0,10"); + + if ( $DB->get_num_rows() ) + { + + while ($info = $DB->fetch_row()) + { + + $info['total_today_posts'] = $todays_posts['count']; + + if ($todays_posts['count'] > 0 and $info['tpost'] > 0) + { + $info['today_pct'] = sprintf( '%.2f', ( $info['tpost'] / $todays_posts['count'] ) * 100 ); + } + + $info['joined'] = $std->get_date( $info['joined'], 'JOINED' ); + + $this->output .= $this->html->top_poster_row( $info ); + } + } + else + { + $this->output .= $this->html->top_poster_no_info(); + } + } + else + { + $this->output .= $this->html->top_poster_no_info(); + } + + $this->output .= $this->html->top_poster_footer( $todays_posts['count'] ); + + $this->page_title = $ibforums->lang['top_poster_title']; + + $this->nav = array( $ibforums->lang['top_poster_title'] ); + + } + +//------------------------------------------------------------------------------------------------ + + function parse_member( $member ) + { + global $ibforums, $std; + + $member['msg_icon'] = "{$ibforums->skin['P_MSG']}"; + + if (!$member['hide_email']) + { + $member['email_icon'] = "{$ibforums->skin['P_EMAIL']}"; + } + else + { + $member['email_icon'] = ' '; + } + + if ($member['icq_number']) + { + $member['icq_icon'] = "base_url}&act=ICQ&MID={$member['id']}','Pager','450','330','0','1','1','1')\">{$ibforums->skin[P_ICQ]}"; + } + else + { + $member['icq_iconn'] = ' '; + } + + if ($member['aim_name']) + { + $member['aol_icon'] = "base_url}&act=AOL&MID={$member['id']}','Pager','450','330','0','1','1','1')\">{$ibforums->skin[P_AOL]}"; + } + else + { + $member['aol_icon'] = ' '; + } + + return $member; + + } + +} + +?> + + + + + diff --git a/upload/sources/misc/tracker.php b/upload/sources/misc/tracker.php new file mode 100644 index 00000000..09a2eff3 --- /dev/null +++ b/upload/sources/misc/tracker.php @@ -0,0 +1,210 @@ + Topic Tracker module +| > Module written by Matt Mecham +| > Date started: 5th March 2002 +| +| > Module Version Number: 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new tracker; + +class tracker { + + var $output = ""; + var $base_url = ""; + var $html = ""; + + var $forum = array(); + var $topic = array(); + var $category = array(); + + + function tracker($is_sub=0) { + + //------------------------------------------------------ + // $is_sub is a boolean operator. + // If set to 1, we don't show the "topic subscribed" page + // we simply end the subroutine and let the caller finish + // up for us. + //------------------------------------------------------ + + global $ibforums, $DB, $std, $print, $skin_universal; + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_emails', $ibforums->lang_id); + + + + //------------------------------------------------------ + // Check the input + //------------------------------------------------------ + + $ibforums->input['t'] = $std->is_number($ibforums->input['t']); + $ibforums->input['f'] = $std->is_number($ibforums->input['f']); + + if ($ibforums->input['t'] < 0 or $ibforums->input['f'] < 0) + { + if ($is_sub != 1) + { + $std->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + else + { + return; + } + } + + //------------------------------------------------------ + // Get the forum info based on the forum ID, get the category name, ID, and get the topic details + //------------------------------------------------------ + + $DB->query("SELECT t.tid, f.id as fid, f.read_perms, f.password FROM ibf_topics t, ibf_forums f WHERE t.tid='".$ibforums->input['t']."' AND t.forum_id=f.id"); + + $this->topic = $DB->fetch_row(); + + + + //------------------------------------------------------ + // Error out if we can not find the forum + //------------------------------------------------------ + + if (!$this->topic['fid']) + { + if ($is_sub != 1) + { + $std->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + else + { + return; + } + } + + //------------------------------------------------------ + // Error out if we can not find the topic + //------------------------------------------------------ + + if (!$this->topic['tid']) + { + if ($is_sub != 1) + { + $std->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + else + { + return; + } + } + + $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; + + $this->base_url_NS = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}"; + + //------------------------------------------------------ + // Check viewing permissions, private forums, + // password forums, etc + //------------------------------------------------------ + + if (! $ibforums->member['id'] ) { + if ($is_sub != 1) + { + $std->Error( array( LEVEL => 1, MSG => 'no_guests') ); + } + else + { + return; + } + } + + if ($this->topic['read_perms'] != '*') + { + if (! preg_match( "/(^|,)".$ibforums->member['mgroup']."(,|$)/", $this->topic['read_perms'] ) ) + { + if ($is_sub != 1) + { + $std->Error( array( LEVEL => 1, MSG => 'forum_no_access') ); + } + else + { + return; + } + } + } + + if ($this->topic['password'] != "") + { + + if ( ! $c_pass = $std->my_getcookie('iBForum'.$this->topic['fid']) ) + { + $std->Error( array( LEVEL => 1, MSG => 'forum_no_access') ); + } + + if ( $c_pass != $this->topic['password'] ) + { + $std->Error( array( LEVEL => 1, MSG => 'forum_no_access') ); + } + + } + + //------------------------------------------------------ + // Have we already subscribed? + //------------------------------------------------------ + + $DB->query("SELECT trid from ibf_tracker WHERE topic_id='".$this->topic['tid']."' AND member_id='".$ibforums->member['id']."'"); + + if ( $DB->get_num_rows() ) + { + if ($is_sub != 1) + { + $std->Error( array( LEVEL => 1, MSG => 'already_sub') ); + } + else + { + return; + } + } + + //------------------------------------------------------ + // Add it to the DB + //------------------------------------------------------ + + $db_string = $DB->compile_db_insert_string( array ( + 'member_id' => $ibforums->member['id'], + 'topic_id' => $this->topic['tid'], + 'start_date' => time(), + ) ); + + $DB->query("INSERT INTO ibf_tracker (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"); + + if ($is_sub != 1) + { + $print->redirect_screen( $ibforums->lang['sub_added'], "act=ST&f={$this->topic['fid']}&t={$this->topic['tid']}&st={$ibforums->input['st']}" ); + } + else + { + return; + } + } +} + +?> + + + + + diff --git a/upload/sources/mod_cp.php b/upload/sources/mod_cp.php new file mode 100644 index 00000000..5d20adf4 --- /dev/null +++ b/upload/sources/mod_cp.php @@ -0,0 +1,1458 @@ + Moderation Control Panel module +| > Module written by Matt Mecham +| > Date started: 19th February 2002 +| +| > Module Version 1.0.0 ++-------------------------------------------------------------------------- +*/ + + +$idx = new Moderate; + +class Moderate { + + var $output = ""; + var $base_url = ""; + var $html = ""; + + var $moderator = array(); + var $forum = array(); + var $topic = array(); + + var $upload_dir = ""; + + + /***********************************************************************************/ + // + // Our constructor, load words, load skin, print the topic listing + // + /***********************************************************************************/ + + function Moderate() { + + global $ibforums, $DB, $std, $print, $skin_universal; + + // Make sure this is a POST request, not a naughty IMG redirect + + require "./Skin/".$ibforums->skin_id."/skin_mod.php"; + + //------------------------------------- + // Compile the language file + //------------------------------------- + + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_mod' , $ibforums->lang_id); + $ibforums->lang = $std->load_words($ibforums->lang, 'lang_topic', $ibforums->lang_id); + + $this->html = new skin_mod(); + + //------------------------------------- + // Check the input + //------------------------------------- + + + + $ibforums->input['f'] = $std->is_number($ibforums->input['f']); + if (! $ibforums->input['f'] ) + { + $std->Error( array( 'LEVEL' => 1,'MSG' => 'missing_files') ); + } + + $ibforums->input['st'] = $ibforums->input['st'] ? $std->is_number($ibforums->input['st']) : 0; + + + //------------------------------------- + // Get the forum info based on the forum ID, get the category name, ID, and get the topic details + //------------------------------------- + + $DB->query("SELECT f.*, c.name as cat_name, c.id as cat_id from ibf_forums f, ibf_categories c WHERE f.id=".$ibforums->input['f']." and c.id=f.category"); + + $this->forum = $DB->fetch_row(); + + + //------------------------------------- + // Error out if we can not find the forum + //------------------------------------- + + if (!$this->forum['id']) + { + $std->Error( array( LEVEL => 1, MSG => 'missing_files') ); + } + + $pass = 0; + + $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; + + if ($ibforums->member['id']) + { + if ($ibforums->member['g_is_supmod'] == 1) + { + $pass = 1; + } + else + { + $DB->query("SELECT * FROM ibf_moderators WHERE forum_id='".$this->forum['id']."' AND member_id='".$ibforums->member['id']."'"); + if ( $this->moderator = $DB->fetch_row() ) + { + $pass = 1; + } + } + } + + if ($pass == 0) + { + $std->Error( array( LEVEL => 1, MSG => 'no_permission') ); + } + + $this->upload_dir = $ibforums->vars['upload_dir']; + + $this->upload_dir = preg_replace( "!/$!", "", $this->upload_dir ); + + //------------------------------------- + + $print->add_output( $this->html->Menu_bar($this->base_url, $this->forum['id']) ); + + //------------------------------------- + // Convert the code ID's into something + // use mere mortals can understand.... + //------------------------------------- + + switch ($ibforums->input['CODE']) { + + case 'edituser': + $this->find_user_one(); + break; + case 'dofinduser': + $this->find_user_two(); + break; + case 'doedituser': + $this->edit_user(); + break; + case 'compedit': + $this->complete_user_edit(); + break; + + //------------------------- + + case 'prune': + $this->prune_juice(); + break; + case 'doprune': + $this->drink_prune_juice(); // eew! + break; + case 'domove': + $this->do_move(); + break; + + //------------------------- + + case 'modtopics': + $this->mod_topics(); + break; + case 'domodtopics': + $this->domod_topics(); + break; + + case 'modposts': + $this->mod_posts(); + break; + case 'modtopicview': + $this->mod_topicview(); + break; + + case 'domodposts': + $this->mod_domodposts(); + break; + + case 'modtopicapprove': + $this->approve_all(); + break; + + default: + $this->splash(); + break; + } + + // If we have any HTML to print, do so... + + $fj = $std->build_forum_jump(); + $fj = preg_replace( "!#Forum Jump#!", $ibforums->lang['forum_jump'], $fj); + + $this->output .= $this->html->CP_end(); + + $this->output .= $this->html->forum_jump($fj, $links); + + if ( count($this->nav) < 1 ) + { + $this->nav[] = "{$this->forum['name']}"; + $this->nav[] = "{$ibforums->lang['cp_modcp_home']}"; + } + + if (! $this->page_title ) + { + $this->page_title = $ibforums->lang['cp_modcp_ptitle']; + } + + $print->add_output("$this->output"); + $print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 1, NAV => $this->nav ) ); + + } + + + //------------------------------------------------- + // MODERATE NEW POSTS AND STUFF + //-------------------------------------------------- + + function approve_all() + { + global $std, $ibforums, $DB, $print; + + + // Sort out the approved bit + + $DB->query("UPDATE ibf_posts SET queued=0 WHERE topic_id='".$ibforums->input['tid']."'"); + + $DB->query("SELECT COUNT(pid) as posts FROM ibf_posts WHERE new_topic <> 1 and topic_id='".$ibforums->input['tid']."'"); + $count = $DB->fetch_row(); + + $DB->query("UPDATE ibf_topics SET posts=".$count['posts']." WHERE tid='".$ibforums->input['tid']."'"); + + // Update the posters ..er.. post count. + + $DB->query("SELECT starter_id FROM ibf_topics WHERE tid='".$ibforums->input['tid']."'"); + + $mems = array(); + + while ( $r = $DB->fetch_row() ) + { + if ($r['starter_id'] > 0) + { + $mems[] = $r['starter_id']; + } + } + + if ( count($mems) > 0 ) + { + $mstring = implode( ",", $mems ); + + $DB->query("UPDATE ibf_members SET posts=posts+1 WHERE id IN ($mstring)"); + } + + // Update the last topic poster, time and number of posts. + + $DB->query("SELECT author_id, author_name, post_date FROM ibf_posts WHERE topic_id='".$ibforums->input['tid']."' AND queued <> 1 ORDER BY pid DESC LIMIT 0,1"); + + if ($last = $DB->fetch_row()) + { + $db_string = $DB->compile_db_update_string( array ( + 'last_post' => $last['post_date'], + 'last_poster_id' => $last['author_id'], + 'last_poster_name' => $last['author_name'], + ) ); + + $DB->query("UPDATE ibf_topics SET $db_string WHERE tid='".$ibforums->input['tid']."'"); + } + + // recount... + + $this->recount(); + + + // Boink + + $print->redirect_screen( $ibforums->lang['cp_redirect_mod_topics'], "act=ModCP&CODE=modposts&f=".$this->forum['id'] ); + + } + + //-------------------------------------------------- + + function mod_domodposts() + { + global $std, $ibforums, $DB, $print; + + //-------------------------------------------------- + // Which TID's are we playing with? + //-------------------------------------------------- + + $ids = array(); + + foreach ($ibforums->input as $key => $value) + { + if ( preg_match( "/^PID_(\d+)$/", $key, $match ) ) + { + if ($ibforums->input[$match[0]]) + { + $ids[] = $match[1]; + } + } + } + + //-------------------------------------------------- + // Did we actually select anyfink? + //-------------------------------------------------- + + if ( count($ids) < 1 ) + { + $this->mod_error('cp_error_no_topics'); + return; + } + + $pid_count = count($ids); + + $pids = implode( ",", $ids ); + + //-------------------------------------------------- + // What did we do? + //-------------------------------------------------- + + if ($ibforums->input['type'] == 'approve') + { + // Sort out the approved bit + + $DB->query("UPDATE ibf_topics SET posts=posts+$pid_count WHERE tid='".$ibforums->input['tid']."'"); + + $DB->query("UPDATE ibf_posts SET queued=0 WHERE pid IN ($pids)"); + + // Update the posters ..er.. post count. + + $DB->query("SELECT author_id FROM ibf_posts WHERE queued <> 1 and pid IN ($pids)"); + + $mems = array(); + + while ( $r = $DB->fetch_row() ) + { + if ($r['author_id'] > 0) + { + $mems[] = $r['author_id']; + } + } + + if ( count($mems) > 0 ) + { + $mstring = implode( ",", $mems ); + + $DB->query("UPDATE ibf_members SET posts=posts+1 WHERE id IN ($mstring)"); + } + + // Update the last topic poster, time and number of posts. + + $DB->query("SELECT author_id, author_name, post_date FROM ibf_posts WHERE topic_id='".$ibforums->input['tid']."' AND queued <> 1 ORDER BY pid DESC LIMIT 0,1"); + + if ($last = $DB->fetch_row()) + { + $db_string = $DB->compile_db_update_string( array ( + 'last_post' => $last['post_date'], + 'last_poster_id' => $last['author_id'], + 'last_poster_name' => $last['author_name'], + ) ); + + $DB->query("UPDATE ibf_topics SET $db_string WHERE tid='".$ibforums->input['tid']."'"); + } + + + + // recount... + + $this->recount(); + } + else + { + // Delete 'dem postings + + $DB->query("DELETE FROM ibf_posts WHERE pid IN ($pids)"); + + // Recount.. + + $this->recount(); + } + + // Boink + + $print->redirect_screen( $ibforums->lang['cp_redirect_mod_topics'], "act=ModCP&CODE=modposts&f=".$this->forum['id'] ); + + } + + //**------------------------------------------------------- + + function mod_topicview() + { + global $std, $ibforums, $DB, $print; + + $DB->query("SELECT tid, title FROM ibf_topics WHERE tid='".$ibforums->input['tid']."'"); + + if ( ! $DB->get_num_rows() ) + { + $this->mod_error('cp_error_no_topics'); + return; + } + + $topic = $DB->fetch_row(); + + $this->output .= $this->html->modtopicview_start($ibforums->input['tid'], $this->forum['name'], $this->forum['id'], $topic['title']); + + + //+---------------------------------------------------------------- + // Get the topics to work on + //+---------------------------------------------------------------- + + $DB->query( "SELECT p.*, ". + "m.id,m.name,m.mgroup,m.email,m.joined,m.avatar,m.avatar_size,m.posts as member_posts,m.aim_name,m.icq_number,m.signature, m.website,m.yahoo,m.title,m.hide_email,m.msnname, ". + "g.g_id, g.g_title, g.g_icon, t.* ". + "FROM ibf_posts p, ibf_members m, ibf_groups g, ibf_topics t ". + "WHERE t.tid='".$ibforums->input['tid']."' AND t.approved=1 AND p.topic_id=t.tid AND p.queued=1 AND p.author_id=m.id AND g.g_id=m.mgroup ". + "ORDER BY p.pid ASC"); + + while( $r = $DB->fetch_row() ) + { + $member = $this->parse_member($r); + + $r['post_date'] = $std->get_date( $r['post_date'], 'LONG' ); + + $this->output .= $this->html->mod_postentry_checkbox($r['pid']); + $this->output .= $this->html->mod_postentry( array( 'msg' => $r, 'member' => $member ) ); + + } + $this->output .= $this->html->mod_topic_spacer(); + $this->output .= $this->html->modtopics_end(); + + } + + //+---------------------------------------------------------------- + //+---------------------------------------------------------------- + + function mod_posts() + { + global $std, $ibforums, $DB, $print; + + + $DB->query("SELECT t.*, COUNT(p.pid) as reply_count FROM ibf_topics t, ibf_posts p WHERE p.queued=1 AND p.new_topic <> 1 AND t.tid=p.topic_id AND t.forum_id='".$this->forum['id']."' GROUP BY t.tid ORDER BY p.post_date ASC"); + + if ( ! $DB->get_num_rows() ) + { + $this->mod_error('cp_error_no_topics'); + return; + } + + $this->output .= $this->html->modpost_topicstart($this->forum['name'], $this->forum['id']); + + //+---------------------------------------------------------------- + // Get the topics to work on + //+---------------------------------------------------------------- + + while( $r = $DB->fetch_row() ) + { + $this->output .= $this->html->modpost_topicentry($r['title'], $r['tid'], $r['reply_count'], $this->forum['id']); + } + + $this->output .= $this->html->modpost_topicend(); + + } + + //-------------------------------------------------- + // MODERATE NEW TOPICS AND STUFF + //-------------------------------------------------- + + function domod_topics() + { + global $std, $ibforums, $DB, $print; + + //-------------------------------------------------- + // Which TID's are we playing with? + //-------------------------------------------------- + + $ids = array(); + + foreach ($ibforums->input as $key => $value) + { + if ( preg_match( "/^TID_(\d+)$/", $key, $match ) ) + { + if ($ibforums->input[$match[0]]) + { + $ids[] = $match[1]; + } + } + } + + //-------------------------------------------------- + // Did we actually select anyfink? + //-------------------------------------------------- + + if ( count($ids) < 1 ) + { + $this->mod_error('cp_error_no_topics'); + return; + } + + $tids = implode( ",", $ids ); + + //-------------------------------------------------- + // What did we do? + //-------------------------------------------------- + + if ($ibforums->input['type'] == 'approve') + { + // Sort out the approved bit + + $DB->query("UPDATE ibf_topics SET approved=1 WHERE tid IN ($tids)"); + + $DB->query("UPDATE ibf_posts SET queued=0 WHERE topic_id IN ($tids)"); + + // Update the posters ..er.. post count. + + $DB->query("SELECT starter_id FROM ibf_topics WHERE tid IN ($tids)"); + + $mems = array(); + + while ( $r = $DB->fetch_row() ) + { + if ($r['starter_id'] > 0) + { + $mems[] = $r['starter_id']; + } + } + + if ( count($mems) > 0 ) + { + $mstring = implode( ",", $mems ); + + $DB->query("UPDATE ibf_members SET posts=posts+1 WHERE id IN ($mstring)"); + } + + + + + // recount... + + $this->recount(); + } + else + { + // Delete 'dem postings + + $DB->query("DELETE FROM ibf_topics WHERE tid IN ($tids)"); + + $DB->query("DELETE FROM ibf_posts WHERE topic_id IN ($tids)"); + + // Recount.. + + $this->recount(); + } + + // Boink + + $print->redirect_screen( $ibforums->lang['cp_redirect_mod_topics'], "act=ModCP&CODE=modtopics&f=".$this->forum['id'] ); + + } + + //**------------------------------------------------------- + + function mod_topics() + { + global $std, $ibforums, $DB, $print; + + $perpage = 10; + + $start = $ibforums->input['st'] ? $ibforums->input['st'] : 0; + + //-------------------------------------------------- + // How many topics must a man write down, before he is considered a man? + //-------------------------------------------------- + + $DB->query("SELECT COUNT(tid) as tcount FROM ibf_topics WHERE approved=0 and forum_id='".$this->forum['id']."'"); + $count = $DB->fetch_row(); + + if ($count['tcount'] < 1) + { + $this->mod_error('cp_error_no_topics'); + return; + } + + //+---------------------------------------------------------------- + // Generate the forum page span links + //+---------------------------------------------------------------- + + $pages = $std->build_pagelinks( array( 'TOTAL_POSS' => $count['tcount'], + 'PER_PAGE' => $perpage, + 'CUR_ST_VAL' => $start, + 'L_SINGLE' => "", + 'L_MULTI' => $ibforums->lang['cp_pages'], + 'BASE_URL' => $this->base_url."&act=ModCP&CODE=modtopics&f=".$this->forum['id'], + ) ); + + $this->output .= $this->html->modtopics_start($pages, $this->forum['name'], $this->forum['id']); + + //+---------------------------------------------------------------- + // Get the topics to work on + //+---------------------------------------------------------------- + + $DB->query( "SELECT p.*, ". + "m.id,m.name,m.mgroup,m.email,m.joined,m.avatar,m.avatar_size,m.posts as member_posts,m.aim_name,m.icq_number,m.signature, m.website,m.yahoo,m.title,m.hide_email,m.msnname, ". + "g.g_id, g.g_title, g.g_icon, t.* ". + "FROM ibf_posts p, ibf_members m, ibf_groups g, ibf_topics t ". + "WHERE t.forum_id='".$this->forum['id']."' and t.approved=0 AND p.topic_id=t.tid AND p.new_topic=1 AND p.author_id=m.id AND g.g_id=m.mgroup ". + "ORDER BY t.tid ASC LIMIT $start, $perpage"); + + while( $r = $DB->fetch_row() ) + { + $member = $this->parse_member($r); + + $r['post_date'] = $std->get_date( $r['post_date'], 'LONG' ); + + $this->output .= $this->html->mod_topic_title($r['title'], $r['tid']); + $this->output .= $this->html->mod_postentry( array( 'msg' => $r, 'member' => $member ) ); + $this->output .= $this->html->mod_topic_spacer(); + } + + $this->output .= $this->html->modtopics_end(); + + } + + //-------------------------------------------------- + // Do Pruney wooney + //-------------------------------------------------- + + function drink_prune_juice() + { + global $std, $ibforums, $DB, $print; + + $pass = 0; + + if ($ibforums->member['g_is_supmod'] == 1) + { + $pass = 1; + } + else if ($this->moderator['mass_prune'] == 1) + { + $pass = 1; + } + else + { + $pass = 0; + } + + if ($pass == 0) + { + $this->mod_error('cp_no_perms'); + return; + } + + //----------------------------------------------- + + $db_query = "SELECT tid FROM ibf_topics WHERE approved=1 and forum_id='".$this->forum['id']."'"; + + if ($ibforums->input['dateline']) + { + $db_query .= " AND last_post < {$ibforums->input['dateline']}"; + } + + if ($ibforums->input['starter']) + { + $db_query .= " AND starter_id='".$ibforums->input['starter']."'"; + + } + + if ($ibforums->input['posts']) + { + $db_query .= " AND posts < '".$ibforums->input['posts']."'"; + } + + if ($ibforums->input['state'] != 'all') + { + if ($ibforums->input['state']) + { + $db_query .= " AND state='".$ibforums->input['state']."'"; + } + } + + $batch = $DB->query($db_query); + + if ( ! $num_rows = $DB->get_num_rows() ) + { + $this->mod_error('cp_error_no_topics'); + return; + } + + //----------------------------------------------- + // Right... to stop a potentially huge mySQL query + // from forming with IN ( ), lets do this in batches + // of 50... + //----------------------------------------------- + + $tid_array = array(); + /* + if ($num_rows > 50) + { + while ( $tid = $DB->fetch_row($batch) ) + { + if ( count($tid_array) >= 50 ) + { + $this->prune_batch( implode(",", $tid_array ) ); + $tid_array = array(); + } + else + { + $tid_array[] = $tid['tid']; + } + } + } + else + { + */ + while ( $tid = $DB->fetch_row() ) + { + $tid_array[] = $tid['tid']; + } + + $this->prune_batch( implode(",", $tid_array ) ); + //} + + // Recount the forum... + + $this->recount(); + + $this->moderate_log("Pruned Forum"); + + // Show results.. + + $this->output .= $this->html->results( $ibforums->lang['cp_result_del'].$num_rows ); + + } + + //-------------------------------------------------------------------------- + + function prune_batch($tid_string) + { + global $std, $ibforums, $DB; + + // Check for attachments + + $DB->query("SELECT attach_id FROM ibf_posts WHERE topic_id IN ($tid_string)"); + + while ( $attach = $DB->fetch_row() ) + { + if ( is_file( $this->upload_dir."/".$attach['attach_id'] ) ) + { + @unlink( $this->upload_dir."/".$attach['attach_id'] ); + } + } + + // Remove polls + + $DB->query("DELETE FROM ibf_polls WHERE tid IN ($tid_string)"); + + // Remove poll voters + + $DB->query("DELETE FROM ibf_voters WHERE tid IN ($tid_string)"); + + // Remove the topics + + $DB->query("DELETE FROM ibf_topics WHERE tid IN ($tid_string)"); + + // Remove the posts + + $DB->query("DELETE FROM ibf_posts WHERE topic_id IN ($tid_string)"); + + } + + + //-------------------------------------------------- + // Prune Forum start + //-------------------------------------------------- + + function prune_juice() + { + global $std, $ibforums, $DB, $print; + + $pass = 0; + + if ($ibforums->member['g_is_supmod'] == 1) + { + $pass = 1; + } + else if ($this->moderator['mass_prune'] == 1) + { + $pass = 1; + } + else + { + $pass = 0; + } + + if ($pass == 0) + { + $this->mod_error('cp_no_perms'); + return; + } + + //----------------------------------------------- + + if ($ibforums->input['check'] == 1) + { + + $link = ""; + $link_text = $ibforums->lang['cp_prune_dorem']; + + $DB->query("SELECT COUNT(tid) as tcount FROM ibf_topics WHERE approved=1 and forum_id='".$this->forum['id']."'"); + $tcount = $DB->fetch_row(); + + $db_query = "SELECT COUNT(*) as count FROM ibf_topics WHERE approved=1 and forum_id='".$this->forum['id']."'"; + + if ($ibforums->input['dateline']) + { + $date = time() - $ibforums->input['dateline']*60*60*24; + $db_query .= " AND last_post < $date"; + + $link .= "&dateline=$date"; + } + + if ($ibforums->input['member']) + { + $DB->query("SELECT id FROM ibf_members WHERE name='".$ibforums->input['member']."'"); + + if (! $mem = $DB->fetch_row() ) + { + $this->mod_error('cp_error_no_mem'); + return; + } + else + { + $db_query .= " AND starter_id='".$mem['id']."'"; + $link .= "&starter={$mem['id']}"; + } + } + + if ($ibforums->input['posts']) + { + $db_query .= " AND posts < '".$ibforums->input['posts']."'"; + $link .= "&posts={$ibforums->input['posts']}"; + } + + if ($ibforums->input['topic_type'] != 'all') + { + $db_query .= " AND state='".$ibforums->input['topic_type']."'"; + $link .= "&state={$ibforums->input['topic_type']}"; + } + + $DB->query($db_query); + $count = $DB->fetch_row(); + + if ($ibforums->input['df'] == 'prune') + { + $link = "&act=ModCP&f={$this->forum['id']}&CODE=doprune&".$link; + } + else + { + if ($ibforums->input['df'] == $this->forum['id']) + { + $this->mod_error('cp_same_forum'); + return; + } + else if ($ibforums->input['df'] == -1) + { + $this->mod_error('cp_no_forum'); + return; + } + + $link = "&act=ModCP&f={$this->forum['id']}&CODE=domove&df=".$ibforums->input['df'].$link; + $link_text = $ibforums->lang['cp_prune_domove']; + } + + $confirm_html = $this->html->prune_confirm( $tcount['tcount'], $count['count'], $link, $link_text ); + + } + + + $select = "\n"; + + $forums = ""; + + $forums .= $std->build_forum_jump(0); + + + if ($ibforums->input['df']) + { + $forums = preg_replace( "/
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{ibf.lang.tt_action}{ibf.lang.st_topic}{ibf.lang.st_posts}{ibf.lang.st_last}
{ibf.lang.search_openclose} $count
+ {ibf.lang.define_search} + + + + + +
{ibf.lang.s_topics_cutoff}
{ibf.lang.s_sort}
{ibf.lang.s_limit}
+ + + + + +
{$data[POST]}->{'MEMBER_NAME'}{ibf.lang.ss_posted_on} {$data[POST]}->{'POST_DATE'}
{$data[POST]}->{'POST'} ( {ibf.lang.ss_read_more} )
+
{ibf.lang.m_moderate}
{ibf.lang.m_approve}
{ibf.lang.m_prune}
{ibf.lang.m_delete}
{ibf.lang.m_open}
{ibf.lang.m_move}
+ {ibf.lang.a_post_results}
+ {ibf.lang.a_post_deleted} {$data[DELETED]}

+ {ibf.lang.a_post_approved} {$data[APPROVED]}

+ {ibf.lang.a_post_left} {$data[LEFT]}

+
{ibf.lang.mod_forum_t}
{ibf.lang.mod_forum}
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{ibf.lang.forum_name}{ibf.lang.forum_topics}{ibf.lang.forum_posts}{ibf.lang.last_post}
{ibf.lang.search_move}
+ {ibf.lang.define_search} +
+ + + + +
{ibf.lang.s_topics_cutoff}
{ibf.lang.s_sort}
{ibf.lang.s_limit}
{ibf.lang.search_delete} $count
+ {ibf.lang.define_search} +
+ + + + +
{ibf.lang.s_topics_cutoff}
{ibf.lang.s_sort}
{ibf.lang.s_limit}
{$data[CAT_NAME]}
+
+ + + + + + + +
+ {ibf.lang.a_topic_results}
+ {ibf.lang.a_topic_d_left} {$data[leave]}

+ {ibf.lang.a_topic_moved} {$data[move]}

+
{ibf.lang.f_moderate} {$data[FORUM_NAME]}
{ibf.lang.f_moderate_t} +
+ + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
{ibf.lang.tt_action}{ibf.lang.tt_details}
+ + + + + + + + +
{ibf.lang.move_topics_from} $forum_name {ibf.lang.to}: + + + + + + $html
{ibf.lang.delete_old} + +
+
+ + + +
+ + + + +
{$data[POST]}
+
+ + + + + + + +
{ibf.lang.f_moderate} {$data[FORUM_NAME]}
{ibf.lang.f_moderate_t}
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {ibf.lang.a_topic_results}
+ {ibf.lang.a_topic_open} {$data[open]}

+ {ibf.lang.a_topic_close} {$data[closed]}

+
{ibf.lang.ss_topic_title} {$data[TOPIC_TITLE]}
{$data[FORUM_NAME]}
{ibf.lang.topic_to_mod} {$data[TOPICS_NOT_APPROVED]}
{$data[FORUM_TOPICS]}{$data[FORUM_POSTS]}{$data[FORUM_LAST_POST]} +
{ibf.lang.ss_topic_title} {$data[TOPIC]}->{'TOPIC_TITLE'}
+ + + + + +
{$data[TOPIC]}->{'TOPIC_STARTER_N'}{ibf.lang.ss_posted_on} {$data[TOPIC]}->{'TOPIC_START_DATE'}
{$data[POST]}->{'POST'} ( {ibf.lang.ss_read_more} )
+
+ {ibf.lang.define_search} + + + + + +
{ibf.lang.s_topics_cutoff}
{ibf.lang.s_sort}
{ibf.lang.s_limit}
{$data[SELECT]}{$data[TOPIC_TITLE]}
{$data[TOPIC_DESC]}
{$data[TOPIC_POSTS]}{$data[TOPIC_LAST_DATE]}
{ibf.lang.st_by} {$data[LAST_POSTER]}
+ {ibf.lang.define_search} +
+ + + + +
{ibf.lang.s_posts_cutoff}
{ibf.lang.s_sort}
{ibf.lang.s_limit}
+ + + + +
+ + + + + +
{ibf.lang.menu}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
{ibf.lang.display}
+ {ibf.lang.a_topic_results}
+ {ibf.lang.a_topic_d_delete} {$data[delete]}

+
+
+ + + + + + + +
{ibf.lang.q_topics} $count
{ibf.lang.menu_off}
+
+ + + + diff --git a/upload/style_templates/1/ReportView.html b/upload/style_templates/1/ReportView.html new file mode 100644 index 00000000..a751256a --- /dev/null +++ b/upload/style_templates/1/ReportView.html @@ -0,0 +1,97 @@ + + + +
{ibf.lang.message}

{ibf.lang.warn}
+ +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + diff --git a/upload/style_templates/1/config.php b/upload/style_templates/1/config.php new file mode 100644 index 00000000..da7dd9d0 --- /dev/null +++ b/upload/style_templates/1/config.php @@ -0,0 +1,247 @@ + \ No newline at end of file diff --git a/upload/style_templates/1/skin_boards.html b/upload/style_templates/1/skin_boards.html new file mode 100644 index 00000000..e18dff57 --- /dev/null +++ b/upload/style_templates/1/skin_boards.html @@ -0,0 +1,205 @@ + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
{ibf.lang.title}
{ibf.lang.in_forum}{$data[FORUM]}->{'FORUM_NAME'}
{ibf.lang.in_topic}{$data[TOPIC]}->{'TOPIC_TITLE'}
+ + + +
+ + + + + + + + + + + + +
{ibf.lang.email_sent}
{ibf.lang.email_sent}
{ibf.lang.email_sent_txt} $member_name
+
+ + + + + + + +
{ibf.lang.name}
{ibf.lang.email}
+ + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{ibf.lang.board_stats}
$active[TOTAL] {ibf.lang.active_users}
{ibf.skin.F_ACTIVE}{$active[GUESTS]} {ibf.lang.guests}, $active[MEMBERS] {ibf.lang.public_members} $active[ANON] {ibf.lang.anon_members} {$active[LINK]}
{$active[NAMES]}
{ibf.lang.board_stats}
{ibf.skin.F_STATS}$text
{ibf.lang.most_online}
{ibf.lang.birthday_header}
{ibf.skin.F_ACTIVE}$total $birth_lang
$birthusers
+
+ +
+ + + + + + + + +
+ + + + +
[ {ibf.lang.d_delete_cookies} ] :: [ {ibf.lang.d_post_read} ]
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/upload/style_templates/1/skin_emails.html b/upload/style_templates/1/skin_emails.html new file mode 100644 index 00000000..74822556 --- /dev/null +++ b/upload/style_templates/1/skin_emails.html @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
{ibf.skin.CAT_IMG}{$Data['name']}
+
+ + + + + + + + + + + + + + + +
{ibf.lang.cat_name}{ibf.lang.topics}{ibf.lang.replies}{ibf.lang.last_post_info}
+ + + +
+ + + + + + + + + + + + + + + + + + +
{ibf.lang.cat_name}{ibf.lang.topics}{ibf.lang.replies}{ibf.lang.last_post_info}
 
+
+
+ + + + + + + + + + + + + + + +{ibf.vars.board_name} {ibf.lang.newslink} $title
+ + + + + + + + + + + + +
{ibf.lang.welcome_back_text} $lastvisit + {ibf.lang.sm_forum_leaders} | + {ibf.lang.sm_todays_posts}
+ {ibf.lang.sm_today_posters} | + {ibf.lang.sm_all_posters} +
+ + + + + + + + +
{$info['img_new_post']}{$info['name']}
{$info['description']}
{$info['moderator']}
{$info['topics']}{$info['posts']}{$info['last_post']}
{ibf.lang.in}: {$info['last_topic']}
{ibf.lang.by}: {$info['last_poster']}
{ibf.lang.name}
{ibf.lang.email}
{ibf.lang.msg}
+ + + +   + + + + + + + + + + + +
+ + + + + + + + + + + +
{$data[TITLE]}
+
Download AIMAIM Remote
Send me an Instant Message
Add me to Your Buddy List
Add Remote to Your Page
Download AOL Instant Messenger

+ + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
{ibf.lang.title}
{ibf.lang.send_lang}$lang
{ibf.lang.to_name}
{ibf.lang.to_email}
{ibf.lang.subject}
{ibf.lang.message} +
+ +
+
+
+ + + + + + + + + + + +
+ + + + + + + + + +
{ibf.lang.send_email_to} {$data[NAME]}
{ibf.lang.show_address_text}
>>{ibf.lang.send_email_to} {$data[NAME]}
+
+ + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
{ibf.lang.send_title}
{ibf.lang.send_email_to} {$data[NAME]}
{ibf.lang.subject} +
{ibf.lang.message}

{ibf.lang.msg_txt}
+
+ +
+
+
+ + + + + + + + + + + +
+ + + + + + + + +
{ibf.lang.email_sent}
{ibf.lang.email_sent_txt} $member_name
+
+ + + + + + + + + + + +
$data
+ + + + diff --git a/upload/style_templates/1/skin_forum.html b/upload/style_templates/1/skin_forum.html new file mode 100644 index 00000000..025df849 --- /dev/null +++ b/upload/style_templates/1/skin_forum.html @@ -0,0 +1,281 @@ + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + +
{ibf.lang.need_password}
{ibf.lang.need_password_txt}
{ibf.lang.enter_pass}
+
+
+ + + + + + + +
+ + + + +
{ibf.lang.mod_cp}
+ + + + + + + + +
+ + + + +
{$rules['title']}

{$rules['body']}
+
+ + + + + + + + + +
+ + + + +
>>{$rules['title']}
+
+ + + + + + + + +
+ + + + + + + + +
+ + + + + +
{ibf.lang.showing_text}{ibf.lang.sort_text} 
+
+ + + + + + + + + +
{$Data[SHOW_PAGES]}{ibf.skin.A_POST}{$Data[POLL_BUTTON]}
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
{ibf.skin.B_NEW}{ibf.lang.pm_open_new} {ibf.skin.B_POLL}{ibf.lang.pm_poll}  + + + + + + + + + + + + +
{ibf.lang.search_forum} 
+
+ {$Data[FORUM_JUMP]} +
{ibf.skin.B_NORM}{ibf.lang.pm_open_no} {ibf.skin.B_POLL_NN}{ibf.lang.pm_poll_no} 
{ibf.skin.B_HOT}{ibf.lang.pm_hot_new} {ibf.skin.B_LOCKED}{ibf.lang.pm_locked} 
{ibf.skin.B_HOT_NN}{ibf.lang.pm_hot_no} {ibf.skin.B_MOVED}{ibf.lang.pm_moved} 
+ + + + + + + + +
+ + + + +
+ + + + + + + + + + +
{$rules['title']}
{$rules['body']}
>>{ibf.lang.back_to_forum}
+
+
+ + + + + + + + + + + + +
$title$pages
+ + + + + + + + + + + + + +
{$info['SHOW_PAGES']}{ibf.skin.A_POST}{$info[POLL_BUTTON]}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
{$info['name']}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/upload/style_templates/1/skin_global.html b/upload/style_templates/1/skin_global.html new file mode 100644 index 00000000..54a82111 --- /dev/null +++ b/upload/style_templates/1/skin_global.html @@ -0,0 +1,276 @@ + + + + {ibf.lang.logged_in_as} {ibf.member.name} ( {ibf.lang.your_cp} | {ibf.lang.log_out} | {$msg[TEXT]} ) + + + + + + + + +
+ + + + + + + {ibf.lang.h_topic_title} ( {ibf.lang.mark_as_read} ){ibf.lang.h_topic_starter}{ibf.lang.h_replies}{ibf.lang.h_hits}{ibf.lang.h_last_action}
+
+ {ibf.lang.no_topics} +

+
{$Data['folder_img']}{$Data['topic_icon']} + + + + + +
{$Data['go_new_post']}{$Data['prefix']} {$Data['title']} {$Data[PAGES]}
+ {$Data['description']}
{$Data['starter']}{$Data['posts']}{$Data['views']}{$Data['last_post']}
{$Data['last_text']} {$Data['last_poster']}
+ + + + + + + +
Powered by IBForums
+ + + + + +
+ <% MEMBER BAR %> + Search | Member List | Help
+
+
+ + + + + + + + + + + + +
{ibf.skin.F_NAV}
+ + + + + + + + + +{ibf.lang.stand_by} + + + + + + + + + +
+ + + + +
+ + + + +
+ {ibf.lang.thanks}, + $Text

+ {ibf.lang.transfer_you}

+ ({ibf.lang.dont_wait})
+
+
+ + + + + + + + + + + + + + + + + + {ibf.lang.guest_stuff} ( {ibf.lang.log_in} | {ibf.lang.register} ) + + + + + + + +( {ibf.lang.admin_cp} ) + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
{ibf.lang.er_log_in_title}
{ibf.lang.erl_enter_name}
{ibf.lang.erl_enter_pass}
+ +
+
+ + + + + + + + + + + + + + + +
+ + + + + +
{ibf.lang.offline_title}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +

$message

{ibf.lang.offline_login}
{ibf.lang.erl_enter_name}
{ibf.lang.erl_enter_pass}
+ + + + + + + + + + + + + + + + +
+ + + + + +
{ibf.lang.error_title}
+
+ + + + + + + +
+ {ibf.lang.exp_text}

+ {ibf.lang.msg_head} +

+ $message +

+ +

+ Useful Links: +

+ • {ibf.lang.er_lost_pass}
+ • {ibf.lang.er_register}
+ • {ibf.lang.er_help_files}
+ • {ibf.lang.er_contact_admin}

+
< {ibf.lang.error_back}
+
+ + + + + + + + {ibf.lang.logged_in_as} {ibf.member.name} ( {ibf.lang.your_cp} | {ibf.lang.log_out} ) + + + + diff --git a/upload/style_templates/1/skin_help.html b/upload/style_templates/1/skin_help.html new file mode 100644 index 00000000..68af020c --- /dev/null +++ b/upload/style_templates/1/skin_help.html @@ -0,0 +1,85 @@ + + + + +
{$entry['title']}
{$entry['description']}
$text
+ + + + + + + + + + + + {ibf.lang.no_results} + + + + + + + + + + +
$two_text
+ + + + + +
+ + + + + + + +
$one_text
+
+ + + + {ibf.lang.search_txt}    +
+
+
+
+ + + + +
+ + + + + + + + diff --git a/upload/style_templates/1/skin_legends.html b/upload/style_templates/1/skin_legends.html new file mode 100644 index 00000000..9f9ee8ba --- /dev/null +++ b/upload/style_templates/1/skin_legends.html @@ -0,0 +1,64 @@ + + + + + + + + + + + + +
$three_text
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
$title
$row1$row2
$code$image
+
+ + + + + diff --git a/upload/style_templates/1/skin_login.html b/upload/style_templates/1/skin_login.html new file mode 100644 index 00000000..dea7bb98 --- /dev/null +++ b/upload/style_templates/1/skin_login.html @@ -0,0 +1,126 @@ + + + +
+
+ + + + + +
+ + + + + + + + +
{ibf.lang.log_out}

{ibf.lang.log_out_txt}
+ +
+
+
+ + + + + + + + + + + +
+ + + + +
{ibf.lang.errors_found}
$data
+
+
+ + + + + + + + +
+ + + + + + + +
{ibf.lang.login_text}
{ibf.lang.forgot_pass} {ibf.lang.pass_link}
+
+ + + + + + + + +
+ + + + + + + + + + + + +
$message
{ibf.lang.enter_name}
{ibf.lang.enter_pass}
+
+
+ + +
+ + + + + + + + + + + + + +
{ibf.lang.options}
{ibf.lang.cookies}{ibf.lang.cookie_yes}
{ibf.lang.cookie_no}
{ibf.lang.privacy}{ibf.lang.anon_name}
+ +
+
+
+ + + + diff --git a/upload/style_templates/1/skin_mlist.html b/upload/style_templates/1/skin_mlist.html new file mode 100644 index 00000000..dc4ac41a --- /dev/null +++ b/upload/style_templates/1/skin_mlist.html @@ -0,0 +1,119 @@ + + + + + + + + + +
{$links[SHOW_PAGES]}
+ + + + + + + + + + +
+   +
+ + + + + + + + + + + + + + + + + + +
{ibf.lang.member_name}{ibf.lang.member_level}{ibf.lang.member_group}{ibf.lang.member_joined}{ibf.lang.member_posts}{ibf.lang.member_email}{ibf.lang.member_aol}{ibf.lang.member_icq}
+ + + +
{$links[SHOW_PAGES]}
+ + + + + + + +No results + + + + + + + + + + + + + + + + + +
+ + +
{ibf.lang.sorting_text} 
+
+ + + + + + + + + + {$member[MEMBER_NAME]} + {$member[MEMBER_PIPS_IMG]} + {$member[MEMBER_GROUP]} + {$member[MEMBER_JOINED]} + {$member[MEMBER_POSTS]} + {$member[MEMBER_EMAIL]} + {$member[AOLNAME]} + {$member[ICQNUMBER]} + + + + + + diff --git a/upload/style_templates/1/skin_mod.html b/upload/style_templates/1/skin_mod.html new file mode 100644 index 00000000..3dd58fed --- /dev/null +++ b/upload/style_templates/1/skin_mod.html @@ -0,0 +1,669 @@ + + + + +
+ + + + + + + + + + + + + +
{ibf.lang.cp_mod_posts_title2} $forumname +
$pages +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
$title
+ + + + + + + +
{ibf.lang.cp_mod_posts_title2} $forumname +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{ibf.lang.cp_3_title}{ibf.lang.cp_3_replies}{ibf.lang.cp_3_approveall}{ibf.lang.cp_3_viewall}
$title$replies{ibf.lang.cp_3_approveall}{ibf.lang.cp_3_viewall}
+
+
+ + + + + + + + + + + + + + + + +
{ibf.lang.cp_mod_topics_title2} $forumname +
$pages +
  {ibf.lang.cp_1_selected}  
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
   $title
{$data['member']['name']}

{$data['member']['avatar']}
{$data['member']['MEMBER_GROUP']}
{$data['member']['MEMBER_POSTS']}
{$data['member']['MEMBER_JOINED']}
+ {ibf.lang.posted_on} {$data['msg']['post_date']}

+ + {$data['msg']['post']} + +
  {ibf.lang.cp_3_postno} $pid
+
+   +
+ + + + + + + +
{ibf.lang.cp_results} +
$text
+
+ + + + + + + + + + + + + + + +
{ibf.lang.cp_check_result} +
{ibf.lang.cp_check_text} +
{ibf.lang.cp_total_topics}$tcount
{ibf.lang.cp_total_match}$count
$link_text
+
{ibf.lang.cp_prune} {$forum['name']}
{ibf.lang.cp_prune_text}
{ibf.lang.cp_action}
{ibf.lang.cp_prune_days}
{ibf.lang.cp_prune_type}$select
{ibf.lang.cp_prune_replies}
{ibf.lang.cp_prune_member}
{ibf.lang.cp_edit_user}: {$profile['name']}
{ibf.lang.cp_remove_av}
{ibf.lang.cp_edit_website}
{ibf.lang.cp_edit_location}
{ibf.lang.cp_edit_interests}
{ibf.lang.cp_edit_signature}
{ibf.lang.cp_edit_user}
{ibf.lang.cp_find_2_user}$select
{ibf.lang.cp_edit_user}
{ibf.lang.cp_find_user}
{ibf.lang.cp_welcome}
{ibf.lang.cp_welcome_text}
+ + + + + + + + + + + + + +
{ibf.lang.cp_mod_in}$forum
{ibf.lang.cp_topics_wait}$tcount
{ibf.lang.cp_posts_wait}$pcount
+
$words
+ +
+
+ + + + + + + + + + + + + + {ibf.lang.move_from} $forum_name {ibf.lang.to}: + + + + {ibf.lang.leave_link} + + + + + + + + + + + + + + + + + + + + + + + + + + + {ibf.lang.edit_f_title} + + + + {ibf.lang.edit_f_desc} + + + + + + + + + + + + + + {ibf.lang.pe_option} $id + + + + + + + + + + + + + {ibf.lang.pe_pollonly} $id + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/upload/style_templates/1/skin_msg.html b/upload/style_templates/1/skin_msg.html new file mode 100644 index 00000000..67220760 --- /dev/null +++ b/upload/style_templates/1/skin_msg.html @@ -0,0 +1,536 @@ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
$posting_title
+ + + +
{$data}
+
+ + + + + + + + +
+ + +
+ + + + + + + + +
  
+ + + + + + + + + + + + +
{ibf.lang.cp_mod_topics_title}
{ibf.lang.cp_mod_topics}
{ibf.lang.cp_mod_posts}
+ + + +
+ + + + + + + + +
{ibf.lang.cp_manage_posts}
{ibf.lang.cp_prune_posts}
+ + + +
+ + + + + + + + +
{ibf.lang.cp_mod_users_title}
{ibf.lang.cp_user_edit}
+ +
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + +
{ibf.lang.cp_error}
$msg
+ + + + +
+ + + + + + + +
{ibf.lang.pm_preview}
$data
+
+
+ + + + + + + + + +
{ibf.lang.pmp_title}
$text
{ibf.lang.pmp_go_inbox} ( {ibf.lang.pmp_thiswindow} )

{ibf.lang.pmp_ignore}
+ + + + + + + + + + Private Message Archive + + + + + + + + + + + + + +
+ + + + + + + + + + +
{$info['msg_title']}
{$info['msg_content']}
Sent by {$info['msg_sender']} on {$info['msg_date']}
+
+
+ + + + + + + + + + + + + + + + + {ibf.lang.arc_comp_title}
{ibf.lang.arc_complete} + + + + + + + + + {ibf.lang.archive_title}
{ibf.lang.archive_text} + + + +
+ + + + + + + {ibf.lang.arc_folders} + $jump_html + + + {ibf.lang.arc_dateline} +   {ibf.lang.arc_days} + + + {ibf.lang.arc_max} + + + + {ibf.lang.arc_delete} + + + + {ibf.lang.arc_type} + + + + + +
+ + + + + + + + + {ibf.lang.inbox_no_msg} + + + + + + + + + + {ibf.lang.prefs_new} + + + {ibf.lang.prefs_text_b} + + + + + + + + + + + + + + + + + {ibf.lang.address_current} + + + + + + + + + + {ibf.lang.address_none} + + + + + + + + + {ibf.lang.member_edit}
+ + + + + + + + + + + + + + + + + + +
{$data[MEMBER]['contact_name']}{ibf.lang.enter_desc}
{ibf.lang.allow_msg}
{$data[SELECT]}
+ + + + + + + + + + + {$entry['contact_name']}    [ {$entry['contact_desc']} ] + + [ {ibf.lang.edit} ] :: [ {ibf.lang.delete} ] +   ( {$entry['text']} ) + + + + + + + + + + + {ibf.lang.member_add} + + + + + + + + + + + + + + + + + +
{ibf.lang.enter_a_name}
{ibf.lang.enter_desc}
{ibf.lang.allow_msg}
+ + + + + + + + + + + + + + + + + + + + + {$data[EXTRA]} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/upload/style_templates/1/skin_online.html b/upload/style_templates/1/skin_online.html new file mode 100644 index 00000000..be78f1a0 --- /dev/null +++ b/upload/style_templates/1/skin_online.html @@ -0,0 +1,93 @@ + + + +
+
{ibf.lang.member_name}{ibf.lang.enter_block}
{$data['msg']['title']}
{$data['msg']['msg_date']}
+ {ibf.skin.M_REPLY} +   + {ibf.skin.M_ADDMEM} +   + {ibf.skin.M_DELETE} +
+ + + + + + + + + + + + +
{ibf.lang.author}{ibf.lang.m_pmessage}
{$data['member']['name']}
{$data['member']['avatar']}
{$data['member']['title']}
{$data['member']['MEMBER_GROUP']}
{$data['member']['MEMBER_POSTS']}
{$data['member']['MEMBER_JOINED']}
+ + {$data['msg']['message']} + {$data['member']['signature']} + +
{$data['member']['MESSAGE_ICON']}{$data['member']['EMAIL_ICON']}{$data['member']['WEBSITE_ICON']}{$data['member']['ICQ_ICON']}{$data['member']['AOL_ICON']}{$data['member']['YAHOO_ICON']}
+
+
+ + + + {ibf.lang.goto_folder}:  {$data['jump']} + + +
$dirname
{ibf.lang.total_messages}: {$info['total_messages']} {$info['full_percent']}
{ibf.lang.messages_left} {$info['space_free']} {$info['full_messenger']}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 {ibf.lang.message_title}{ibf.lang.message_from}{ibf.lang.message_date}
{$data['msg']['icon']}{$data['msg']['title']}{$data['msg']['from_name']} {$data['msg']['add_to_contacts']}{$data['msg']['date']}
+ $vdi_html {ibf.lang.move_or_delete} {ibf.lang.selected_msg} +
+ +
+ {ibf.skin.M_READ} {ibf.lang.icon_read} +  {ibf.skin.M_UNREAD} {ibf.lang.icon_unread} + +
+ + + + {ibf.lang.goto_folder}:   $vdi_html + +
+
{ibf.lang.msg_options}
  +  {ibf.lang.auto_sent_add} +
 {ibf.lang.read_rec_notify} +
+ + +
{ibf.lang.to_whom}
{ibf.lang.address_list}{$data[CONTACTS]}
{ibf.lang.enter_name}
{ibf.lang.enter_message}
{ibf.lang.msg_title}
{ibf.lang.prefs_current}
{ibf.lang.prefs_text_a}
+ + + +
{$links[SHOW_PAGES]}
+ + + + + + + + + + {$session['member_name']} + {$session['where_line']} + {$session['running_time']} + {$session['msg_icon']} + + + + + + + + + + + +   + + + + + +
+ + + + +
$links
+ + + + + + + + + + + + + + +
$links
+
+ + + + + + + + + + + diff --git a/upload/style_templates/1/skin_post.html b/upload/style_templates/1/skin_post.html new file mode 100644 index 00000000..1fb2dc9f --- /dev/null +++ b/upload/style_templates/1/skin_post.html @@ -0,0 +1,439 @@ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + diff --git a/upload/style_templates/1/skin_poll.html b/upload/style_templates/1/skin_poll.html new file mode 100644 index 00000000..e059a816 --- /dev/null +++ b/upload/style_templates/1/skin_poll.html @@ -0,0 +1,74 @@ + + + +[ {ibf.lang.ba_edit} ] + + + + + + + +[ {ibf.lang.ba_delete} ] + + + + + + + + + + + + + + + + + + + + + +
+
{ibf.lang.member_name}{ibf.lang.where}{ibf.lang.time} 
 $answer
+ +
+ + + + + + + + + + + + + + + + +
$edit   $delete
{ibf.lang.poll_s_choices}{ibf.lang.poll_s_votes}{ibf.lang.poll_s_stats}
+ $vote_button +
+
+ + + + + + + + +
$answer$votes [$percentage%]
+ + + + + + + +
+   +
+ + + + + + + + + + + + + + +
$data
  +
+
+ + + + + + + + + + + + + + + +
{ibf.lang.click_smilie}
{ibf.lang.all_emoticons}
+ + + + + + + + + + {ibf.lang.review_topic} + + + + + + + + + + + + + + + {ibf.lang.post_icon} + +                                    
+                                     +
+   [ Use None ] + + + + + + + + + + + + + +
+ + + + +
{ibf.lang.errors_found}
$data
+
+
+ + + + + + + + + {ibf.lang.upload_title} + + + {ibf.lang.upload_text} $data + + + + + + + + + + + {ibf.lang.tt_topic_settings} + + + {ibf.lang.topic_title} + + + + {ibf.lang.topic_desc} + + + + + + + + + + + {$data['author']} + {ibf.lang.posted_on} {$data['date']}
{$data['post']} + + + + + + + + + + + + +
+ + + + +
{ibf.lang.post_preview}
$data
+
+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/upload/style_templates/1/skin_printpage.html b/upload/style_templates/1/skin_printpage.html new file mode 100644 index 00000000..ba2d4706 --- /dev/null +++ b/upload/style_templates/1/skin_printpage.html @@ -0,0 +1,46 @@ + + + + {ibf.lang.by}: {$entry['author_name']} {$this->class['LANG']['on']} {$entry['post_date']} +

+ {$entry['post']} +
+ + + + + + + + {ibf.lang.end} + + +
{ibf.lang.last_posts}
{ibf.lang.tt_options}
{ibf.lang.mod_options}$jump
{ibf.lang.post_to_quote}
{ibf.lang.post_to_quote_txt} +
{ibf.lang.ib_code_buttons}
{ibf.lang.ibf_code_txt} + + + + + + + + + +
+ + + + + + Close Current Tag
+ + + + + + + + + Close All Tags +
+
{ibf.lang.post}
({ibf.lang.check_length})

+ + + + + + + + +
{ibf.lang.enable_emo}
{ibf.lang.enable_sig}
{ibf.lang.unreg_namestuff}
{ibf.lang.guest_name}
{ibf.lang.tt_poll_settings}
{ibf.lang.poll_choices} + + + + + +
{ibf.lang.poll_only}
+ + + + + + + + + + {ibf.vars.board_name} [Powered by IB Forums] + + + + + + + + + + + + + + +
+ + {ibf.lang.title} +

+ -{ibf.vars.board_name}
+ +--{ibf.lang.forum}: $forum_name
+ +---{ibf.lang.topic}: $topic_title {ibf.lang.start} $topic_starter +
+
+
+ + + + diff --git a/upload/style_templates/1/skin_profile.html b/upload/style_templates/1/skin_profile.html new file mode 100644 index 00000000..68008b11 --- /dev/null +++ b/upload/style_templates/1/skin_profile.html @@ -0,0 +1,159 @@ + + + +
{ibf.lang.edit_my_sig} | + {ibf.lang.edit_avatar} | + {ibf.lang.edit_profile}
+ + + + + + + +
{$info['name']}
{ibf.lang.find_posts} | + {ibf.lang.add_to_contact}
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
{ibf.lang.active_stats}
{ibf.lang.total_posts}{$info['posts']}
( {$info['total_pct']}% {ibf.lang.total_percent} )
{ibf.lang.posts_per_day}{$info['posts_day']}
{ibf.lang.joined}{$info['joined']}
{ibf.lang.fav_forum}{$info['fav_forum']}
{$info['fav_posts']} {ibf.lang.fav_posts}
( {$info['percent']}% {ibf.lang.fav_percent} )
{ibf.lang.user_local_time}{$info['local_time']}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{ibf.lang.communicate}
{ibf.lang.email}{$info['email']}
{ibf.lang.aim}{$info['aim_name']}
{ibf.lang.icq}{$info['icq_number']}
{ibf.lang.yahoo}{$info['yahoo']}
{ibf.lang.msn}{$info['msn_name']}
{ibf.lang.pm}{ibf.lang.click_here}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{ibf.lang.info}
{ibf.lang.mgroup}{$info['group_title']}
{ibf.lang.mtitle}{$info['member_title']}
{ibf.lang.homepage}{$info['homepage']}
{ibf.lang.birthday}{$info['birthday']}
{ibf.lang.location}{$info['location']}
{ibf.lang.interests}{$info['interests']}
+
+ + + + + + + + + + + + +
{ibf.lang.post_detail}
{ibf.lang.avatar}{$info['avatar']}
{ibf.lang.siggie}{$info['signature']}
+
<( {ibf.lang.back} )
+
+ + + + diff --git a/upload/style_templates/1/skin_register.html b/upload/style_templates/1/skin_register.html new file mode 100644 index 00000000..adbdc901 --- /dev/null +++ b/upload/style_templates/1/skin_register.html @@ -0,0 +1,215 @@ + + + +
+
+ + + + + + +
{ibf.lang.lp_header}

{ibf.lang.lp_text}
+
+ + +
+ + + + + + + + + +
{ibf.lang.complete_form}
{ibf.lang.lp_user_name}
+ +
+
+
+ + + + + + + + + + + +
+ + + + + + + +
{ibf.lang.registration_process}
{ibf.lang.thank_you} {$member['name']}. {ibf.lang.auth_text} {$member['email']}
+
+ + + + + + + + + + + +
+ + + + + + + +
{ibf.lang.registration_process}
{ibf.lang.thank_you} {$member['name']}. {ibf.lang.preview_reg_text}
+
+ + + + + + + + +
+
+ + + + + + + +
{ibf.lang.dumb_header}

{ibf.lang.dumb_text}
+
+ + +
+ + + + + + + + + + + + + +
{ibf.lang.complete_form}
{ibf.lang.user_id}
{ibf.lang.val_key}
+ +
+
+
+ + + + + + + + +
+
+ + + + + + +
{ibf.lang.reg_header}

{$data['TEXT']}
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
{ibf.lang.complete_form}
{ibf.lang.user_name}
{ibf.lang.pass_word}
{ibf.lang.re_enter_pass}
{ibf.lang.email_address}
{ibf.lang.email_address_two}
+
+
+ + +
+ + + + + + + + +
{ibf.lang.terms_service}
{ibf.lang.terms_service_text}
+ +

{ibf.lang.agree_submit}  +
+ +
+
+
+ + + + diff --git a/upload/style_templates/1/skin_search.html b/upload/style_templates/1/skin_search.html new file mode 100644 index 00000000..18a5b71b --- /dev/null +++ b/upload/style_templates/1/skin_search.html @@ -0,0 +1,289 @@ + + + + +
{$Data['folder_img']}{$Data['topic_icon']} + + + + + +
{$Data['go_new_post']}{$Data['prefix']} {$Data['title']} {$Data[PAGES]}
+ {$Data['description']}
{$Data['forum_name']}{$Data['starter']}{$Data['posts']}{$Data['views']}{$Data['last_post']}
{$Data['last_text']} {$Data['last_poster']}
 
+ + + + + + + + + + +
{$Data[SHOW_PAGES]}
+ + + + + + + + + + + + + +
{ibf.skin.B_NEW} {ibf.lang.pm_open_new}{ibf.skin.B_HOT} {ibf.lang.pm_hot_new}{ibf.skin.B_POLL} {ibf.lang.pm_poll}{ibf.skin.B_LOCKED} {ibf.lang.pm_locked}
{ibf.skin.B_NORM} {ibf.lang.pm_open_no}{ibf.skin.B_HOT_NN} {ibf.lang.pm_hot_no}{ibf.skin.B_POLL_NN} {ibf.lang.pm_poll_no}{ibf.skin.B_MOVED} {ibf.lang.pm_moved}
+ + + + + + + + +
+ + + + $hidden_fields +
+ + + + +
+ + + + + + + + + + + + +
{ibf.lang.keywords_title}
{ibf.lang.key_search}{ibf.lang.mem_search}
 

{ibf.lang.keysearch_text}


 {ibf.lang.match_name_ex}
 {ibf.lang.match_name_pa}
+
+ + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + +
{ibf.lang.search_options}
{ibf.lang.search_where}{ibf.lang.search_refine}
+ + + + + + + + + + + + + +
 {ibf.lang.search_cats}$cats
 {ibf.lang.search_forums}$forums
 {ibf.lang.in_posts} {ibf.lang.in_topics}
+
+ + + + + +
+ {ibf.lang.search_from} +
+ +
{ibf.lang.and}  {ibf.lang.older}  {ibf.lang.newer} +
+ {ibf.lang.sort_results}
+ +
{ibf.lang.descending} +
{ibf.lang.ascending} +
+
+
+
+ + + + + + + + + +
+ + + + + +
{ibf.lang.active_topics}
{$Data[SHOW_PAGES]}
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {ibf.lang.active_st_text} + +   {ibf.lang.active_end_text}   + +    +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + +
 {ibf.lang.h_topic_title}{ibf.lang.h_forum_name}{ibf.lang.h_topic_starter}{ibf.lang.h_replies}{ibf.lang.h_hits}{ibf.lang.h_last_action}
+ + + +
{$Data[SHOW_PAGES]}
+ + +
+ + + + + + + + + diff --git a/upload/style_templates/1/skin_topic.html b/upload/style_templates/1/skin_topic.html new file mode 100644 index 00000000..7b92e75a --- /dev/null +++ b/upload/style_templates/1/skin_topic.html @@ -0,0 +1,260 @@ + + + +( {ibf.lang.mod_cp} ) + + + + + + + +  {ibf.lang.snitch_geezer_to_a_copper} + + + + + + + +{ibf.lang.ip}: $data + + + + + + + +( {ibf.lang.go_new_post} ) + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/upload/style_templates/1/skin_stats.html b/upload/style_templates/1/skin_stats.html new file mode 100644 index 00000000..6cdcfe87 --- /dev/null +++ b/upload/style_templates/1/skin_stats.html @@ -0,0 +1,113 @@ + + + +
 {ibf.lang.h_topic_title}{ibf.lang.h_forum_name}{ibf.lang.h_topic_starter}{ibf.lang.h_replies}{ibf.lang.h_hits}{ibf.lang.h_last_action}
{ibf.lang.active_no_topics}
+ + + +
{$title}
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
$group
{ibf.lang.leader_name}{ibf.lang.leader_forums}{ibf.lang.leader_location} 
{$info['name']}$forums{$info['location']}{$info['msg_icon']}
+
+
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{ibf.lang.member}{ibf.lang.member_joined}{ibf.lang.member_posts}{ibf.lang.member_today}{ibf.lang.member_percent}
{$info['name']}{$info['joined']}{$info['posts']}{$info['tpost']}{$info['today_pct']}%
{ibf.lang.total_today} $info
+
+ + + + + + + +
{ibf.lang.no_info}
+ + + + +
$modcp +
+ + + + + +   +
+
+ + + + + + + + + + + + + + + +
+ + + + +
+ + + + + +
{ibf.lang.topic_stats}{ibf.lang.track_topic} | + {ibf.lang.forward} | + {ibf.lang.print}
+
+
+ + + + + +
{$data[TOPIC][SHOW_PAGES]}
Back to {$data['FORUM']['name']}
{$data[TOPIC][REPLY_BUTTON]}{ibf.skin.A_POST}{$data[TOPIC][POLL_BUTTON]}
+
+ + + + +
{$data[FORUM]['JUMP']}
+
+ + + + + + + + +
{$data[POSTER]['name']} + + + + + +
{$data[POST]['post_icon']}{ibf.lang.posted_on} {$data[POST]['post_date']}{$data[POST]['delete_button']}{$data[POST]['edit_button']}{ibf.skin.P_QUOTE}
+
+ {$data[POSTER]['avatar']}

+ {$data[POSTER]['title']}
+ {$data[POSTER]['member_rank_img']}

+ {$data[POSTER]['member_group']}
+ {$data[POSTER]['member_posts']}
+ {$data[POSTER]['member_number']}
+ {$data[POSTER]['member_joined']}
+ {$data[POSTER][WARN_GFX]}

+
+
{$data[POST]['post']} {$data[POST]['attachment']} {$data[POST]['signature']}
  + + + + + + +
{$data[POSTER]['message_icon']}{$data[POSTER]['email_icon']}{$data[POSTER]['website_icon']}{$data[POSTER]['icq_icon']}{$data[POSTER]['aol_icon']}{$data[POSTER]['yahoo_icon']}{$data[POSTER]['msn_icon']}{$data[POST]['ip_address']}{$data[POST]['report_link']}Top
+
+ + + + +
{$data['TOPIC']['SHOW_PAGES']} {$data['TOPIC']['go_new']}{$data[TOPIC][REPLY_BUTTON]}{ibf.skin.A_POST}{$data[TOPIC][POLL_BUTTON]}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $hidden_field + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + +
{$data['TOPIC']['title']}{$data['TOPIC']['description']}
+
+ + + + + + + + + + + + + +

{ibf.lang.pic_attach}

+
+ + + + + +
« {ibf.lang.t_old} | {ibf.lang.t_new} » + {ibf.lang.track_topic} | + {ibf.lang.forward} | + {ibf.lang.print}
+
+ + + +
{ibf.lang.pic_attach}
+

+ + + + + + + +

+ + + + + + + + +
User Attached Image{ibf.lang.attach_dl}
{$data['name']} ( {ibf.lang.attach_hits}: {$data['hits']} )
+

+ + + + diff --git a/upload/style_templates/1/skin_ucp.html b/upload/style_templates/1/skin_ucp.html new file mode 100644 index 00000000..03a1dcd1 --- /dev/null +++ b/upload/style_templates/1/skin_ucp.html @@ -0,0 +1,935 @@ + + + +

{ibf.lang.birthday} + + + +
{ibf.lang.change_email_title}
$txt
{ibf.lang.ce_new_email}
{ibf.lang.ce_new_email2}
{ibf.lang.account_pass_title}
{ibf.lang.pass_change_text}
{ibf.lang.account_pass_old}
{ibf.lang.account_pass_new}
{ibf.lang.account_pass_new2}
{ibf.lang.personal_ops}
{ibf.member.name}, {ibf.lang.personal_ops_txt}
{ibf.lang.edit_profile}

{ibf.lang.edit_profile_txt}
{ibf.lang.member_title}
{ibf.lang.av_current}
{ibf.lang.this_avatar}{$data[CUR_AV]}
{ibf.lang.avatar_pre_title}
{ibf.lang.avatar_pre_txt}{$data[AVATARS]}     {$data[SHOW_AVS]}
{ibf.lang.upload_avatar}
$text
{ibf.lang.avatar_url_title}
{ibf.lang.avatar}
{ibf.lang.avatar_url_ext}
$allowed_ext
{ibf.lang.avatar_dims}
{ibf.lang.maximum} {ibf.lang.width} = {ibf.vars.av_width} {ibf.lang.pixels}
{ibf.lang.maximum} {ibf.lang.height} = {ibf.vars.av_height} {ibf.lang.pixels})
{ibf.lang.width}     x   {ibf.lang.height}  
{ibf.lang.av_tt_one}
{ibf.lang.av_tt_two}
{ibf.lang.avatar_ops}

{ibf.lang.avatar_ops_txt}
{ibf.lang.cp_current_sig}
+ + + + +
$sig
+
{ibf.lang.cp_edit_sig}
+ + + + + + + + + +
+ + + + + + Close Current Tag
+ + + + + + + + + Close All Tags +
+

({ibf.lang.check_length})
{ibf.lang.profile_title}
{ibf.lang.website}
{ibf.lang.icq}
{ibf.lang.aol}
{ibf.lang.yahoo}
{ibf.lang.msn}
{ibf.lang.location}
({ibf.lang.check_length})
{ibf.lang.interests}
({ibf.lang.check_length})
+ +
+ + + + + + +
+   +
+ + + + + + + + + +
  
+ + + + +
+ + + {ibf.lang.m_messenger}
+
+ • {ibf.lang.mess_new}
+ • {ibf.lang.mess_contact}
+ • {ibf.lang.mess_folders}
+ • {ibf.lang.mess_inbox}
+ • {ibf.lang.mess_archive}
+
+ + + {ibf.lang.m_personal}
+
+ • {ibf.lang.m_contact_info}
+ + • {ibf.lang.m_sig_info}
+ • {ibf.lang.m_avatar_info}
+ + + +
+ {ibf.lang.m_options}
+
+ • {ibf.lang.m_email_opt}
+ • {ibf.lang.m_board_opt}
+ • {ibf.lang.m_skin_lang}
+ • {ibf.lang.m_email_change}
+ • {ibf.lang.m_passy_opt}
+ + +
+ {ibf.lang.m_tracker}
+
+ • {ibf.lang.m_view_subs} +
+
+ + + + + + + + + + + + + +
+
+
+ + + + + + + + {ibf.lang.stats_header} + + + + + + + + + + + + + + + + + + + + +
{ibf.lang.email_address}{$member[MEMBER_EMAIL]}
{ibf.lang.number_posts}{$member[MEMBER_POSTS]}
{ibf.lang.registered}{$member[DATE_REGISTERED]}
{ibf.lang.daily_average}{$member[DAILY_AVERAGE]}
+ + + + {ibf.lang.messenger_summary} + + + + + + + + + + + + +
{ibf.lang.total_messages}{$member['total_messages']} {$member['full_percent']}
{ibf.lang.messages_left}{$member['space_free']} {$member['full_messenger']}
+ + + + {ibf.lang.note_pad} + + + +
+ + + + + + + +
+ +
+
+ + + + + +
{ibf.lang.ta_size}  + + +
+
+ + + + + + + + + +
+ + + + + + {ibf.lang.settings_time} + + + {ibf.lang.settings_time_txt}
$time + + + $time_select + + + {ibf.lang.dst_box} + + + + + + + + + + + + + + + + + {ibf.lang.settings_title} + + + {ibf.lang.settings_lang_txt} + $lang_select + + + + + + + + + + {ibf.lang.settings_skin} + + + {ibf.lang.settings_skin_txt} + $skin    + + + + + + + + + +
+ + + + + + + + + + {ibf.lang.settings_display} + + + {ibf.lang.settings_viewsig} + {$data[SIG]} + + + {ibf.lang.settings_viewimg} + {$data[IMG]} + + + {ibf.lang.settings_viewava} + {$data[AVA]} + + + {ibf.lang.settings_dopopup} + {$data[POP]} + + + {ibf.lang.hide_session_txt} + {$data[SESS]} + + + + + + + + + + + +
+ + + + {ibf.lang.privacy_settings} + + + + {ibf.lang.hide_email} + + + + {ibf.lang.admin_send} + + + {ibf.lang.board_prefs} + + + + {ibf.lang.send_full_msg} + + + + + + +
+ + + + + + + + + + + {ibf.lang.subs_header} + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 {ibf.lang.subs_topic}{ibf.lang.subs_replies}{ibf.lang.subs_view}{ibf.lang.subs_last_post}
{$data['folder_icon']}{$data['title']} ( {ibf.lang.new_window} )
{$data['description']}{ibf.lang.subs_start} {$data['start_date']}
{$data['posts']}{$data['views']}{$data['last_post_date']}
{ibf.lang.subs_by} {$data['last_poster']}
  {ibf.lang.with_selected}
+ + + + + + + + +
+ + + + + +
+
+ +
+
{$data}
+
+ + + + diff --git a/upload/upgrade3.php b/upload/upgrade3.php new file mode 100644 index 00000000..b591f729 --- /dev/null +++ b/upload/upgrade3.php @@ -0,0 +1,86 @@ + Wrapper script +| > Script written by Matt Mecham +| > Date started: 14th February 2002 +| ++-------------------------------------------------------------------------- +*/ + +//----------------------------------------------- +// USER CONFIGURABLE ELEMENTS +//----------------------------------------------- + +// Root path + +$root_path = "./"; + +//----------------------------------------------- +// NO USER EDITABLE SECTIONS BELOW +//----------------------------------------------- + +error_reporting (E_ERROR | E_WARNING | E_PARSE); +set_magic_quotes_runtime(0); + + + + +//-------------------------------- +// Import $INFO, now! +//-------------------------------- + +require $root_path."conf_global.php"; + +//-------------------------------- +// Load the DB driver and such +//-------------------------------- + +$INFO['sql_driver'] = !$INFO['sql_driver'] ? 'mySQL' : $INFO['sql_driver']; + +$to_require = $root_path."sources/Drivers/".$INFO['sql_driver'].".php"; +require ($to_require); + +$DB = new db_driver; + +$DB->obj['sql_database'] = $INFO['sql_database']; +$DB->obj['sql_user'] = $INFO['sql_user']; +$DB->obj['sql_pass'] = $INFO['sql_pass']; +$DB->obj['sql_host'] = $INFO['sql_host']; +$DB->obj['sql_tbl_prefix'] = $INFO['sql_tbl_prefix']; + +// Get a DB connection + +$DB->connect(); + +$DB->query("ALTER TABLE ibf_members CHANGE time_offset time_offset VARCHAR(10) DEFAULT NULL"); +$DB->query("ALTER TABLE ibf_members CHANGE skin skin SMALLINT(5) DEFAULT NULL"); +$DB->query("ALTER TABLE ibf_topics CHANGE forum_id forum_id SMALLINT (5) DEFAULT '0' NOT NULL"); +$DB->query("ALTER TABLE ibf_members ADD dst_in_use TINYINT (1) DEFAULT '0'"); + +echo("Running Queries:
ALTER TABLE ibf_members ADD dst_in_use TINYINT (1) DEFAULT '0'
ALTER TABLE ibf_topics CHANGE forum_id forum_id SMALLINT (5) DEFAULT '0' NOT NULL
ALTER TABLE ibf_members CHANGE time_offset time_offset VARCHAR(10) DEFAULT NULL
ALTER TABLE ibf_members CHANGE skin skin SMALLINT(5) DEFAULT NULL

Upgrade complete, you may now remove this file"); + +exit(); + + +//+------------------------------------------------- +// GLOBAL ROUTINES +//+------------------------------------------------- + +function fatal_error($message="", $help="") { + echo("$message

$help"); + exit; +} +?> diff --git a/upload/uploads/index.html b/upload/uploads/index.html new file mode 100644 index 00000000..657c5bbf --- /dev/null +++ b/upload/uploads/index.html @@ -0,0 +1 @@ + IBForums - Bulletin Board System

403: IBForums-> Forbidden


You have reached this Page in error, please use your back button to return to ibforums.
Get your free download of IBForums now! \ No newline at end of file