if (dbrows($result)) { $user_data = dbarray($result); } else { redirect("index.php"); } add_to_title($locale['global_200'] . $locale['u103'] . $locale['global_201'] . $user_data['user_name']); if (iADMIN && checkrights("UG") && $_GET['lookup'] != $userdata['user_id']) { if (isset($_POST['add_to_group']) && (isset($_POST['user_group']) && isnum($_POST['user_group']))) { if (!preg_match("(^\\.{$_POST['user_group']}\$|\\.{$_POST['user_group']}\\.|\\.{$_POST['user_group']}\$)", $user_data['user_groups'])) { $result = dbquery("UPDATE " . DB_USERS . " SET user_groups='" . $user_data['user_groups'] . "." . $_POST['user_group'] . "' WHERE user_id='" . $_GET['lookup'] . "'"); } redirect(FUSION_SELF . "?lookup=" . $user_data['user_id']); } } opentable($locale['u104'] . " " . $user_data['user_name']); $userFields = new UserFields(); $userFields->userData = $user_data; $userFields->showAdminOptions = true; $userFields->displayOutput(); } elseif (isset($_GET['group_id']) && isnum($_GET['group_id'])) { $result = dbquery("SELECT group_id, group_name FROM " . DB_USER_GROUPS . " WHERE group_id='" . $_GET['group_id'] . "'"); if (dbrows($result)) { $data = dbarray($result); $result = dbquery("SELECT user_id, user_name, user_level, user_status\n\t\t\tFROM " . DB_USERS . "\n\t\t\tWHERE user_groups REGEXP('^\\\\.{$_GET['group_id']}\$|\\\\.{$_GET['group_id']}\\\\.|\\\\.{$_GET['group_id']}\$')\n\t\t\tORDER BY user_level DESC, user_name"); opentable($locale['u110']); echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n"; echo "<td align='center' colspan='2' class='tbl1'><strong>" . $data['group_name'] . "</strong>\n"; echo "(" . sprintf(dbrows($result) == 1 ? $locale['u111'] : $locale['u112'], dbrows($result)) . ")"; echo "</td>\n</tr>\n<tr>\n"; if (dbrows($result)) { echo "<td class='tbl2'><strong>" . $locale['u113'] . "</strong></td>\n";
$errors = $userInput->getErrorsArray(); if (empty($errors) && $userInput->themeChanged()) { redirect(FUSION_SELF); } $userdata = dbarray(dbquery("SELECT * FROM " . DB_USERS . " WHERE user_id='" . $userdata['user_id'] . "'")); unset($userInput); } elseif (isset($_GET['code']) && $settings['email_verification'] == "1") { $userInput = new UserFieldsInput(); $userInput->verifyCode($_GET['code']); $userInput->displayMessages(); $userdata = dbarray(dbquery("SELECT * FROM " . DB_USERS . " WHERE user_id='" . $userdata['user_id'] . "'")); unset($userInput); } opentable($locale['u102']); if ($settings['email_verification'] == "1") { $result = dbquery("SELECT user_email FROM " . DB_EMAIL_VERIFY . " WHERE user_id='" . $userdata['user_id'] . "'"); if (dbrows($result)) { $data = dbarray($result); echo "<div class='tbl2' style='text-align:center; width:500px; margin: 5px auto 10px auto;'>" . sprintf($locale['u200'], $data['user_email']) . "\n<br />\n" . $locale['u201'] . "\n</div>\n"; } } echo "<div style='text-align:center; margin-bottom: 10px;'>" . $locale['u100'] . "</div>"; $userFields = new UserFields(); $userFields->postName = "update_profile"; $userFields->postValue = $locale['u105']; $userFields->userData = $userdata; $userFields->errorsArray = $errors; $userFields->setUserNameChange($settings['userNameChange']); $userFields->displayInput(); closetable(); require_once THEMES . "templates/footer.php";
echo set_value('email', $data['email']); ?> "> </div> <?php } ?> <?php foreach (UserFields::with((array) $data['usermeta'])->all('signup') as $key => $f) { ?> <?php if (OAuth::errors()->has($key)) { ?> <?php echo UserFields::buildField($key); ?> <?php } ?> <?php } ?> <div class="form-group"> <button type="submit" name="submit" class="btn btn-primary"><?php _e('main.signup'); ?> </button> </div> </form>
if (isset($_POST['savechanges'])) { $userInput = new UserFieldsInput(); $userInput->userData = $user_data; $userInput->adminActivation = 0; $userInput->emailVerification = 0; $userInput->isAdminPanel = TRUE; $userInput->skipCurrentPass = TRUE; $userInput->saveUpdate(); $userInput->displayMessages(); $errors = $userInput->getErrorsArray(); $user_data = dbarray(dbquery("SELECT * FROM " . DB_USERS . " WHERE user_id='" . $user_id . "'")); unset($userInput); } opentable($locale['430']); member_nav(member_url("edit", $user_id) . "| " . $locale['430']); $userFields = new UserFields(); $userFields->postName = "savechanges"; $userFields->postValue = $locale['430']; $userFields->formaction = FUSION_SELF . $aidlink . "&step=edit&user_id=" . $user_id; $userFields->isAdminPanel = TRUE; $userFields->showAdminPass = FALSE; $userFields->skipCurrentPass = TRUE; $userFields->userData = $user_data; $userFields->errorsArray = $errors; $userFields->displayInput(); closetable(); // Delete User } elseif (isset($_GET['step']) && $_GET['step'] == "delete" && $user_id && (!$isAdmin || iSUPERADMIN)) { if (isset($_POST['delete_user'])) { $result = dbquery("SELECT user_id, user_avatar FROM " . DB_USERS . " WHERE user_id='" . $user_id . "' AND user_level<'103'"); if (dbrows($result)) {
/** * Get thread posts info */ private function get_thread_post() { $forum_settings = $this->get_forum_settings(); $userdata = fusion_get_userdata(); $locale = fusion_get_locale(); $user_sig_module = \UserFields::check_user_field('user_sig'); $user_web_module = \UserFields::check_user_field('user_web'); $userid = isset($userdata['user_id']) ? (int) $userdata['user_id'] : 0; switch ($this->thread_info['section']) { case 'oldest': $sortCol = 'post_datestamp ASC'; break; case 'latest': $sortCol = 'post_datestamp DESC'; break; case 'high': $sortCol = 'vote_points DESC'; break; default: $sortCol = 'post_datestamp ASC'; } // @todo: where to calculate has voted without doing it in while loop? require_once INCLUDES . "mimetypes_include.php"; $result = dbquery("\n\t\t\t\t\tSELECT p.*,\n\t\t\t\t\tt.thread_id,\n\t\t\t\t\tu.user_id, u.user_name, u.user_status, u.user_avatar, u.user_level, u.user_posts, u.user_groups,\n\t\t\t\t\tu.user_joined, u.user_lastvisit, u.user_ip,\n\t\t\t\t\t" . ($user_sig_module ? " u.user_sig," : "") . ($user_web_module ? " u.user_web," : "") . "\n\t\t\t\t\tu2.user_name AS edit_name, u2.user_status AS edit_status,\n\t\t\t\t\tcount(a1.attach_id) 'attach_image_count',\n\t\t\t\t\tcount(a2.attach_id) 'attach_files_count',\n\t\t\t\t\tSUM(v.vote_points) as vote_points, count(v2.thread_id) as has_voted\n\t\t\t\t\tFROM " . DB_FORUM_POSTS . " p\n\t\t\t\t\tINNER JOIN " . DB_FORUM_THREADS . " t ON t.thread_id = p.thread_id\n\t\t\t\t\tLEFT JOIN " . DB_FORUM_VOTES . " v ON v.post_id = p.post_id\n\t\t\t\t\tLEFT JOIN " . DB_FORUM_VOTES . " v2 on v2.thread_id = p.thread_id AND v2.vote_user = '******'\n\t\t\t\t\tLEFT JOIN " . DB_USERS . " u ON p.post_author = u.user_id\n\t\t\t\t\tLEFT JOIN " . DB_USERS . " u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'\n\t\t\t\t\tLEFT JOIN " . DB_FORUM_ATTACHMENTS . " a1 on a1.post_id = p.post_id AND a1.attach_mime IN ('" . implode(",", img_mimeTypes()) . "')\n\t\t\t\t\tLEFT JOIN " . DB_FORUM_ATTACHMENTS . " a2 on a2.post_id = p.post_id AND a2.attach_mime NOT IN ('" . implode(",", img_mimeTypes()) . "')\n\t\t\t\t\tWHERE p.thread_id='" . intval($_GET['thread_id']) . "' AND post_hidden='0'\n\t\t\t\t\t" . ($this->thread_info['thread']['forum_type'] == '4' ? "OR p.post_id='" . intval($this->thread_info['post_firstpost']) . "'" : '') . "\n\t\t\t\t\tGROUP by p.post_id\n\t\t\t\t\tORDER BY {$sortCol} LIMIT " . intval($_GET['rowstart']) . ", " . intval($forum_settings['posts_per_page'])); $this->thread_info['post_rows'] = dbrows($result); if ($this->thread_info['post_rows'] > 0) { $response = $this->mood()->post_mood(); if ($response) { redirect(FUSION_REQUEST); } /* Set Threads Navigation */ $this->thread_info['thread_posts'] = format_word($this->thread_info['post_rows'], $locale['fmt_post']); $this->thread_info['page_nav'] = ''; if ($this->thread_info['max_post_items'] > $this->thread_info['posts_per_page']) { $this->thread_info['page_nav'] = "<div class='pull-right'>" . makepagenav($_GET['rowstart'], $this->thread_info['posts_per_page'], $this->thread_info['max_post_items'], 3, FORUM . "viewthread.php?thread_id=" . $this->thread_info['thread']['thread_id'] . (isset($_GET['highlight']) ? "&highlight=" . urlencode($_GET['highlight']) : '') . "&") . "</div>"; } add_to_jquery("\n \$('.reason_button').bind('click', function(e) {\n var reason_div = \$(this).data('target');\n console.log(reason_div);\n if ( \$('#'+reason_div).is(':visible') ) {\n \$('#'+reason_div).slideUp();\n } else {\n \$('#'+reason_div).slideDown();\n }\n });\n "); $i = 1; while ($pdata = dbarray($result)) { // Format Post Message $post_message = empty($pdata['post_smileys']) ? parsesmileys($pdata['post_message']) : $pdata['post_message']; $post_message = nl2br(parseubb($post_message)); if (isset($_GET['highlight'])) { $post_message = "<div class='search_result'>" . $post_message . "</div>\n"; } // Marker $marker = array('link' => "#post_" . $pdata['post_id'], "title" => "#" . ($i + $_GET['rowstart']), 'id' => "post_" . $pdata['post_id']); $post_marker = "<a class='marker' href='" . $marker['link'] . "' id='" . $marker['id'] . "'>" . $marker['title'] . "</a>"; $post_marker .= "<a title='" . $locale['forum_0241'] . "' href='#top'><i class='entypo up-open'></i></a>\n"; // Post Attachments $post_attachments = ""; if ($pdata['attach_files_count'] || $pdata['attach_image_count']) { if ($this->getThreadPermission("can_download_attach")) { $attachResult = dbquery("SELECT * FROM " . DB_FORUM_ATTACHMENTS . " WHERE post_id='" . intval($pdata['post_id']) . "'"); if (dbrows($attachResult) > 0) { $aImage = ""; $aFiles = ""; while ($attachData = dbarray($attachResult)) { if (in_array($attachData['attach_mime'], img_mimeTypes())) { $aImage .= display_image_attach($attachData['attach_name'], "50", "50", $pdata['post_id']) . "\n"; } else { $aFiles .= "<div class='display-inline-block'><i class='entypo attach'></i><a href='" . INFUSIONS . "forum/viewthread.php?thread_id=" . $pdata['thread_id'] . "&getfile=" . $attachData['attach_id'] . "'>" . $attachData['attach_name'] . "</a> "; $aFiles .= "[<span class='small'>" . parsebytesize(filesize(INFUSIONS . "forum/attachments/" . $attachData['attach_name'])) . " / " . $attachData['attach_count'] . $locale['forum_0162'] . "</span>]</div>\n"; } } if (!empty($aFiles)) { $post_attachments .= "<div class='emulated-fieldset'>\n"; $post_attachments .= "<span class='emulated-legend'>" . profile_link($pdata['user_id'], $pdata['user_name'], $pdata['user_status']) . $locale['forum_0154'] . ($pdata['attach_files_count'] > 1 ? $locale['forum_0158'] : $locale['forum_0157']) . "</span>\n"; $post_attachments .= "<div class='attachments-list m-t-10'>" . $aFiles . "</div>\n"; $post_attachments .= "</div>\n"; } if (!empty($aImage)) { $post_attachments .= "<div class='emulated-fieldset'>\n"; $post_attachments .= "<span class='emulated-legend'>" . profile_link($pdata['user_id'], $pdata['user_name'], $pdata['user_status']) . $locale['forum_0154'] . ($pdata['attach_image_count'] > 1 ? $locale['forum_0156'] : $locale['forum_0155']) . "</span>\n"; $post_attachments .= "<div class='attachments-list'>" . $aImage . "</div>\n"; $post_attachments .= "</div>\n"; if (!defined('COLORBOX')) { define('COLORBOX', TRUE); add_to_head("<link rel='stylesheet' href='" . INCLUDES . "jquery/colorbox/colorbox.css' type='text/css' media='screen' />"); add_to_head("<script type='text/javascript' src='" . INCLUDES . "jquery/colorbox/jquery.colorbox.js'></script>"); add_to_jquery("\$('a[rel^=\"attach\"]').colorbox({ current: '" . $locale['forum_0159'] . " {current} " . $locale['forum_0160'] . " {total}',width:'80%',height:'80%'});"); } } } else { $post_attachments = "Failed to fetch the attachment"; } } else { $post_attachments = "<small><i class='fa fa-clipboard'></i> " . $locale['forum_0184'] . "</small>\n"; } } $pdata['user_ip'] = $forum_settings['forum_ips'] && iMOD ? $locale['forum_0268'] . ' ' . $pdata['post_ip'] : ''; $pdata += array("user_online" => $pdata['user_lastvisit'] >= time() - 3600 ? TRUE : FALSE, "is_first_post" => $pdata['post_id'] == $this->thread_info['post_firstpost'] ? TRUE : FALSE, "is_last_post" => $pdata['post_id'] == $this->thread_info['post_lastpost'] ? TRUE : FALSE, "user_profile_link" => profile_link($pdata['user_id'], $pdata['user_name'], $pdata['user_status']), "user_avatar_image" => display_avatar($pdata, '50px', FALSE, FALSE, 'img-rounded'), "user_post_count" => format_word($pdata['user_posts'], $locale['fmt_post']), "print" => array('link' => BASEDIR . "print.php?type=F&item_id=" . $_GET['thread_id'] . "&post=" . $pdata['post_id'] . "&nr=" . ($i + $_GET['rowstart']), 'title' => $locale['forum_0179']), "post_marker" => $post_marker, "marker" => $marker, "post_attachments" => $post_attachments, 'post_reply_message' => ''); $pdata['post_message'] = $post_message; // Reply notifications $reply_result = dbquery("\n SELECT p.post_id, p.post_datestamp, u.user_id, u.user_name, u.user_status\n FROM " . DB_FORUM_POSTS . " p\n INNER JOIN " . DB_USERS . " u ON u.user_id = p.post_author\n WHERE p.post_cat= " . intval($pdata['post_id']) . "\n GROUP BY u.user_id ORDER BY p.post_datestamp DESC\n "); if (dbrows($reply_result) > 0) { // who has replied $reply_sender = ""; $last_datestamp = 0; while ($r_data = dbarray($reply_result)) { $reply_sender[$r_data['post_id']] = "<a class='reply_sender' href='" . FUSION_REQUEST . "#post_" . $r_data['post_id'] . "'>\n" . profile_link($r_data['user_id'], $r_data['user_name'], $r_data['user_status'], "", FALSE) . "</a>"; $last_datestamp = $r_data['post_datestamp']; } $senders = implode(", ", $reply_sender); $pdata['post_reply_message'] = "<i class='fa fa-reply fa-fw'></i>" . sprintf($locale['forum_0527'], $senders, timer($last_datestamp)); } // Displays mood buttons $pdata['post_mood'] = $this->mood()->set_PostData($pdata)->display_mood_buttons(); $pdata['post_mood_message'] = $this->mood()->get_mood_message(); /** * User Stuffs, Sig, User Message, Web */ // Quote & Edit Link if ($this->getThreadPermission("can_reply")) { if (!$this->thread_info['thread']['thread_locked']) { $pdata['post_quote'] = array('link' => INFUSIONS . "forum/viewthread.php?action=reply&forum_id=" . $pdata['forum_id'] . "&thread_id=" . $pdata['thread_id'] . "&post_id=" . $pdata['post_id'] . "&quote=" . $pdata['post_id'], 'title' => $locale['forum_0266']); if (iMOD || ($forum_settings['forum_edit_lock'] == TRUE && $pdata['is_last_post'] || $forum_settings['forum_edit_lock'] == FALSE) && $userdata['user_id'] == $pdata['post_author'] && ($forum_settings['forum_edit_timelimit'] <= 0 || time() - $forum_settings['forum_edit_timelimit'] * 60 < $pdata['post_datestamp'])) { $pdata['post_edit'] = array('link' => INFUSIONS . "forum/viewthread.php?action=edit&forum_id=" . $pdata['forum_id'] . "&thread_id=" . $pdata['thread_id'] . "&post_id=" . $pdata['post_id'], 'title' => $locale['forum_0265']); } $pdata['post_reply'] = array('link' => INFUSIONS . "forum/viewthread.php?action=reply&forum_id=" . $pdata['forum_id'] . "&thread_id=" . $pdata['thread_id'] . "&post_id=" . $pdata['post_id'], 'title' => $locale['forum_0509']); } elseif (iMOD) { $pdata['post_edit'] = array('link' => INFUSIONS . "forum/viewthread.php?action=edit&forum_id=" . $pdata['forum_id'] . "&thread_id=" . $pdata['thread_id'] . "&post_id=" . $pdata['post_id'], 'title' => $locale['forum_0265']); } } // rank img if ($pdata['user_level'] <= USER_LEVEL_ADMIN) { if ($forum_settings['forum_ranks']) { $pdata['user_rank'] = show_forum_rank($pdata['user_posts'], $pdata['user_level'], $pdata['user_groups']); // in fact now is get forum rank } else { $pdata['user_rank'] = getuserlevel($pdata['user_level']); } } else { if ($forum_settings['forum_ranks']) { $pdata['user_rank'] = iMOD ? show_forum_rank($pdata['user_posts'], 104, $pdata['user_groups']) : show_forum_rank($pdata['user_posts'], $pdata['user_level'], $pdata['user_groups']); } else { $pdata['user_rank'] = iMOD ? $locale['userf1'] : getuserlevel($pdata['user_level']); } } // Website if ($pdata['user_web'] && (iADMIN || $pdata['user_status'] != 6 && $pdata['user_status'] != 5)) { $user_web_url = !preg_match("@^http(s)?\\:\\/\\/@i", $pdata['user_web']) ? "http://" . $pdata['user_web'] : $pdata['user_web']; $pdata['user_web'] = array('link' => $user_web_url, 'title' => $locale['forum_0364']); } else { $pdata['user_web'] = array('link' => '', 'title' => ''); } // PM link $pdata['user_message'] = array('link' => '', 'title' => ''); if (iMEMBER && $pdata['user_id'] != $userdata['user_id'] && (iADMIN || $pdata['user_status'] != 6 && $pdata['user_status'] != 5)) { $pdata['user_message'] = array('link' => BASEDIR . 'messages.php?msg_send=' . $pdata['user_id'], "title" => $locale['send_message']); } // User Sig if ($pdata['user_sig'] && isset($pdata['post_showsig']) && $pdata['user_status'] != 6 && $pdata['user_status'] != 5) { $pdata['user_sig'] = nl2br(parseubb(parsesmileys(stripslashes($pdata['user_sig'])), "b|i|u||center|small|url|mail|img|color")); } else { $pdata['user_sig'] = ""; } // Voting - need up or down link - accessible to author also the vote // answered and on going questions. // Answer rating $pdata['vote_message'] = ''; //echo $data['forum_type'] == 4 ? "<br/>\n".(number_format($data['thread_postcount']-1)).$locale['forum_0365']."" : ''; // answers // form components $pdata['post_checkbox'] = iMOD ? "<input type='checkbox' name='delete_post[]' value='" . $pdata['post_id'] . "'/>" : ''; $pdata['post_votebox'] = ''; if ($this->thread_info['thread']['forum_type'] == 4) { if ($this->getThreadPermission("can_rate")) { // can vote. $pdata['vote_up'] = array('link' => INFUSIONS . "forum/postify.php?post=voteup&forum_id=" . $pdata['forum_id'] . "&thread_id=" . $pdata['thread_id'] . "&post_id=" . $pdata['post_id'], "title" => $locale['forum_0265']); $pdata['vote_down'] = array('link' => INFUSIONS . "forum/postify.php?post=votedown&forum_id=" . $pdata['forum_id'] . "&thread_id=" . $pdata['thread_id'] . "&post_id=" . $pdata['post_id'], "title" => $locale['forum_0265']); $pdata['post_votebox'] = "<div class='text-center'>\n"; $pdata['post_votebox'] .= "<a href='" . $pdata['vote_up']['link'] . "' class='btn btn-default btn-xs m-b-5 p-5' title='" . $locale['forum_0265'] . "'>\n<i class='entypo up-dir icon-xs'></i></a>"; $pdata['post_votebox'] .= "<h3 class='m-0'>" . (!empty($pdata['vote_points']) ? $pdata['vote_points'] : 0) . "</h3>\n"; $pdata['post_votebox'] .= "<a href='" . $pdata['vote_down']['link'] . "' class='btn btn-default btn-xs m-t-5 p-5' title='" . $locale['forum_0265'] . "'>\n<i class='entypo down-dir icon-xs'></i></a>"; $pdata['post_votebox'] .= "</div>\n"; } else { $pdata['post_votebox'] = "<div class='text-center'>\n"; $pdata['post_votebox'] .= "<h3 class='m-0'>" . (!empty($pdata['vote_points']) ? $pdata['vote_points'] : 0) . "</h3>\n"; $pdata['post_votebox'] .= "</div>\n"; } } $pdata['post_edit_reason'] = ''; if ($pdata['post_edittime']) { $edit_reason = "<small><div class='edit_reason'>" . $locale['forum_0164'] . profile_link($pdata['post_edituser'], $pdata['edit_name'], $pdata['edit_status']) . $locale['forum_0167'] . showdate("forumdate", $pdata['post_edittime']) . " - "; if ($pdata['post_editreason'] && iMEMBER) { $edit_reason .= "<a id='reason_pid_" . $pdata['post_id'] . "' rel='" . $pdata['post_id'] . "' class='reason_button pointer' data-target='reason_div_pid_" . $pdata['post_id'] . "'>"; $edit_reason .= "<strong>" . $locale['forum_0165'] . "</strong>"; $edit_reason .= "</a></div>"; $edit_reason .= "<div id='reason_div_pid_" . $pdata['post_id'] . "' class='post_reason' style='display:none;'><small class='text-lighter'>- " . $pdata['post_editreason'] . "</small></div>\n"; } else { $edit_reason .= "</div>\n</small>"; } $pdata['post_edit_reason'] = $edit_reason; //$this->edit_reason = TRUE; } // Custom Post Message Link/Buttons $pdata['post_links'] = ''; $pdata['post_links'] .= !empty($pdata['post_quote']) ? "<a class='btn btn-xs btn-default' title='" . $pdata['post_quote']["title"] . "' href='" . $pdata['post_quote']['link'] . "'>" . $pdata['post_quote']['title'] . "</a>\n" : ''; $pdata['post_links'] .= !empty($pdata['post_edit']) ? "<a class='btn btn-xs btn-default' title='" . $pdata['post_edit']["title"] . "' href='" . $pdata['post_edit']['link'] . "'>" . $pdata['post_edit']['title'] . "</a>\n" : ''; $pdata['post_links'] .= !empty($pdata['print']) ? "<a class='btn btn-xs btn-default' title='" . $pdata['print']["title"] . "' href='" . $pdata['print']['link'] . "'>" . $pdata['print']['title'] . "</a>\n" : ''; $pdata['post_links'] .= !empty($pdata['user_web']) ? "<a class='btn btn-xs btn-default' class='forum_user_actions' href='" . $pdata['user_web']['link'] . "' target='_blank'>" . $pdata['user_web']['title'] . "</a>\n" : ''; $pdata['post_links'] .= !empty($pdata['user_message']) ? "<a class='btn btn-xs btn-default' href='" . $pdata['user_message']['link'] . "' target='_blank'>" . $pdata['user_message']['title'] . "</a>\n" : ''; // Post Date $pdata['post_date'] = $locale['forum_0524'] . " " . timer($pdata['post_datestamp']) . " - " . showdate('forumdate', $pdata['post_datestamp']); $pdata['post_shortdate'] = $locale['forum_0524'] . " " . timer($pdata['post_datestamp']); $pdata['post_longdate'] = $locale['forum_0524'] . " " . showdate('forumdate', $pdata['post_datestamp']); $this->thread_info['post_items'][$pdata['post_id']] = $pdata; $i++; } } }
?> ><?php echo "{$user->last_name} {$user->first_name}"; ?> </option> <?php } ?> </select> </div> <?php } ?> <?php echo UserFields::setData($user->usermeta)->build('user'); ?> <div class="form-group"> <button type="submit" name="submit" class="btn btn-primary"><?php _e('main.save_changes'); ?> </button> </div> </form> <script src="<?php echo asset_url('js/vendor/jquery.Jcrop.min.js'); ?> "></script> <script src="<?php
$userInput->userData = $user_data; $userInput->adminActivation = 0; $userInput->registration = FALSE; $userInput->emailVerification = 0; $userInput->isAdminPanel = TRUE; $userInput->skipCurrentPass = TRUE; $userInput->saveUpdate(); $user_data = dbarray(dbquery("SELECT * FROM " . DB_USERS . " WHERE user_id='" . $user_id . "'")); unset($userInput); if ($defender->safe()) { redirect(FUSION_SELF . $aidlink); } } opentable($locale['430']); add_breadcrumb(array('link' => '', 'title' => $locale['430'])); $userFields = new UserFields(); $userFields->postName = "savechanges"; $userFields->postValue = $locale['430']; $userFields->displayValidation = 0; $userFields->displayTerms = FALSE; $userFields->plugin_folder = INCLUDES . "user_fields/"; $userFields->plugin_locale_folder = LOCALE . LOCALESET . "user_fields/"; $userFields->showAdminPass = FALSE; $userFields->skipCurrentPass = TRUE; $userFields->userData = $user_data; $userFields->method = 'input'; $userFields->admin_mode = true; $info = $userFields->get_profile_input(); render_userform($info); closetable(); // Delete User
</label> <input type="password" name="pass1" id="signup-pass1" class="form-control" autocomplete="off" value=""> </div> <!-- <div class="form-group"> <label for="signup-pass2"><?php _e('main.password_confirmation'); ?> </label> <input type="password" name="pass2" id="signup-pass2" class="form-control" autocomplete="off"> </div> --> <?php echo UserFields::build('signup'); ?> <?php if (Config::get('auth.captcha')) { ?> <div class="form-group recaptcha"> <?php display_captcha(); ?> </div> <?php } ?> <div class="form-group">
function ajax_settings_profile() { if (Auth::guest()) { exit; } $avatarType = isset($_POST['avatar_type']) ? $_POST['avatar_type'] : ''; $displayName = isset($_POST['display_name']) ? escape($_POST['display_name']) : ''; $types = implode(',', array_keys(Config::get('auth.providers', array()))); $data = array('avatar_type' => $avatarType); $rules = array('avatar_type' => "in:image,gravatar,{$types}"); foreach (UserFields::all('user') as $key => $field) { if (!empty($field['validation'])) { $data[$key] = isset($_POST[$key]) ? $_POST[$key] : ''; $rules[$key] = $field['validation']; } } $validator = Validator::make($data, $rules); if ($validator->passes()) { $user = User::find(Auth::user()->id); if (!empty($displayName)) { $user->display_name = $displayName; } if ($user->save()) { $fields = array_merge(UserFields::all('user'), array('avatar_type' => '')); foreach ($fields as $key => $field) { $value = isset($_POST[$key]) ? escape($_POST[$key]) : ''; $prev = isset($user->usermeta[$key]) ? $user->usermeta[$key] : ''; Usermeta::update($user->id, $key, $value, $prev); } json_message(); } else { json_message(with(new MessageBag(array('error' => trans('errors.dbsave'))))->toArray(), false); } } else { json_message($validator->errors()->toArray(), false); } }