|
From: FlorinCB <ory...@us...> - 2008-12-28 20:43:26
|
Update of /cvsroot/mxbb/mx_contact In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12286 Modified Files: mx_contact.php mx_newsletter.php Log Message: fix Index: mx_newsletter.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/mx_newsletter.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mx_newsletter.php 22 Oct 2008 23:47:29 -0000 1.3 --- mx_newsletter.php 28 Dec 2008 20:43:18 -0000 1.4 *************** *** 50,62 **** // $user_name = $userdata['username']; ! $real_name = (!isset($HTTP_POST_VARS['real_name'])) ? '' : stripslashes(trim(htmlspecialchars($HTTP_POST_VARS['real_name']))); ! $institution = (!isset($HTTP_POST_VARS['institution'])) ? '' : stripslashes(trim(htmlspecialchars($HTTP_POST_VARS['institution']))); ! $fax = (!isset($HTTP_POST_VARS['fax'])) ? '' : stripslashes(trim(htmlspecialchars($HTTP_POST_VARS['fax']))); ! $phone = (!isset($HTTP_POST_VARS['phone'])) ? '' : stripslashes(trim(htmlspecialchars($HTTP_POST_VARS['phone']))); ! $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'])); ! $newsletter = (!isset($HTTP_POST_VARS['newsletter'])) ? 0 : 1; $script_path = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path'])); --- 50,62 ---- // $user_name = $userdata['username']; ! $real_name = (!isset($_POST['real_name'])) ? '' : stripslashes(trim(htmlspecialchars($_POST['real_name']))); ! $institution = (!isset($_POST['institution'])) ? '' : stripslashes(trim(htmlspecialchars($_POST['institution']))); ! $fax = (!isset($_POST['fax'])) ? '' : stripslashes(trim(htmlspecialchars($_POST['fax']))); ! $phone = (!isset($_POST['phone'])) ? '' : stripslashes(trim(htmlspecialchars($_POST['phone']))); ! $email = (!isset($_POST['email'])) ? '' : stripslashes(trim(htmlspecialchars($_POST['email']))); ! $comments = (!isset($_POST['feedback'])) ? '' : stripslashes(trim(htmlspecialchars($_POST['feedback']))); ! $attachment = (!isset($_FILES['attachment']['name'])) ? '' : basename($_FILES['attachment']['name']); ! $code = (!isset($_POST['code'])) ? '' : htmlspecialchars(trim($_POST['code'])); ! $newsletter = (!isset($_POST['newsletter'])) ? 0 : 1; $script_path = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path'])); *************** *** 74,78 **** // "Quick Delete" an Attachment // ! if(isset($HTTP_GET_VARS['delete'])) { if($contact_config['contact_delete'] == 0) --- 74,78 ---- // "Quick Delete" an Attachment // ! if($mx_request_vars->is_get('delete')) { if($contact_config['contact_delete'] == 0) *************** *** 90,98 **** // Start send script // ! if(isset($HTTP_POST_VARS['submit'])) { function error_check() { ! global $HTTP_POST_FILES, $lang, $phpEx, $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; --- 90,98 ---- // Start send script // ! if($mx_request_vars->is_request('submit')) { function error_check() { ! global $_FILES, $lang, $phpEx, $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; *************** *** 105,109 **** 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 . --- 105,109 ---- if($CF_general_message == 1) { ! @unlink($_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 . *************** *** 114,117 **** --- 114,119 ---- } } + + //die("fljkewlkgjrlkgj"); // *************** *** 353,357 **** $sql = "INSERT INTO " . CONTACT_TABLE . " VALUES ('$user_ip', '$wait_time')"; ! $result = $db->sql_query($sql); if(!$db->sql_query($sql)) --- 355,359 ---- $sql = "INSERT INTO " . CONTACT_TABLE . " VALUES ('$user_ip', '$wait_time')"; ! //$result = $db->sql_query($sql); if(!$db->sql_query($sql)) *************** *** 363,394 **** // No Errors // ! if($CF_general_message == 0) ! { ! $send_time = time(); ! $getfile = (!empty($attachment)) ? $contact_config['contact_file_root'] . "/" . contact_decode_ip($user_ip) . "/" . $attachment : ''; ! $sql_array = array( ! 'sendtime' => $send_time, ! 'username' => $user_name, ! 'realname' => str_replace("\'", "''", $real_name), ! 'institution' => str_replace("\'", "''", $institution), ! 'phone' => str_replace("\'", "''", $phone), ! 'fax' => str_replace("\'", "''", $fax), ! 'email' => str_replace("\'", "''", $email), ! 'ip' => $user_ip, ! 'message' => addslashes(str_replace("\'", "''", $comments)), ! 'newsletter' => (int) $newsletter, ! 'upfile' => str_replace("\'", "''", $getfile), ! ); ! $sql = "INSERT INTO " . CONTACT_MSGS_TABLE . $db->sql_build_array('INSERT', $sql_array); ! if(!$result = $db->sql_query($sql)) ! { ! 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>")); } } --- 365,394 ---- // No Errors // ! $send_time = time(); ! $getfile = (!empty($attachment)) ? $contact_config['contact_file_root'] . "/" . contact_decode_ip($user_ip) . "/" . $attachment : ''; ! $sql_array = array( ! 'sendtime' => $send_time, ! 'username' => $user_name, ! 'realname' => str_replace("\'", "''", $real_name), ! 'institution' => str_replace("\'", "''", $institution), ! 'phone' => str_replace("\'", "''", $phone), ! 'fax' => str_replace("\'", "''", $fax), ! 'email' => str_replace("\'", "''", $email), ! 'ip' => $user_ip, ! 'message' => addslashes(str_replace("\'", "''", $comments)), ! 'newsletter' => (int) $newsletter, ! 'upfile' => str_replace("\'", "''", $getfile), ! ); ! $sql = "INSERT INTO " . CONTACT_MSGS_TABLE . $db->sql_build_array('INSERT', $sql_array); ! ! if(!$result = $db->sql_query($sql)) ! { ! 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>")); } Index: mx_contact.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/mx_contact.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mx_contact.php 4 Oct 2008 07:44:53 -0000 1.4 --- mx_contact.php 28 Dec 2008 20:43:18 -0000 1.5 *************** *** 22,30 **** $is_block = FALSE; - include_once($module_root_path . 'includes/contact_constants.' . $phpEx); include_once($module_root_path . 'includes/functions_newsletter.' . $phpEx); - $contact_config = array(); $_br = '<br /><br />'; --- 22,28 ---- |