Lots of updates

git-svn-id: file:///svn/phpbb/trunk@553 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
uid42062 2001-07-04 19:36:32 +00:00
parent b2c10ae40b
commit a6723b8a1b
5 changed files with 707 additions and 926 deletions

View file

@ -131,6 +131,8 @@ else
$board_config['avatar_path'] = $config['avatar_path']; $board_config['avatar_path'] = $config['avatar_path'];
$board_config['prune_enable'] = $config['prune_enable']; $board_config['prune_enable'] = $config['prune_enable'];
$board_config['gzip_compress'] = $config['gzip_compress']; $board_config['gzip_compress'] = $config['gzip_compress'];
$board_config['smtp_delivery'] = $config['smtp_delivery'];
$board_config['smtp_host'] = $config['smtp_host'];
} }

View file

@ -83,7 +83,14 @@ $lang['Pages'] = "Pages";
$lang['of'] = "of"; // See Page above $lang['of'] = "of"; // See Page above
$lang['Go'] = "Go"; $lang['Go'] = "Go";
$lang['Submit'] = "Submit";
$lang['Reset'] = "Reset";
$lang['Cancel'] = "Cancel";
$lang['Yes'] = "Yes";
$lang['No'] = "No";
$lang['Private_messaging'] = "Send a Private Message"; $lang['Private_messaging'] = "Send a Private Message";
$lang['Click_index'] = "Click <a href=\"index.$phpEx\">HERE</a> to return to the index";
// //
// Global Header strings // Global Header strings
@ -230,6 +237,11 @@ $lang['Find_username'] = "Find a username";
$lang['Find'] = "Find"; $lang['Find'] = "Find";
$lang['No_match'] = "No matches found"; $lang['No_match'] = "No matches found";
$lang['No_post_id'] = "No post ID was specified";
$lang['No_such_folder'] = "No such folder exists";
$lang['No_folder'] = "No folder specified";
// //
// Profiles/Registration // Profiles/Registration
// //
@ -241,18 +253,73 @@ $lang['Bad_username'] = "The username you choose has been taken or is disallowed
$lang['Sorry_banned_email'] = "Sorry but the email address you gave has been banned from registering on this system."; $lang['Sorry_banned_email'] = "Sorry but the email address you gave has been banned from registering on this system.";
$lang['Only_one_avatar'] = "Only one type of avatar can be specified"; $lang['Only_one_avatar'] = "Only one type of avatar can be specified";
$lang['Always_smile'] = "Always enable Smilies";
$lang['Always_html'] = "Always allow HTML";
$lang['Always_bbcode'] = "Always allow BBCode";
$lang['Always_add_sig'] = "Always attach my signature";
$l_boardtheme = "Board Theme";
$l_boardlang = "Board Language";
$l_nothemes = "No Themes In database";
$l_saveprefs = "Save $l_preferences";
$l_timezone = "Timezone";
$lang['Avatar_panel'] = "Avatar control panel";
$lang['Avatar'] = "Avatar"; $lang['Avatar'] = "Avatar";
$lang['Avatar_explain'] = "Displays a small graphic image below your details in posts. Only one image can be displayed at a time, its width can be no greater than " . $board_config['avatar_max_width'] . " pixels, a height no greater than " . $board_config['avatar_max_height'] . " pixels and a file size no more than " . (round($board_config['avatar_filesize'] / 1024)) . " kB."; $lang['Avatar_explain'] = "Displays a small graphic image below your details in posts. Only one image can be displayed at a time, its width can be no greater than " . $board_config['avatar_max_width'] . " pixels, a height no greater than " . $board_config['avatar_max_height'] . " pixels and a file size no more than " . (round($board_config['avatar_filesize'] / 1024)) . " kB.";
$lang['Upload_Avatar'] = "Upload Avatar image"; $lang['Upload_Avatar_file'] = "Upload Avatar from your machine";
$lang['Upload_Avatar_URL'] = "Upload Avatar from a URL";
$lang['Upload_Avatar_URL_explain'] = "Enter the URL of the location containing the Avatar image, it will be copied to this site.";
$lang['Pick_local_Avatar'] = "Select Avatar from the gallery";
$lang['Link_remote_Avatar'] = "Link to off-site Avatar";
$lang['Link_remote_Avatar_explain'] = "Enter the URL of the location containing the Avatar image you wish to link to.";
$lang['Avatar_URL'] = "URL of Avatar Image"; $lang['Avatar_URL'] = "URL of Avatar Image";
$lang['Avatar_gallery'] = "Show gallery of Avatar images"; $lang['Avatar_gallery'] = "Show gallery of Avatar images";
$lang['Delete_Image'] = "Delete Image"; $lang['Delete_Image'] = "Delete Image";
$lang['Current_Image'] = "Current Image"; $lang['Current_Image'] = "Current Image";
$lang['Notify_on_privmsg'] = "Notify on Private Message"; $lang['Notify_on_privmsg'] = "Notify on Private Message";
$lang['Hide_user'] = "Hide your online status"; $lang['Hide_user'] = "Hide your online status";
$lang['Profile_updated'] = "Your profile has been updated<br><br>" . $lang['Click_index'];
$lang['Password_mismatch'] = "The passwords you entered did not match";
$lang['Invalid_username'] = "The username you requested has been taken or disallowed";
$lang['Fields_empty'] = "You must fill in the required fields";
$lang['Avatar_filetype'] = "The avatar filetype must be .jpg, .gif or .png";
$lang['Avatar_filesize'] = "The avatar image file size must more than 0 kB and less than " . round($board_config['avatar_filesize'] / 1024) . " kB";
$lang['Avatar_imagesize'] = "The avatar must be less than " . $board_config['avatar_max_width'] . " pixels wide and " . $board_config['avatar_max_height'] . " pixels high";
$lang['Welcome_subject'] = "Welcome to " . $board_config['sitename'] . " Forums";
$lang['Account_added'] = "Thank you for registering, your account has been created. You may now login with your username and password";
$lang['Account_inactive'] = "Your account has been created. However, this forum requires account activation, an activation key has been sent to the email address you provided. Pease check your email for further information";
$lang['Welcome_email_activate'] = $lang['Welcome_subject'] . "
Please keep this email for your records.
Your account information is as follows:
----------------------------
Username: $username
Password: $password
----------------------------
Your account is currently inactive. You cannot use it until you visit the following link:
http://$SERVER_NAME$PHP_SELF?mode=activate&act_key=$act_key
Please do not forget your password as it has been encrypted in our database and we cannot retrieve it for you.
However, should you forget your password you can request a new one which will be activated in the same way as this account.
Thank you for registering.
";
$lang['COPPA'] = "Your account has been created but has to be approved, please check your email for details.";
$lang['Welcome_COPPA'] = "Your account has been created, however in complance with the COPPA act you must print out this page and have you parent or guardian mail it to: <br>" . $lang['Mailing_address'] . "<br>Or fax it to: <br>" . $lang['Fax_info'] . "<br> Once this information has been received your account will be activated by the administrator and you will receive an email notification.";
// //
@ -553,7 +620,6 @@ $l_version = "Version";
// Auth // Auth
// Register // Register
$l_accountinactive = "Your account has been created. However, this forum requires account activation, an activation key has been sent to the email address you provided. Pease check your email for further information.";
$l_acountadded = "Thank you for registering with $sitename. Your account has been successfully created."; $l_acountadded = "Thank you for registering with $sitename. Your account has been successfully created.";
$l_nowactive = "Your account is now been activated. You may login and post with this account. Thank you for using $sitename forums."; $l_nowactive = "Your account is now been activated. You may login and post with this account. Thank you for using $sitename forums.";
$l_notfilledin = "Error - you did not fill in all the required fields."; $l_notfilledin = "Error - you did not fill in all the required fields.";
@ -597,28 +663,6 @@ Thank you for registering.
"; ";
$l_welcomeemailactivate = "
$l_welcomesubj,
Please keep this email for your records.
Your account information is as follows:
----------------------------
Username: $username
Password: $password
----------------------------
Your account is currently INACTIVE. You cannot use it until you visit the following link:
http://$SERVER_NAME$PHP_SELF?mode=activate&act_key=$act_key
Please do not forget your password as it has been encrypted in our database and we cannot retrieve it for you.
However, should you forget your password we provide an easy to use script to generate and email a new, random, password.
Thank you for registering.
";
$l_beenadded = "You have been added to the database."; $l_beenadded = "You have been added to the database.";
$l_thankregister= "Thank you for registering!"; $l_thankregister= "Thank you for registering!";

View file

@ -62,8 +62,7 @@ if($mode == "read")
} }
else else
{ {
// Error out message_die(GENERAL_ERROR, $lang['No_post_id']);
} }
if(!$userdata['session_logged_in']) if(!$userdata['session_logged_in'])
@ -99,13 +98,12 @@ if($mode == "read")
} }
else else
{ {
// Error out message_die(GENERAL_ERROR, $lang['No_such_folder']);
} }
} }
else else
{ {
// Error out message_die(GENERAL_ERROR, $lang['No_folder']);
} }
$sql = "SELECT u.username, u.user_id, u.user_website, u.user_icq, u.user_aim, u.user_yim, u.user_msnm, u.user_viewemail, u.user_sig, u.user_avatar, pm.privmsgs_id, pm.privmsgs_type, pm.privmsgs_subject, pm.privmsgs_from_userid, pm.privmsgs_to_userid, pm.privmsgs_date, pm.privmsgs_ip, pm.privmsgs_bbcode_uid, pmt.privmsgs_text $sql = "SELECT u.username, u.user_id, u.user_website, u.user_icq, u.user_aim, u.user_yim, u.user_msnm, u.user_viewemail, u.user_sig, u.user_avatar, pm.privmsgs_id, pm.privmsgs_type, pm.privmsgs_subject, pm.privmsgs_from_userid, pm.privmsgs_to_userid, pm.privmsgs_date, pm.privmsgs_ip, pm.privmsgs_bbcode_uid, pmt.privmsgs_text
@ -117,7 +115,7 @@ if($mode == "read")
$sql_type"; $sql_type";
if(!$pm_status = $db->sql_query($sql)) if(!$pm_status = $db->sql_query($sql))
{ {
error_die(SQL_QUERY, "Could not query private message post information.", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Could not query private message post information.", "", __LINE__, __FILE__, $sql);
} }
if(!$db->sql_numrows($pm_status)) if(!$db->sql_numrows($pm_status))
{ {
@ -133,7 +131,7 @@ if($mode == "read")
WHERE privmsgs_id = " . $privmsg['privmsgs_id']; WHERE privmsgs_id = " . $privmsg['privmsgs_id'];
if(!$pm_upd_status = $db->sql_query($sql)) if(!$pm_upd_status = $db->sql_query($sql))
{ {
error_die(SQL_QUERY, "Could not update private message read status.", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Could not update private message read status.", "", __LINE__, __FILE__, $sql);
} }
// //
@ -148,7 +146,7 @@ if($mode == "read")
VALUES (" . PRIVMSGS_SENT_MAIL . ", '" . $privmsg['privmsgs_subject'] . "', " . $privmsg['privmsgs_from_userid'] . ", " . $privmsg['privmsgs_to_userid'] . ", " . $privmsg['privmsgs_date'] . ", '" . $privmsg['privmsgs_ip'] . "', '" . $privmsg['privmsgs_bbcode_uid'] . "')"; VALUES (" . PRIVMSGS_SENT_MAIL . ", '" . $privmsg['privmsgs_subject'] . "', " . $privmsg['privmsgs_from_userid'] . ", " . $privmsg['privmsgs_to_userid'] . ", " . $privmsg['privmsgs_date'] . ", '" . $privmsg['privmsgs_ip'] . "', '" . $privmsg['privmsgs_bbcode_uid'] . "')";
if(!$pm_sent_status = $db->sql_query($sql)) if(!$pm_sent_status = $db->sql_query($sql))
{ {
error_die(SQL_QUERY, "Could not insert private message sent info.", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Could not insert private message sent info.", "", __LINE__, __FILE__, $sql);
} }
else else
{ {
@ -158,7 +156,7 @@ if($mode == "read")
VALUES ($privmsg_sent_id, '" . $privmsg['privmsgs_text'] . "')"; VALUES ($privmsg_sent_id, '" . $privmsg['privmsgs_text'] . "')";
if(!$pm_sent_text_status = $db->sql_query($sql)) if(!$pm_sent_text_status = $db->sql_query($sql))
{ {
error_die(SQL_QUERY, "Could not insert private message sent text.<BR>$sql", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Could not insert private message sent text.<BR>$sql", "", __LINE__, __FILE__, $sql);
} }
} }
} }
@ -220,17 +218,17 @@ if($mode == "read")
$poster_avatar = ($privmsg['user_avatar'] != "" && $userdata['user_id'] != ANONYMOUS) ? "<img src=\"" . $board_config['avatar_path'] . "/" . $privmsg['user_avatar'] . "\">" : ""; $poster_avatar = ($privmsg['user_avatar'] != "" && $userdata['user_id'] != ANONYMOUS) ? "<img src=\"" . $board_config['avatar_path'] . "/" . $privmsg['user_avatar'] . "\">" : "";
$profile_img = "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id") . "\"><img src=\"" . $images['profile'] . "\" alt=\"$l_profileof $poster\" border=\"0\"></a>"; $profile_img = "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id") . "\"><img src=\"" . $images['profile'] . "\" alt=\"" . $lang['Profile'] . "\" border=\"0\"></a>";
$email_img = ($privmsg['user_viewemail'] == 1) ? "<a href=\"mailto:" . $privmsg['user_email'] . "\"><img src=\"" .$images['email'] . "\" alt=\"$l_email $poster\" border=\"0\"></a>" : ""; $email_img = ($privmsg['user_viewemail'] == 1) ? "<a href=\"mailto:" . $privmsg['user_email'] . "\"><img src=\"" .$images['email'] . "\" alt=\"" . $lang['Email'] . "\" border=\"0\"></a>" : "";
$www_img = ($privmsg['user_website']) ? "<a href=\"" . $privmsg['user_website'] . "\"><img src=\"" . $images['www'] . "\" alt=\"$l_viewsite\" border=\"0\"></a>" : ""; $www_img = ($privmsg['user_website']) ? "<a href=\"" . $privmsg['user_website'] . "\"><img src=\"" . $images['www'] . "\" alt=\"" . $lang['Website'] . "\" border=\"0\"></a>" : "";
if($privmsg['user_icq']) if($privmsg['user_icq'])
{ {
$icq_status_img = "<a href=\"http://wwp.icq.com/" . $privmsg['user_icq'] . "#pager\"><img src=\"http://online.mirabilis.com/scripts/online.dll?icq=" . $privmsg['user_icq'] . "&img=5\" alt=\"$l_icqstatus\" border=\"0\"></a>"; $icq_status_img = "<a href=\"http://wwp.icq.com/" . $privmsg['user_icq'] . "#pager\"><img src=\"http://online.mirabilis.com/scripts/online.dll?icq=" . $privmsg['user_icq'] . "&img=5\" alt=\"" . $lang['Page_ICQ'] . "\" border=\"0\"></a>";
$icq_add_img = "<a href=\"http://wwp.icq.com/scripts/search.dll?to=" . $privmsg['user_icq'] . "\"><img src=\"" . $images['icq'] . "\" alt=\"$l_icq\" border=\"0\"></a>"; $icq_add_img = "<a href=\"http://wwp.icq.com/scripts/search.dll?to=" . $privmsg['user_icq'] . "\"><img src=\"" . $images['icq'] . "\" alt=\"" . $lang['ICQ'] . "\" border=\"0\"></a>";
} }
else else
{ {
@ -319,34 +317,18 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit")
if(!$userdata['user_allow_pm']) if(!$userdata['user_allow_pm'])
{ {
// //
// Admin has prevented user // Admin has prevented user from sending PM's
// from sending PM's
// //
include('includes/page_header.'.$phpEx);
$msg = $lang['Cannot_send_privmsg']; $msg = $lang['Cannot_send_privmsg'];
message_die(GENERAL_MESSAGE, $msg);
$template->set_filenames(array(
"reg_header" => "error_body.tpl")
);
$template->assign_vars(array(
"ERROR_MESSAGE" => $msg)
);
$template->pparse("reg_header");
include('includes/page_tail.'.$phpEx);
} }
// //
// When we get to the point of a code review // When we get to the point of a code review we really really really need to look at
// we really really really need to look at // combining the following fragments with the posting routine. I don't think or see it
// combining the following fragments with the // necessary to actually use posting for privmsgs but I'm sure more can be combined in
// posting routine. I don't think or see it // common functions ... not that I think all functions are common, some functions are
// necessary to actually use posting for privmsgs // actually quite classy and sophisticated, champagne, caviar and all that
// but I'm sure more can be combined in common
// functions ... not that I think all functions are
// common, some functions are actually quite classy
// and sophisticated, champagne, caviar and all that
// //
$disable_html = (isset($HTTP_POST_VARS['disable_html'])) ? $HTTP_POST_VARS['disable_html'] : !$userdata['user_allowhtml']; $disable_html = (isset($HTTP_POST_VARS['disable_html'])) ? $HTTP_POST_VARS['disable_html'] : !$userdata['user_allowhtml'];
@ -368,11 +350,11 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit")
} }
else else
{ {
// Error out message_die(GENERAL_ERROR, $lang['No_post_id']);
} }
} }
if(empty($HTTP_GET_VARS[POST_USERS_URL]) && !$preview && empty($HTTP_POST_VARS['submit'])) if(!empty($HTTP_GET_VARS[POST_USERS_URL]) && !$preview && empty($HTTP_POST_VARS['submit']))
{ {
$user_id = $HTTP_GET_VARS[POST_USERS_URL]; $user_id = $HTTP_GET_VARS[POST_USERS_URL];
@ -421,7 +403,6 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit")
OR username LIKE '%$username_search%' OR username LIKE '%$username_search%'
OR username LIKE '$username_search' ) OR username LIKE '$username_search' )
AND user_id <> " . ANONYMOUS; AND user_id <> " . ANONYMOUS;
} }
else else
{ {
@ -432,9 +413,7 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit")
WHERE ( username LIKE '" . chr($first_letter) . "%' WHERE ( username LIKE '" . chr($first_letter) . "%'
OR username LIKE '" . chr($first_letter) . "' ) OR username LIKE '" . chr($first_letter) . "' )
AND user_id <> " . ANONYMOUS; AND user_id <> " . ANONYMOUS;
} }
} }
else else
{ {
@ -465,7 +444,7 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit")
} }
$user_names_select .= "</select>"; $user_names_select .= "</select>";
$user_alpha_select = "<select name=\"user_alpha\">"; $user_alpha_select = "<select name=\"user_alpha\" onchange=\"\">";
for($i = 65; $i < 91; $i++) for($i = 65; $i < 91; $i++)
{ {
if($first_letter == $i) if($first_letter == $i)
@ -491,7 +470,7 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit")
AND u.user_id = pm.privmsgs_to_userid"; AND u.user_id = pm.privmsgs_to_userid";
if(!$pm_edit_status = $db->sql_query($sql)) if(!$pm_edit_status = $db->sql_query($sql))
{ {
error_die(SQL_QUERY, "Could not obtain private message for editing.", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Could not obtain private message for editing.", "", __LINE__, __FILE__, $sql);
} }
if(!$db->sql_numrows($pm_edit_status)) if(!$db->sql_numrows($pm_edit_status))
{ {
@ -521,7 +500,7 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit")
AND u.user_id = pm.privmsgs_from_userid"; AND u.user_id = pm.privmsgs_from_userid";
if(!$pm_reply_status = $db->sql_query($sql)) if(!$pm_reply_status = $db->sql_query($sql))
{ {
error_die(SQL_QUERY, "Could not obtain private message for editing.", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Could not obtain private message for editing.", "", __LINE__, __FILE__, $sql);
} }
if(!$db->sql_numrows($pm_reply_status)) if(!$db->sql_numrows($pm_reply_status))
{ {
@ -663,9 +642,9 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit")
WHERE privmsgs_id = $privmsgs_id"; WHERE privmsgs_id = $privmsgs_id";
} }
if(!$pm_sent_status = $db->sql_query($sql_info)) if(!$pm_sent_status = $db->sql_query($sql_info, BEGIN_TRANSACTION))
{ {
error_die(SQL_QUERY, "Could not insert/update private message sent info.", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Could not insert/update private message sent info.", "", __LINE__, __FILE__, $sql_info);
} }
else else
{ {
@ -683,9 +662,9 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit")
WHERE privmsgs_text_id = $privmsgs_id"; WHERE privmsgs_text_id = $privmsgs_id";
} }
if(!$pm_sent_text_status = $db->sql_query($sql)) if(!$pm_sent_text_status = $db->sql_query($sql, END_TRANSACTION))
{ {
error_die(SQL_QUERY, "Could not insert/update private message sent text.", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Could not insert/update private message sent text.", "", __LINE__, __FILE__, $sql_info);
} }
else if($mode != "edit") else if($mode != "edit")
{ {
@ -695,22 +674,11 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit")
} }
} }
include('includes/page_header.'.$phpEx);
$msg = $lang['Message_sent'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("privmsg.$phpEx?folder=inbox") . "\">" . $lang['Here'] . "</a> " . $lang['to_return_inbox'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("index.$phpEx") . "\">" . $lang['Here'] . "</a> ". $lang['to_return_index']; $msg = $lang['Message_sent'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("privmsg.$phpEx?folder=inbox") . "\">" . $lang['Here'] . "</a> " . $lang['to_return_inbox'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("index.$phpEx") . "\">" . $lang['Here'] . "</a> ". $lang['to_return_index'];
$template->set_filenames(array( message_die(GENERAL_MESSAGE, $msg);
"reg_header" => "error_body.tpl")
);
$template->assign_vars(array(
"ERROR_MESSAGE" => $msg)
);
$template->pparse("reg_header");
include('includes/page_tail.'.$phpEx);
} }
} }
} }
// //
@ -727,7 +695,7 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit")
AND u.user_id = ug.user_id"; AND u.user_id = ug.user_id";
if(!$group_status = $db->sql_query($sql)) if(!$group_status = $db->sql_query($sql))
{ {
error_die(SQL_QUERY, "Could not obtain group moderator list.", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Could not obtain group moderator list.", "", __LINE__, __FILE__, $sql);
} }
if($db->sql_numrows($group_status)) if($db->sql_numrows($group_status))
{ {
@ -863,6 +831,7 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit")
$template->assign_vars(array( $template->assign_vars(array(
"S_USERNAME_INPUT" => $username_input, "S_USERNAME_INPUT" => $username_input,
"SUBJECT_INPUT" => $subject_input, "SUBJECT_INPUT" => $subject_input,
"MESSAGE_INPUT" => $message_input, "MESSAGE_INPUT" => $message_input,
"HTML_STATUS" => $html_status, "HTML_STATUS" => $html_status,
@ -932,7 +901,7 @@ else if( ( isset($HTTP_POST_VARS['delete']) && !empty($HTTP_POST_VARS['mark']) )
if(!$del_list_status = $db->sql_query($deleteall_sql)) if(!$del_list_status = $db->sql_query($deleteall_sql))
{ {
error_die(SQL_QUERY, "Could not obtain id list to delete all messages.", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Could not obtain id list to delete all messages.", "", __LINE__, __FILE__, $deleteall_sql);
} }
$delete_list = $db->sql_fetchrowset($del_list_status); $delete_list = $db->sql_fetchrowset($del_list_status);
@ -944,7 +913,6 @@ else if( ( isset($HTTP_POST_VARS['delete']) && !empty($HTTP_POST_VARS['mark']) )
unset($delete_type); unset($delete_type);
} }
$delete_sql = "DELETE FROM " . PRIVMSGS_TABLE . " $delete_sql = "DELETE FROM " . PRIVMSGS_TABLE . "
WHERE "; WHERE ";
$delete_text_sql = "DELETE FROM " . PRIVMSGS_TEXT_TABLE . " $delete_text_sql = "DELETE FROM " . PRIVMSGS_TEXT_TABLE . "
@ -982,15 +950,15 @@ else if( ( isset($HTTP_POST_VARS['delete']) && !empty($HTTP_POST_VARS['mark']) )
break; break;
} }
if(!$del_status = $db->sql_query($delete_sql)) if(!$del_status = $db->sql_query($delete_sql, BEGIN_TRANSACTION))
{ {
error_die(SQL_QUERY, "Could not delete private message info.", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Could not delete private message info.", "", __LINE__, __FILE__, $delete_sql);
} }
else else
{ {
if(!$del_text_status = $db->sql_query($delete_text_sql)) if(!$del_text_status = $db->sql_query($delete_text_sql, END_TRANSACTION))
{ {
error_die(SQL_QUERY, "Could not delete private message text.", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Could not delete private message text.", "", __LINE__, __FILE__, $delete_text_sql);
} }
} }
@ -1018,9 +986,7 @@ else if( ( isset($HTTP_POST_VARS['save']) && !empty($HTTP_POST_VARS['mark']) )
$saved_sql .= "OR "; $saved_sql .= "OR ";
} }
} }
$saved_sql .= "AND "; $saved_sql .= "AND ";
} }
switch($folder) switch($folder)
@ -1036,7 +1002,7 @@ else if( ( isset($HTTP_POST_VARS['save']) && !empty($HTTP_POST_VARS['mark']) )
if(!$save_status = $db->sql_query($saved_sql)) if(!$save_status = $db->sql_query($saved_sql))
{ {
error_die(SQL_QUERY, "Could not save private messages.", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Could not save private messages.", "", __LINE__, __FILE__, $saved_sql);
} }
$folder = "savebox"; $folder = "savebox";
@ -1157,11 +1123,11 @@ $sql .= " ORDER BY pm.privmsgs_date DESC LIMIT $start, " . $board_config['topics
if(!$pm_tot_status = $db->sql_query($sql_tot)) if(!$pm_tot_status = $db->sql_query($sql_tot))
{ {
error_die(SQL_QUERY, "Could not query private message information.", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Could not query private message information.", "", __LINE__, __FILE__, $sql_tot);
} }
if(!$pm_status = $db->sql_query($sql)) if(!$pm_status = $db->sql_query($sql))
{ {
error_die(SQL_QUERY, "Could not query private message information.", __LINE__, __FILE__); message_die(GENERAL_ERROR, "Could not query private messages.", "", __LINE__, __FILE__, $sql);
} }
$pm_total = $db->sql_numrows($pm_tot_status); $pm_total = $db->sql_numrows($pm_tot_status);
$pm_list = $db->sql_fetchrowset($pm_status); $pm_list = $db->sql_fetchrowset($pm_status);

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,7 @@
<th class="secondary" colspan="2">&nbsp;<b>{L_REGISTRATION_INFO}</b> <span class="gensmall">[{L_ITEMS_REQUIRED}]</span>&nbsp;</th> <th class="secondary" colspan="2">&nbsp;<b>{L_REGISTRATION_INFO}</b> <span class="gensmall">[{L_ITEMS_REQUIRED}]</span>&nbsp;</th>
</tr> </tr>
<tr> <tr>
<td class="row1"><span class="gen">{L_USERNAME}: *</b><br>{L_USER_UNIQ}</td> <td class="row1" width="38%"><span class="gen">{L_USERNAME}: *</b><br>{L_USER_UNIQ}</td>
<td class="row2"><input type="text" name="username" size="35" maxlength="40" value="{USERNAME}"></td> <td class="row2"><input type="text" name="username" size="35" maxlength="40" value="{USERNAME}"></td>
</tr> </tr>
<tr> <tr>
@ -96,18 +96,6 @@
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_SMILIES}:</span></td> <td class="row1"><span class="gen">{L_ALWAYS_ALLOW_SMILIES}:</span></td>
<td class="row2"><input type="radio" name="allowsmilies" value="1" {ALWAYS_ALLOW_SMILIES_YES}> <span class="gen">{L_YES}</span>&nbsp;&nbsp;<input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO}> <span class="gen">{L_NO}</span></td> <td class="row2"><input type="radio" name="allowsmilies" value="1" {ALWAYS_ALLOW_SMILIES_YES}> <span class="gen">{L_YES}</span>&nbsp;&nbsp;<input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO}> <span class="gen">{L_NO}</span></td>
</tr> </tr>
<tr>
<td class="row1"><span class="gen">{L_AVATAR}:</span><br /><span class="gensmall">{L_AVATAR_EXPLAIN}</span></td>
<td class="row2"><table cellspacing="2" cellpadding="0" border="0">
<tr>
<td align="center"><span class="gensmall">{L_CURRENT_IMAGE}</span></td>
<td rowspan="2" valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="gensmall">{L_UPLOAD_AVATAR}:</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}"><input type="file" name="avatar"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="gensmall">{L_AVATAR_URL}:</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="avatarurl"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="gensmall">{L_DELETE_AVATAR}:</span><input type="checkbox" name="avatardel"></td>
</tr>
<tr>
<td align="center">&nbsp;{AVATAR}&nbsp;</td>
</tr>
</table></td>
</tr>
<tr> <tr>
<td class="row1"><span class="gen">{L_BOARD_LANGUAGE}:</span></td> <td class="row1"><span class="gen">{L_BOARD_LANGUAGE}:</span></td>
<td class="row2">{LANGUAGE_SELECT}</td> <td class="row2">{LANGUAGE_SELECT}</td>
@ -129,7 +117,42 @@
<td class="row2"><input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="16"></td> <td class="row2"><input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="16"></td>
</tr> </tr>
<tr> <tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}"></td> <th class="secondary" colspan="2">&nbsp;<b>{L_AVATAR_PANEL}</b></td>
</tr>
<!-- IF $S_ALLOW_AVATAR_UPLOAD eq TRUE || $S_ALLOW_AVATAR_LOCAL eq TRUE || $S_ALLOW_AVATAR_REMOTE eq TRUE -->
<tr>
<td class="row1" colspan="2" align="center"><table width="70%" cellspacing="2" cellpadding="0" border="0">
<tr>
<td width="65%"><span class="gen"><span class="gensmall">{L_AVATAR_EXPLAIN}</span></td>
<td align="center"><span class="gensmall">{L_CURRENT_IMAGE}</span><br>{AVATAR}<br><input type="checkbox" name="avatardel">&nbsp;<span class="gensmall">{L_DELETE_AVATAR}</span></td>
</tr>
</table></td>
</tr>
<!-- ENDIF -->
<!-- IF $S_ALLOW_AVATAR_UPLOAD eq TRUE -->
<tr>
<td class="row1"><span class="gen">{L_UPLOAD_AVATAR_FILE}:</span></td>
<td class="row2"><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}"><input type="file" name="avatar"></td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_UPLOAD_AVATAR_URL}:</span><br><span class="gensmall">{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></td>
<td class="row2"><input type="text" name="avatarurl" size="40"></td>
</tr>
<!-- ENDIF -->
<!-- IF $S_ALLOW_AVATAR_REMOTE eq TRUE -->
<tr>
<td class="row1"><span class="gen">{L_LINK_REMOTE_AVATAR}:</span><br><span class="gensmall">{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></td>
<td class="row2"><input type="text" name="avatarremoteurl" size="40"></td>
</tr>
<!-- ENDIF -->
<!-- IF $S_ALLOW_AVATAR_LOCAL eq TRUE -->
<tr>
<td class="row1"><span class="gen">{L_AVATAR_GALLERY}:</span></td>
<td class="row2">&nbsp;</td>
</tr>
<!-- ENDIF -->
<tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}">&nbsp;&nbsp;<input type="reset" value="{L_RESET}"</td>
</tr> </tr>
</table></td> </table></td>
</form></tr> </form></tr>