You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: OryNider <ory...@us...> - 2007-12-12 18:42:44
|
Update of /cvsroot/mxbb/mx_contact/contrib/images/Captcha sets/water In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3930/water Added Files: captcha1.png captcha2.png captcha3.png captcha4.png captcha5.png Log Message: First Version! --- NEW FILE: captcha1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: captcha3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: captcha2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: captcha5.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: captcha4.png --- (This appears to be a binary file; contents omitted.) |
|
From: OryNider <ory...@us...> - 2007-12-12 18:42:37
|
Update of /cvsroot/mxbb/mx_contact/contrib/images/Captcha sets/oily In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3930/oily Added Files: captcha1.png captcha2.png captcha3.png captcha4.png captcha5.png Log Message: First Version! --- NEW FILE: captcha1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: captcha3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: captcha2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: captcha5.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: captcha4.png --- (This appears to be a binary file; contents omitted.) |
|
From: OryNider <ory...@us...> - 2007-12-12 18:42:36
|
Update of /cvsroot/mxbb/mx_contact/contrib/images/Captcha sets/icecream In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3930/icecream Added Files: captcha1.png captcha2.png captcha3.png captcha4.png captcha5.png Log Message: First Version! --- NEW FILE: captcha1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: captcha3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: captcha2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: captcha5.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: captcha4.png --- (This appears to be a binary file; contents omitted.) |
|
From: OryNider <ory...@us...> - 2007-12-12 18:42:35
|
Update of /cvsroot/mxbb/mx_contact/contrib/images/Captcha sets In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3930 Added Files: icecream.jpg oily.jpg solar.jpg water.jpg Log Message: First Version! --- NEW FILE: solar.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: oily.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icecream.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: water.jpg --- (This appears to be a binary file; contents omitted.) |
|
From: OryNider <ory...@us...> - 2007-12-12 18:42:20
|
Update of /cvsroot/mxbb/mx_contact/contrib/addons/Recipient List addon/root/language/lang_english In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3898 Added Files: lang_contacts.php Log Message: First Version! --- NEW FILE: lang_contacts.php --- <?php /*************************************************************************** * lang_contacts.php * ----------------- * Version: 1.0.0 * Begin: Sunday, Sept 17, 2006 * Copyright: (C) 2006, Marcus * E-mail: ma...@ph... * $id: 17:47 02/03/2007 * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ $lang['Contacts_list'] = 'Select a Recipient'; $lang['Contacts_explain'] = 'Your message will be sent to the Site Admin unless you choose another recipient'; // // Array of Recipients // $lang['contact_me']['3'] = 'Technical Support'; $lang['contact_me']['4'] = 'Billing Dept'; $lang['contact_me']['5'] = 'Human Resources'; $lang['contact_me']['6'] = 'Public Relations'; ?> |
|
From: OryNider <ory...@us...> - 2007-12-12 18:42:15
|
Update of /cvsroot/mxbb/mx_contact/contrib/addons/Reasons addon/root/language/lang_english In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3490/Reasons addon/root/language/lang_english Added Files: lang_contact_options.php Log Message: First Version! --- NEW FILE: lang_contact_options.php --- <?php /*************************************************************************** * lang_contact_options.php * ------------------------ * Version: 1.0.0 * Begin: Sunday, Sept 17, 2006 * Copyright: (C) 2006, Marcus * E-mail: ma...@ph... * $id: 13:20 20/02/2007 * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ $lang['Contact_options'] = 'Select a Reason'; $lang['No_option'] = 'You need to select a reason'; // // Array of Reasons // $lang['contact_option']['Feedback'] = 'Feedback/Suggestion'; $lang['contact_option']['Login/Registration Issues'] = 'Login/Registration Issues'; $lang['contact_option']['Report a Post'] = 'Report a Post'; $lang['contact_option']['Other'] = 'Other'; ?> |
|
From: OryNider <ory...@us...> - 2007-12-12 18:42:06
|
Update of /cvsroot/mxbb/mx_contact/contrib/addons/Recipient List addon In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3490/Recipient List addon Added Files: install.txt Log Message: First Version! --- NEW FILE: install.txt --- ############################################################## ## MOD Title: Contact Form :: Recipients List Add-on ## MOD Author: marcus.smith < ma...@ph... > (MarcuS) http://www.phobbia.net/mods ## MOD Description: Adds a dropdown of different Admins/Moderators who can be contacted ## MOD Version: 1.2.0 ## ## Installation Level: Easy ## ## Installation Time: ~5 Minutes ## ## Files To Edit: contact.php ## includes/functions_selects.php ## templates/subSilver/contact_body.tpl ## ## Included Files: language/lang_english/lang_contacts.php ## ## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ############################################################## ## For security purposes, please check: http://www.phpbb.com/mods/ ## for the latest version of this MOD. Although MODs are checked ## before being allowed in the MODs Database there is no guarantee ## that there are no security problems within the MOD. No support ## will be given for MODs not found within the MODs Database which ## can be found at http://www.phpbb.com/mods/ ############################################################## ## Author Notes: ## ## How to Use this Addon ## --------------------- ## Open language/lang_english/lang_contacts.php and locate the Recipients array. ## Each recipient is structured as follows: $lang['contact_me']['user_id'] = 'Recipient Name/Dept'; ## The first part: ['user_id'] - is sent to the chosen user_id you enter, whilst the second part: 'Recipient Name/Dept' ## is displayed in the Contact Forms dropdown options list which users see. A user_id can be found by getting ## the u= value seen in the URL when viewing a users profile. ## ## If the sender does not choose a recipient from the list it will go to the Site Admin by default. ## ## One Rule: The same user_id cannot appear more than once in the list! ## ## Sites with Additional Languages ## ------------------------------- ## Simply create a duplicate of lang_contacts.php, making sure the user_id is against the correct translation ## each time in the Recipients array. ## ## Why did you use 'user_id' instead of e-mails? ## --------------------------------------------- ## If we used value="em...@yo..." these may be viewed in the HTML source and either abused by ## people, or found by spam bots harvesting your site. Instead we use the user_id of the user who will ## receive the e-mail, and get their e-mail from the database registered to their name. This does cause ## a couple of limitations - ie each user_id can be listed once only - but is more secure in the end. ## ############################################################## ## MOD History: ## ## 2007-30-05 - Version 1.2.0 ## - Bug fix in install.txt - thanks Wolfgang ## ## 2007-22-04 - Version 1.1.0 ## - Updated to match latest code changes (8.9.4) ## ## 2007-03-03 - Version 1.0.0 ## - Recipients List Add-on written for Contact Form ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ DIY INSTRUCTIONS ]------------------------------------------- # Make sure the Contact Form mod is installed BEFORE following these instructions. See Authors Notes for creating your own reasons list or using translations. # #-----[ COPY ]------------------------------------------ # copy root/language/lang_english/lang_contacts.php to language/lang_english/lang_contacts.php # #-----[ OPEN ]------------------------------------------ # contact.php # #-----[ FIND ]------------------------------------------ # include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_contact.'.$phpEx); # #-----[ AFTER, ADD ]------------------------------------ # include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_contacts.'.$phpEx); include($phpbb_root_path . 'includes/functions_selects.'.$phpEx); # #-----[ FIND ]------------------------------------------ # $email = (!isset($HTTP_POST_VARS['email'])) ? '' : stripslashes(trim(htmlspecialchars($HTTP_POST_VARS['email']))); # #-----[ AFTER, ADD ]------------------------------------ # $contacts_list = (!isset($HTTP_POST_VARS['contacts_list'])) ? '' : stripslashes(htmlspecialchars($HTTP_POST_VARS['contacts_list'])); # #-----[ FIND ]------------------------------------------ # $sql = "SELECT user_lang FROM " . USERS_TABLE . " WHERE user_id = 2"; if(!($result = $db->sql_query($sql))) { message_die(CRITICAL_ERROR, "Could not query recipient information", "", __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); # #-----[ REPLACE WITH ]------------------------------------ # # #-----[ FIND ]------------------------------------------ # empty($contact_config['contact_admin_email']) ? $emailer->email_address($board_config['board_email']) : $emailer->email_address($contact_config['contact_admin_email']); # #-----[ REPLACE WITH ]------------------------------------ # if($contacts_list == '0') { empty($contact_config['contact_admin_email']) ? $emailer->email_address($board_config['board_email']) : $emailer->email_address($contact_config['contact_admin_email']); } else { $sql = "SELECT user_email, user_lang FROM " . USERS_TABLE . " WHERE user_id = '$contacts_list'"; $result = $db->sql_query($sql); if(!$db->sql_query($sql)) { message_die(GENERAL_ERROR, "Could not query recipient information", "", __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); $emailer->email_address($row['user_email']); } # #-----[ FIND ]------------------------------------------ # 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], # #-----[ AFTER, ADD ]------------------------------------ # 'L_TO_OPTIONS' => $lang['Contacts_list'], 'L_TO_OPTIONS_EXPLAIN' => $lang['Contacts_explain'], 'TO_OPTIONS' => contacts_list($select_name = 'contacts_list'), # #-----[ OPEN ]------------------------------------------ # includes/functions_selects.php # #-----[ FIND ]----------------------------------------- # ?> # #-----[ BEFORE, ADD ]------------------------------------ # // // Contact Form :: Recipients List Addon // function contacts_list($select_name = 'contacts_list') { global $lang; $contacts_list = '<select name="' . $select_name . '">'; $contacts_list .= '<option value="0" selected="selected">' . $lang['Contacts_list'] .'</option>'; while(list($value, $option) = @each($lang['contact_me'])) { $contacts_list .= '<option value="' . $value . '">' . $option . '</option>'; } $contacts_list .= '</select>'; return $contacts_list; } # #-----[ OPEN ]------------------------------------------ # templates/subSilver/contact_body.tpl # #-----[ FIND ]------------------------------------------ # <tr> <td class="row1"><span class="gen"><b>{L_EMAIL}</b></span><br /> <span class="gensmall">{L_EXPLAIN_EMAIL}</span></td> <td class="row2"><input type="text" name="email" size="30" maxlength="50" /></td> </tr> # #-----[ AFTER, ADD ]------------------------------------ # <tr> <td class="row1"><span class="gen"><b>{L_TO_OPTIONS}</b></span><br /> <span class="gensmall">{L_TO_OPTIONS_EXPLAIN}</span></td> <td class="row2">{TO_OPTIONS}</td> </tr> # #-----[ SAVE/CLOSE ALL FILES ]-------------------------- # # EoM |
|
From: OryNider <ory...@us...> - 2007-12-12 18:42:05
|
Update of /cvsroot/mxbb/mx_contact/contrib/addons/Reasons addon In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3490/Reasons addon Added Files: install.txt Log Message: First Version! --- NEW FILE: install.txt --- ############################################################## ## MOD Title: Contact Form :: Reasons Add-on ## MOD Author: marcus.smith < ma...@ph... > (MarcuS) http://www.phobbia.net/mods ## MOD Description: Adds a dropdown of reasons for using the form, these need to be setup by the Admin. ## MOD Version: 1.2.0 ## ## Installation Level: Easy ## ## Installation Time: ~5 Minutes ## ## Files To Edit: contact.php ## includes/functions_selects.php ## language/lang_english/email/contact.tpl ## templates/subSilver/contact_body.tpl ## ## Included Files: language/lang_english/lang_contact_options.php ## ## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ############################################################## ## For security purposes, please check: http://www.phpbb.com/mods/ ## for the latest version of this MOD. Although MODs are checked ## before being allowed in the MODs Database there is no guarantee ## that there are no security problems within the MOD. No support ## will be given for MODs not found within the MODs Database which ## can be found at http://www.phpbb.com/mods/ ############################################################## ## Author Notes: ## ## How to Use this Addon ## --------------------- ## Open language/lang_english/lang_contact_options.php and locate the reasons array. ## Each reason is structured as follows: $lang['contact_option']['Reason'] = 'Reason'; ## The first part: ['Reason'] - is sent to the Admin as the Subject, whilst the second ## part: 'Reason' is displayed in the Contact Forms dropdown options list which users see. ## Best practice is for both to be the same for easier handling. Simply add/remove reasons ## you would like to appear on your sites Contact Form. ## ## ## Sites with Additional Languages ## ------------------------------- ## When sending an e-mail to the Admin, phpBB determines their chosen language and sends ## it in that language, not that of the sender. When you are adding new translations of ## language/lang_xxxxx/lang_contact_options.php it is vital that you maintain the order of ## your reasons in each translation and do not change the $lang['contact_option'] parts. ## You will need to translate the first 2 lines in the lang_contact_options.php file also. ## ############################################################## ## MOD History: ## ## 2007-22-04 - Version 1.2.0 ## - Updated to match latest code changes (8.9.4) ## ## 2007-03-03 - Version 1.1.0a ## - Minor typos corrected in install.txt ## -- Thanks to CyberSpy (phpbb.com) for pointing these out ## ## 2007-03-01 - Version 1.1.0 ## - Minor tweak in install.txt: ## $contact_options = stripslashes(htmlspecialchars($HTTP_POST_VARS['contact_options'])); ## ## 2007-02-20 - Version 1.0.0 ## - Reasons Add-on written for Contact Form ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ DIY INSTRUCTIONS ]------------------------------------------- # Make sure the Contact Form mod is installed BEFORE following these instructions. See Authors Notes for creating your own reasons list or using translations. # #-----[ COPY ]------------------------------------------ # copy root/language/lang_english/lang_contact_options.php to language/lang_english/lang_contact_options.php # #-----[ OPEN ]------------------------------------------ # contact.php # #-----[ FIND ]------------------------------------------ # include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_contact.'.$phpEx); # #-----[ AFTER, ADD ]------------------------------------ # include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_contact_options.'.$phpEx); include($phpbb_root_path . 'includes/functions_selects.'.$phpEx); # #-----[ FIND ]------------------------------------------ # $email = (!isset($HTTP_POST_VARS['email'])) ? '' : stripslashes(trim(htmlspecialchars($HTTP_POST_VARS['email']))); # #-----[ AFTER, ADD ]------------------------------------ # $contact_options = (!isset($HTTP_POST_VARS['contact_options'])) ? '' : htmlspecialchars($HTTP_POST_VARS['contact_options']); # #-----[ FIND ]------------------------------------------ # global $CF_attach_POST_error, $CF_attach_file_exists, $CF_attach_file_dud, $CF_attach_file_big; # #-----[ AFTER, ADD ]------------------------------------ # global $CF_select_option; # #-----[ FIND ]------------------------------------------ # message_die(GENERAL_ERROR, $lang['Contact_error'] . $CF_code_empty . $CF_code_wrong . $CF_attach_POST_error . $CF_illegal_ext . $CF_unknown_ext . $CF_rname_empty . $CF_email_empty . $CF_email_check . $CF_comments_empty . $CF_comments_limit . $CF_attach_file_exists . $CF_attach_file_dud . $CF_attach_file_big . $CF_image_error . $CF_image_zip . sprintf($lang['Click_return_form'], "<a href=\"javascript:history.back(-1); return false;\">", "</a>")); # #-----[ IN-LINE FIND ]------------------------------------------ # . $CF_image_error . $CF_image_zip # #-----[ IN-LINE AFTER, ADD ]------------------------------------ # . $CF_select_option # #-----[ FIND ]------------------------------------------ # // Stage 1 error_check(); # #-----[ BEFORE, ADD ]------------------------------------ # if($contact_options == '0') { $CF_select_option = "<br /><br />" . $lang['No_option']; $CF_general_message = 1; } # #-----[ FIND ]------------------------------------------ # $emailer->assign_vars(array( # #-----[ AFTER, ADD ]------------------------------------ # 'REASON' => ":: " . trim(stripslashes($contact_options)), # #-----[ FIND ]------------------------------------------ # 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], # #-----[ AFTER, ADD ]------------------------------------ # 'L_OPTIONS' => $lang['Contact_options'], 'OPTIONS' => contact_options($select_name = 'contact_options'), # #-----[ OPEN ]------------------------------------------ # includes/functions_selects.php # #-----[ FIND ]----------------------------------------- # ?> # #-----[ BEFORE, ADD ]------------------------------------ # // // Contact Form :: Reasons Addon // function contact_options($select_name = 'contact_options') { global $lang; $contact_options = '<select name="' . $select_name . '">'; $contact_options .= '<option value="0" selected="selected">' . $lang['Contact_options'] .'</option>'; while(list($value, $option) = @each($lang['contact_option'])) { $contact_options .= '<option value="' . $value . '">' . $option . '</option>'; } $contact_options .= '</select>'; return $contact_options; } # #-----[ OPEN ]------------------------------------------ # language/lang_english/email/contact.tpl # #-----[ FIND ]------------------------------------------ # Subject: Feedback received # #-----[ IN-LINE FIND ]------------------------------------------ # Subject: Feedback received # #-----[ IN-LINE AFTER, ADD ]------------------------------------ # {REASON} # #-----[ OPEN ]------------------------------------------ # templates/subSilver/contact_body.tpl # #-----[ FIND ]------------------------------------------ # <tr> <td class="row1"><span class="gen"><b>{L_EMAIL}</b></span><br /> <span class="gensmall">{L_EXPLAIN_EMAIL}</span></td> <td class="row2"><input type="text" name="email" size="30" maxlength="50" /></td> </tr> # #-----[ AFTER, ADD ]------------------------------------ # <tr> <td class="row1"><span class="gen"><b>{L_OPTIONS} *</b></span></td> <td class="row2">{OPTIONS}</td> </tr> # #-----[ SAVE/CLOSE ALL FILES ]-------------------------- # # EoM |
|
From: OryNider <ory...@us...> - 2007-12-12 18:42:05
|
Update of /cvsroot/mxbb/mx_contact/contrib/addons/Registration addon In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3490/Registration addon Added Files: install.txt Log Message: First Version! --- NEW FILE: install.txt --- ############################################################## ## MOD Title: Registration Link to Contact Form ## MOD Author: marcus.smith < ma...@ph... > (Marcus) http://www.phobbia.net/mods ## MOD Description: Changes the "Administrator" link above the Registration form CAPTCHA to go ## to the Contact Form rather than expose an e-mail to harvesters. ## MOD Version: 1.0.0 ## ## Installation Level: Easy ## ## Installation Time: ~1 Minute ## ## Files To Edit: includes/usercp_register.php ## ## Included Files: N/A ## ## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ############################################################## ## For security purposes, please check: http://www.phpbb.com/mods/ ## for the latest version of this MOD. Although MODs are checked ## before being allowed in the MODs Database there is no guarantee ## that there are no security problems within the MOD. No support ## will be given for MODs not found within the MODs Database which ## can be found at http://www.phpbb.com/mods/ ############################################################## ## Author Notes: ## ## I recommend this little change for 1 simple reason. The Admin link is an ## <a href="mailto: Your e-mail"> link. Spambots can find and abuse this! ## ## Replacing it with a link to your Contact Form should prevent this. You will ## need to allow for Guests to use the Contact Form if you apply this change. ## ############################################################## ## MOD History: ## ## 2006-12-12 - Version 1.0.0 ## - Edit written for this small modification ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ OPEN ]------------------------------------------ # includes/usercp_register.php # #-----[ FIND ]------------------------------------------ # 'L_CONFIRM_CODE_IMPAIRED' => sprintf($lang['Confirm_code_impaired'], '<a href="mailto:' . $board_config['board_email'] . '">', '</a>'), # #-----[ REPLACE WITH ]------------------------------------ # 'L_CONFIRM_CODE_IMPAIRED' => sprintf($lang['Confirm_code_impaired'], '<a href="' . append_sid("contact.$phpEx") . '">', '</a>'), # #-----[ SAVE/CLOSE ALL FILES ]-------------------------- # # EoM |
|
From: OryNider <ory...@us...> - 2007-12-12 18:41:53
|
Update of /cvsroot/mxbb/mx_contact/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3418/includes Added Files: contact_attach.php contact_constants.php contact_emailer.php contact_extend.php functions_contact.php Log Message: First Version! --- NEW FILE: contact_attach.php --- <?php /*************************************************************************** * contact_attach.php * --------------------- * Version: 9.0.0 * Begin: Tuesday, Dec 06, 2006 * Copyright: (C) 2006-07, Marcus * E-mail: ma...@ph... * $id: 18:52 03/07/2007 * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ if(!defined('IN_PORTAL')) { die('Hacking Attempt'); } // // Filename Hash option // if($contact_config['contact_hash'] == 0) { // // Normal Filenames // $attachment = !empty($attachment) ? strtolower(urlencode(basename($HTTP_POST_FILES['attachment']['name']))) : ''; $attach = $server_url . $script_path . "/" . trim($contact_config['contact_file_root']) . "/" . decode_ip($user_ip) . "/" . $attachment; } else { // // MD5 Filenames // $upload = strtolower(urlencode(basename($HTTP_POST_FILES['attachment']['name']))); // Get the file extension first $extn = substr(strrchr($upload, "."), 1); // Generate a random Filename $attachment = !empty($attachment) ? strtolower(md5(mt_rand() * time()) . "." . $extn) : ''; $attach = $server_url . $script_path . "/" . trim($contact_config['contact_file_root']) . "/" . decode_ip($user_ip) . "/" . $attachment; } $delete_link = sprintf("\n" . $lang['Remove_file'], $server_url . $script_name . "?delete=" . decode_ip($user_ip) . "/" . $attachment . "\n"); // // Was there an attachment? Yes? Then lets process it. // if(empty($attachment)) { $attach = $lang['Empty']; $delete_link = ''; } else { $filename = basename($HTTP_POST_FILES['attachment']['name']); $ext = strrchr(strtolower($filename), '.'); // // Banned extentions // $blacklist = array( 'adp', 'as', 'asmx', 'asp', 'aspx', 'avi', 'bat', 'bin', 'cfg', 'cgi', 'com', 'cmd', 'css', 'dhtm', 'dhtml', 'dll', 'doc', 'exe', 'fla', 'gvi', 'hta', 'htaccess', 'htm', 'html', 'htt', 'inc', 'ini', 'jar', 'js', 'jse', 'jsp', 'jspx', 'lnk', 'mdb', 'moov', 'mov', 'movie', 'mp3', 'mp4', 'mpa', 'mpe', 'mpeg', 'mpg', 'obs', 'pdf', 'php', 'php3', 'php4', 'php5', 'php6', 'phtm', 'phtml', 'pif', 'pl', 'ppt', 'prg', 'ra', 'ram', 'raw', 'reg', 'rgs', 'rhtml', 'rm', 'rtf', 'scr', 'sct', 'shb', 'shs', 'sht', 'shtm', 'shtml', 'sql', 'sys', 'tlb', 'tpl', 'txt', 'vb', 'vbe', 'vbs', 'vbscript', 'vdo', 'wav', 'ws', 'wsf', 'xls', 'xml' ); // // Permitted extensions // $whitelist = array( 'bmp', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'png', 'psd', 'rar', 'swf', 'tiff', 'zip' ); if(in_array(trim($ext, '.'), $blacklist)) { $CF_illegal_ext = $_br . sprintf($lang['Illegal_ext'], $ext) . "<br />" . $lang['zip_advise']; $CF_general_message = 1; } elseif(!in_array(trim($ext, '.'), $whitelist)) { $CF_unknown_ext = $_br . sprintf($lang['Unknown_ext'], $ext) . "<br />" . $lang['zip_advise']; $CF_general_message = 1; } // Stage 2 error_check(); // // Extension safe - proceed with upload // if(($HTTP_POST_FILES['attachment']['size'] > intval($contact_config['contact_max_file_size'] * 1024)) || ($HTTP_POST_FILES['attachment']['error'] == 1)) { $CF_attach_file_big = $_br . sprintf($lang['Attach-Too_big'], $contact_config['contact_max_file_size']) . "<br />" . $lang['zip_advise']; $CF_general_message = 1; } elseif(($HTTP_POST_FILES['attachment']['error'] == 3) || ($HTTP_POST_FILES['attachment']['error'] == 6)) { $CF_attach_POST_error = $_br . $lang['POST_ERROR']; $CF_general_message = 1; } elseif(($HTTP_POST_FILES['attachment']['size'] == 0) || ($HTTP_POST_FILES['attachment']['error'] == 4)) { $CF_attach_file_dud = $_br . $lang['Attach_dud']; $CF_general_message = 1; } elseif(file_exists(@phpbb_realpath($phpbb_root_path . $contact_config['contact_file_root'] . "/" . decode_ip($user_ip) . "/" . $attachment))) { $CF_attach_file_exists = $_br . $lang['Attach-File_exists']; $CF_general_message = 1; } // Stage 3 error_check(); // // Image Types // $imfilename = basename($HTTP_POST_FILES['attachment']['name']); $image_types = array( 'bmp', 'gif', 'jpg', 'jpeg', 'png', 'tiff', 'swf', 'psd' ); $imext = strrchr(strtolower($imfilename), "."); if(in_array(trim($imext, '.'), $image_types)) { list($width, $height, $type) = @getimagesize($HTTP_POST_FILES['attachment']['tmp_name']); if(intval($width) > 0 && intval($height) > 0) { switch ($type) { // GIF case 1: if($imext != '.gif') { $CF_image_error = $_br . $lang['Image_error']; $CF_general_message = 1; } break; // JPG, JPC, JP2, JPX, JB2 case 2: case 9: case 10: case 11: case 12: if($imext != '.jpg' && $imext != '.jpeg') { $CF_image_error = $_br . $lang['Image_error']; $CF_general_message = 1; } break; // PNG case 3: if($imext != '.png') { $CF_image_error = $_br . $lang['Image_error']; $CF_general_message = 1; } break; // SWF case 4: if($imext != '.swf') { $CF_image_error = $_br . $lang['Image_error']; $CF_general_message = 1; } elseif($imext == '.swf') { $CF_image_zip = $_br . $lang['Image_zip']; $CF_general_message = 1; } break; // PSD case 5: if($imext != '.psd') { $CF_image_error = $_br . $lang['Image_error']; $CF_general_message = 1; } elseif($imext == '.psd') { $CF_image_zip = $_br . $lang['Image_zip']; $CF_general_message = 1; } break; // BMP case 6: if($imext != '.bmp') { $CF_image_error = $_br . $lang['Image_error']; $CF_general_message = 1; } elseif($imext == '.bmp') { $CF_image_zip = $_br . $lang['Image_zip']; $CF_general_message = 1; } break; // TIFF's case 7: case 8: if($imext != '.tiff') { $CF_image_error = $_br . $lang['Image_error']; $CF_general_message = 1; } elseif($imext == '.tiff') { $CF_image_zip = $_br . $lang['Image_zip']; $CF_general_message = 1; } break; default: $CF_image_error = $_br . $lang['Image_error']; $CF_general_message = 1; } } else { // XSS? $CF_image_error = $_br . $lang['Image_error']; $CF_general_message = 1; } } // Stage 4 error_check(); if(!file_exists(@phpbb_realpath($module_root_path . $contact_config['contact_file_root'] . "/" . decode_ip($user_ip)))) { if(!file_exists(@phpbb_realpath($module_root_path . $contact_config['contact_file_root'] . "/"))) { @mkdir($module_root_path . $contact_config['contact_file_root'] . "/", 0755); $fd = @fopen($module_root_path . $contact_config['contact_file_root'] . "/index.html", 'a'); @fclose($fd); } @mkdir($module_root_path . $contact_config['contact_file_root'] . "/" . decode_ip($user_ip), 0755); } if(@is_uploaded_file($HTTP_POST_FILES['attachment']['tmp_name'])) { @move_uploaded_file($HTTP_POST_FILES['attachment']['tmp_name'], $module_root_path . $contact_config['contact_file_root'] . "/" . decode_ip($user_ip) . "/" . $attachment); $fa = @fopen($module_root_path . $contact_config['contact_file_root'] . "/" . decode_ip($user_ip) . "/index.html", 'a'); @fclose($fa); $CF_attach_success = $_br . $lang['Attach-Uploaded']; } else { @unlink($attach); $CF_attach_POST_error = $_br . $lang['POST_ERROR']; $CF_general_message = 1; } } ?> --- NEW FILE: functions_contact.php --- <?php /*************************************************************************** * functions_contact.php * --------------------- * Version: 9.0.0 * Begin: Tuesday, Dec 06, 2006 * Copyright: (C) 2006-07, Marcus * E-mail: ma...@ph... * $id: 21:55 25/06/2007 * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ if(!defined('IN_PORTAL')) { die('Hacking Attempt'); } if(!$userdata['session_logged_in']) { $remove = $HTTP_GET_VARS['delete']; redirect($module_root_path . "login.$phpEx?redirect=index.$phpEx&delete=$remove", true); } elseif($userdata['user_level'] != ADMIN) { mx_message_die(GENERAL_ERROR, $lang['Not_Authorised']); // lang_main.php } else { $filename = $module_root_path . "/" . trim($contact_config['contact_file_root']) . "/" . $HTTP_GET_VARS['delete']; // // Exploit Prevention // //exploit_catch($filename); // // If filename and location matches okay, delete it.. // if(file_exists($filename)) { delete_file($filename); mx_message_die(GENERAL_MESSAGE, $lang['File_Removed']); } else { mx_message_die(GENERAL_ERROR, $lang['File_Not_Here']); } } function exploit_catch($filename) { $methods = array('..', 'contact.php', '\0'); foreach($methods as $hacks) { if(strpos($filename, $hacks) !== false) { die('Hacking Attempt'); } } if(is_dir($filename)) { die('Hacking Attempt'); } } function delete_file($filename) { global $HTTP_GET_VARS, $db, $contact_config, $module_root_path; @unlink($filename); clearstatcache(); if($contact_config['contact_storage'] == 1) { $filename = $module_root_path . trim($contact_config['contact_file_root']) . "/" . $HTTP_GET_VARS['delete']; $sql = "UPDATE " . CONTACT_MSGS_TABLE . " SET upfile = '' WHERE upfile = '$filename'"; if(!($result = $db->sql_query($sql))) { mx_message_die(GENERAL_ERROR, 'Could not update Contact table', '', __LINE__, __FILE__, $sql); } } } ?> --- NEW FILE: contact_extend.php --- <?php /*************************************************************************** * contact_extend.php * ------------------ * Version: 9.0.0 * Begin: Tuesday, Dec 06, 2006 * Copyright: (C) 2006-07, Marcus * E-mail: ma...@ph... * $id: 21:20 01/06/2007 * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ if(!defined('IN_PORTAL')) { die('Hacking Attempt'); } if($contact_config['contact_thankyou'] == 1 && !$userdata['session_logged_in']) { return; } else { if($email == $lang['Empty']) { return; } else { // // Prune expired emails (24hr anti-spam) // $time = time(); $sql = "DELETE FROM " . CONTACT_EMAILS_TABLE . " WHERE lasttime <= '$time'"; $result = $db->sql_query($sql); if(!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Failed to update emails', '', __LINE__, __FILE__, $sql); } // // Store new Sender e-mail with limit (3 max) // $sql = "SELECT * FROM " . CONTACT_EMAILS_TABLE . " WHERE email = '$email'"; $result = $db->sql_query($sql); if(!$db->sql_query($sql)) { mx_message_die(CRITICAL_ERROR, 'Could not query email information', '', __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); if(empty($row['email'])) { $lasttime = time() + intval(24 * 60) * intval(60); $initial = 1; $sql = "INSERT INTO " . CONTACT_EMAILS_TABLE . " (email, sent, lasttime) VALUES ('" . str_replace("\'", "''", $email) . "', $initial, $lasttime)"; if(!$db->sql_query($sql)) { mx_message_die(CRITICAL_ERROR, 'Could not update email information', '', __LINE__, __FILE__, $sql); } } else { if($row['sent'] >= 3) { mx_message_die(GENERAL_ERROR, $lang['Thankyou_limit']); } else { $sql = "UPDATE " . CONTACT_EMAILS_TABLE . " SET sent = sent + 1 WHERE email = '$email'"; if(!$db->sql_query($sql)) { mx_message_die(CRITICAL_ERROR, 'Could not update email information', '', __LINE__, __FILE__, $sql); } } } // // Send a Thank You e-mail to the sender // $emailer = new emailer($board_config['smtp_delivery']); $emailer->from($board_config['board_email']); $emailer->replyto($board_config['board_email']); $email_headers = 'X-AntiAbuse: Board Servername - ' . $board_config['server_name'] . "\n"; $email_headers .= 'X-AntiAbuse: User ID - ' . $userdata['user_id'] . "\n"; $email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n"; $email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\n"; empty($email) ? $emailer->email_address() : $emailer->email_address($email); $emailer->extra_headers($email_headers); $emailer->use_template('contact_thanks', $userdata['user_lang']); $emailer->set_subject($subject); $emailer->assign_vars(array( 'REAL_NAME' => $real_name, 'USERNAME' => $user_name, 'EMAIL' => $email, 'COMMENTS' => $comments, 'USER_IP' => decode_ip($user_ip), 'TIMEDATE' => $timedate, 'SITENAME' => $board_config['sitename']) ); $emailer->send(); $emailer->reset(); } } ?> --- NEW FILE: contact_constants.php --- <?php /** * * @package mxBB Portal Module - mx_contact * @version $Id: contact_constants.php,v 1.1 2007/12/12 18:41:43 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ if ( !defined('IN_PORTAL') ) { die('Hacking attempt'); } // ------------------------------------------------------------------------- // Extend User Style with module lang and images // Usage: $mx_user->extend(LANG, IMAGES) // Switches: // - LANG: MX_LANG_MAIN (default), MX_LANG_ADMIN, MX_LANG_ALL, MX_LANG_NONE // - IMAGES: MX_IMAGES (default), MX_IMAGES_NONE // ------------------------------------------------------------------------- $mx_user->extend(MX_LANG_MAIN, MX_IMAGES_NONE); define('CONTACT_TABLE', $mx_table_prefix . 'contact'); define('CONTACT_CONFIG_TABLE', $mx_table_prefix . 'contact_config'); define('CONTACT_MSGS_TABLE', $mx_table_prefix . 'contact_msgs'); define('CONTACT_EMAILS_TABLE', $mx_table_prefix . 'contact_emails'); ?> --- NEW FILE: contact_emailer.php --- <?php /*************************************************************************** contact_emailer.php ------------------- begin : Sunday Aug. 12, 2001 copyright : (C) 2001 The phpBB Group email : su...@ph... $Id: contact_emailer.php,v 1.1 2007/12/12 18:41:43 orynider Exp $ ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ // // The emailer class has support for attaching files, that isn't implemented // in the 2.0 release but we can probable find some way of using it in a future // release // class emailer { var $msg, $subject, $extra_headers; var $addresses, $reply_to, $from; var $use_smtp; var $tpl_msg = array(); function emailer($use_smtp) { $this->reset(); $this->use_smtp = $use_smtp; $this->reply_to = $this->from = ''; } // Resets all the data (address, template file, etc etc to default function reset() { $this->addresses = array(); $this->vars = $this->msg = $this->extra_headers = ''; } // Sets an email address to send to function email_address($address) { $this->addresses['to'] = trim($address); } function cc($address) { $this->addresses['cc'][] = trim($address); } function bcc($address) { $this->addresses['bcc'][] = trim($address); } function replyto($address) { $this->reply_to = trim($address); } function from($address) { $this->from = trim($address); } // set up subject for mail function set_subject($subject = '') { $this->subject = trim(preg_replace('#[\n\r]+#s', '', $subject)); } // set up extra mail headers function extra_headers($headers) { $this->extra_headers .= trim($headers) . "\n"; } function use_template($template_file, $template_lang = '') { global $board_config, $phpbb_root_path, $module_root_path, $mx_root_path; if (trim($template_file) == '') { mx_message_die(GENERAL_ERROR, 'No template file set', '', __LINE__, __FILE__); } if (trim($template_lang) == '') { $template_lang = $board_config['default_lang']; } if (empty($this->tpl_msg[$template_lang . $template_file])) { $tpl_file = $module_root_path . 'language/lang_' . $template_lang . '/email/' . $template_file . '.tpl'; if (!@file_exists(@phpbb_realpath($tpl_file))) { $tpl_file = $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/email/' . $template_file . '.tpl'; if (!@file_exists(@phpbb_realpath($tpl_file))) { mx_message_die(GENERAL_ERROR, 'Could not find email template file :: ' . $template_file . ' @:' . $tpl_file, '', __LINE__, __FILE__); } } if (!($fd = @fopen($tpl_file, 'r'))) { mx_message_die(GENERAL_ERROR, 'Failed opening template file :: ' . $template_file . ' @:' . $tpl_file, '', __LINE__, __FILE__); } $this->tpl_msg[$template_lang . $template_file] = fread($fd, filesize($tpl_file)); fclose($fd); } $this->msg = $this->tpl_msg[$template_lang . $template_file]; return true; } // assign variables function assign_vars($vars) { $this->vars = (empty($this->vars)) ? $vars : $this->vars . $vars; } // Send the mail out to the recipients set previously in var $this->address function send() { global $board_config, $lang, $phpEx, $phpbb_root_path, $db; // Escape all quotes, else the eval will fail. $this->msg = str_replace ("'", "\'", $this->msg); $this->msg = preg_replace('#\{([a-z0-9\-_]*?)\}#is', "' . $\\1 . '", $this->msg); // Set vars reset ($this->vars); while (list($key, $val) = each($this->vars)) { $$key = $val; } eval("\$this->msg = '$this->msg';"); // Clear vars reset ($this->vars); while (list($key, $val) = each($this->vars)) { unset($$key); } // We now try and pull a subject from the email body ... if it exists, // do this here because the subject may contain a variable $drop_header = ''; $match = array(); if (preg_match('#^(Subject:(.*?))$#m', $this->msg, $match)) { $this->subject = (trim($match[2]) != '') ? trim($match[2]) : (($this->subject != '') ? $this->subject : 'No Subject'); $drop_header .= '[\r\n]*?' . preg_quote($match[1], '#'); } else { $this->subject = (($this->subject != '') ? $this->subject : 'No Subject'); } if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match)) { $this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['ENCODING']); $drop_header .= '[\r\n]*?' . preg_quote($match[1], '#'); } else { $this->encoding = trim($lang['ENCODING']); } if ($drop_header != '') { $this->msg = trim(preg_replace('#' . $drop_header . '#s', '', $this->msg)); } $to = $this->addresses['to']; $cc = (count($this->addresses['cc'])) ? implode(', ', $this->addresses['cc']) : ''; $bcc = (count($this->addresses['bcc'])) ? implode(', ', $this->addresses['bcc']) : ''; // Build header $this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $board_config['board_email'] . "\n") . "Return-Path: " . $board_config['board_email'] . "\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '') . (($bcc != '') ? "Bcc: $bcc\n" : ''); // Send message ... removed $this->encode() from subject for time being if ( $this->use_smtp ) { if ( !defined('SMTP_INCLUDED') ) { include($phpbb_root_path . 'includes/smtp.' . $phpEx); } $result = smtpmail($to, $this->subject, $this->msg, $this->extra_headers); } else { $empty_to_header = ($to == '') ? TRUE : FALSE; $to = ($to == '') ? (($board_config['sendmail_fix']) ? ' ' : 'Undisclosed-recipients:;') : $to; $result = @mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg), $this->extra_headers); if (!$result && !$board_config['sendmail_fix'] && $empty_to_header) { $to = ' '; $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '1' WHERE config_name = 'sendmail_fix'"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Unable to update config table', '', __LINE__, __FILE__, $sql); } $board_config['sendmail_fix'] = 1; $result = @mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg), $this->extra_headers); } } // Did it work? if (!$result) { mx_message_die(GENERAL_ERROR, 'Failed sending email :: ' . (($this->use_smtp) ? 'SMTP' : 'PHP') . ' :: ' . $result, '', __LINE__, __FILE__); } return true; } // Encodes the given string for proper display for this encoding ... nabbed // from php.net and modified. There is an alternative encoding method which // may produce lesd output but it's questionable as to its worth in this // scenario IMO function encode($str) { if ($this->encoding == '') { return $str; } // define start delimimter, end delimiter and spacer $end = "?="; $start = "=?$this->encoding?B?"; $spacer = "$end\r\n $start"; // determine length of encoded text within chunks and ensure length is even $length = 75 - strlen($start) - strlen($end); $length = floor($length / 2) * 2; // encode the string and split it into chunks with spacers after each chunk $str = chunk_split(base64_encode($str), $length, $spacer); // remove trailing spacer and add start and end delimiters $str = preg_replace('#' . preg_quote($spacer, '#') . '$#', '', $str); return $start . $str . $end; } // // Attach files via MIME. // function attachFile($filename, $mimetype = "application/octet-stream", $szFromAddress, $szFilenameToDisplay) { global $lang; $mime_boundary = "--==================_846811060==_"; $this->msg = '--' . $mime_boundary . "\nContent-Type: text/plain;\n\tcharset=\"" . $lang['ENCODING'] . "\"\n\n" . $this->msg; if ($mime_filename) { $filename = $mime_filename; $encoded = $this->encode_file($filename); } $fd = fopen($filename, "r"); $contents = fread($fd, filesize($filename)); $this->mimeOut = "--" . $mime_boundary . "\n"; $this->mimeOut .= "Content-Type: " . $mimetype . ";\n\tname=\"$szFilenameToDisplay\"\n"; $this->mimeOut .= "Content-Transfer-Encoding: quoted-printable\n"; $this->mimeOut .= "Content-Disposition: attachment;\n\tfilename=\"$szFilenameToDisplay\"\n\n"; if ( $mimetype == "message/rfc822" ) { $this->mimeOut .= "From: ".$szFromAddress."\n"; $this->mimeOut .= "To: ".$this->emailAddress."\n"; $this->mimeOut .= "Date: ".date("D, d M Y H:i:s") . " UT\n"; $this->mimeOut .= "Reply-To:".$szFromAddress."\n"; $this->mimeOut .= "Subject: ".$this->mailSubject."\n"; $this->mimeOut .= "X-Mailer: PHP/".phpversion()."\n"; $this->mimeOut .= "MIME-Version: 1.0\n"; } $this->mimeOut .= $contents."\n"; $this->mimeOut .= "--" . $mime_boundary . "--" . "\n"; return $out; // added -- to notify email client attachment is done } function getMimeHeaders($filename, $mime_filename="") { $mime_boundary = "--==================_846811060==_"; if ($mime_filename) { $filename = $mime_filename; } $out = "MIME-Version: 1.0\n"; $out .= "Content-Type: multipart/mixed;\n\tboundary=\"$mime_boundary\"\n\n"; $out .= "This message is in MIME format. Since your mail reader does not understand\n"; $out .= "this format, some or all of this message may not be legible."; return $out; } // // Split string by RFC 2045 semantics (76 chars per line, end with \r\n). // function myChunkSplit($str) { $stmp = $str; $len = strlen($stmp); $out = ""; while ($len > 0) { if ($len >= 76) { $out .= substr($stmp, 0, 76) . "\r\n"; $stmp = substr($stmp, 76); $len = $len - 76; } else { $out .= $stmp . "\r\n"; $stmp = ""; $len = 0; } } return $out; } // // Split the specified file up into a string and return it // function encode_file($sourcefile) { if (is_readable(phpbb_realpath($sourcefile))) { $fd = fopen($sourcefile, "r"); $contents = fread($fd, filesize($sourcefile)); $encoded = $this->myChunkSplit(base64_encode($contents)); fclose($fd); } return $encoded; } } // class emailer ?> |
Update of /cvsroot/mxbb/mx_contact In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3418 Added Files: contact_captcha.php db_install.php db_uninstall.php index.htm mx_contact.pak mx_contact.php readme.txt release.txt Log Message: First Version! --- NEW FILE: release.txt --- [b][Release]: mxBB Contact - Module[/b] [b][Authors]: darkassasin93, marcus.smith, OryNider[/b] [b][Version]: 1.0B[/b] [b]Designed for mxBB Version: 2.8.0[/b] [b][Support]:[/b] [URL=http://www.mx-system.com/]post here[/URL] [b]Author's Notes:[/b] Description: Allows visitors to contact the site Admin via a Contact Form. Files can also be attached and sent if permitte (12/12/2007) [b]ScreenShots: [/b] [IMG]http://img146.imageshack.us/img146/2414/mxbbcontactxl1.png[/IMG] [b][Download]: [/b][URL=http://www.mx-system.com/]mx_contact.zip[/URL] --- NEW FILE: contact_captcha.php --- <?php /*************************************************************************** * contact_captcha.php * ------------------- * Version: 9.0.0 * Begin: Tuesday, Dec 06, 2006 * Copyright: (C) 2006-07, Marcus * E-mail: ma...@ph... * $id: 21:55 25/06/2007 * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ if( !defined('IN_PORTAL') || !is_object($mx_block)) { define('IN_PORTAL', true); $mx_root_path = '../../'; $module_root_path = './'; // // Let's include some stuff... // $phpEx = substr(strrchr(__FILE__, '.'), 1); include_once($mx_root_path . 'common.' . $phpEx); // // Start session management // $mx_user->init($user_ip, PAGE_INDEX); // // End session management // $block_id = ( !empty($HTTP_GET_VARS['block_id']) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; if( empty($block_id) ) { $sql = "SELECT * FROM " . BLOCK_TABLE . " WHERE block_title = 'mxBB Contact' LIMIT 1"; if(!$result = $db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, "Could not query Contact module information", "", __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); $block_id = $row['block_id']; } $is_block = FALSE; } else { // // Read block Configuration $title = $mx_block->block_info['block_title']; $block_size = ( isset($block_size) && !empty($block_size) ? $block_size : '100%' ); if( is_object($mx_block)) { $is_block = TRUE; } global $images; } include_once($module_root_path . 'includes/contact_constants.'.$phpEx); define('PAGE_CONTACT_FORM', -1405); @session_start(); $contact_config = array(); $sql = "SELECT * FROM " . CONTACT_CONFIG_TABLE; if(!($result = $db->sql_query($sql))) { message_die(CRITICAL_ERROR, 'Could not query config information', '', __LINE__, __FILE__, $sql); } while ($row = $db->sql_fetchrow($result)) { $contact_config[$row['config_name']] = $row['config_value']; } // // Seed the random number generator // 104729 is the 10000th prime number // mt_srand((double)microtime() * 104729); $random = md5(mt_rand() * microtime()); $digit = rand(1,9); $random = str_replace(0, $digit, $random); // Substitute zeros $length = rand(4,5); $captcha = substr($random, 0, $length); unset($random, $digit); $type = ''; if($contact_config['contact_captcha_type'] == 2) { if(function_exists('glob')) { $type = rand(0,1); } else { $type = 1; // PHP < 4.3.0 } } if($contact_config['contact_captcha_type'] == 0 || $type == 0) { unset($type); foreach(glob($module_root_path . 'images/captcha/captcha*.png') as $bgimg); if(empty($bgimg)) { $type = 1; } else { // // Image based CAPTCHA // $bg = rand(1,5); $image = @imagecreatefrompng($module_root_path . 'images/captcha/captcha'.$bg.'.png'); $txtcol = imagecolorallocate($image, 0, 0, 0); display_code($captcha); } } if($contact_config['contact_captcha_type'] == 1 || $type == 1) { unset($type); // // Coloured CAPTCHA // $image = imagecreate(80,25); $background = imagecolorallocatealpha($image, rand(125,255), rand(125,255), rand(125,255), rand(50,100)); $linecol = imagecolorallocatealpha($image, rand(50,200), rand(50,200), rand(50,200), rand(20,80)); $txtcol = imagecolorallocate($image, 0,0,0); $blk = imagecolorallocate($image, 0,0,0); // // Random Lines // $lines = rand(2,5); for($i=1; $i<=$lines; $i++) { imageline($image, rand(2,78), rand(2,23), rand(78,2), rand(23,2), $linecol); } // // Border Lines // imageline($image, 0, 0, 79, 0, $blk); imageline($image, 0, 0, 0, 24, $blk); imageline($image, 79, 24, 0, 24, $blk); imageline($image, 79, 24, 79, 0, $blk); display_code($captcha); } function display_code($captcha) { global $module_root_path; global $txtcol, $image, $length; if(function_exists('imagettftext')) { for($i=1; $i<=$length; $i++) { // // Rotate Characters // $rotate = rand(1,2); if($rotate == 1) { $angle = rand(0,25); } else { $angle = rand(335,360); } // // TTF's Fonts // $font = rand(1,5); switch ($font) { case 1: imagettftext($image, rand(12,14), $angle, ($i*12), 20, $txtcol, $module_root_path . 'fonts/ArialRoundedBT.ttf', substr($captcha,($i-1),1)); break; case 2: imagettftext($image, rand(12,14), $angle, ($i*12), 20, $txtcol, $module_root_path . 'fonts/VillageSquare.ttf', substr($captcha,($i-1),1)); break; case 3: imagettftext($image, rand(12,14), $angle, ($i*12), 20, $txtcol, $module_root_path . 'fonts/BauerBodoniItalicBT.ttf', substr($captcha,($i-1),1)); break; case 4: imagettftext($image, rand(12,14), $angle, ($i*12), 20, $txtcol, $module_root_path . 'fonts/WarmMilk.ttf', substr($captcha,($i-1),1)); break; case 5: imagettftext($image, rand(12,14), $angle, ($i*12), 20, $txtcol, $module_root_path . 'fonts/OregonDry.ttf', substr($captcha,($i-1),1)); break; } } } else { // // Standard PHP Font // imagestring($image, rand(4,5), rand(13,18), 4, $captcha, $txtcol); } } if(@ini_get('register_globals') == '0' || strtolower(@ini_get('register_globals')) == 'off') { $HTTP_SESSION_VARS['randi'] = $captcha; } else { // PHP5 $_SESSION['randi'] = $captcha; } header("Content-type: image/png"); header("Cache-Control: post-check=0, pre-check=0", false); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Pragma: no-cache"); header("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); imagepng($image); imagedestroy($image); ?> --- NEW FILE: db_uninstall.php --- <?php /** * * @package mxBB Portal Module - mx_contact * @version $Id: db_uninstall.php,v 1.1 2007/12/12 18:41:35 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define('IN_PORTAL', true); if ( !defined('IN_ADMIN') ) { $mx_root_path = '../../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($mx_root_path . 'common.'.$phpEx); // // Start session management // $mx_user->init($user_ip, PAGE_INDEX); if( !$userdata['session_logged_in'] ) { die("Hacking attempt(3)"); } if( $userdata['user_level'] != ADMIN ) { die("Hacking attempt(4)"); } // // End session management // } $sql = array( "DROP TABLE ".$mx_table_prefix."contact_config", "DROP TABLE ".$mx_table_prefix."contact_emails" "DROP TABLE ".$mx_table_prefix."contact" ); $n = 0; $message = "<b>This list is a result of the SQL queries needed to uninstall radio Module Addon</b><br/><br/>"; while($sql[$n]) { $message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br/>' : ''; if( !$result = $db->sql_query($sql[$n]) ) { $message .= '<b><font color=#FF0000>[Error or Already removed]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />'; } else { $message .='<b><font color=#0000fF>[Removed]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />'; } $n++; } $message .= ' <br />If you get some Error, relax, this is normal when updating modules'; echo '<br /> <br />'; echo '<table cellpadding="4" cellspacing="1" border="0" class="forumline">'; echo '<tr><th class="thHead" align="center">Module Installation Information</th></tr>'; echo '<tr><td class="row1" align="center"><span class="gen">' . $message . '</span></td></tr>'; echo '</table> <br />'; ?> --- NEW FILE: mx_contact.pak --- module=+:266=+:mxBB Contact=+:modules/mx_contact/=+:mx_contact=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:266=+:267=+:mxBB Contact=+:mxBB Contact block=+:mx_contact.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 block=+:=+:mxBB Contact=+:Demo block=+:267=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 --- NEW FILE: readme.txt --- /********************************************************************************\ | | subject : mxBB-Portal, CMS & portal, module | name : mx_contact | begin : December, 2007 | copyright : (C) 2002-2007 mxBB | mxBB project site : www.mx-system.com | | author : OryNider (see additional credit below) | author site : http://pubory.uv.ro/ | author email : ory...@rd... | | additional credit : Original "Contact Form" Mod by | marcus.smith < ma...@ph... > (MarcuS) http://www.phobbia.net/mods/ | MOD Author : darkassasin93 < N/A > (Matt Bowen) N/A | | description : Allows visitors to contact the site Admin via a Contact Form. | Files can also be attached and sent if permitted | ScreenShot : http://img146.imageshack.us/img146/2414/mxbbcontactxl1.png |********************************************************************************| | | @package mxBB Portal Module - mx_phpCA | @version $Id: readme.txt,v 1.1 2007/12/12 18:41:38 orynider Exp $ | @copyright (c) 2002-2007 [OryNider] mxBB Development Team | @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 | \********************************************************************************/ /********************************************************************************\ | Installation Instructions \********************************************************************************/ Note: In order for this module to install you must have a working phpBB and mxBB installation. 1) Copy the folder: mx_contact into your: {mxBB install}\modules\ folder on your web server. 2) From your website enter mxBB Admin Control Panel. 3) Under mxBB-Portal click on Management. 4) Now click on Modules Setup. 5) Under Module Administration use the pull down menu and choose: mx_contact 6) Press the Install Module button 7) If you have followed the instructions correctly you should now be able to create Mx Counter blocks for inclusion on your pages. 8) chmod 777 efiles/ /********************************************************************************\ | End Of Document \********************************************************************************/ --- NEW FILE: mx_contact.php --- <?php /*************************************************************************** * contact.php * ----------- * Version: 9.0.0 * Begin: Sunday, Sept 17, 2006 * Copyright: (C) 2006-07, Marcus * E-mail: ma...@ph... * $id: 21:55 25/06/2007 * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ if( !defined('IN_PORTAL')) { //die("Hacking attempt"); } // // Read Block Settings // $title = $mx_block->block_info['block_title']; $b_description = $mx_block->block_info['block_desc']; $is_block = FALSE; include_once($module_root_path . 'includes/contact_constants.' . $phpEx); function this_contact_mxurl($args = '', $force_standalone_mode = false) { global $mx_root_path, $module_root_path, $page_id, $phpEx, $mx_block; if( $force_standalone_mode || !is_object($mx_block) ) { $mxurl = $mx_root_path . 'modules/mx_contact/' . 'contact.' . $phpEx . ($args == '' ? '' : '?' . $args); } else { $mxurl = $mx_root_path . 'index.' . $phpEx; if( is_numeric($page_id) && !empty($page_id) ) { $mxurl .= '?page=' . $page_id . ($args == '' ? '' : '&' . $args); } else { $mxurl .= '?page=' . $page_id . ($args == '' ? '' : '&' . $args); } } return $mxurl; } // // Session management // $userdata = session_pagestart($user_ip, PAGE_CONTACT_FORM); init_userprefs($userdata); $contact_config = array(); $_br = '<br /><br />'; $sql = "SELECT * FROM " . CONTACT_CONFIG_TABLE; if(!($result = $db->sql_query($sql))) { mx_message_die(CRITICAL_ERROR, 'Could not query config information', '', __LINE__, __FILE__, $sql); } while ($row = $db->sql_fetchrow($result)) { $contact_config[$row['config_name']] = $row['config_value']; } // // Is the Form Enabled? // if($contact_config['contact_form_enable'] == 0) { mx_message_die(GENERAL_MESSAGE, $lang['Contact_Disabled'] . $_br . sprintf($lang['Click_return_index'], "<a href=" . mx_append_sid(this_contact_mxurl()) . ">", "</a>")); } // // Assign parameters // $user_name = $userdata['username']; $real_name = (!isset($HTTP_POST_VARS['real_name'])) ? '' : stripslashes(trim(htmlspecialchars($HTTP_POST_VARS['real_name']))); $email = (!isset($HTTP_POST_VARS['email'])) ? '' : stripslashes(trim(htmlspecialchars($HTTP_POST_VARS['email']))); $comments = (!isset($HTTP_POST_VARS['feedback'])) ? '' : stripslashes(trim(htmlspecialchars($HTTP_POST_VARS['feedback']))); $attachment = (!isset($HTTP_POST_FILES['attachment']['name'])) ? '' : basename($HTTP_POST_FILES['attachment']['name']); $code = (!isset($HTTP_POST_VARS['code'])) ? '' : htmlspecialchars(trim($HTTP_POST_VARS['code'])); $script_path = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path'])); $script_name = ($script_path != $module_root_path) ? $module_root_path . '/contact.'.$phpEx : $script_path . 'conatct.'.$phpEx; $server_name = trim($board_config['server_name']); $server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://'; $server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) . '/' : '/'; $server_url = $server_protocol . $server_name . $server_port; $timedate = date("D M d, Y g:ia"); $CF_general_message = 0; // // "Quick Delete" an Attachment // if(isset($HTTP_GET_VARS['delete'])) { if($contact_config['contact_delete'] == 0) { mx_message_die(GENERAL_ERROR, $lang['QDelete_disabled']); } else { include_once($module_root_path . 'includes/functions_contact.'.$phpEx); exit; } } // // Start send script // if(isset($HTTP_POST_VARS['submit'])) { function error_check() { global $HTTP_POST_FILES, $lang, $phpEx, $module_root_path, $module_root_path, $mx_root_path; global $CF_general_message, $CF_code_empty, $CF_code_wrong, $CF_ini_max; global $CF_illegal_ext, $CF_unknown_ext, $CF_image_error, $CF_image_zip; global $CF_rname_empty, $CF_email_empty, $CF_email_check, $CF_comments_empty, $CF_comments_limit; global $CF_attach_POST_error, $CF_attach_file_exists, $CF_attach_file_dud, $CF_attach_file_big; // // Lets check for Errors // if($CF_general_message == 1) { @unlink($HTTP_POST_FILES['attachment']['tmp_name']); mx_message_die(GENERAL_ERROR, $lang['Contact_error'] . $CF_code_empty . $CF_code_wrong . $CF_attach_POST_error . $CF_illegal_ext . $CF_unknown_ext . $CF_rname_empty . $CF_email_empty . $CF_email_check . $CF_comments_empty . $CF_comments_limit . $CF_attach_file_exists . $CF_attach_file_dud . $CF_attach_file_big . $CF_image_error . $CF_image_zip . sprintf($lang['Click_return_form'], "<a href=" . this_contact_mxurl() . " onclick=\"history.back(-1); return false;\">", "</a>")); } } // // Flood Control // if($contact_config['contact_flood_limit'] != 0) { $sql = "SELECT send_time, ip_address FROM " . CONTACT_TABLE . " WHERE ip_address = '$user_ip' ORDER BY send_time DESC"; $result = $db->sql_query($sql); if(!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Failed to retrieve flood information', '', __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); $time_left = round(intval($row['send_time'] - time()) / intval(60) / intval(60)); if($row['ip_address'] == $user_ip && $row['send_time'] - time() > 0) { mx_message_die(GENERAL_ERROR, sprintf($lang['Flood_limit'], $time_left)); } } // // Captcha Code // if(extension_loaded('gd')) { if($contact_config['contact_captcha'] == 1) { @session_start(); if(@ini_get('register_globals') == '0' || strtolower(@ini_get('register_globals')) == 'off') { if(isset($HTTP_SESSION_VARS['randi'])) { $randi = substr($HTTP_SESSION_VARS['randi'],0,6); } } else { // Required for max PHP5 compatability if(isset($_SESSION['randi'])) { $randi = substr($_SESSION['randi'],0,6); } } if(empty($code)) { $CF_code_empty = $_br . $lang['Code_Empty']; $CF_general_message = 1; } elseif($code != $randi) { $CF_code_wrong = $_br . $lang['Code_Wrong']; $CF_general_message = 1; } // // Clear session data to prevent image reuse // @session_destroy(); unset($randi); } } // // Real Name Validator // if($contact_config['contact_require_rname'] == 1) { if(empty($real_name)) { $CF_rname_empty = $_br . $lang['Rname-Empty']; $CF_general_message = 1; } } // // E-mail Validator // if($contact_config['contact_require_email'] == 1) { if(!empty($email)) { if(!preg_match('/^[a-z0-9&\'\.\-_\+]+@[a-z0-9\-äöü]+\.([a-z0-9\-äöü]+\.)*?[a-z]+$/is', $email)) { $CF_email_check = $_br . $lang['Email-Check']; $CF_general_message = 1; } } else { $CF_email_empty = $_br . $lang['Email-Empty']; $CF_general_message = 1; } } // // Comments Validator // if($contact_config['contact_require_comments'] == 1) { if(empty($comments)) { $CF_comments_empty = $_br . $lang['Comments-Empty']; $CF_general_message = 1; } } if($contact_config['contact_char_limit'] > 0) { if(strlen(trim($comments)) > $contact_config['contact_char_limit']) { $CF_comments_limit = $_br . $lang['Comments_exceeded']; $CF_general_message = 1; } } // Stage 1 error_check(); $CF_attach_success = ''; if($contact_config['contact_permit_attachments'] == 1) { require($module_root_path . 'includes/contact_attach.'.$phpEx); } // Stage 5 error_check(); // // Indicate any fields that weren't completed // if(empty($real_name) && $contact_config['contact_require_rname'] == 0) { $real_name = $lang['Empty']; } if(empty($email) && $contact_config['contact_require_email'] == 0) { $email = $lang['Empty']; } if(empty($comments) && $contact_config['contact_require_comments'] == 0) { $comments = $lang['Empty']; } if($contact_config['contact_permit_attachments'] == 0) { $attach = '--'; $delete_link = ''; } // // Change "Anonymous" to "Guest" // $user_name = ($userdata['user_id'] == ANONYMOUS) ? $lang['Guest'] : $userdata['username']; // // Set the Subject // NB: not used if email/index.tpl has 'Subject:' hard-coded // $subject = trim(stripslashes($lang['Feedback'])); $sql = "SELECT user_lang FROM " . USERS_TABLE . " WHERE user_id = 2"; if(!$result = $db->sql_query($sql)) { mx_message_die(CRITICAL_ERROR, 'Could not query recipient information', '', __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); // // Send the e-mail // include($module_root_path . 'includes/contact_emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); $emailer->from($board_config['board_email']); $emailer->replyto($board_config['board_email']); $email_headers = 'X-AntiAbuse: Board Servername - ' . $board_config['server_name'] . "\n"; $email_headers .= 'X-AntiAbuse: User ID - ' . $userdata['user_id'] . "\n"; $email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n"; $email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\n"; empty($contact_config['contact_admin_email']) ? $emailer->email_address($board_config['board_email']) : $emailer->email_address($contact_config['contact_admin_email']); $emailer->extra_headers($email_headers); $emailer->use_template('contact', $row['user_lang']); $emailer->set_subject($subject); $emailer->assign_vars(array( 'REAL_NAME' => $real_name, 'USERNAME' => $user_name, 'EMAIL' => $email, 'COMMENTS' => $comments, 'ATTACHMENT' => $attach, 'DELETE' => ($contact_config['contact_delete'] == 1) ? $delete_link : '', 'USER_IP' => decode_ip($user_ip), 'TIMEDATE' => $timedate, 'SITENAME' => $board_config['sitename']) ); $emailer->send(); $emailer->reset(); // // Send "Thank You" E-mail? // if($contact_config['contact_thankyou'] != 0) { include($module_root_path . 'includes/contact_extend.'.$phpEx); } // // SQL Time // $wait_time = time() + intval($contact_config['contact_flood_limit'] * 60) * intval(60); $sql = "INSERT INTO " . CONTACT_TABLE . " VALUES ('$user_ip', '$wait_time')"; $result = $db->sql_query($sql); if(!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Failed to insert user information', '', __LINE__, __FILE__, $sql); } // // No Errors // if($CF_general_message == 0) { if($contact_config['contact_storage'] == 1) { $send_time = time(); $getfile = (!empty($attachment)) ? $contact_config['contact_file_root'] . "/" . decode_ip($user_ip) . "/" . $attachment : ''; $sql = "INSERT INTO " . CONTACT_MSGS_TABLE . " (sendtime, username, realname, email, ip, message, upfile) VALUES ($send_time, '$user_name', '" . str_replace("\'", "''", $real_name) . "', '" . str_replace("\'", "''", $email) . "', '$user_ip', '" . addslashes(str_replace("\'", "''", $comments)) . "', '" . str_replace("\'", "''", $getfile) . "')"; if(!$db->sql_query($sql, END_TRANSACTION)) { mx_message_die(GENERAL_ERROR, 'Could not update Message Log', '', __LINE__, __FILE__, $sql); } } mx_message_die(GENERAL_MESSAGE, $lang['Contact_success'] . $CF_attach_success . $_br . sprintf($lang['Click_return_index'], "<a href=" . mx_append_sid(this_contact_mxurl()) . ">", "</a>")); } } // // End send script // // // Change "Anonymous" to "Guest" // $user_name = ($userdata['user_id'] == ANONYMOUS) ? $lang['Guest'] : $userdata['username']; // // Check if "Real Name" is required // $rname = ($contact_config['contact_require_rname'] == 1) ? $lang['Rname_require'] : $lang['Real_name']; // // Check if "E-mail" is required // $email = ($contact_config['contact_require_email'] == 1) ? $lang['E-mail_require'] : $lang['E-mail']; // // Check if "Comments" are required // $comments = ($contact_config['contact_require_comments'] == 1) ? $lang['Comments_require'] : $lang['Comments']; // // Pruning // if($contact_config['contact_prune'] == 1) { $send_time = time(); $sql = "DELETE FROM " . CONTACT_TABLE . " WHERE send_time <= '$send_time'"; if(!$result = $db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Failed to initiate pruning', '', __LINE__, __FILE__, $sql); } } // // Generate the Page // //include($mx_root_path . 'includes/page_header.'.$phpEx); $template->set_filenames(array( 'contact_body' => 'contact_body.tpl') ); $template->assign_vars(array( 'L_CONTACT_FORM' => $lang['Contact_form'], 'L_INTRODUCTION' => $lang['Contact_intro'], 'L_REAL_NAME' => $rname, 'L_REAL_NAME_EXPLAIN' => $lang['Real_name_explain'], 'L_EMAIL' => $email, 'L_EXPLAIN_EMAIL' => $lang['Explain_email'], 'L_COMMENTS' => $comments, 'L_COMMENTS_EXPLAIN' => $lang['Comments_explain'], 'L_COMMENTS_LIMIT' => ($contact_config['contact_char_limit'] > 0) ? sprintf($lang['Comments_limit'], $contact_config['contact_char_limit']) : '', 'L_ATTACHMENT' => $lang['Attachment'], 'L_ATTACHMENT_EXPLAIN' => sprintf($lang['Attachment_explain'], $contact_config['contact_max_file_size']), 'L_FLOOD_EXPLAIN' => ($contact_config['contact_flood_limit'] > 0) ? sprintf($lang['Flood_explain'], $contact_config['contact_flood_limit'], ($contact_config['contact_flood_limit'] <> 1) ? $lang['hours'] : $lang['hour']) : '', 'L_FIELDS_REQUIRED' => $lang['Fields_required'], 'L_NOTIFY_IP' => $lang['Notify_IP'], 'L_CHARS' => $lang['Chars'], 'L_CAPTCHA' => $lang['Captcha_code'], 'L_CAPTCHA_EXPLAIN' => $lang['Captcha_code_explain'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], 'USERNAME' => $user_name, 'CAPTCHA' => $module_root_path.'contact_captcha.'.$phpEx, 'S_FORM_ENCTYPE' => 'multipart/form-data', 'S_SUBMIT_ACTION' => mx_append_sid(this_contact_mxurl()) )); // // Permit Attachments // $attach_auth = 0; if(!$userdata['session_logged_in']) { $attach_auth = ($contact_config['contact_auth_guest'] == 1) ? 1 : 0; } else { switch ($userdata['user_level']) { case USER: $attach_auth = ($contact_config['contact_auth_user'] == 1) ? 1 : 0; break; case MOD: $attach_auth = ($contact_config['contact_auth_mod'] == 1) ? 1 : 0; break; case ADMIN: $attach_auth = ($contact_config['contact_auth_admin'] == 1) ? 1 : 0; break; default: $attach_auth = ($contact_config['contact_auth_guest'] == 1) ? 1 : 0; } } if($contact_config['contact_permit_attachments'] == 1 && $attach_auth == 1) { $template->assign_block_vars('permit_attachments', array()); } if($contact_config['contact_captcha'] == 1 && extension_loaded('gd')) { $template->assign_block_vars('captcha', array()); } $template->pparse('contact_body'); //include($mx_root_path . 'includes/page_tail.'.$phpEx); ?> --- NEW FILE: db_install.php --- <?php /** * * @package mxBB Portal Module - mx_contact * @version $Id: db_install.php,v 1.1 2007/12/12 18:41:35 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ //ini_set( 'display_errors', '1' ); define( 'IN_PORTAL', true ); if ( !defined( 'IN_ADMIN' ) ) { $mx_root_path = './../../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include( $mx_root_path . 'common.' . $phpEx ); // Start session management $mx_user->init($user_ip, PAGE_INDEX); // End session management if ( !$userdata['session_logged_in'] ) { die( "Hacking attempt(1)" ); } if ( $userdata['user_level'] != ADMIN ) { die( "Hacking attempt(2)" ); } } $mx_module_version = '1.0.0'; $mx_module_copy = 'mxBB <i> - Contact</i> module by OryNider'; // If fresh install if ( !$result = $db->sql_query( "SELECT config_name from " . $mx_table_prefix . "radio_config" ) ) { $message = "<b>This is a fresh install!</b><br/><br/>"; // // Build Array of SQL Statements. // $sql = array(); $sql[] = 'DROP TABLE IF EXISTS ' . $mx_table_prefix . 'contact_config'; $sql[] = 'DROP TABLE IF EXISTS ' . $mx_table_prefix . 'contact_emails'; $sql[] = 'DROP TABLE IF EXISTS ' . $mx_table_prefix . 'contact'; $sql[] = 'CREATE TABLE ' . $mx_table_prefix . 'contact ( ip_address CHAR(8) NOT NULL DEFAULT \'\', send_time INTEGER(11) NOT NULL DEFAULT \'0\', KEY ip_address (ip_address) )'; $sql[] = 'CREATE TABLE ' . $mx_table_prefix . 'contact_config ( config_name VARCHAR(255) NOT NULL DEFAULT \'\', config_value VARCHAR(255) NOT NULL DEFAULT \'\', PRIMARY KEY (config_name) )'; $sql[] = 'CREATE TABLE ' . $mx_table_prefix . 'contact_emails ( email VARCHAR(50) NOT NULL DEFAULT\'\', sent INT(1) NOT NULL DEFAULT \'0\', lasttime INTEGER(11) NOT NULL DEFAULT \'0\', PRIMARY KEY (email) )'; $sql[] = 'CREATE TABLE ' . $mx_table_prefix . 'contact_msgs ( msg_id INT(3) UNSIGNED NOT NULL AUTO_INCREMENT, sendtime INT(11) NOT NULL DEFAULT \'0\', username VARCHAR(25) NOT NULL DEFAULT \'\', realname VARCHAR(30) NOT NULL DEFAULT \'\', email VARCHAR(50) NOT NULL DEFAULT \'\', ip CHAR(8) NOT NULL DEFAULT \'\', message TEXT NOT NULL, upfile VARCHAR(255) NOT NULL DEFAULT \'\', PRIMARY KEY (msg_id) )'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_version\',\'9.0.0\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_admin_email\',\'\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_form_enable\',\'1\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_require_rname\',\'0\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_require_email\',\'1\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_require_comments\',\'1\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_permit_attachments\',\'0\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_max_file_size\',\'128\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_file_root\',\'efiles\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_flood_limit\',\'8\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_char_limit\',\'255\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_prune\',\'1\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_hash\',\'1\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_auth_guest\',\'0\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_auth_user\',\'1\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_auth_mod\',\'1\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_auth_admin\',\'1\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_captcha\',\'1\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_captcha_type\',\'0\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_delete\',\'1\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_storage\',\'1\')'; $sql[] = 'INSERT INTO ' . $mx_table_prefix . 'contact_config VALUES(\'contact_thankyou\',\'1\')'; $sql[] = "UPDATE " . $mx_table_prefix . "module" . " SET module_version = '" . $mx_module_version . "', module_copy = '" . $mx_module_copy . "' WHERE module_id = '" . $mx_module_id . "'"; $message .= mx_do_install_upgrade( $sql ); } else { // If already installed $message = "<b>Module is already installed... consider upgrading ;)</b><br/><br/>"; } echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Module Installation/Upgrading/Uninstallation Information - Module specific DB tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $message . "</span></td></tr>"; echo "</table><br />"; ?> --- NEW FILE: index.htm --- <html> <head> <title>mxBB Counter Module</title> </head> <body> <br /><br /><br /><br /><br /><br /><br /> <center><h1><a href="http://mxbb.net/">mxBB-Portal</a></h1></center> </body> |
|
From: OryNider <ory...@us...> - 2007-12-12 18:41:46
|
Update of /cvsroot/mxbb/mx_contact/fonts In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3418/fonts Added Files: ArialRoundedBT.ttf BauerBodoniItalicBT.ttf OregonDry.ttf VillageSquare.ttf WarmMilk.ttf index.html Log Message: First Version! --- NEW FILE: index.html --- --- NEW FILE: WarmMilk.ttf --- (This appears to be a binary file; contents omitted.) --- NEW FILE: BauerBodoniItalicBT.ttf --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ArialRoundedBT.ttf --- (This appears to be a binary file; contents omitted.) --- NEW FILE: OregonDry.ttf --- (This appears to be a binary file; contents omitted.) --- NEW FILE: VillageSquare.ttf --- (This appears to be a binary file; contents omitted.) |
|
From: OryNider <ory...@us...> - 2007-12-12 18:41:43
|
Update of /cvsroot/mxbb/mx_contact/contrib In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3418/contrib Added Files: contactform.png phobbia.net.url Log Message: First Version! --- NEW FILE: phobbia.net.url --- [InternetShortcut] URL=http://www.phobbia.net/mods IDList= IconFile=http://www.phobbia.net/favicon.ico IconIndex=1 [{000214A0-0000-0000-C000-000000000046}] Prop3=19,2 --- NEW FILE: contactform.png --- (This appears to be a binary file; contents omitted.) |
|
From: OryNider <ory...@us...> - 2007-12-12 18:41:42
|
Update of /cvsroot/mxbb/mx_contact/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3418/admin Added Files: admin_contact.php admin_contact_log.php Log Message: First Version! --- NEW FILE: admin_contact_log.php --- <?php /*************************************************************************** * admin_contact_log.php * --------------------- * Version: 9.0.0 * Begin: Sunday, Sept 17, 2006 * Copyright: (C) 2006-07, Marcus * E-mail: ma...@ph... * $id: 17:46 03/07/2007 * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ define( 'IN_PORTAL', 1 ); if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['Contact_Form']['Contact_Messages'] = 'modules/mx_contact/admin/' . $file; return; } $mx_root_path = './../../../'; $module_root_path = "./../"; $phpEx = substr(strrchr(__FILE__, '.'), 1); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include_once( $module_root_path . 'includes/contact_constants.' . $phpEx ); // ********************************************************************** // Read language definition // ********************************************************************** if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) { include_once($module_root_path . 'language/lang_english/lang_main.'.$phpEx); $link_language = 'lang_english'; } else { include_once($module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx); $link_language = 'lang_' . $board_config['default_lang']; } $start = (isset($HTTP_GET_VARS['start']) || isset($HTTP_POST_VARS['start'])) ? intval($HTTP_GET_VARS['start']) : 0; $pagination = ''; $total_pag_items = 1; $confirm = (isset($HTTP_POST_VARS['confirm'])) ? true : false; $delete = (isset($HTTP_POST_VARS['delete'])) ? true : false; if(isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode'])) { $mode = (isset($HTTP_POST_VARS['mode'])) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; $mode = htmlspecialchars($mode); } else { if($delete) { $mode = 'delete'; } else { $mode = ''; } } if(isset($HTTP_POST_VARS['cancel'])) { $mode = ''; } if($mode == 'delete') { if($cancel) { $redirect = 'admin/admin_contact_log.'.$phpEx; redirect(append_sid($redirect, true)); } if(!$confirm) { $msg_ids = $HTTP_POST_VARS['msgid']; if(empty($HTTP_POST_VARS['msgid'])) { $redirect = 'admin/admin_contact_log.'.$phpEx; redirect(append_sid($redirect, true)); } $hidden_fields = ''; for($i = 0, $msgs = count($msg_ids); $i < $msgs; $i++) { $hidden_fields .= '<input type="hidden" name="msgid[]" value="' . intval($msg_ids[$i]) . '" />'; } $template->set_filenames(array( 'body' => 'admin/confirm_body.tpl') ); $template->assign_vars(array( 'MESSAGE_TITLE' => $lang['Confirm'], 'MESSAGE_TEXT' => $lang['Confirm_delete_msg'], 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'S_CONFIRM_ACTION' => append_sid('admin_contact_log.'.$phpEx.'?mode=delete'), 'S_HIDDEN_FIELDS' => $hidden_fields) ); $template->pparse('body'); } else { $msg_ids = (isset($HTTP_POST_VARS['msgid'])) ? $HTTP_POST_VARS['msgid'] : array($msgid); $del_msg_sql = ''; for($i = 0, $msgs = count($msg_ids); $i < $msgs; $i++) { $del_msg_sql .= (($del_msg_sql != '') ? ', ' : '') . intval($msg_ids[$i]); } $sql = "DELETE FROM " . CONTACT_MSGS_TABLE . " WHERE msg_id IN ($del_msg_sql)"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete message(s)', '', __LINE__, __FILE__, $sql); } if($del_msg_sql == '') { $redirect = 'admin/admin_contact_log.'.$phpEx; redirect(append_sid($redirect, true)); } $message = $lang['Msg_del_success'] . "<br /><br />" . sprintf($lang['Click_return_msglog'], "<a href=\"" . append_sid("admin_contact_log.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } } if($mode == 'remove') { $contact_config = array(); $sql = "SELECT * FROM " . CONTACT_CONFIG_TABLE; if(!$result = $db->sql_query($sql)) { message_die(CRITICAL_ERROR, 'Could not query config information', '', __LINE__, __FILE__, $sql); } while ($row = $db->sql_fetchrow($result)) { $contact_config[$row['config_name']] = $row['config_value']; } $file_id = (!empty($HTTP_POST_VARS['file'])) ? $HTTP_POST_VARS['file'] : $HTTP_GET_VARS['file']; $msg_id = (!empty($HTTP_POST_VARS['id'])) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id']; $msg_id = intval($msg_id); $confirm = isset($HTTP_POST_VARS['confirm']); if($confirm) { $filename = $HTTP_POST_VARS['file']; if(file_exists($filename)) { @unlink($filename); clearstatcache(); $sql = "UPDATE " . CONTACT_MSGS_TABLE . " SET upfile = '' WHERE msg_id = " . $msg_id; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not update Contact table', '', __LINE__, __FILE__, $sql); } $message = $lang['File_del_success'] . "<br /><br />" . sprintf($lang['Click_return_msglog'], "<a href=\"" . append_sid("admin_contact_log.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } else { clearstatcache(); $sql = "UPDATE " . CONTACT_MSGS_TABLE . " SET upfile = '' WHERE msg_id = " . $msg_id; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not update Contact table', '', __LINE__, __FILE__, $sql); } $message = $lang['File_Not_Here'] . "<br /><br />" . sprintf($lang['Click_return_msglog'], "<a href=\"" . append_sid("admin_contact_log.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_ERROR, $message); } } else { $template->set_filenames(array( 'body' => 'admin/confirm_body.tpl') ); $hidden_fields = '<input type="hidden" name="mode" value="remove" /><input type="hidden" name="id" value="' . $msg_id . '" /><input type="hidden" name="file" value="' . $file_id . '" />'; $template->assign_vars(array( 'MESSAGE_TITLE' => $lang['Confirm'], 'MESSAGE_TEXT'=> $lang['Confirm_delete_file'], 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'S_CONFIRM_ACTION' => append_sid("admin_contact_log.$phpEx"), 'S_HIDDEN_FIELDS'=> $hidden_fields) ); $template->pparse('body'); } } if($mode == 'full') { $msg_id = (!empty($HTTP_POST_VARS['id'])) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id']; $msg_id = intval($msg_id); $template->set_filenames(array( 'body' => 'admin/contact_fullmsg.tpl') ); $sql = "SELECT * FROM " . CONTACT_MSGS_TABLE . " WHERE msg_id = " . $msg_id; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not obtain message from database', '', __LINE__, __FILE__, $sql); } $message = $db->sql_fetchrow($result); $template->assign_vars(array( 'MESSAGE' => $message['message'] . "<hr />") ); $template->pparse('body'); } if($mode == '') { $sql = "SELECT * FROM " . CONTACT_MSGS_TABLE . " ORDER BY sendtime DESC LIMIT " . $start . ", " . $board_config['topics_per_page']; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Couldnt obtain messages from database', '', __LINE__, __FILE__, $sql); } $messages = $db->sql_fetchrowset($result); $template->set_filenames(array( 'body' => 'admin/contact_msgs.tpl') ); $template->assign_vars(array( 'L_MSGS_TITLE' => $lang['Contact_msgs_title'], 'L_MSGS_TEXT' => $lang['Contact_msgs_text'], 'L_DATE' => $lang['Contact_date'], 'L_USER' => $lang['Username'], 'L_NAME' => $lang['Real_name'], 'L_EMAIL' => $lang['E-mail'], 'L_MESSAGE' => $lang['Comments'], 'L_IP' => $lang['Contact_ip'], 'L_FILE' => $lang['Attachment'], 'L_MSG_DELETE' => $lang['Msg_delete'], 'COPYRIGHT' => $lang['Copyright'], 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_MSG_ACTION' => append_sid("admin_contact_log.$phpEx")) ); for($i=0, $msg_row = count($messages); $i < $msg_row; $i++) { $row_color = (!($i % 2)) ? $theme['td_color1'] : $theme['td_color2']; $row_class = (!($i % 2)) ? $theme['td_class1'] : $theme['td_class2']; // // Prevent Stretching of the Message Log screen // Based on "50 characters in message" mod by "Underhill" // if(preg_match("/([^[:blank:]]{30})/", $messages[$i]['message'])) { $message_array = preg_split("/\n/", $messages[$i]['message']); for($j=0, $msgs = count($message_array); $j < $msgs; $j++) { $message_array[$j] = preg_replace("/([^[:blank:]]{30})/", "\\1 ", $message_array[$j]); $messages[$i]['message'] = implode("\n", $message_array); } } $preview = (strlen($messages[$i]['message']) > 100) ? true : false; if($preview) { $id = $messages[$i]['msg_id']; $full_msg = "... [<a href=" . append_sid("admin_contact_log.$phpEx?mode=full&id=$id") . " onclick=\"window.open('" . append_sid("admin_contact_log.$phpEx?mode=full&id=$id") . "', 'Message', 'left=100,top=100,height=300,width=300,resizable=yes,scrollbars=yes'); return false;\">" . $lang['more'] . "</a>]"; $preview = substr($messages[$i]['message'], 0, 100); $from = strlen($lang['more'])+6; $preview = substr_replace($preview, $full_msg, (100-$from), 100); } $template->assign_block_vars('messages', array( 'ROW_COLOR' => "#" . $row_color, 'ROW_CLASS' => $row_class, 'DATE' => date("d-m-y", $messages[$i]['sendtime']), 'TIME' => date("H:i", $messages[$i]['sendtime']), 'MSG_ID' => $messages[$i]['msg_id'], 'USER' => $messages[$i]['username'], 'NAME' => $messages[$i]['realname'], 'EMAIL' => $messages[$i]['email'], 'MESSAGE' => ($preview) ? $preview : $messages[$i]['message'], 'IP' => decode_ip($messages[$i]['ip']), 'FILE' => $messages[$i]['upfile'], 'L_DELETE' => $lang['Delete'], 'S_THIS_ID' => 'msgid', 'MSG_ID' => $messages[$i]['msg_id'], 'U_GET_FILE' => (empty($messages[$i]['upfile'])) ? '' : sprintf($lang['Contact_get'], "<a href=\"" . $phpbb_root_path . $messages[$i]['upfile'] . "\">", "</a>"), 'U_REMOVE_FILE' => (empty($messages[$i]['upfile'])) ? '' : sprintf($lang['Contact_remove'], "<a href=\"" . append_sid("admin_contact_log.$phpEx?mode=remove&id=" . $messages[$i]['msg_id'] . "&file=" . $phpbb_root_path . $messages[$i]['upfile']) . "\">", "</a>"), 'U_MSG_DELETE' => append_sid("admin_contact_log.$phpEx?mode=delete")) ); } $sql = "SELECT count(*) AS total FROM " . CONTACT_MSGS_TABLE; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error getting total', '', __LINE__, __FILE__, $sql); } if($total = $db->sql_fetchrow($result)) { if($total['total'] > 0) { $total_pag_items = $total['total']; $pagination = generate_pagination("admin_contact_log.$phpEx?mode=$mode", $total_pag_items, $board_config['topics_per_page'], $start); } } $template->assign_vars(array( 'PAGINATION' => $pagination, 'PAGE_NUMBER' => sprintf($lang['Page_of'], (floor($start / $board_config['topics_per_page']) +1), ceil($total_pag_items / $board_config['topics_per_page']))) ); $template->pparse('body'); } include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); ?> --- NEW FILE: admin_contact.php --- <?php /*************************************************************************** * admin_contact.php * ------------------- * Version: 9.0.0 * Begin: Sunday, Sept 17, 2006 * Copyright: (C) 2006-07, Marcus * E-mail: ma...@ph... * $id: 21:20 01/06/2007 * ***************************************************************************/ define( 'IN_PORTAL', 1 ); if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['Contact_Form']['Configuration'] = 'modules/mx_contact/admin/' . $file; return; } $mx_root_path = './../../../'; $module_root_path = "./../"; $phpEx = substr(strrchr(__FILE__, '.'), 1); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include_once( $module_root_path . 'includes/contact_constants.' . $phpEx ); // ********************************************************************** // Read language definition // ********************************************************************** if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) { include_once($module_root_path . 'language/lang_english/lang_main.'.$phpEx); $link_language = 'lang_english'; } else { include_once($module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx); $link_language = 'lang_' . $board_config['default_lang']; } // // Pull all config data // $sql = "SELECT * FROM " . CONTACT_CONFIG_TABLE; if(!$result = $db->sql_query($sql)) { message_die(CRITICAL_ERROR, 'Could not query contact config information', '', __LINE__, __FILE__, $sql); } else { while($row = $db->sql_fetchrow($result)) { $contact_config[$row['config_name']] = $row['config_value']; $config_name = $row['config_name']; $config_value = $row['config_value']; $default_config[$config_name] = isset($HTTP_POST_VARS['submit']) ? str_replace("'", "\'", $config_value) : $config_value; $new[$config_name] = (isset($HTTP_POST_VARS[$config_name])) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; if(isset($HTTP_POST_VARS['submit'])) { $sql = "UPDATE " . CONTACT_CONFIG_TABLE . " SET config_value = '" . str_replace("\'", "''", $new[$config_name]) . "' WHERE config_name = '$config_name'"; if(!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Failed to update general configuration for $config_name', '', __LINE__, __FILE__, $sql); } } } if(isset($HTTP_POST_VARS['submit'])) { $message = $lang['Contact_updated'] . "<br /><br />" . sprintf($lang['Click_return_contact'], "<a href=\"" . append_sid("admin_contact.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } } // Contact Captcha define('CAPTCHA_TYPE_IMAGE', 0); define('CAPTCHA_TYPE_COLOURED', 1); define('CAPTCHA_TYPE_RANDOM', 2); // Thank You Options define('DISABLE_THANKYOU', 0); define('REGONLY_THANKYOU', 1); define('ALL_THANKYOU', 2); $form_enable_yes = ($new['contact_form_enable']) ? "checked=\"checked\"" : ""; $form_enable_no = (!$new['contact_form_enable']) ? "checked=\"checked\"" : ""; $hash_yes = ($new['contact_hash']) ? "checked=\"checked\"" : ""; $hash_no = (!$new['contact_hash']) ? "checked=\"checked\"" : ""; $prune_yes = ($new['contact_prune']) ? "checked=\"checked\"" : ""; $prune_no = (!$new['contact_prune']) ? "checked=\"checked\"" : ""; $require_rname_yes = ($new['contact_require_rname']) ? "checked=\"checked\"" : ""; $require_rname_no = (!$new['contact_require_rname']) ? "checked=\"checked\"" : ""; $require_email_yes = ($new['contact_require_email']) ? "checked=\"checked\"" : ""; $require_email_no = (!$new['contact_require_email']) ? "checked=\"checked\"" : ""; $require_comments_yes = ($new['contact_require_comments']) ? "checked=\"checked\"" : ""; $require_comments_no = (!$new['contact_require_comments']) ? "checked=\"checked\"" : ""; $permit_attachments_yes = ($new['contact_permit_attachments']) ? "checked=\"checked\"" : ""; $permit_attachments_no = (!$new['contact_permit_attachments']) ? "checked=\"checked\"" : ""; $contact_auth_guest_yes = ($new['contact_auth_guest']) ? "checked=\"checked\"" : ""; $contact_auth_guest_no = (!$new['contact_auth_guest']) ? "checked=\"checked\"" : ""; $contact_auth_user_yes = ($new['contact_auth_user']) ? "checked=\"checked\"" : ""; $contact_auth_user_no = (!$new['contact_auth_user']) ? "checked=\"checked\"" : ""; $contact_auth_mod_yes = ($new['contact_auth_mod']) ? "checked=\"checked\"" : ""; $contact_auth_mod_no = (!$new['contact_auth_mod']) ? "checked=\"checked\"" : ""; $contact_auth_admin_yes = ($new['contact_auth_admin']) ? "checked=\"checked\"" : ""; $contact_auth_admin_no = (!$new['contact_auth_admin']) ? "checked=\"checked\"" : ""; $contact_captcha_yes = ( $new['contact_captcha'] ) ? "checked=\"checked\"" : ""; $contact_captcha_no = ( !$new['contact_captcha'] ) ? "checked=\"checked\"" : ""; $captcha_type_image = ( $new['contact_captcha_type'] == CAPTCHA_TYPE_IMAGE ) ? "checked=\"checked\"" : ""; $captcha_type_colour = ( $new['contact_captcha_type'] == CAPTCHA_TYPE_COLOURED ) ? "checked=\"checked\"" : ""; $captcha_type_random = ( $new['contact_captcha_type'] == CAPTCHA_TYPE_RANDOM ) ? "checked=\"checked\"" : ""; $contact_thank_none = ( $new['contact_thankyou'] == DISABLE_THANKYOU ) ? "checked=\"checked\"" : ""; $contact_thank_reg = ( $new['contact_thankyou'] == REGONLY_THANKYOU ) ? "checked=\"checked\"" : ""; $contact_thank_all = ( $new['contact_thankyou'] == ALL_THANKYOU ) ? "checked=\"checked\"" : ""; $contact_delete_yes = ( $new['contact_delete'] ) ? "checked=\"checked\"" : ""; $contact_delete_no = ( !$new['contact_delete'] ) ? "checked=\"checked\"" : ""; $contact_storage_yes = ( $new['contact_storage'] ) ? "checked=\"checked\"" : ""; $contact_storage_no = ( !$new['contact_storage'] ) ? "checked=\"checked\"" : ""; $template->set_filenames(array( 'body' => 'admin/contact_config_body.tpl') ); $template->assign_vars(array( 'L_VERSION' => sprintf($contact_config['contact_version']), 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'L_DISABLE' => $lang['Disable'], 'L_ENABLE' => $lang['Enable'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], 'L_ADMIN_EMAIL' => $lang['Admin_email'], 'L_ADMIN_EMAIL_EXPLAIN' => $lang['Admin_email_explain'], 'L_CONTACT_TITLE' => $lang['Contact_title'], 'L_CONTACT_EXPLAIN' => $lang['Contact_explain'], 'L_GENERAL_SETTINGS' => $lang['General_settings'], 'L_REQ_SETTINGS' => $lang['Req_settings'], 'L_REQUIRE_RNAME' => $lang['Require_rname'], 'L_REQUIRE_EMAIL' => $lang['Require_email'], 'L_REQUIRE_COMMENTS' => $lang['Require_comments'], 'L_PERMIT_ATTACHMENTS' => $lang['Permit_attachments'], 'L_ATTACHMENTS' => $lang['Attachment_settings'], 'L_MAX_FILE_SIZE' => $lang['Max_file_size'], 'L_MAX_FILE_SIZE_EXPLAIN' => sprintf($lang['Max_file_size_explain'], (@phpversion() >= '4.0.0') ? ini_get('upload_max_filesize') : get_cfg_var('upload_max_filesize')), 'L_FILE_ROOT' => $lang['File_root'], 'L_FILE_ROOT_EXPLAIN' => $lang['File_root_explain'], 'L_PRUNE' => $lang['Prune'], 'L_PRUNE_EXPLAIN' => $lang['Prune_explain'], 'L_FLOOD_LIMIT' => $lang['Flood_limit_admin'], 'L_FLOOD_LIMIT_EXPLAIN' => $lang['Flood_limit_admin_explain'], 'L_CHAR_LIMIT' => $lang['Char_limit_admin'], 'L_CHAR_LIMIT_EXPLAIN' => $lang['Char_limit_admin_explain'], 'L_HASH' => $lang['Hash'], 'L_HASH_EXPLAIN' => $lang['Hash_explain'], 'L_MD5' => $lang['md5'], 'L_NO_HASH' => $lang['no_hash'], 'L_DELETE' => $lang['QDelete'], 'L_DELETE_EXPLAIN' => $lang['QDelete_explain'], 'L_STORAGE' => $lang['Msg_Log'], 'L_STORAGE_EXPLAIN' => $lang['Msg_Log_explain'], 'L_KB' => $lang['kb'], 'L_HOURS' => $lang['hours'], 'L_AUTH_PERMISSION' => $lang['auth_permission'], 'L_AUTH_PERMISSION_EXPLAIN' => $lang['auth_perm_explain'], 'L_ANON' => $lang['auth_guests'], 'L_USER' => $lang['auth_members'], 'L_MOD' => $lang['auth_mods'], 'L_ADMIN' => $lang['auth_admins'], 'L_FORM_ENABLE' => $lang['Form_Enable'], 'L_CAPTCHA_TITLE' => $lang['Captcha'], 'L_ACTIVATE' => $lang['Activate'], 'L_ACTIVATE_EXPLAIN' => $lang['Captcha_explain'], 'L_CAPTCHA_TYPE' => $lang['Type'], 'L_CAPTCHA_TYPE_EXPLAIN' => $lang['Type_explain'], 'L_IMAGEBG' => $lang['Image_bg'], 'L_COLOURED' => $lang['Coloured'], 'L_RANDOM' => $lang['Random'], 'L_THANKYOU_SETTINGS' => $lang['Thankyou_settings'], 'L_THANKYOU_OPTION' => $lang['Thankyou_option'], 'L_THANKYOU_EXPLAIN' => $lang['Thankyou_explain'], 'L_THANK_NONE' => $lang['Thank_none'], 'L_THANK_MEMBERS' => $lang['Thank_members'], 'L_THANK_ALL' => $lang['Thank_all'], 'THANK_NONE' => DISABLE_THANKYOU, 'THANK_NONE_CHECKED' => $contact_thank_none, 'THANK_MEMBERS' => REGONLY_THANKYOU, 'THANK_MEMBERS_CHECKED' => $contact_thank_reg, 'THANK_ALL' => ALL_THANKYOU, 'THANK_ALL_CHECKED' => $contact_thank_all, 'TYPE_IMAGE' => CAPTCHA_TYPE_IMAGE, 'CAPTCHA_TYPE_IMAGE_CHECKED' => $captcha_type_image, 'TYPE_COLOUR' => CAPTCHA_TYPE_COLOURED, 'CAPTCHA_TYPE_COLOUR_CHECKED' => $captcha_type_colour, 'TYPE_RANDOM' => CAPTCHA_TYPE_RANDOM, 'CAPTCHA_TYPE_RANDOM_CHECKED' => $captcha_type_random, 'ADMIN_EMAIL' => $contact_config['contact_admin_email'], 'FLOOD_LIMIT' => $contact_config['contact_flood_limit'], 'MAX_FILE_SIZE' => $contact_config['contact_max_file_size'], 'FILE_ROOT' => $contact_config['contact_file_root'], 'CHAR_LIMIT' => $contact_config['contact_char_limit'], 'COPYRIGHT' => $lang['Copyright'], 'S_CONFIG_ACTION' => append_sid('admin_contact.'.$phpEx), 'S_FORM_ENABLE_YES' => $form_enable_yes, 'S_FORM_ENABLE_NO' => $form_enable_no, 'S_CAPTCHA_ENABLE' => $contact_captcha_yes, 'S_CAPTCHA_DISABLE' => $contact_captcha_no, 'S_DELETE_FILES_YES' => $contact_delete_yes, 'S_DELETE_FILES_NO' => $contact_delete_no, 'S_STORE_MSGS_YES' => $contact_storage_yes, 'S_STORE_MSGS_NO' => $contact_storage_no, 'S_HASH_YES' => $hash_yes, 'S_HASH_NO' => $hash_no, 'S_PRUNE_YES' => $prune_yes, 'S_PRUNE_NO' => $prune_no, 'S_PERM_GUEST_YES' => $contact_auth_guest_yes, 'S_PERM_GUEST_NO' => $contact_auth_guest_no, 'S_PERM_USER_YES' => $contact_auth_user_yes, 'S_PERM_USER_NO' => $contact_auth_user_no, 'S_PERM_MOD_YES' => $contact_auth_mod_yes, 'S_PERM_MOD_NO' => $contact_auth_mod_no, 'S_PERM_ADMIN_YES' => $contact_auth_admin_yes, 'S_PERM_ADMIN_NO' => $contact_auth_admin_no, 'S_REQUIRE_RNAME_YES' => $require_rname_yes, 'S_REQUIRE_RNAME_NO' => $require_rname_no, 'S_REQUIRE_EMAIL_YES' => $require_email_yes, 'S_REQUIRE_EMAIL_NO' => $require_email_no, 'S_REQUIRE_COMMENTS_YES' => $require_comments_yes, 'S_REQUIRE_COMMENTS_NO' => $require_comments_no, 'S_PERMIT_ATTACHMENTS_YES' => $permit_attachments_yes, 'S_PERMIT_ATTACHMENTS_NO' => $permit_attachments_no) ); if(extension_loaded('gd')) { $template->assign_block_vars('captcha_config', array()); } $template->pparse('body'); include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); ?> |
|
From: OryNider <ory...@us...> - 2007-12-12 18:40:13
|
Update of /cvsroot/mxbb/mx_contact/templates/subSilver/images In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2515/images Log Message: Directory /cvsroot/mxbb/mx_contact/templates/subSilver/images added to the repository |
|
From: OryNider <ory...@us...> - 2007-12-12 18:40:08
|
Update of /cvsroot/mxbb/mx_contact/templates/subSilver/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2515/admin Log Message: Directory /cvsroot/mxbb/mx_contact/templates/subSilver/admin added to the repository |
|
From: OryNider <ory...@us...> - 2007-12-12 18:39:54
|
Update of /cvsroot/mxbb/mx_contact/templates/subSilver In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2420/subSilver Log Message: Directory /cvsroot/mxbb/mx_contact/templates/subSilver added to the repository |
|
From: OryNider <ory...@us...> - 2007-12-12 18:39:32
|
Update of /cvsroot/mxbb/mx_contact/language/lang_english/email In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2357/email Log Message: Directory /cvsroot/mxbb/mx_contact/language/lang_english/email added to the repository |
|
From: OryNider <ory...@us...> - 2007-12-12 18:39:20
|
Update of /cvsroot/mxbb/mx_contact/language/lang_english In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2341/lang_english Log Message: Directory /cvsroot/mxbb/mx_contact/language/lang_english added to the repository |
|
From: OryNider <ory...@us...> - 2007-12-12 18:38:42
|
Update of /cvsroot/mxbb/mx_contact/images/captcha In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1904/captcha Log Message: Directory /cvsroot/mxbb/mx_contact/images/captcha added to the repository |
|
From: OryNider <ory...@us...> - 2007-12-12 18:37:43
|
Update of /cvsroot/mxbb/mx_contact/contrib/language/lang_spanish/email In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1479/email Log Message: Directory /cvsroot/mxbb/mx_contact/contrib/language/lang_spanish/email added to the repository |
|
From: OryNider <ory...@us...> - 2007-12-12 18:37:24
|
Update of /cvsroot/mxbb/mx_contact/contrib/language/lang_romanian/email In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1445/email Log Message: Directory /cvsroot/mxbb/mx_contact/contrib/language/lang_romanian/email added to the repository |
|
From: OryNider <ory...@us...> - 2007-12-12 18:37:01
|
Update of /cvsroot/mxbb/mx_contact/contrib/language/lang_polish/email In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1053/email Log Message: Directory /cvsroot/mxbb/mx_contact/contrib/language/lang_polish/email added to the repository |
|
From: OryNider <ory...@us...> - 2007-12-12 18:36:38
|
Update of /cvsroot/mxbb/mx_contact/contrib/language/lang_italian/email In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1023/email Log Message: Directory /cvsroot/mxbb/mx_contact/contrib/language/lang_italian/email added to the repository |
|
From: OryNider <ory...@us...> - 2007-12-12 18:36:10
|
Update of /cvsroot/mxbb/mx_contact/contrib/language/lang_german/email In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv982/email Log Message: Directory /cvsroot/mxbb/mx_contact/contrib/language/lang_german/email added to the repository |