Code: Select all
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
}
if ($signature != '')
{
Code: Select all
#
#-----[ FIND ]------------------------------------------
#
if ($signature != '')
#
#-----[ BEFORE, ADD ]-----------------------------------
#
$empty_day = $bday_day == $lang['Default_Day'] || empty($bday_day);
$empty_year = $bday_year == $lang['Default_Year'] || empty($bday_year);
$temp_month = ( !$board_config['bday_require'] && $bday_month == 0 ) ? 1 : $bday_month;
$temp_day = ( !$board_config['bday_require'] && $empty_day ) ? 1 : $bday_day;
if ( !$board_config['bday_year'] )
{
$temp_year = $empty_year ? 4 : $bday_year;
}
else
{
$temp_year = $bday_year;
if ( !$board_config['bday_require'] && $bday_month == 0 && $empty_year )
{
$temp_year = $empty_year ? 4 : 0;
}
}
if ( !@checkdate( $temp_month, $temp_day, $temp_year ) )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Birthday_invalid'];
}
Code: Select all
if( !$error )
{
$sql = "UPDATE " . USERS_TABLE . "
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''",
Code: Select all
#
#-----[ FIND ]------------------------------------------
# this is a partial match
#
$sql = "UPDATE " . USERS_TABLE . "
SET " . $username_sql
#
#-----[ IN-LINE FIND ]----------------------------------
#
, user_icq = '" . str_replace("\'", "''", $icq) . "'
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------
#
, user_birthday = " . sprintf('%02d%02d%04d',$bday_month,$bday_day,$bday_year) . "
Code: Select all
#
#-----[ FIND ]------------------------------------------
#
$form_enctype = ( !@$ini_val('file_uploads')
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Country/Location Flags
// Query to get the list of flags
$sql = "SELECT *
FROM " . FLAG_TABLE . "
ORDER BY flag_name";
if(!$flags_result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain flags information.", "", __LINE__, __FILE__, $sql);
}
// Build the html select statement
$flag_start_image = 'blank.gif';
$flag_select = '<select name="user_flag" onChange="document.images[\'user_flag\'].src = \'../images/flags/\' + this.value;">';
$flag_select .= '<option value="blank.gif">' . $lang['Select_country'] . '</option>';
while ( $flag_row = $db->sql_fetchrow($flags_result) )
{
$flag_name = $flag_row['flag_name'];
$flag_image = $flag_row['flag_image'];
$selected = ( $user_flag == $flag_image ) ? ' selected="selected"' : '';
$flag_select .= ' <option value="' . $flag_image . '"' . $selected . '">' . $flag_name . '</option>';
if ( isset( $user_flag) && ($user_flag == $flag_image))
{
$flag_start_image = $flag_image;
}
}
$flag_select .= '</select>';
Code: Select all
//
// Let's do an overall check for settings/versions which would prevent
// us from doing file uploads....
//
$ini_val = ( phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var';
$form_enctype = ( !@$ini_val('file_uploads') || phpversion() == '4.0.4pl1' || !$board_config['allow_avatar_upload'] || ( phpversion() < '4.0.3' && @$ini_val('open_basedir') != '' ) ) ? '' : 'enctype="multipart/form-data"';
// Country/Location Flags
// Query to get the list of flags
$sql = "SELECT *
FROM " . FLAG_TABLE . "
ORDER BY flag_name";
if(!$flags_result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain flags information.", "", __LINE__, __FILE__, $sql);
}
// Build the html select statement
$flag_start_image = 'blank.gif';
$flag_select = '<select name="user_flag" onChange="document.images[\'user_flag\'].src = \'../images/flags/\' + this.value;">';
$flag_select .= '<option value="blank.gif">' . $lang['Select_country'] . '</option>';
while ( $flag_row = $db->sql_fetchrow($flags_result) )
{
$flag_name = $flag_row['flag_name'];
$flag_image = $flag_row['flag_image'];
$selected = ( $user_flag == $flag_image ) ? ' selected="selected"' : '';
$flag_select .= ' <option value="' . $flag_image . '"' . $selected . '">' . $flag_name . '</option>';
if ( isset( $user_flag) && ($user_flag == $flag_image))
{
$flag_start_image = $flag_image;
}
}
$flag_select .= '</select>';
Code: Select all
General Error
Could not update users table
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''us.gif', user_from_flag = 'us.gif', user_interests = '', user_sig = '', user_si' at line 2
UPDATE phpbb_users SET user_email = 'email@removed', user_icq = '', user_website = 'http://www.domain.com', user_occ = '', user_from = '#warrock on GameSurge.Net', 'us.gif', user_from_flag = 'us.gif', user_interests = '', user_sig = '', user_sig_bbcode_uid = '', user_viewemail = 0, user_aim = '', user_yim = '', user_msnm = '', user_attachsig = 1, user_allowsmile = 1, user_allowhtml = 0, user_allowbbcode = 1, user_allow_viewonline = 0, user_notify = 0, user_notify_pm = 0, user_popup_pm = 1, user_timezone = 0, user_dateformat = 'd M Y h:i a', user_lang = 'english', user_style = 5, user_active = 1, user_actkey = '' WHERE user_id = 2
Line : 550
File : usercp_register.php
Code: Select all
message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);
Code: Select all
INSERT INTO phpbb_flags(flag_id,flag_image,flag_name) VALUES('','iv.gif','Cote d'Ivoire');
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Ivoire')' at line 1
Code: Select all
INSERT INTO phpbb_flags(flag_id,flag_image,flag_name) VALUES('','iv.gif','Cote d'Ivoire');
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Ivoire')' at line 1
Code: Select all
$sql[] = 'INSERT INTO ' . $table_prefix . 'flags(flag_id,flag_image,flag_name) VALUES(\'\',\'iv.gif\',\'Cote d\'Ivoire\')';