Example #1
0
 }
 if (empty($too_long_word)) {
     $too_long_word = too_long_word($user_location, $settings['location_word_maxlength']);
     if ($too_long_word) {
         $errors[] = 'error_word_too_long';
     }
 }
 $profile_check = html_format($profile);
 $profile_check = strip_tags($profile_check);
 if (empty($too_long_word)) {
     $too_long_word = too_long_word($profile_check, $settings['text_word_maxlength']);
     if ($too_long_word) {
         $errors[] = 'error_word_too_long';
     }
 }
 $signature_check = signature_format($signature);
 $signature_check = strip_tags($signature_check);
 if (empty($too_long_word)) {
     $too_long_word = too_long_word($signature_check, $settings['text_word_maxlength']);
     if ($too_long_word) {
         $errors[] = 'error_word_too_long';
     }
 }
 // end of checking
 // save if no errors:
 if (empty($errors)) {
     @mysql_query("UPDATE " . $db_settings['userdata_table'] . " SET user_name='" . mysql_real_escape_string($edit_user_name) . "', user_type='" . intval($edit_user_type) . "', user_email='" . mysql_real_escape_string($user_email) . "', user_real_name='" . mysql_real_escape_string($user_real_name) . "', gender=" . intval($gender) . ", birthday='" . mysql_real_escape_string($birthday) . "', email_contact=" . intval($email_contact) . ", user_hp='" . mysql_real_escape_string($user_hp) . "', user_location='" . mysql_real_escape_string($user_location) . "', profile='" . mysql_real_escape_string($profile) . "', signature='" . mysql_real_escape_string($signature) . "', last_login=last_login, registered=registered, new_posting_notification=" . intval($new_posting_notification) . ", new_user_notification=" . intval($new_user_notification) . ", time_difference=" . intval($time_difference) . " WHERE user_id=" . $edit_user_id, $connid) or raise_error('database_error', mysql_error());
     @mysql_query("UPDATE " . $db_settings['forum_table'] . " SET time=time, last_reply=last_reply, edited=edited, name='" . mysql_real_escape_string($edit_user_name) . "' WHERE user_id=" . intval($edit_user_id), $connid);
     @mysql_query("UPDATE " . $db_settings['forum_table'] . " SET time=time, last_reply=last_reply, edited=edited, edited_by='" . mysql_real_escape_string($edit_user_name) . "' WHERE edited_by='" . mysql_real_escape_string($old_user_name) . "'", $connid);
     @mysql_query("DELETE FROM " . $db_settings['userdata_cache_table'] . " WHERE cache_id=" . $edit_user_id, $connid);
     if (isset($_POST['delete_avatar'])) {
Example #2
0
 } else {
     $data['posting'] = $data['cache_text'];
 }
 #if(isset($data['signature']) && $data['signature'] != '' && $data["show_signature"]==1) $data['signature'] = signature_format(stripslashes($data['signature']));
 #else unset($data['signature']);
 if (isset($data['signature']) && $data['signature'] != '' && $data["show_signature"] == 1) {
     // user has a signature and wants it to be displaed in this posting. Check if it's already cached:
     if ($data['cache_signature'] != '') {
         $data['signature'] = $data['cache_signature'];
     } else {
         $s_result = @mysql_query("SELECT cache_signature FROM " . $db_settings['userdata_cache_table'] . " WHERE cache_id=" . intval($data['user_id']) . " LIMIT 1", $connid);
         $s_data = mysql_fetch_array($s_result);
         if ($s_data['cache_signature'] != '') {
             $data['signature'] = $s_data['cache_signature'];
         } else {
             $data['signature'] = signature_format(stripslashes($data['signature']));
             // cache signature:
             $xxx = mysql_query("SELECT COUNT(*) FROM " . $db_settings['userdata_cache_table'] . " WHERE cache_id=" . intval($data['user_id']), $connid) or die(mysql_error());
             list($row_count) = mysql_fetch_row($xxx);
             #echo 'row count: '.$row_count.' user_id: '.$data['user_id'].'<br />';
             if ($row_count == 1) {
                 @mysql_query("UPDATE " . $db_settings['userdata_cache_table'] . " SET cache_signature='" . mysql_real_escape_string($data['signature']) . "' WHERE cache_id=" . intval($data['user_id']), $connid);
             } else {
                 @mysql_query("DELETE FROM " . $db_settings['userdata_cache_table'] . " WHERE cache_id=" . intval($data['user_id']), $connid);
                 @mysql_query("INSERT INTO " . $db_settings['userdata_cache_table'] . " (cache_id, cache_signature, cache_profile) VALUES (" . intval($data['user_id']) . ",'" . mysql_real_escape_string($data['signature']) . "','')", $connid);
             }
         }
     }
 } else {
     unset($data['signature']);
 }
Example #3
0
 $smarty->assign('preview', true);
 if (isset($posting_user_id) && intval($posting_user_id) > 0) {
     $pr_result = @mysql_query("SELECT email_contact, user_hp, user_location, signature FROM " . $db_settings['userdata_table'] . " WHERE user_id = " . intval($posting_user_id) . " LIMIT 1", $connid) or die(mysql_error());
     $pr_data = mysql_fetch_array($pr_result);
     mysql_free_result($pr_result);
     if ($pr_data['email_contact'] != 0) {
         $smarty->assign('email', true);
     }
     if (trim($pr_data['user_hp']) != '') {
         $smarty->assign('preview_hp', htmlspecialchars(stripslashes(add_http_if_no_protocol($pr_data['user_hp']))));
     }
     if (trim($pr_data['user_location']) != '') {
         $smarty->assign('preview_location', htmlspecialchars(stripslashes($pr_data['user_location'])));
     }
     if (trim($pr_data['signature']) != '') {
         $smarty->assign('preview_signature', signature_format(stripslashes($pr_data['signature'])));
     }
     if ($pr_data['signature'] != '') {
         $smarty->assign('signature', true);
         $smarty->assign('show_signature', $show_signature);
     }
     $smarty->assign('provide_email_notification', true);
 } else {
     $smarty->assign('email', htmlspecialchars(stripslashes($email)));
     if (trim($hp) != '') {
         $smarty->assign('preview_hp', htmlspecialchars(stripslashes(add_http_if_no_protocol($hp))));
     }
     $smarty->assign('hp', htmlspecialchars(stripslashes($hp)));
     $smarty->assign('location', htmlspecialchars(stripslashes($location)));
     $smarty->assign('preview_location', htmlspecialchars(stripslashes($location)));
     if ($settings['email_notification_unregistered']) {
Example #4
0
 }
 if (empty($too_long_word)) {
     $too_long_word = too_long_word(stripslashes($user_location), $settings['location_word_maxlength']);
     if ($too_long_word) {
         $errors[] = 'error_word_too_long';
     }
 }
 $profile_check = html_format(stripslashes($profile));
 $profile_check = strip_tags($profile_check);
 if (empty($too_long_word)) {
     $too_long_word = too_long_word($profile_check, $settings['text_word_maxlength']);
     if ($too_long_word) {
         $errors[] = 'error_word_too_long';
     }
 }
 $signature_check = signature_format(stripslashes($signature));
 $signature_check = strip_tags($signature_check);
 if (empty($too_long_word)) {
     $too_long_word = too_long_word($signature_check, $settings['text_word_maxlength']);
     if ($too_long_word) {
         $errors[] = 'error_word_too_long';
     }
 }
 if (isset($errors)) {
     $result = mysql_query("SELECT user_name, user_email FROM " . $db_settings['userdata_table'] . " WHERE user_id = " . $id . " LIMIT 1", $connid) or raise_error('database_error', mysql_error());
     $row = mysql_fetch_array($result);
     mysql_free_result($result);
     $smarty->assign('errors', $errors);
     if (isset($too_long_word)) {
         $smarty->assign('word', $too_long_word);
     }
Example #5
0
        $edited_data = mysql_fetch_array($result);
        @mysql_free_result($result);
        if (!$edited_data['user_name']) {
            $edited_by = $lang['unknown_user'];
        } else {
            $edited_by = htmlspecialchars(stripslashes($edited_data['user_name']));
        }
    }
    $smarty->assign('edited_by', $edited_by);
}
if (isset($entrydata['signature']) && $entrydata['signature'] != '' && $entrydata["show_signature"] == 1) {
    // user has a signature and wants it to be displaed in this posting. Check if it's already cached:
    if ($entrydata['cache_signature'] != '') {
        $smarty->assign('signature', $entrydata['cache_signature']);
    } else {
        $signature = signature_format(stripslashes($entrydata['signature']));
        // cache signature:
        list($row_count) = @mysql_fetch_row(mysql_query("SELECT COUNT(*) FROM " . $db_settings['userdata_cache_table'] . " WHERE cache_id=" . intval($entrydata['user_id']), $connid));
        if ($row_count == 1) {
            mysql_query("UPDATE " . $db_settings['userdata_cache_table'] . " SET cache_signature='" . mysql_real_escape_string($signature) . "' WHERE cache_id=" . intval($entrydata['user_id']), $connid);
        } else {
            @mysql_query("DELETE FROM " . $db_settings['userdata_cache_table'] . " WHERE cache_id=" . intval($entrydata['user_id']), $connid);
            @mysql_query("INSERT INTO " . $db_settings['userdata_cache_table'] . " (cache_id, cache_signature, cache_profile) VALUES (" . intval($entrydata['user_id']) . ",'" . mysql_real_escape_string($signature) . "','')", $connid);
        }
        $smarty->assign('signature', $signature);
    }
}
if (isset($tree)) {
    $smarty->assign('tree', $tree);
}
if (isset($branch)) {