$error = array(); if (strxlen($_POST['question']) > $config['maxtitlelength']) { $error[] = $lang->phrase('question_too_long'); } if (strxlen($_POST['question']) < $config['mintitlelength']) { $error[] = $lang->phrase('question_too_short'); } if (count_filled($_POST['notice']) < 2) { $error[] = $lang->phrase('min_replies_vote'); } if (count_filled($_POST['notice']) > 50) { $error[] = $lang->phrase('max_replies_vote'); } if (count($error) > 0) { $data = array('question' => $_POST['question'], 'answer' => $_POST['notice']); $fid = save_error_data($data); error($error, 'managetopic.php?action=vote_edit&id=' . $_GET['id'] . "&fid=" . $fid . SID2URL_x); } else { $db->query("UPDATE {$db->pre}topics SET vquestion = '{$_POST['question']}' WHERE id = '{$_GET['id']}' LIMIT 1", __LINE__, __FILE__); $result = $db->query("SELECT id, answer FROM {$db->pre}vote WHERE tid = '{$info['id']}' ORDER BY id", __LINE__, __FILE__); while ($row = $db->fetch_assoc($result)) { if (strlen($_POST['notice'][$row['id']]) > 0 && strlen($_POST['notice'][$row['id']]) < 255) { $db->query("UPDATE {$db->pre}vote SET answer = '{$_POST['notice'][$row['id']]}' WHERE id = '{$row['id']}'", __LINE__, __FILE__); } } if (strlen($_POST['notice'][0]) > 0 && strlen($_POST['notice'][0]) < 255) { $db->query("INSERT INTO {$db->pre}vote (tid, answer) VALUES ('{$_GET['id']}','{$_POST['notice'][0]}')", __LINE__, __FILE__); } ok($lang->phrase('data_success'), "showtopic.php?id={$_GET['id']}"); } } elseif ($action == "vote_delete") {
} ($code = $plugins->load('editprofile_signature_start')) ? eval($code) : null; echo $tpl->parse("editprofile/signature"); ($code = $plugins->load('editprofile_signature_end')) ? eval($code) : null; } } elseif ($_GET['action'] == "about2") { if ($my->p['useabout'] == 0) { errorLogin($lang->phrase('not_allowed'), "editprofile.php"); } $error = array(); if (strxlen($_POST['about']) > $config['maxaboutlength']) { $error[] = $lang->phrase('about_too_long'); } ($code = $plugins->load('editprofile_about2_start')) ? eval($code) : null; if (count($error) > 0 || !empty($_POST['Preview'])) { $fid = save_error_data($_POST['about']); if (!empty($_POST['Preview'])) { $slog->updatelogged(); $db->close(); viscacha_header("Location: editprofile.php?action=about&job=preview&fid=" . $fid . SID2URL_JS_x); exit; } else { error($error, "editprofile.php?action=about&fid=" . $fid . SID2URL_x); } } else { ($code = $plugins->load('editprofile_about2_query')) ? eval($code) : null; $db->query("UPDATE {$db->pre}user SET about = '{$_POST['about']}' WHERE id = '{$my->id}'"); ok($lang->phrase('data_success'), "editprofile.php?action=about" . SID2URL_x); } } elseif ($_GET['action'] == "about") { if ($my->p['useabout'] == 0) {
} } foreach ($notices as $key => $note) { $notices[$key] = array('length' => numbers(strxlen($note)), 'text' => $note, 'rows' => count_nl($note, 15) + 1); } $notes = count($notices); $used_chars = numbers(strxlen(str_replace('[VSEP]', '', $my->notice))); $chars = numbers($config['maxnoticelength']); $mymodules->load('editprofile_notice_top'); echo $tpl->parse("editprofile/notice"); } elseif ($_GET['action'] == "about2") { if ($my->p['useabout'] == 0) { errorLogin($lang->phrase('not_allowed'), "editprofile.php"); } if (strxlen($_POST['comment']) > $config['maxaboutlength']) { $fid = save_error_data($_POST['comment']); error($lang->phrase('about_too_long'), "editprofile.php?action=about&fid=" . $fid . SID2URL_x); } else { $db->query("UPDATE {$db->pre}user SET about = '" . $_POST['comment'] . "' WHERE id = '" . $my->id . "'"); ok($lang->phrase('data_success'), "editprofile.php?action=about" . SID2URL_x); } } elseif ($_GET['action'] == "about") { if ($my->p['useabout'] == 0) { errorLogin($lang->phrase('not_allowed'), "editprofile.php"); } $breadcrumb->Add($lang->phrase('editprofile_about')); echo $tpl->parse("header"); echo $tpl->parse("menu"); if (strlen($_GET['fid']) == 32) { $data = $gpc->prepare(import_error_data($_GET['fid'])); } else {
$error[] = $lang->phrase('pw_comparison_failed'); } // Custom profile fields $custom = addprofile_customprepare(); $error = array_merge($error, $custom['error']); ($code = $plugins->load('register_save_errorhandling')) ? eval($code) : null; if (count($error) > 0) { $data = $custom['data']; $data['name'] = $_POST['name']; $data['email'] = $_POST['email']; $data['temp'] = $_POST['temp']; $data['human'] = $human; ($code = $plugins->load('register_save_errordata')) ? eval($code) : null; $fid = save_error_data($data, $fid); error($error, 'register.php?fid='.$fid.SID2URL_x); } else { set_flood(); $reg = time(); $confirmcode = md5($config['cryptkey'].$reg); $pw_md5 = md5($_POST['pwx']); ($code = $plugins->load('register_save_queries')) ? eval($code) : null; $db->query("INSERT INTO {$db->pre}user (name, pw, mail, regdate, confirm, groups, signature, about) VALUES ('{$_POST['name']}', '{$pw_md5}', '{$_POST['email']}', '{$reg}', '{$config['confirm_registration']}', '".GROUP_MEMBER."', '', '')"); $redirect = $db->insert_id(); // Custom profile fields addprofile_customsave($custom['data'], $redirect);