echo " </table>\n"; echo " </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " <br />\n"; echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"600\">\n"; echo " <tr>\n"; echo " <td align=\"left\">\n"; echo " <table class=\"box\" width=\"100%\">\n"; echo " <tr>\n"; echo " <td align=\"left\" class=\"posthead\">\n"; echo " <table class=\"posthead\" width=\"100%\">\n"; if (attachments_get_all($uid, $aid, $attachments_array, $image_attachments_array)) { echo " <tr>\n"; echo " <td class=\"subhead_checkbox\" align=\"center\" width=\"1%\">", form_checkbox("toggle_other", "toggle_other"), "</td>\n"; echo " <td align=\"left\" colspan=\"4\" class=\"subhead\">", gettext("Other Attachments (including PM Messages and other forums)"), "</td>\n"; echo " </tr>\n"; if (is_array($attachments_array) && sizeof($attachments_array) > 0) { foreach ($attachments_array as $key => $attachment) { if ($attachment_link = attachments_make_link($attachment, false)) { echo " <tr>\n"; echo " <td align=\"center\" width=\"1%\">", form_checkbox("delete_other_attachment[{$attachment['hash']}]", "Y"), "</td>\n"; echo " <td align=\"left\" valign=\"top\" style=\"white-space: nowrap\" class=\"postbody\">{$attachment_link}</td>\n"; if (!is_md5($aid) && is_md5($attachment['aid'])) { echo " <td align=\"left\" valign=\"top\" style=\"white-space: nowrap\" class=\"postbody\">"; if ($message_link = attachments_get_message_link($attachment['aid'])) { echo "<a href=\"{$message_link}\" target=\"_blank\">", gettext("View Message"), "</a>"; } else {
echo " </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " <br />\n"; if ($uid == session::get_value('UID') && is_md5($aid)) { echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"600\">\n"; echo " <tr>\n"; echo " <td align=\"left\">\n"; echo " <table class=\"box\" width=\"100%\">\n"; echo " <tr>\n"; echo " <td align=\"left\" class=\"posthead\">\n"; echo " <table class=\"posthead\" width=\"100%\">\n"; if (attachments_get_all(session::get_value('UID'), $aid, $attachments_array, $image_attachments_array)) { echo " <tr>\n"; echo " <td class=\"subhead_checkbox\" width=\"1%\">", form_checkbox("toggle_other", "toggle_other"), "</td>\n"; echo " <td align=\"left\" colspan=\"4\" class=\"subhead\">", gettext("Other Attachments (including PM Messages and other forums)"), "</td>\n"; echo " </tr>\n"; if (is_array($attachments_array) && sizeof($attachments_array) > 0) { foreach ($attachments_array as $key => $attachment) { if ($attachment_link = attachments_make_link($attachment, false)) { echo " <tr>\n"; echo " <td align=\"center\" width=\"1%\">", form_checkbox("delete_other_attachment[{$attachment['hash']}]", "Y"), "</td>\n"; echo " <td align=\"left\" valign=\"top\" style=\"white-space: nowrap\" class=\"postbody\">{$attachment_link}</td>\n"; if (!is_md5($aid) && is_md5($attachment['aid'])) { echo " <td align=\"left\" valign=\"top\" style=\"white-space: nowrap\" class=\"postbody\">"; if ($message_link = attachments_get_message_link($attachment['aid'])) { echo "<a href=\"{$message_link}\" target=\"_blank\">", gettext("View Message"), "</a>"; } else {
} $dob['BLANK_FIELDS'] = $dob['YEAR'] == 0 || $dob['MONTH'] == 0 || $dob['DAY'] == 0 ? true : false; } else { $dob['YEAR'] = 0; $dob['MONTH'] = 0; $dob['DAY'] = 0; $dob['BLANK_FIELDS'] = true; } // Check to see if we should show the set for all forums checkboxes if (session::check_perm(USER_PERM_ADMIN_TOOLS, 0, 0) && $admin_edit || $profile_uid == $_SESSION['UID'] && $admin_edit === false) { $show_set_all = forums_get_available_count() > 1; } else { $show_set_all = false; } // User's attachments for profile and avatar pictures $attachments_array = attachments_get_all($profile_uid); // Start Output Here if ($admin_edit === true) { $user = user_get($profile_uid); html_draw_top(array('title' => sprintf(gettext('Admin - User Details - %s'), format_user_name($user['LOGON'], $user['NICKNAME'])), 'class' => 'window_title', 'js' => array('js/prefs.js', 'js/fineuploader.min.js'))); echo "<h1>", gettext("Admin"), html_style_image('separator'), gettext("Manage User"), html_style_image('separator'), word_filter_add_ob_tags(format_user_name($user['LOGON'], $user['NICKNAME']), true), "</h1>\n"; } else { html_draw_top(array('title' => gettext('My Controls - User Details'), 'class' => 'window_title', 'js' => array('js/prefs.js', 'js/fineuploader.min.js'))); echo "<h1>", gettext("User Details"), "</h1>\n"; } if (isset($error_msg_array) && sizeof($error_msg_array) > 0) { html_display_error_array($error_msg_array, '700', $admin_edit ? 'center' : 'left'); } else { if (isset($_GET['updated'])) { html_display_success_msg(gettext("Preferences were successfully updated."), '700', $admin_edit ? 'center' : 'left'); }
} if (!($content = poll_get_option_html($_GET['question_number'], $_GET['option_number']))) { header_status(500, 'Internal Server Error'); exit; } break; case 'pref_attachment': if (!session::logged_in()) { break; } cache_disable(); if (!isset($_GET['type']) || !in_array($_GET['type'], array('pic_aid', 'avatar_aid'))) { header_status(500, 'Internal Server Error'); exit; } $attachments_array = attachments_get_all($_SESSION['UID']); header('Content-type: application/json; charset=UTF-8'); switch ($_GET['type']) { case 'pic_aid': $content = json_encode(user_prefs_filter_attachments($attachments_array, 95, 95)); break; case 'avatar_aid': $content = json_encode(user_prefs_filter_attachments($attachments_array, 16, 16)); break; } break; default: header_status(500, 'Internal Server Error'); exit; } echo $content;
echo "<h1>", gettext("Attachments"), "</h1>\n"; if (isset($error_msg_array) && sizeof($error_msg_array) > 0) { html_display_error_array($error_msg_array, '700', 'center'); } echo "<br />\n"; echo "<form accept-charset=\"utf-8\" name=\"attachments\" method=\"post\" action=\"edit_attachments.php\">\n"; echo " ", form_csrf_token_field(), "\n"; echo " ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n"; echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n"; echo " <tr>\n"; echo " <td align=\"left\">\n"; echo " <table class=\"box\" width=\"100%\">\n"; echo " <tr>\n"; echo " <td align=\"left\" class=\"posthead\">\n"; echo " <table class=\"posthead\" width=\"100%\">\n"; if (($attachments_array = attachments_get_all($_SESSION['UID'])) !== false) { echo " <tr>\n"; echo " <td class=\"subhead_checkbox\" align=\"center\" width=\"1%\">", form_checkbox("toggle_main", "toggle_main"), "</td>\n"; echo " <td align=\"left\" colspan=\"4\" class=\"subhead\">", gettext("Attachments"), "</td>\n"; echo " </tr>\n"; foreach ($attachments_array as $key => $attachment) { if (($attachment_link = attachments_make_link($attachment, false, true)) !== false) { echo " <tr>\n"; echo " <td align=\"center\" width=\"1%\">", form_checkbox("attachments_delete[{$attachment['hash']}]", "Y"), "</td>\n"; echo " <td align=\"left\" valign=\"middle\" style=\"white-space: nowrap\" class=\"postbody\">{$attachment_link}</td>\n"; echo " <td align=\"left\" valign=\"middle\" style=\"white-space: nowrap\" class=\"postbody\">"; if (($message_link = attachments_get_message_link($attachment['hash'])) !== false) { echo "<a href=\"{$message_link}\" target=\"_blank\">", gettext("View Message"), "</a>"; } else { if (($message_link = attachments_get_pm_link($attachment['hash'])) !== false) { echo "<a href=\"{$message_link}\" target=\"_blank\">", gettext("View Message"), "</a>";