Esempio n. 1
0
    echo "                  <td align=\"center\" class=\"subhead\" width=\"150\"><a href=\"links.php?webtag={$webtag}&amp;fid={$fid}&amp;viewmode={$viewmode}&amp;page={$page}&amp;sort_by=CREATED&amp;sort_dir=ASC\">", gettext("Date"), "</a>&nbsp;</td>\n";
}
if ($sort_by == "RATING" && $sort_dir == "DESC") {
    echo "                  <td align=\"center\" class=\"subhead\" width=\"100\"><a href=\"links.php?webtag={$webtag}&amp;fid={$fid}&amp;viewmode={$viewmode}&amp;page={$page}&amp;sort_by=RATING&amp;sort_dir=ASC\">", gettext("Rating"), "</a>&nbsp;</td>";
} else {
    echo "                  <td align=\"center\" class=\"subhead\" width=\"100\"><a href=\"links.php?webtag={$webtag}&amp;fid={$fid}&amp;viewmode={$viewmode}&amp;page={$page}&amp;sort_by=RATING&amp;sort_dir=DESC\">", gettext("Rating"), "</a>&nbsp;</td>";
}
echo "                </tr>\n";
if (sizeof($links['links_array']) > 0) {
    foreach ($links['links_array'] as $key => $link) {
        if ($link['VISIBLE'] == "N") {
            echo "                <tr class=\"link_hidden\">\n";
            echo "                  <td align=\"left\" class=\"postbody\" valign=\"top\">&nbsp;<a href=\"links_detail.php?webtag={$webtag}&amp;lid={$key}&amp;fid={$fid}\" class=\"link_hidden\">", word_filter_add_ob_tags($link['TITLE'], true), "</a></td>\n";
        } else {
            echo "                <tr>\n";
            echo "                  <td align=\"left\" class=\"postbody\" valign=\"top\">&nbsp;<a href=\"links_detail.php?webtag={$webtag}&amp;lid={$key}&amp;fid={$fid}\">", word_filter_add_ob_tags($link['TITLE'], true), "</a></td>\n";
        }
        echo "                  <td align=\"center\" class=\"postbody\" valign=\"top\">", format_time($link['CREATED']), "</td>\n";
        if (isset($link['RATING']) && strlen($link['RATING']) > 0) {
            echo "                  <td align=\"center\" class=\"postbody\" valign=\"top\">", number_format($link['RATING'], 1, ".", ","), "</td>\n";
        } else {
            echo "                  <td align=\"center\" class=\"postbody\" valign=\"top\">&nbsp;</td>\n";
        }
        echo "                </tr>\n";
    }
}
echo "                <tr>\n";
echo "                  <td align=\"left\" class=\"postbody\">&nbsp;</td>\n";
echo "                </tr>\n";
echo "              </table>\n";
echo "            </td>\n";
Esempio n. 2
0
echo "<form accept-charset=\"utf-8\" name=\"f_post\" action=\"lpm_edit.php\" method=\"post\" target=\"_self\">\n";
echo "  ", form_csrf_token_field(), "\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  ", form_input_hidden('mid', htmlentities_array($mid)), "\n";
echo "<div class=\"post\">\n";
echo "<h3>", gettext("Edit Message"), "</h3>\n";
echo "<div class=\"post_inner\">\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    light_html_display_error_array($error_msg_array);
}
echo "<div class=\"post_thread_title\">", gettext("Subject"), ":", light_form_input_text("t_subject", isset($t_subject) ? htmlentities_array($t_subject) : "", 30, 64), "</div>\n";
echo "<div class=\"post_to\">", gettext("To"), ":\n";
echo "<div class=\"recipients\">\n";
if (isset($message_data['RECIPIENTS']) && sizeof($message_data['RECIPIENTS']) > 0) {
    foreach ($message_data['RECIPIENTS'] as $recipient) {
        echo word_filter_add_ob_tags(format_user_name($recipient['LOGON'], $recipient['NICKNAME']), true), "\n";
    }
} else {
    echo gettext('Unknown User');
}
echo "</div>\n";
echo "</div>\n";
echo "<div class=\"post_content\">", light_form_textarea("t_content", htmlentities_array(strip_paragraphs($t_content)), 10, 50, null, 'textarea'), "</div>\n";
echo "<div class=\"post_buttons\">";
echo light_form_submit("apply", gettext("Apply"));
echo light_form_submit("preview", gettext("Preview"));
echo light_form_submit("cancel", gettext("Cancel"));
echo "</div>";
if (attachments_check_dir()) {
    echo "<div class=\"attachments post_attachments\">", gettext('Attachments'), ":\n";
    echo "  ", attachments_form($_SESSION['UID'], $attachments), "\n";
Esempio n. 3
0
if (session::logged_in()) {
    echo "<form accept-charset=\"utf-8\" name=\"link_comment\" action=\"links_detail.php\" method=\"post\">\n";
    echo "  ", form_csrf_token_field(), "\n";
    echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
    echo "  ", form_input_hidden("type", "comment"), "\n";
    echo "  ", form_input_hidden("lid", htmlentities_array($lid)), "\n";
    echo "  ", form_input_hidden("parent_fid", htmlentities_array($parent_fid)), "\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";
    echo "                <tr>\n";
    echo "                  <td align=\"left\" class=\"subhead\">", gettext("Add a comment about"), " ", word_filter_add_ob_tags($link['TITLE'], true), "</td>";
    echo "                </tr>\n";
    echo "                <tr>\n";
    echo "                  <td align=\"center\">\n";
    echo "                    <table class=\"posthead\" width=\"95%\">\n";
    echo "                      <tr>\n";
    echo "                        <td align=\"left\">", form_textarea("comment", null, 6, 74), "</td>\n";
    echo "                      </tr>\n";
    echo "                      <tr>\n";
    echo "                        <td align=\"left\">&nbsp;</td>\n";
    echo "                      </tr>\n";
    echo "                    </table>\n";
    echo "                  </td>\n";
    echo "                </tr>\n";
    echo "              </table>\n";
    echo "            </td>\n";
Esempio n. 4
0
    echo "                      </tr>\n";
    echo "                      <tr>\n";
    echo "                        <td align=\"left\">", form_input_text("t_threadtitle", htmlentities_array($t_threadtitle), 0, 0, false, "thread_title"), form_input_hidden("t_newthread", "Y"), "</td>\n";
    echo "                      </tr>\n";
} else {
    echo "                      <tr>\n";
    echo "                        <td align=\"left\"><h2>", gettext("Folder"), "</h2></td>\n";
    echo "                      </tr>\n";
    echo "                      <tr>\n";
    echo "                        <td align=\"left\">", word_filter_add_ob_tags($thread_data['FOLDER_TITLE'], true), "</td>\n";
    echo "                      </tr>\n";
    echo "                      <tr>\n";
    echo "                        <td align=\"left\"><h2>", gettext("Thread title"), "</h2></td>\n";
    echo "                      </tr>\n";
    echo "                      <tr>\n";
    echo "                        <td align=\"left\">", word_filter_add_ob_tags($thread_data['TITLE'], true), form_input_hidden("t_tid", htmlentities_array($reply_to_tid)), form_input_hidden("t_rpid", htmlentities_array($reply_to_pid)), "</td>\n";
    echo "                      </tr>\n";
}
echo "                      <tr>\n";
echo "                        <td align=\"left\"><h2>", gettext("To"), "</h2></td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\" style=\"white-space: nowrap\">", form_input_text_search("t_to_user", htmlentities_array($t_to_user), false, false, SEARCH_LOGON, false, "", "post_to_others"), "</td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\">&nbsp;</td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\"><h2>", gettext("Thread options"), "</h2></td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
Esempio n. 5
0
function links_get_folder_path_links($fid, $folders, $html = true, $link_last_too = false, $link_base = false)
{
    $webtag = get_webtag();
    forum_check_webtag_available($webtag);
    if (!is_numeric($fid)) {
        return false;
    }
    if (!is_array($folders)) {
        return false;
    }
    if (!isset($folders[$fid])) {
        return false;
    }
    $tree_fid = $fid;
    $tree_array = array();
    list($key) = array_keys($folders);
    while ($tree_fid != $key) {
        $tree_array[] = $tree_fid;
        $tree_fid = $folders[$tree_fid]['PARENT_FID'];
    }
    $link_base = $link_base ? $link_base : "links.php?webtag={$webtag}";
    if (strstr($link_base, "?")) {
        $result = $html ? "<a href=\"{$link_base}&amp;fid={$key}\">" . word_filter_add_ob_tags($folders[$key]['NAME'], true) . "</a>" : word_filter_add_ob_tags($folders[$key]['NAME'], true);
    } else {
        $result = $html ? "<a href=\"{$link_base}&amp;fid={$key}\">" . word_filter_add_ob_tags($folders[$key]['NAME'], true) . "</a>" : word_filter_add_ob_tags($folders[$key]['NAME'], true);
    }
    if (is_array($tree_array) && sizeof($tree_array) > 0) {
        while (($val = array_pop($tree_array)) !== null) {
            if ($val != $fid && $html || $link_last_too) {
                $result .= $html ? html_style_image('separator') . "<a href=\"{$link_base}&amp;fid={$val}\">" . word_filter_add_ob_tags($folders[$val]['NAME'], true) . "</a>" : " &gt; " . word_filter_add_ob_tags($folders[$val]['NAME'], true);
            } else {
                $result .= $html ? html_style_image('separator') . word_filter_add_ob_tags($folders[$val]['NAME'], true) : " &gt; " . word_filter_add_ob_tags($folders[$val]['NAME'], true);
            }
        }
    }
    return $result;
}
 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";
 echo "                <tr>\n";
 echo "                  <td class=\"subhead\" align=\"center\" width=\"20\">&nbsp;</td>\n";
 echo "                  <td class=\"subhead\" align=\"left\">", gettext("Name"), "</td>\n";
 echo "                  <td class=\"subhead\" align=\"left\">", gettext("Feed Location"), "</td>\n";
 echo "                  <td class=\"subhead\" align=\"left\" width=\"20%\">", gettext("Update Frequency"), "&nbsp;</td>\n";
 echo "                </tr>\n";
 if (sizeof($rss_feeds['rss_feed_array']) > 0) {
     foreach ($rss_feeds['rss_feed_array'] as $rss_feed) {
         echo "                <tr>\n";
         echo "                  <td valign=\"top\" align=\"center\" width=\"1%\">", form_checkbox("t_delete[{$rss_feed['RSSID']}]", "Y", false), "</td>\n";
         echo "                  <td valign=\"top\" align=\"left\" width=\"35%\"><a href=\"admin_rss_feeds.php?webtag={$webtag}&amp;page={$page}&amp;feed_id={$rss_feed['RSSID']}\">", word_filter_add_ob_tags($rss_feed['NAME'], true), "</a></td>\n";
         echo "                  <td valign=\"top\" align=\"left\" width=\"45%\">{$rss_feed['URL']}</td>\n";
         echo "                  <td valign=\"top\" align=\"left\" width=\"20%\">", in_array($rss_feed['FREQUENCY'], array_keys($update_frequencies_array)) ? $update_frequencies_array[$rss_feed['FREQUENCY']] : gettext("Unknown"), "</td>\n";
         echo "                </tr>\n";
     }
 }
 echo "                <tr>\n";
 echo "                  <td align=\"left\">&nbsp;</td>\n";
 echo "                </tr>\n";
 echo "              </table>\n";
 echo "            </td>\n";
 echo "          </tr>\n";
 echo "        </table>\n";
 echo "      </td>\n";
 echo "    </tr>\n";
 echo "    <tr>\n";
Esempio n. 7
0
                break;
            case DELETE_USER_DATA:
                $index_link = "<a href=\"index.php?webtag={$webtag}&amp;final_uri=%s\" target=\"_blank\">%s</a>";
                $admin_user_link = sprintf("admin_user.php?webtag={$webtag}&uid=%s", $entry_array[0]);
                $admin_user_link = sprintf($index_link, rawurlencode($admin_user_link), $entry_array[1]);
                $action_text = sprintf(gettext("Deleted all user data for account '%s'"), $admin_user_link);
                break;
            default:
                $action_text = gettext("Unknown") . " :: {$admin_log_entry['ACTION']} :: ";
                $action_text .= implode(", ", $entry_array);
                break;
        }
        if ($auto_update === true) {
            echo "                    <td align=\"left\" valign=\"top\">", gettext("none"), "</td>\n";
        } else {
            echo "                    <td align=\"left\" valign=\"top\"><a href=\"admin_user.php?webtag={$webtag}&amp;uid=", $admin_log_entry['UID'], "\">", word_filter_add_ob_tags(format_user_name($admin_log_entry['LOGON'], $admin_log_entry['NICKNAME']), true), "</a></td>\n";
        }
        echo "                    <td align=\"left\">", $action_text, "</td>\n";
        if (isset($group_by) && $group_by != ADMIN_LOG_GROUP_NONE) {
            echo "                    <td align=\"center\">{$admin_log_entry['COUNT']}</td>\n";
        }
        echo "                  </tr>\n";
    }
}
echo "                <tr>\n";
echo "                  <td align=\"left\">&nbsp;</td>\n";
echo "                </tr>\n";
echo "              </table>\n";
echo "            </td>\n";
echo "          </tr>\n";
echo "        </table>\n";
Esempio n. 8
0
    echo "                      </tr>\n";
    echo "                      <tr>\n";
    echo "                        <td align=\"left\">", form_input_text("threadtitle", htmlentities_array($threadtitle), null, null, null, "thread_title"), form_input_hidden("newthread", "Y"), "</td>\n";
    echo "                      </tr>\n";
} else {
    echo "                      <tr>\n";
    echo "                        <td align=\"left\"><h2>", gettext("Folder"), "</h2></td>\n";
    echo "                      </tr>\n";
    echo "                      <tr>\n";
    echo "                        <td align=\"left\">", word_filter_add_ob_tags($thread_data['FOLDER_TITLE'], true), "</td>\n";
    echo "                      </tr>\n";
    echo "                      <tr>\n";
    echo "                        <td align=\"left\"><h2>", gettext("Thread title"), "</h2></td>\n";
    echo "                      </tr>\n";
    echo "                      <tr>\n";
    echo "                        <td align=\"left\">", word_filter_add_ob_tags($thread_data['TITLE'], true), form_input_hidden("reply_to", htmlentities_array("{$tid}.{$reply_to_pid}")), form_input_hidden('return_msg', htmlentities_array($return_msg)), "</td>\n";
    echo "                      </tr>\n";
}
echo "                      <tr>\n";
echo "                        <td align=\"left\"><h2>", gettext("To"), "</h2></td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\" style=\"white-space: nowrap\">", form_input_text_search("to_logon", isset($to_logon) ? htmlentities_array($to_logon) : "", null, null, SEARCH_LOGON, true, sprintf('title="%s"', gettext("Separate recipients by a comma")), "post_to_others multiple", gettext("Leave blank for all")), "</td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\">&nbsp;</td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\"><h2>", gettext("Thread options"), "</h2></td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
Esempio n. 9
0
        exit;
    } else {
        $error_msg_array[] = gettext("Relationship updated failed!");
        $valid = false;
    }
}
if (isset($_POST['reset_nickname_x']) || isset($_POST['reset_nickname_y'])) {
    $peer_nickname = user_get_nickname($peer_uid);
    $peer_relationship = user_get_peer_relationship($_SESSION['UID'], $peer_uid);
    user_rel_update($_SESSION['UID'], $peer_uid, $peer_relationship, $peer_nickname);
}
$peer_user_display = format_user_name($user_peer['LOGON'], $user_peer['NICKNAME']);
html_draw_top(array('title' => sprintf(gettext('User Relationship - %s'), $peer_user_display), 'class' => 'window_title'));
$peer_relationship = user_get_relationship($_SESSION['UID'], $peer_uid);
$peer_nickname = user_get_peer_nickname($_SESSION['UID'], $peer_uid);
echo "<h1>", gettext("User Relationship"), html_style_image('separator'), "<a href=\"user_profile.php?webtag={$webtag}&amp;uid={$peer_uid}\" target=\"_blank\" class=\"popup 650x500\">", word_filter_add_ob_tags($peer_user_display, true), "</a></h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '600', 'left');
} else {
    if ($peer_perms & USER_PERM_FOLDER_MODERATE && !session::check_perm(USER_PERM_CAN_IGNORE_ADMIN, 0)) {
        html_display_warning_msg(gettext("You cannot ignore this user, as they are a moderator."), '600', 'left');
    }
}
if (isset($_POST['preview_signature'])) {
    if (($t_sig_content = user_get_sig($peer_uid)) !== false) {
        $preview_message['RECIPIENTS'] = array();
        $preview_from_user = user_get($peer_uid);
        $preview_message['FROM_LOGON'] = $preview_from_user['LOGON'];
        $preview_message['FROM_NICKNAME'] = $preview_from_user['NICKNAME'];
        $preview_message['FROM_UID'] = $preview_from_user['UID'];
        $preview_message['CONTENT'] = gettext("Signature Preview");
Esempio n. 10
0
 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";
 echo "                <tr>\n";
 echo "                  <td align=\"left\" class=\"subhead\" width=\"20\">&nbsp;</td>\n";
 echo "                  <td align=\"left\" class=\"subhead\">", gettext("Name"), "</td>\n";
 echo "                  <td align=\"left\" class=\"subhead\">", gettext("Forum Link Location"), "</td>\n";
 echo "                  <td align=\"left\" class=\"subhead\">&nbsp;</td>\n";
 echo "                </tr>\n";
 if (sizeof($forum_links_array['forum_links_array']) > 0) {
     foreach ($forum_links_array['forum_links_array'] as $key => $forum_link) {
         echo "                <tr>\n";
         echo "                  <td valign=\"top\" align=\"center\" width=\"1%\">", form_checkbox("t_delete[{$forum_link['LID']}]", "Y"), "</td>\n";
         echo "                  <td align=\"left\"><a href=\"admin_forum_links.php?webtag={$webtag}&amp;page={$page}&amp;lid={$forum_link['LID']}\">", word_filter_add_ob_tags($forum_link['TITLE'], true), "</a></td>\n";
         echo "                  <td align=\"left\">", $forum_link['URI'], "</a></td>\n";
         echo "                  <td align=\"center\" width=\"50\" style=\"white-space: nowrap\">", form_submit_image('move_up', "move_up[{$forum_link['LID']}]", "Move Up", "title=\"Move Up\"", "move_up_ctrl"), form_submit_image('move_down', "move_down[{$forum_link['LID']}]", "Move Down", "title=\"Move Down\"", "move_down_ctrl"), "</td>\n";
         echo "                </tr>\n";
     }
 }
 echo "                <tr>\n";
 echo "                  <td align=\"left\">&nbsp;</td>\n";
 echo "                </tr>\n";
 echo "              </table>\n";
 echo "            </td>\n";
 echo "          </tr>\n";
 echo "        </table>\n";
 echo "      </td>\n";
 echo "    </tr>\n";
 echo "    <tr>\n";
Esempio n. 11
0
function light_pm_display($message_data, $preview = false)
{
    $webtag = get_webtag();
    forum_check_webtag_available($webtag);
    if (!$preview) {
        if (strlen(trim($message_data['SUBJECT'])) > 0) {
            echo "<h3 class=\"message_subject\">", word_filter_add_ob_tags($message_data['SUBJECT'], true), "</h3>\n";
        } else {
            echo "<h3 class=\"message_subject\">", gettext("No Subject"), "</h3>\n";
        }
    }
    echo "<div class=\"message\">\n";
    echo "<div class=\"message_header\">\n";
    echo "<div class=\"message_from\">\n";
    echo gettext("From"), ": ", word_filter_add_ob_tags(format_user_name($message_data['FROM_LOGON'], $message_data['FROM_NICKNAME']), true), "\n";
    echo "<span class=\"message_time\">", format_date_time($message_data['CREATED']), "</span>\n";
    echo "<div class=\"clearer\"></div>\n";
    echo "</div>\n";
    echo "<div class=\"message_to\">", gettext("To"), ": ";
    if (isset($message_data['RECIPIENTS']) && sizeof($message_data['RECIPIENTS']) > 0) {
        foreach ($message_data['RECIPIENTS'] as $recipient) {
            echo "<span>", word_filter_add_ob_tags(format_user_name($recipient['LOGON'], $recipient['NICKNAME']), true), "</span>\n";
        }
    } else {
        echo gettext('Unknown User');
    }
    echo "<div class=\"clearer\"></div>\n";
    echo "</div>\n";
    echo "</div>\n";
    $message_data['CONTENT'] = message_apply_formatting($message_data['CONTENT']);
    $message_data['CONTENT'] = word_filter_add_ob_tags($message_data['CONTENT']);
    echo "<div class=\"message_links\">&nbsp;</div>\n";
    echo "<div class=\"message_body\">", $message_data['CONTENT'], "</div>\n";
    if (isset($message_data['ATTACHMENTS']) && sizeof($message_data['ATTACHMENTS']) > 0) {
        if (($attachments_array = attachments_get($message_data['FROM_UID'], $message_data['ATTACHMENTS'])) !== false) {
            echo "<div class=\"message_attachments\">\n";
            echo "  <span>", gettext("Attachments"), ":</span>\n";
            echo "  <ul>\n";
            foreach ($attachments_array as $attachment) {
                if (($attachment_link = light_attachments_make_link($attachment)) !== false) {
                    echo "<li>", html_style_image('attach'), $attachment_link, "</li>\n";
                }
            }
            echo "  </ul>\n";
            echo "</div>\n";
        }
    }
    if ($preview === false) {
        $links_array = array();
        if (($message_data['TYPE'] & PM_INBOX_ITEMS) > 0) {
            $links_array[] = "<a href=\"lpm_write.php?webtag={$webtag}&amp;reply_to={$message_data['MID']}\" class=\"reply\">" . html_style_image('post') . gettext("Reply") . "</a>";
            if (isset($message_data['RECIPIENTS']) && sizeof($message_data['RECIPIENTS']) > 1) {
                $links_array[] = "<a href=\"lpm_write.php?webtag={$webtag}&amp;replyall={$message_data['MID']}\" class=\"replyall\">" . html_style_image('reply_all') . gettext("Reply All") . "</a>";
            }
            $links_array[] = "<a href=\"lpm_write.php?webtag={$webtag}&amp;fwdmsg={$message_data['MID']}\" class=\"forward\">" . html_style_image('forward') . gettext("Forward") . "</a>";
            $links_array[] = "<a href=\"lpm.php?webtag={$webtag}&amp;delete_msg={$message_data['MID']}\" class=\"delete\">" . html_style_image('delete') . gettext("Delete") . "</a>";
        } else {
            if (($message_data['TYPE'] & PM_OUTBOX_ITEMS) > 0) {
                $links_array[] = "<a href=\"lpm_edit.php?webtag={$webtag}&amp;mid={$message_data['MID']}\" class=\"edit\">" . html_style_image('edit') . gettext("Edit") . "</a>";
                $links_array[] = "<a href=\"lpm_write.php?webtag={$webtag}&amp;fwdmsg={$message_data['MID']}\" class=\"forward\">" . html_style_image('forward') . gettext("Forward") . "</a>";
                $links_array[] = "<a href=\"lpm.php?webtag={$webtag}&amp;delete_msg={$message_data['MID']}\" class=\"delete\">" . html_style_image('delete') . gettext("Delete") . "</a>";
            } else {
                if (($message_data['TYPE'] & PM_DRAFT_ITEMS) > 0) {
                    $links_array[] = "<a href=\"lpm_write.php?webtag={$webtag}&amp;editmsg={$message_data['MID']}\" class=\"edit\">" . html_style_image('edit') . gettext("Edit") . "</a>";
                    $links_array[] = "<a href=\"lpm.php?webtag={$webtag}&amp;delete_msg={$message_data['MID']}\" class=\"delete\">" . html_style_image('delete') . gettext("Delete") . "</a>";
                } else {
                    $links_array[] = "<a href=\"lpm_write.php?webtag={$webtag}&amp;fwdmsg={$message_data['MID']}\" class=\"forward\">" . html_style_image('forward') . gettext("Forward") . "</a>";
                    $links_array[] = "<a href=\"lpm.php?webtag={$webtag}&amp;delete_msg={$message_data['MID']}\" class=\"delete\">" . html_style_image('delete') . gettext("Delete") . "</a>";
                }
            }
        }
        if (sizeof($links_array) > 0) {
            echo "<div class=\"message_footer_links\">", implode('&nbsp;&nbsp;', $links_array), "</div>\n";
        }
    }
    echo "</div>";
}
Esempio n. 12
0
function poll_public_ballot_user_callback($user_data)
{
    $webtag = get_webtag();
    if (isset($user_data['UID']) && $user_data['UID'] > 0) {
        $user_profile_link_html = "<a href=\"user_profile.php?webtag={$webtag}&amp;uid=%1\$s\" target=\"_blank\" class=\"popup 650x500\" style=\"white-space: nowrap\">%2\$s</a>";
        return sprintf($user_profile_link_html, $user_data['UID'], word_filter_add_ob_tags(format_user_name($user_data['LOGON'], $user_data['NICKNAME']), true), $webtag);
    } else {
        if (isset($user_data['LOGON'])) {
            return $user_data['LOGON'];
        } else {
            if (is_string($user_data)) {
                return $user_data;
            }
        }
    }
    return gettext("Unknown user");
}
Esempio n. 13
0
 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";
 echo "                <tr>\n";
 echo "                  <td class=\"subhead\" align=\"left\" width=\"25\">&nbsp;</td>\n";
 echo "                  <td class=\"subhead\" align=\"left\">", gettext("Item Name"), "</td>\n";
 echo "                  <td class=\"subhead\" align=\"left\" width=\"50\">&nbsp;</td>\n";
 echo "                  <td class=\"subhead\" align=\"left\" width=\"150\">", gettext("Type"), "</td>\n";
 echo "                </tr>\n";
 if (sizeof($profile_items['profile_items_array']) > 0) {
     foreach ($profile_items['profile_items_array'] as $profile_item) {
         echo "                <tr>\n";
         echo "                  <td valign=\"top\" align=\"center\" width=\"25\">", form_checkbox("delete_item[{$profile_item['PIID']}]", "Y"), "</td>\n";
         echo "                  <td valign=\"top\" align=\"left\"><a href=\"admin_prof_items.php?webtag={$webtag}&amp;psid={$psid}&amp;piid={$profile_item['PIID']}&amp;sect_page={$sect_page}\">", word_filter_add_ob_tags($profile_item['NAME'], true), "</a></td>\n";
         echo "                  <td align=\"center\" width=\"50\" style=\"white-space: nowrap\">", form_submit_image('move_up', "move_up[{$profile_item['PIID']}]", "Move Up", "title=\"Move Up\"", "move_up_ctrl"), form_submit_image('move_down', "move_down[{$profile_item['PIID']}]", "Move Down", "title=\"Move Down\"", "move_down_ctrl"), "</td>\n";
         if (isset($item_types_array[$profile_item['TYPE']])) {
             echo "                  <td valign=\"top\" align=\"left\" width=\"100\">{$item_types_array[$profile_item['TYPE']]}</td>\n";
         } else {
             echo "                  <td valign=\"top\" align=\"left\" width=\"100\">", gettext("Text Field"), "</td>\n";
         }
         echo "                </tr>\n";
     }
 }
 echo "                <tr>\n";
 echo "                  <td align=\"left\" colspan=\"4\">&nbsp;</td>\n";
 echo "                </tr>\n";
 echo "              </table>\n";
 echo "            </td>\n";
 echo "          </tr>\n";
Esempio n. 14
0
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\"><h2>", gettext("Thread title"), "</h2></td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\">", word_filter_add_ob_tags($thread_data['TITLE'], true), "</td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\"><h2>", gettext("To"), "</h2></td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\">";
if ($edit_message['TO_UID'] > 0) {
    echo "<a href=\"user_profile.php?webtag={$webtag}&amp;uid={$edit_message['TO_UID']}\" target=\"_blank\" class=\"popup 650x500\">", word_filter_add_ob_tags(format_user_name($edit_message['TLOGON'], $edit_message['TNICK']), true), "</a>\n";
} else {
    echo word_filter_add_ob_tags(format_user_name($edit_message['TLOGON'], $edit_message['TNICK']), true);
}
echo "                        </td>\n";
echo "                      </tr>\n";
if (($user_emoticon_pack = session::get_value('EMOTICONS')) === false) {
    $user_emoticon_pack = forum_get_setting('default_emoticons', null, 'default');
}
if ($emoticon_preview_html = emoticons_preview($user_emoticon_pack)) {
    echo "                      <tr>\n";
    echo "                        <td align=\"left\">&nbsp;</td>\n";
    echo "                      </tr>\n";
    echo "                      <tr>\n";
    echo "                        <td align=\"left\">\n";
    echo "                          <table width=\"196\" class=\"messagefoot\" cellspacing=\"0\">\n";
    echo "                            <tr>\n";
    echo "                              <td align=\"left\" class=\"subhead\">", gettext("Emoticons"), "</td>\n";
 echo "    <tr>\n";
 echo "      <td align=\"left\" class=\"posthead\">\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";
 echo "                <tr>\n";
 echo "                  <td align=\"left\" class=\"subhead\" colspan=\"2\">", gettext("Search Results"), "</td>\n";
 echo "                </tr>\n";
 echo "                <tr>\n";
 echo "                  <td align=\"center\">\n";
 echo "                    <table class=\"posthead\" width=\"95%\">\n";
 if (sizeof($user_search_array['user_array']) > 0) {
     foreach ($user_search_array['user_array'] as $user_search_result) {
         echo "                      <tr>\n";
         echo "                        <td align=\"left\">", form_checkbox("add_user[]", $user_search_result['UID'], ''), "&nbsp;", word_filter_add_ob_tags(format_user_name($user_search_result['LOGON'], $user_search_result['NICKNAME']), true), "</td>\n";
         echo "                      </tr>\n";
     }
 }
 echo "                      <tr>\n";
 echo "                        <td align=\"left\">&nbsp;</td>\n";
 echo "                      </tr>\n";
 echo "                    </table>\n";
 echo "                  </td>\n";
 echo "                </tr>\n";
 echo "              </table>\n";
 echo "            </td>\n";
 echo "          </tr>\n";
 echo "        </table>\n";
 echo "      </td>\n";
 echo "    </tr>\n";
Esempio n. 16
0
 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";
 echo "                <tr>\n";
 echo "                  <td class=\"subhead\" align=\"left\" width=\"25\">&nbsp;</td>\n";
 echo "                  <td class=\"subhead\" align=\"left\">", gettext("Section Name"), "</td>\n";
 echo "                  <td class=\"subhead\" align=\"left\" width=\"50\">&nbsp;</td>\n";
 echo "                  <td class=\"subhead\" align=\"center\">", gettext("Items"), "</td>\n";
 echo "                </tr>\n";
 if (sizeof($profile_sections['profile_sections_array']) > 0) {
     foreach ($profile_sections['profile_sections_array'] as $profile_section) {
         echo "                <tr>\n";
         echo "                  <td valign=\"top\" align=\"center\" width=\"25\">", form_checkbox("delete_section[{$profile_section['PSID']}]", "Y"), "</td>\n";
         echo "                  <td valign=\"top\" align=\"left\"><a href=\"admin_prof_sect.php?webtag={$webtag}&amp;page={$page}&amp;psid={$profile_section['PSID']}\">", word_filter_add_ob_tags($profile_section['NAME'], true), "</a></td>\n";
         echo "                  <td align=\"center\" width=\"50\" style=\"white-space: nowrap\">", form_submit_image('move_up', "move_up[{$profile_section['PSID']}]", "Move Up", "title=\"Move Up\"", "move_up_ctrl"), form_submit_image('move_down', "move_down[{$profile_section['PSID']}]", "Move Down", "title=\"Move Down\"", "move_down_ctrl"), "</td>\n";
         echo "                  <td valign=\"top\" align=\"center\" width=\"100\"><a href=\"admin_prof_items.php?webtag={$webtag}&amp;psid={$profile_section['PSID']}&amp;sect_page={$page}&amp;viewitems=yes\">", htmlentities_array($profile_section['ITEM_COUNT']), "</a></td>\n";
         echo "                </tr>\n";
     }
 }
 echo "                <tr>\n";
 echo "                  <td align=\"left\" colspan=\"4\">&nbsp;</td>\n";
 echo "                </tr>\n";
 echo "              </table>\n";
 echo "            </td>\n";
 echo "          </tr>\n";
 echo "        </table>\n";
 echo "      </td>\n";
 echo "    </tr>\n";
 echo "    <tr>\n";
Esempio n. 17
0
 echo "                    <table class=\"box\" width=\"95%\">\n";
 echo "                      <tr>\n";
 echo "                        <td align=\"left\" class=\"posthead\">\n";
 echo "                          <table class=\"posthead\" width=\"100%\">\n";
 echo "                            <tr>\n";
 echo "                              <td align=\"left\" class=\"subhead\" width=\"100\">", gettext("Folders"), "</td>\n";
 echo "                              <td align=\"left\" class=\"subhead\">", gettext("Permissions"), "</td>\n";
 echo "                            </tr>\n";
 echo "                            <tr>\n";
 echo "                              <td align=\"left\" colspan=\"2\">\n";
 echo "                                <div class=\"admin_folder_perms\">\n";
 foreach ($folder_array as $fid => $folder) {
     echo "                                  ", form_input_hidden("t_update_perms_array[]", htmlentities_array($folder['FID'])), "\n";
     echo "                                  <table class=\"posthead\" width=\"100%\">\n";
     echo "                                    <tr>\n";
     echo "                                      <td align=\"left\" rowspan=\"5\" width=\"100\" valign=\"top\"><a href=\"admin_folder_edit.php?webtag={$webtag}&amp;fid={$folder['FID']}\" target=\"_self\">", word_filter_add_ob_tags($folder['TITLE'], true), "</a></td>\n";
     echo "                                      <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("t_post_read[{$folder['FID']}]", USER_PERM_POST_READ, gettext("Read Posts"), $folder['STATUS'] & USER_PERM_POST_READ), "</td>\n";
     echo "                                      <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("t_post_create[{$folder['FID']}]", USER_PERM_POST_CREATE, gettext("Reply to threads"), $folder['STATUS'] & USER_PERM_POST_CREATE), "</td>\n";
     echo "                                    </tr>\n";
     echo "                                    <tr>\n";
     echo "                                      <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("t_thread_create[{$folder['FID']}]", USER_PERM_THREAD_CREATE, gettext("Create new threads"), $folder['STATUS'] & USER_PERM_THREAD_CREATE), "</td>\n";
     echo "                                      <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("t_post_edit[{$folder['FID']}]", USER_PERM_POST_EDIT, gettext("Edit posts"), $folder['STATUS'] & USER_PERM_POST_EDIT), "</td>\n";
     echo "                                    </tr>\n";
     echo "                                    <tr>\n";
     echo "                                      <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("t_post_delete[{$folder['FID']}]", USER_PERM_POST_DELETE, gettext("Delete posts"), $folder['STATUS'] & USER_PERM_POST_DELETE), "</td>\n";
     echo "                                      <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("t_post_attach[{$folder['FID']}]", USER_PERM_POST_ATTACHMENTS, gettext("Upload attachments"), $folder['STATUS'] & USER_PERM_POST_ATTACHMENTS), "</td>\n";
     echo "                                    </tr>\n";
     echo "                                    <tr>\n";
     echo "                                      <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("t_post_html[{$folder['FID']}]", USER_PERM_HTML_POSTING, gettext("Post in HTML"), $folder['STATUS'] & USER_PERM_HTML_POSTING), "</td>\n";
     echo "                                      <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("t_post_sig[{$folder['FID']}]", USER_PERM_SIGNATURE, gettext("Post a signature"), $folder['STATUS'] & USER_PERM_SIGNATURE), "</td>\n";
     echo "                                    </tr>\n";
Esempio n. 18
0
echo "        <table class=\"box\" width=\"100%\">\n";
echo "          <tr>\n";
echo "            <td align=\"left\" class=\"posthead\">\n";
echo "              <table class=\"posthead\" width=\"100%\">\n";
echo "                <tr>\n";
echo "                  <td class=\"subhead\" align=\"left\" style=\"white-space: nowrap\">&nbsp;</td>\n";
echo "                  <td class=\"subhead\" align=\"left\" style=\"white-space: nowrap\">", gettext("Folder name"), "</td>\n";
echo "                  <td class=\"subhead\" align=\"left\" style=\"white-space: nowrap\">&nbsp;</td>\n";
echo "                  <td class=\"subhead\" align=\"center\" style=\"white-space: nowrap\">", gettext("Thread Count"), "</td>\n";
echo "                  <td class=\"subhead\" align=\"left\" style=\"white-space: nowrap\">", gettext("Permissions"), "</td>\n";
echo "                </tr>\n";
if (sizeof($folder_array['folder_array']) > 0) {
    foreach ($folder_array['folder_array'] as $key => $folder) {
        echo "                <tr>\n";
        echo "                  <td valign=\"top\" align=\"center\" width=\"1%\">", form_checkbox("t_delete[{$folder['FID']}]", "Y"), "</td>\n";
        echo "                  <td align=\"left\"><a href=\"admin_folder_edit.php?webtag={$webtag}&amp;page={$page}&amp;fid={$folder['FID']}\" title=\"", gettext("Click To Edit Folder"), "\">", word_filter_add_ob_tags($folder['TITLE'], true), "</a></td>\n";
        echo "                  <td align=\"right\" width=\"40\" style=\"white-space: nowrap\">", form_submit_image('move_up', "move_up[{$folder['FID']}]", "Move Up", "title=\"Move Up\"", "move_up_ctrl"), form_submit_image('move_down', "move_down[{$folder['FID']}]", "Move Down", "title=\"Move Down\"", "move_down_ctrl"), "</td>\n";
        if (isset($folder['THREAD_COUNT']) && $folder['THREAD_COUNT'] > 0) {
            echo "                  <td align=\"center\" width=\"15%\">{$folder['THREAD_COUNT']}</td>\n";
        } else {
            echo "                  <td align=\"center\" width=\"15%\">0</td>\n";
        }
        if (isset($folder['FOLDER_PERMS']) && $folder['FOLDER_PERMS'] > 0) {
            echo "                  <td align=\"left\" width=\"25%\" style=\"white-space: nowrap\">", perm_display_list($folder['FOLDER_PERMS']), "</td>\n";
        } else {
            echo "                  <td align=\"left\" width=\"25%\" style=\"white-space: nowrap\">", gettext("none"), "</td>\n";
        }
        echo "                </tr>\n";
    }
}
echo "                <tr>\n";
Esempio n. 19
0
function stats_get_html()
{
    // Get webtag
    $webtag = get_webtag();
    // Current active user UID
    $uid = session::get_value('UID');
    // Number of active users
    $session_count = stats_get_active_session_count();
    // Number of recent posts.
    $recent_post_count = stats_get_recent_post_count();
    // Update the stats records.
    stats_update($session_count, $recent_post_count);
    // User Profile link
    $user_profile_link = '%s<a href="user_profile.php?webtag=%s&amp;uid=%s" target="_blank" class="popup 650x500"><span class="%s" title="%s">%s</span></a>';
    // Newest ser Profile link
    $new_user_profile_link = '<a href="user_profile.php?webtag=%s&amp;uid=%s" target="_blank" class="popup 650x500">%s</a>';
    // Search Engine Bot link
    $search_engine_bot_link = '<a href="%s" target="_blank"><span class="user_stats_normal">%s</span></a>';
    // Output the HTML.
    if ($user_stats = stats_get_active_user_list()) {
        $active_user_list_array = array();
        $html = "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" class=\"posthead\">\n";
        $html .= "  <tr>\n";
        $html .= "    <td width=\"35\">&nbsp;</td>\n";
        $html .= "    <td>&nbsp;</td>\n";
        $html .= "    <td width=\"35\">&nbsp;</td>\n";
        $html .= "  </tr>\n";
        $html .= "  <tr>\n";
        $html .= "    <td>&nbsp;</td>\n";
        $html .= "    <td>";
        if (forum_get_setting('guest_show_recent', 'Y') && user_guest_enabled()) {
            if ($user_stats['GUESTS'] != 1) {
                $active_user_list_array[] = sprintf(gettext("<b>%s</b> guests"), $user_stats['GUESTS']);
            } else {
                $active_user_list_array[] = gettext("<b>1</b> guest");
            }
        }
        if ($user_stats['USER_COUNT'] != 1) {
            $active_user_list_array[] = sprintf(gettext("<b>%s</b> members"), $user_stats['USER_COUNT']);
        } else {
            $active_user_list_array[] = gettext("<b>1</b> member");
        }
        if ($user_stats['ANON_USERS'] != 1) {
            $active_user_list_array[] = sprintf(gettext("<b>%s</b> anonymous members"), $user_stats['ANON_USERS']);
        } else {
            $active_user_list_array[] = gettext("<b>1</b> anonymous member");
        }
        $active_user_list = implode(", ", $active_user_list_array);
        $active_user_time = format_time_display(ini_get('session.gc_maxlifetime'), false);
        $html .= sprintf(gettext("%s active in the past %s."), $active_user_list, $active_user_time);
        $html .= " [ <a href=\"start.php?webtag={$webtag}&amp;show=visitors\" target=\"" . html_get_frame_name('main') . "\">" . gettext("View Complete List") . "</a> ]\n";
        $html .= "    </td>\n";
        $html .= "    <td width=\"35\">&nbsp;</td>\n";
        $html .= "  </tr>\n";
        if (sizeof($user_stats['USERS']) > 0) {
            $active_users_array = array();
            foreach ($user_stats['USERS'] as $user) {
                $active_user_title = '';
                $active_user_class = '';
                $active_user_avatar = '';
                if (isset($user['BOT_NAME']) && isset($user['BOT_URL'])) {
                    $active_user_display = word_filter_add_ob_tags($user['BOT_NAME'], true);
                    $active_user_display = sprintf($search_engine_bot_link, $user['BOT_URL'], $active_user_display);
                    $active_users_array[] = $active_user_display;
                } else {
                    $active_user_logon = format_user_name($user['LOGON'], $user['NICKNAME']);
                    $active_user_display = str_replace(" ", "&nbsp;", word_filter_add_ob_tags($active_user_logon, true));
                    if ($user['UID'] == $uid) {
                        if (isset($user['ANON_LOGON']) && $user['ANON_LOGON'] > USER_ANON_DISABLED) {
                            $active_user_title = gettext("You (Invisible)");
                            $active_user_class = 'user_stats_curuser';
                        } else {
                            $active_user_title = gettext("You");
                            $active_user_class = 'user_stats_curuser';
                        }
                    } else {
                        if (($user['RELATIONSHIP'] & USER_FRIEND) > 0) {
                            $active_user_title = gettext("Friend");
                            $active_user_class = 'user_stats_friend';
                        } else {
                            $active_user_class = 'user_stats_normal';
                        }
                    }
                    if (isset($user['AVATAR_URL']) && strlen($user['AVATAR_URL']) > 0) {
                        $active_user_avatar = sprintf('<a href="user_profile.php?webtag=%s&amp;uid=%s" target="_blank" class="popup 650x500">
                                                         <img src="%s" title="%s" alt="" border="0" width="16" height="16" />
                                                       </a>', $webtag, $user['UID'], $user['AVATAR_URL'], htmlentities_array($active_user_title));
                    } else {
                        if (isset($user['AVATAR_AID']) && is_md5($user['AVATAR_AID'])) {
                            $attachment = attachments_get_by_hash($user['AVATAR_AID']);
                            if (!($user_avatar_picture = attachments_make_link($attachment, false, false, false, false))) {
                                $active_user_avatar = sprintf('<a href="user_profile.php?webtag=%s&amp;uid=%s" target="_blank" class="popup 650x500">
                                                             <img src="%s&amp;avatar_picture" title="%s" alt="" border="0" width="16" height="16" />
                                                           </a>', $webtag, $user['UID'], $user_avatar_picture, htmlentities_array($active_user_title));
                            }
                        }
                    }
                    $active_users_array[] = sprintf($user_profile_link, $active_user_avatar, $webtag, $user['UID'], $active_user_class, $active_user_title, $active_user_display);
                }
            }
            $html .= "  <tr>\n";
            $html .= "    <td width=\"35\">&nbsp;</td>\n";
            $html .= "    <td>&nbsp;</td>\n";
            $html .= "    <td width=\"35\">&nbsp;</td>\n";
            $html .= "  </tr>\n";
            $html .= "  <tr>";
            $html .= "    <td>&nbsp;</td>\n";
            $html .= "    <td class=\"activeusers\">\n";
            $html .= "      " . implode(", ", $active_users_array) . "\n";
            $html .= "    </td>\n";
            $html .= "    <td width=\"35\">&nbsp;</td>\n";
            $html .= "  </tr>\n";
        }
        $html .= "  <tr>\n";
        $html .= "    <td width=\"35\">&nbsp;</td>\n";
        $html .= "    <td>&nbsp;</td>\n";
        $html .= "  </tr>\n";
        $html .= "</table>\n";
    }
    $thread_count = stats_get_thread_count();
    $post_count = stats_get_post_count();
    $html .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" class=\"posthead\">\n";
    $html .= "  <tr>\n";
    $html .= "    <td width=\"35\">&nbsp;</td>\n";
    $html .= "    <td>";
    if ($thread_count != 1) {
        $num_threads_display = sprintf(gettext("<b>%s</b> threads"), number_format($thread_count, 0, ".", ","));
    } else {
        $num_threads_display = gettext("<b>1</b> thread");
    }
    if ($post_count != 1) {
        $num_posts_display = sprintf(gettext("<b>%s</b> posts"), number_format($post_count, 0, ".", ","));
    } else {
        $num_posts_display = gettext("<b>1</b> post");
    }
    $html .= sprintf(gettext("Our members have made a total of %s and %s."), $num_threads_display, $num_posts_display) . '<br />';
    $html .= "    <td width=\"35\">&nbsp;</td>\n";
    $html .= "  </tr>\n";
    $html .= "</table>\n";
    if ($longest_thread = stats_get_longest_thread()) {
        $html .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" class=\"posthead\">\n";
        $html .= "  <tr>\n";
        $html .= "    <td width=\"35\">&nbsp;</td>\n";
        $html .= "    <td>";
        $longest_thread_title = word_filter_add_ob_tags($longest_thread['TITLE'], true);
        $longest_thread_link = sprintf("<a href=\"./index.php?webtag={$webtag}&amp;msg=%d.1\">%s</a>", $longest_thread['TID'], $longest_thread_title);
        $longest_thread_post_count = $longest_thread['LENGTH'] != 1 ? sprintf(gettext("<b>%s</b> posts"), $longest_thread['LENGTH']) : gettext("<b>1</b> post");
        $html .= sprintf(gettext("Longest thread is <b>%s</b> with %s."), $longest_thread_link, $longest_thread_post_count);
        $html .= "    </td>\n";
        $html .= "    <td width=\"35\">&nbsp;</td>\n";
        $html .= "  </tr>\n";
        $html .= "</table>\n";
    }
    $html .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" class=\"posthead\">\n";
    $html .= "  <tr>\n";
    $html .= "    <td width=\"35\">&nbsp;</td>\n";
    $html .= "    <td>&nbsp;</td>\n";
    $html .= "    <td width=\"35\">&nbsp;</td>\n";
    $html .= "  </tr>\n";
    $html .= "</table>\n";
    $html .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" class=\"posthead\">\n";
    $html .= "  <tr>\n";
    $html .= "    <td width=\"35\">&nbsp;</td>\n";
    $html .= "    <td>";
    if ($recent_post_count != 1) {
        $recent_post_count = number_format($recent_post_count, 0, ",", ",");
        $html .= sprintf(gettext("There have been <b>%s</b> posts made in the last 60 minutes."), $recent_post_count);
    } else {
        $html .= gettext("There has been <b>1</b> post made in the last 60 minutes.");
    }
    $html .= "    </td>\n";
    $html .= "    <td width=\"35\">&nbsp;</td>\n";
    $html .= "  </tr>\n";
    $html .= "</table>\n";
    if ($most_posts = stats_get_most_posts()) {
        if ($most_posts['MOST_POSTS_COUNT'] > 0 && $most_posts['MOST_POSTS_DATE'] > 0) {
            $html .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" class=\"posthead\">\n";
            $html .= "  <tr>\n";
            $html .= "    <td width=\"35\">&nbsp;</td>\n";
            $html .= "    <td>";
            $post_stats_record_date = format_time($most_posts['MOST_POSTS_DATE']);
            $html .= sprintf(gettext("Most posts ever made in a single 60 minute period is <b>%s</b> on %s."), $most_posts['MOST_POSTS_COUNT'], $post_stats_record_date);
            $html .= "    </td>\n";
            $html .= "    <td width=\"35\">&nbsp;</td>\n";
            $html .= "  </tr>\n";
            $html .= "</table>\n";
        }
    }
    if ($user_count = user_count()) {
        $html .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" class=\"posthead\">\n";
        $html .= "  <tr>\n";
        $html .= "    <td width=\"35\">&nbsp;</td>\n";
        $html .= "    <td>&nbsp;</td>\n";
        $html .= "    <td width=\"35\">&nbsp;</td>\n";
        $html .= "  </tr>\n";
        $html .= "  <tr>\n";
        $html .= "    <td width=\"35\">&nbsp;</td>\n";
        $html .= "    <td>";
        if ($user_count != 1) {
            if ($newest_member = stats_get_newest_user()) {
                $user_newest_display = word_filter_add_ob_tags(format_user_name($newest_member['LOGON'], $newest_member['NICKNAME']), true);
                $user_newest_profile_link = sprintf($new_user_profile_link, $webtag, $newest_member['UID'], $user_newest_display);
                $html .= sprintf(gettext("We have <b>%s</b> registered members and the newest member is <b>%s</b>."), $user_count, $user_newest_profile_link);
            } else {
                $html .= sprintf(gettext("We have %s registered members."), $user_count);
            }
        } else {
            $html .= gettext("We have one registered member.");
        }
        $html .= "    </td>\n";
        $html .= "    <td width=\"35\">&nbsp;</td>\n";
        $html .= "  </tr>\n";
        $html .= "</table>\n";
    }
    if ($most_users = stats_get_most_users()) {
        if ($most_users['MOST_USERS_COUNT'] > 0 && $most_users['MOST_USERS_DATE'] > 0) {
            $html .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" class=\"posthead\">\n";
            $html .= "  <tr>\n";
            $html .= "    <td width=\"35\">&nbsp;</td>\n";
            $html .= "    <td>";
            $most_users_count = number_format($most_users['MOST_USERS_COUNT'], 0, ",", ",");
            $most_users_date = format_time($most_users['MOST_USERS_DATE']);
            $html .= sprintf(gettext("Most users ever online was <b>%s</b> on %s."), $most_users_count, $most_users_date);
            $html .= "    </td>\n";
            $html .= "    <td width=\"35\">&nbsp;</td>\n";
            $html .= "  </tr>\n";
            $html .= "</table>\n";
        }
    }
    $html .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" class=\"posthead\">\n";
    $html .= "  <tr>\n";
    $html .= "    <td width=\"35\">&nbsp;</td>\n";
    $html .= "    <td>&nbsp;</td>\n";
    $html .= "    <td width=\"35\">&nbsp;</td>\n";
    $html .= "  </tr>\n";
    $html .= "</table>\n";
    $html .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" class=\"posthead\">\n";
    $html .= "  <tr>\n";
    $html .= "    <td width=\"35\">&nbsp;</td>\n";
    $html .= "    <td>&nbsp;</td>\n";
    $html .= "    <td width=\"35\">&nbsp;</td>\n";
    $html .= "  </tr>\n";
    $html .= "</table>\n";
    // Return the output buffer contents.
    return $html;
}
Esempio n. 20
0
function message_display($tid, $message, $msg_count, $first_msg, $folder_fid, $in_list = true, $closed = false, $limit_text = true, $is_poll = false, $show_sigs = true, $is_preview = false, $highlight_array = array())
{
    $perm_is_moderator = session::check_perm(USER_PERM_FOLDER_MODERATE, $folder_fid);
    $post_edit_time = forum_get_setting('post_edit_time', null, 0);
    $post_edit_grace_period = forum_get_setting('post_edit_grace_period', null, 0);
    $webtag = get_webtag();
    if (($uid = session::get_value('UID')) === false) {
        return;
    }
    if ($posts_per_page = session::get_value('POSTS_PER_PAGE')) {
        if ($posts_per_page < 10) {
            $posts_per_page = 10;
        }
        if ($posts_per_page > 30) {
            $posts_per_page = 30;
        }
    } else {
        $posts_per_page = 20;
    }
    if (($quick_reply = session::get_value('REPLY_QUICK')) === false) {
        $quick_reply = 'N';
    }
    if ((!isset($message['CONTENT']) || $message['CONTENT'] == "") && !$is_preview) {
        message_display_deleted($tid, isset($message['PID']) ? $message['PID'] : 0, $message, $in_list, $is_preview, $first_msg, $msg_count, $posts_per_page);
        return;
    }
    $from_user_permissions = perm_get_user_permissions($message['FROM_UID']);
    if ($uid != $message['FROM_UID']) {
        if ($from_user_permissions & USER_PERM_WORMED && !$perm_is_moderator) {
            message_display_deleted($tid, $message['PID'], $message, $in_list, $is_preview, $first_msg, $msg_count, $posts_per_page);
            return;
        }
    }
    if (!isset($message['FROM_RELATIONSHIP'])) {
        $message['FROM_RELATIONSHIP'] = 0;
    }
    if (!isset($message['TO_RELATIONSHIP'])) {
        $message['TO_RELATIONSHIP'] = 0;
    }
    if ($message['TO_RELATIONSHIP'] & USER_IGNORED_COMPLETELY || $message['FROM_RELATIONSHIP'] & USER_IGNORED_COMPLETELY) {
        message_display_deleted($tid, $message['PID'], $message, $in_list, $is_preview, $first_msg, $msg_count, $posts_per_page);
        return;
    }
    // Add emoticons/WikiLinks and ignore signature ----------------------------
    if (session::get_value('IMAGES_TO_LINKS') == 'Y') {
        $message['CONTENT'] = preg_replace('/<a([^>]*)href="([^"]*)"([^\\>]*)><img[^>]*src="([^"]*)"[^>]*><\\/a>/iu', '[href: <a\\1href="\\2"\\3>\\2</a>][img: <a\\1href="\\4"\\3>\\4</a>]', $message['CONTENT']);
        $message['CONTENT'] = preg_replace('/<img[^>]*src="([^"]*)"[^>]*>/iu', '[img: <a href="\\1">\\1</a>]', $message['CONTENT']);
        $message['CONTENT'] = preg_replace('/<embed[^>]*src="([^"]*)"[^>]*>/iu', '[object: <a href="\\1">\\1</a>]', $message['CONTENT']);
    }
    if (!$is_poll || $is_poll && isset($message['PID']) && $message['PID'] > 1) {
        $message['CONTENT'] = message_apply_formatting($message['CONTENT'], $message['FROM_RELATIONSHIP'] & USER_IGNORED_SIG || !$show_sigs);
    }
    // Check length of post to see if we should truncate it for display --------
    if (mb_strlen(strip_tags($message['CONTENT'])) > intval(forum_get_setting('maximum_post_length', null, 6226)) && $limit_text) {
        $cut_msg = mb_substr($message['CONTENT'], 0, intval(forum_get_setting('maximum_post_length', null, 6226)));
        $cut_msg = preg_replace("/(<[^>]+)?\$/Du", "", $cut_msg);
        $message['CONTENT'] = fix_html($cut_msg);
        $message['CONTENT'] .= "&hellip;[" . gettext("Message Truncated") . "]\n<p align=\"center\"><a href=\"display.php?webtag={$webtag}&amp;msg={$tid}.{$message['PID']}\" target=\"_self\">" . gettext("View full message") . "</a>";
    }
    // Check for words that should be filtered ---------------------------------
    if (!$is_poll || $is_poll && isset($message['PID']) && $message['PID'] > 1) {
        $message['CONTENT'] = word_filter_add_ob_tags($message['CONTENT'], false);
    }
    if ($in_list && isset($message['PID'])) {
        echo "<a name=\"a{$tid}_{$message['PID']}\"></a>\n";
    }
    // Check for search words to highlight -------------------------------------
    if (is_array($highlight_array) && sizeof($highlight_array) > 0) {
        $highlight_pattern = array();
        $highlight_replace = array();
        foreach ($highlight_array as $key => $word) {
            $highlight_word = preg_quote($word, "/");
            $highlight_pattern[$key] = "/({$highlight_word})/iu";
            $highlight_replace[$key] = "<span class=\"highlight\">\\1</span>";
        }
        $message_parts = preg_split('/([<|>])/u', $message['CONTENT'], -1, PREG_SPLIT_DELIM_CAPTURE);
        for ($i = 0; $i < sizeof($message_parts); $i++) {
            if (!($i % 4)) {
                $message_parts[$i] = preg_replace($highlight_pattern, $highlight_replace, $message_parts[$i], 1);
            }
        }
        $message['CONTENT'] = implode("", $message_parts);
    }
    // Little up/down arrows to the left of each message -----------------------
    if (forum_get_setting('require_post_approval', 'Y') && $message['FROM_UID'] != $uid) {
        if (isset($message['APPROVED']) && $message['APPROVED'] == 0 && !$perm_is_moderator) {
            message_display_approval_req($tid, $message['PID'], $in_list, $is_preview, $first_msg, $msg_count, $posts_per_page);
            return;
        }
    }
    // OUTPUT MESSAGE ----------------------------------------------------------
    if (!$is_preview && $message['MOVED_TID'] > 0 && $message['MOVED_PID'] > 0) {
        $post_link = "<a href=\"messages.php?webtag={$webtag}&amp;msg=%s.%s\" target=\"_self\">%s</a>";
        $post_link = sprintf($post_link, $message['MOVED_TID'], $message['MOVED_PID'], gettext("here"));
        echo "<div align=\"center\">\n";
        echo "<table class=\"thread_track_notice\" width=\"96%\">\n";
        echo "  <tr>\n";
        echo "    <td align=\"left\">", sprintf(gettext("<b>Thread Split:</b> This post has been moved %s"), $post_link), "</td>\n";
        echo "  </tr>\n";
        echo "</table>\n";
        echo "</div>\n";
        echo $in_list ? "<br />\n" : '';
        return;
    }
    echo "<div align=\"center\">\n";
    echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n";
    echo "  <tr>\n";
    if ($in_list && !$is_preview) {
        message_display_navigation($tid, $message['PID'], $first_msg, $msg_count, $posts_per_page);
    }
    echo "    <td align=\"center\">\n";
    echo "      <table width=\"100%\" class=\"box\" cellpadding=\"0\">\n";
    echo "        <tr>\n";
    echo "          <td align=\"left\">\n";
    echo "            <table class=\"posthead\" width=\"100%\">\n";
    echo "              <tr>\n";
    echo "                <td width=\"1%\" align=\"right\" style=\"white-space: nowrap\"><span class=\"posttofromlabel\">&nbsp;", gettext("From"), ":&nbsp;</span></td>\n";
    echo "                <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\">";
    if ($message['FROM_UID'] > -1) {
        echo "<a href=\"user_profile.php?webtag={$webtag}&amp;uid={$message['FROM_UID']}\" target=\"_blank\" class=\"popup 650x500\">";
        echo word_filter_add_ob_tags(format_user_name($message['FLOGON'], $message['FNICK']), true), "</a></span>";
    } else {
        echo word_filter_add_ob_tags(format_user_name($message['FLOGON'], $message['FNICK']), true), "</span>";
    }
    if (session::get_value('SHOW_AVATARS') == 'Y') {
        if (isset($message['AVATAR_URL']) && strlen($message['AVATAR_URL']) > 0) {
            echo "&nbsp;<img src=\"{$message['AVATAR_URL']}\" alt=\"\" title=\"", word_filter_add_ob_tags(format_user_name($message['FLOGON'], $message['FNICK']), true), "\" border=\"0\" width=\"16\" height=\"16\" />";
        } else {
            if (isset($message['AVATAR_AID']) && is_md5($message['AVATAR_AID'])) {
                $attachment = attachments_get_by_hash($message['AVATAR_AID']);
                if ($profile_picture_href = attachments_make_link($attachment, false, false, false, false)) {
                    echo "&nbsp;<img src=\"{$profile_picture_href}&amp;avatar_picture\" alt=\"\" title=\"", word_filter_add_ob_tags(format_user_name($message['FLOGON'], $message['FNICK']), true), "\" border=\"0\" width=\"16\" height=\"16\" />\n";
                }
            }
        }
    }
    $temp_ignore = false;
    // If the user posting a poll is ignored, remove ignored status for this message only so the poll can be seen
    if ($is_poll && isset($message['PID']) && $message['PID'] == 1 && $message['FROM_RELATIONSHIP'] & USER_IGNORED) {
        $message['FROM_RELATIONSHIP'] -= USER_IGNORED;
        $temp_ignore = true;
    }
    if ($message['FROM_RELATIONSHIP'] & USER_FRIEND) {
        echo "&nbsp;<img src=\"", html_style_image('friend.png'), "\" alt=\"", gettext("Friend"), "\" title=\"", gettext("Friend"), "\" />";
    } else {
        if ($message['FROM_RELATIONSHIP'] & USER_IGNORED || $temp_ignore) {
            echo "&nbsp;<img src=\"", html_style_image('enemy.png'), "\" alt=\"", gettext("Ignored user"), "\" title=\"", gettext("Ignored user"), "\" />";
        }
    }
    echo "</td>\n";
    echo "                <td width=\"1%\" align=\"right\" style=\"white-space: nowrap\"><span class=\"postinfo\">";
    if ($message['FROM_RELATIONSHIP'] & USER_IGNORED && $limit_text && $uid != 0) {
        echo "<b>", gettext("Ignored message"), "</b>";
    } else {
        if ($in_list) {
            if ($from_user_permissions & USER_PERM_WORMED) {
                echo "<b>", gettext("Wormed user"), "</b> ";
            }
            if ($message['FROM_RELATIONSHIP'] & USER_IGNORED_SIG) {
                echo "<b>", gettext("Ignored signature"), "</b> ";
            }
            if (forum_get_setting('require_post_approval', 'Y') && isset($message['APPROVED']) && $message['APPROVED'] == 0) {
                echo "<b>", gettext("Approval Required"), "</b> ";
            }
            echo format_time($message['CREATED']);
        }
    }
    echo "&nbsp;</span></td>\n";
    echo "              </tr>\n";
    echo "              <tr>\n";
    echo "                <td width=\"1%\" align=\"right\" style=\"white-space: nowrap\"><span class=\"posttofromlabel\">&nbsp;", gettext("To"), ":&nbsp;</span></td>\n";
    echo "                <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\">";
    if ($message['TLOGON'] != gettext("ALL") && $message['TO_UID'] != 0) {
        echo "<a href=\"user_profile.php?webtag={$webtag}&amp;uid={$message['TO_UID']}\" target=\"_blank\" class=\"popup 650x500\">";
        echo word_filter_add_ob_tags(format_user_name($message['TLOGON'], $message['TNICK']), true), "</a></span>";
        if ($message['TO_RELATIONSHIP'] & USER_FRIEND) {
            echo "&nbsp;<img src=\"", html_style_image('friend.png'), "\" alt=\"", gettext("Friend"), "\" title=\"", gettext("Friend"), "\" />";
        } else {
            if ($message['TO_RELATIONSHIP'] & USER_IGNORED) {
                echo "&nbsp;<img src=\"", html_style_image('enemy.png'), "\" alt=\"", gettext("Ignored user"), "\" title=\"", gettext("Ignored user"), "\" />";
            }
        }
        if (isset($message['VIEWED']) && $message['VIEWED'] > 0) {
            echo "&nbsp;<span class=\"smalltext\"><img src=\"", html_style_image('post_read.png'), "\" alt=\"\" title=\"", sprintf(gettext("Read: %s"), format_time($message['VIEWED'])), "\" /></span>";
        } else {
            if ($is_preview == false) {
                echo "&nbsp;<span class=\"smalltext\"><img src=\"", html_style_image('post_unread.png'), "\" alt=\"\" title=\"", gettext("Unread Message"), "\" /></span>";
            }
        }
    } else {
        echo "", gettext("ALL"), "</span>";
    }
    echo "</td>\n";
    echo "                <td align=\"right\" style=\"white-space: nowrap\"><span class=\"postinfo\">";
    if ($message['FROM_RELATIONSHIP'] & USER_IGNORED && $limit_text && $in_list && $uid != 0) {
        echo "<a href=\"user_rel.php?webtag={$webtag}&amp;uid={$message['FROM_UID']}&amp;msg={$tid}.{$message['PID']}\" target=\"_self\">", gettext("Stop ignoring this user"), "</a>&nbsp;&nbsp;&nbsp;";
        echo "<a href=\"display.php?webtag={$webtag}&amp;msg={$tid}.{$message['PID']}\" target=\"_self\">", gettext("View Message"), "</a>";
    } else {
        if ($in_list && $msg_count > 0) {
            if ($is_poll) {
                echo "<a href=\"poll_results.php?webtag={$webtag}&amp;tid={$tid}\" target=\"_blank\" class=\"popup 800x600\"><img src=\"", html_style_image('poll.png'), "\" border=\"0\" alt=\"", gettext("This is a poll. Click to view results."), "\" title=\"", gettext("This is a poll. Click to view results."), "\" /></a> ", gettext("Poll"), " ";
            }
            echo sprintf(gettext("%s of %s"), $message['PID'], $msg_count);
        }
    }
    echo "&nbsp;</span></td>\n";
    echo "              </tr>\n";
    echo "            </table>\n";
    echo "          </td>\n";
    echo "        </tr>\n";
    if (!($message['FROM_RELATIONSHIP'] & USER_IGNORED) || !$limit_text) {
        echo "        <tr>\n";
        echo "          <td align=\"left\">\n";
        echo "            <table width=\"100%\">\n";
        echo "              <tr>\n";
        echo "                <td colspan=\"3\" align=\"right\"><span class=\"postnumber\">";
        if ($in_list && $msg_count > 0) {
            $title = $message['PID'] == 1 ? "" . gettext("Permanent link to this thread") . " ({$tid}.1)" : "" . gettext("Link to this post");
            if ($is_preview) {
                echo "<a href=\"messages.php?webtag={$webtag}&amp;msg={$tid}.{$message['PID']}\" target=\"_blank\" title=\"{$title}\">{$tid}.{$message['PID']}</a>";
            } else {
                echo "<a href=\"index.php?webtag={$webtag}&amp;msg={$tid}.{$message['PID']}\" target=\"", html_get_top_frame_name(), "\" title=\"{$title}\">{$tid}.{$message['PID']}</a>";
            }
            if ($message['REPLY_TO_PID'] > 0) {
                $title = "" . gettext("Link to post") . " #{$message['REPLY_TO_PID']}";
                echo " ", gettext("In reply to"), " ";
                if (intval($message['REPLY_TO_PID']) >= intval($first_msg)) {
                    echo "<a href=\"#a{$tid}_{$message['REPLY_TO_PID']}\" target=\"_self\" title=\"{$title}\">";
                    echo "{$tid}.{$message['REPLY_TO_PID']}</a>";
                } else {
                    if ($is_preview) {
                        echo "<a href=\"messages.php?webtag={$webtag}&amp;msg={$tid}.{$message['REPLY_TO_PID']}\" target=\"_blank\" title=\"{$title}\">";
                        echo "{$tid}.{$message['REPLY_TO_PID']}</a>";
                    } else {
                        echo "<a href=\"messages.php?webtag={$webtag}&amp;msg={$tid}.{$message['REPLY_TO_PID']}\" target=\"_self\" title=\"{$title}\">";
                        echo "{$tid}.{$message['REPLY_TO_PID']}</a>";
                    }
                }
            }
        }
        echo "&nbsp;</span></td>\n";
        echo "              </tr>\n";
        echo "              <tr>\n";
        echo "                <td class=\"postbody postcontent\" align=\"left\">{$message['CONTENT']}</td>\n";
        echo "              </tr>\n";
        if (isset($message['EDITED']) && $message['EDITED'] > 0) {
            if ($post_edit_grace_period == 0 || $message['EDITED'] - $message['CREATED'] > $post_edit_grace_period * MINUTE_IN_SECONDS) {
                if ($edit_user = user_get_logon($message['EDITED_BY'])) {
                    echo "              <tr>\n";
                    echo "                <td class=\"postbody\" align=\"left\"><p class=\"edit_text\">", sprintf(gettext("EDITED: %s by %s"), format_time($message['EDITED']), $edit_user), "</p></td>\n";
                    echo "              </tr>\n";
                }
            }
        }
        if (forum_get_setting('require_post_approval', 'Y') && isset($message['APPROVED']) && $message['APPROVED'] > 0 && $perm_is_moderator) {
            if (isset($message['APPROVED_BY']) && $message['APPROVED_BY'] > 0 && $message['APPROVED_BY'] != $message['FROM_UID']) {
                if ($approved_user = user_get_logon($message['APPROVED_BY'])) {
                    echo "              <tr>\n";
                    echo "                <td class=\"postbody\" align=\"left\"><p class=\"approved_text\">", sprintf(gettext("APPROVED: %s by %s"), format_time($message['APPROVED']), $approved_user), "</p></td>\n";
                    echo "              </tr>\n";
                }
            }
        }
        if ($tid != 0 && isset($message['PID']) || isset($message['AID'])) {
            $aid = isset($message['AID']) ? $message['AID'] : attachments_get_id($tid, $message['PID']);
            $attachments_array = array();
            $image_attachments_array = array();
            if (attachments_get($message['FROM_UID'], $aid, $attachments_array, $image_attachments_array)) {
                echo "              <tr>\n";
                echo "                <td class=\"postbody\" align=\"left\">\n";
                if (is_array($attachments_array) && sizeof($attachments_array) > 0) {
                    echo "                  <p><b>", gettext("Attachments"), ":</b><br />\n";
                    foreach ($attachments_array as $attachment) {
                        echo "                  ", attachments_make_link($attachment), "<br />\n";
                    }
                    echo "                  </p>\n";
                }
                if (is_array($image_attachments_array) && sizeof($image_attachments_array) > 0) {
                    echo "                  <p><b>", gettext("Image Attachments"), ":</b><br />\n";
                    foreach ($image_attachments_array as $key => $attachment) {
                        echo "                  ", attachments_make_link($attachment), "\n";
                    }
                    echo "                  </p>\n";
                }
                echo "                </td>\n";
                echo "              </tr>\n";
            }
        }
        echo "            </table>\n";
        if (!$is_preview) {
            echo "            <table width=\"100%\" class=\"postresponse\" cellspacing=\"1\" cellpadding=\"0\">\n";
            echo "              <tr>\n";
            if (isset($message['ANON_LOGON']) && $message['ANON_LOGON'] > USER_ANON_DISABLED || !isset($message['USER_ACTIVE']) || is_null($message['USER_ACTIVE'])) {
                echo "                <td width=\"25%\" align=\"left\">";
                echo "                  <img src=\"", html_style_image('status_offline.png'), "\" alt=\"\" title=\"", gettext("Inactive / Offline"), "\" />";
                echo "                </td>\n";
            } else {
                echo "                <td width=\"25%\" align=\"left\">";
                echo "                  <img src=\"", html_style_image('status_online.png'), "\" alt=\"\" title=\"", gettext("Online"), "\" />";
                echo "                </td>\n";
            }
            echo "                <td width=\"50%\" style=\"white-space: nowrap\">";
            if ($msg_count > 0) {
                if (!$closed && session::check_perm(USER_PERM_POST_CREATE, $folder_fid) || $perm_is_moderator) {
                    if ($quick_reply == 'Y') {
                        echo "<img src=\"", html_style_image('quickreply.png'), "\" border=\"0\" alt=\"", gettext("Quick Reply"), "\" title=\"", gettext("Quick Reply"), "\" />\n";
                        echo "<a href=\"Javascript:void(0)\" rel=\"{$tid}.{$message['PID']}\" target=\"_self\" class=\"quick_reply_link\">", gettext("Quick Reply"), "</a>\n";
                    } else {
                        echo "<img src=\"", html_style_image('post.png'), "\" border=\"0\" alt=\"", gettext("Reply"), "\" title=\"", gettext("Reply"), "\" />";
                        echo "&nbsp;<a href=\"post.php?webtag={$webtag}&amp;replyto={$tid}.{$message['PID']}\" target=\"_parent\" id=\"reply_{$message['PID']}\">", gettext("Reply"), "</a>";
                    }
                    echo "&nbsp;&nbsp;<img src=\"", html_style_image('quote_disabled.png'), "\" border=\"0\" alt=\"", gettext("Quote"), "\" title=\"", gettext("Quote"), "\" id=\"quote_img_{$message['PID']}\" />";
                    echo "&nbsp;<a href=\"post.php?webtag={$webtag}&amp;replyto={$tid}.{$message['PID']}&amp;quote_list={$message['PID']}\" target=\"_parent\" title=\"", gettext("Quote"), "\" id=\"quote_{$message['PID']}\" rel=\"{$message['PID']}\">", gettext("Quote"), "</a>";
                    if (!session::check_perm(USER_PERM_PILLORIED, 0) && ($uid != $message['FROM_UID'] && $from_user_permissions & USER_PERM_PILLORIED || $uid == $message['FROM_UID']) && session::check_perm(USER_PERM_POST_EDIT, $folder_fid) && ($post_edit_time == 0 || time() - $message['CREATED'] < $post_edit_time * HOUR_IN_SECONDS) && forum_get_setting('allow_post_editing', 'Y') || $perm_is_moderator) {
                        if ($is_poll && $message['PID'] == 1) {
                            if (!poll_is_closed($tid) || $perm_is_moderator) {
                                echo "&nbsp;&nbsp;<img src=\"", html_style_image('edit.png'), "\" border=\"0\" alt=\"", gettext("Edit Poll"), "\" title=\"", gettext("Edit Poll"), "\" />";
                                echo "&nbsp;<a href=\"edit_poll.php?webtag={$webtag}&amp;msg={$tid}.{$message['PID']}\" target=\"_parent\">", gettext("Edit Poll"), "</a>\n";
                            }
                        } else {
                            echo "&nbsp;&nbsp;<img src=\"", html_style_image('edit.png'), "\" border=\"0\" alt=\"", gettext("Edit"), "\" title=\"", gettext("Edit"), "\" />";
                            echo "&nbsp;<a href=\"edit.php?webtag={$webtag}&amp;msg={$tid}.{$message['PID']}\" target=\"_parent\">", gettext("Edit"), "</a>";
                        }
                    }
                }
            } else {
                echo "&nbsp;";
            }
            echo "</td>\n";
            echo "                <td width=\"25%\" align=\"right\" style=\"white-space: nowrap\">\n";
            echo "                  <span class=\"post_options\" id=\"post_options_{$tid}.{$message['PID']}\"></span>\n";
            echo "                </td>\n";
            echo "              </tr>";
            echo "            </table>\n";
        } else {
            echo "            <table width=\"100%\" class=\"postresponse\" cellspacing=\"1\" cellpadding=\"0\">\n";
            echo "              <tr>\n";
            echo "                <td>&nbsp;</td>\n";
            echo "              </tr>\n";
            echo "            </table>\n";
        }
    }
    echo "            </td>\n";
    echo "          </tr>\n";
    echo "        </table>\n";
    echo "      </td>\n";
    if ($in_list && !$is_preview) {
        message_display_navigation($tid, $message['PID'], $first_msg, $msg_count, $posts_per_page);
    }
    echo "    </tr>\n";
    echo "  </table>\n";
    if ($in_list && isset($message['PID'])) {
        echo "  <div id=\"quick_reply_{$message['PID']}\"></div>\n";
    }
    echo "</div>\n";
    echo $in_list ? "<br />\n" : '';
}
Esempio n. 21
0
    if ($sort_by == 'ACTIVE' && $sort_dir == 'DESC') {
        echo "                   <td class=\"subhead_sort_desc\" align=\"left\"><a href=\"admin_users.php?webtag={$webtag}&amp;sort_by=ACTIVE&amp;sort_dir=ASC&amp;user_search=", htmlentities_array($user_search), "&amp;page={$page}&amp;filter={$filter}\">", gettext("Active"), "</a></td>\n";
    } else {
        if ($sort_dir == 'ASC') {
            echo "                   <td class=\"subhead\" align=\"left\"><a href=\"admin_users.php?webtag={$webtag}&amp;sort_by=ACTIVE&amp;sort_dir=ASC&amp;user_search=", htmlentities_array($user_search), "&amp;page={$page}&amp;filter={$filter}\">", gettext("Active"), "</a></td>\n";
        } else {
            echo "                   <td class=\"subhead\" align=\"left\"><a href=\"admin_users.php?webtag={$webtag}&amp;sort_by=ACTIVE&amp;sort_dir=DESC&amp;user_search=", htmlentities_array($user_search), "&amp;page={$page}&amp;filter={$filter}\">", gettext("Active"), "</a></td>\n";
        }
    }
}
echo "                 </tr>\n";
if (sizeof($admin_user_array['user_array']) > 0) {
    foreach ($admin_user_array['user_array'] as $user) {
        echo "                 <tr>\n";
        echo "                   <td align=\"center\">", form_checkbox("user_update[{$user['UID']}]", "Y"), "</td>\n";
        echo "                   <td class=\"posthead\" align=\"left\" width=\"35%\" style=\"white-space: nowrap\">&nbsp;<a href=\"admin_user.php?webtag={$webtag}&amp;uid=", $user['UID'], "\">", word_filter_add_ob_tags(format_user_name($user['LOGON'], $user['NICKNAME']), true), "</a></td>\n";
        if (isset($user['LAST_VISIT']) && $user['LAST_VISIT'] > 0) {
            echo "                   <td class=\"posthead\" align=\"left\">&nbsp;", format_time($user['LAST_VISIT']), "</td>\n";
        } else {
            echo "                   <td class=\"posthead\" align=\"left\">&nbsp;", gettext("Unknown"), "</td>\n";
        }
        if (isset($user['REGISTERED']) && $user['REGISTERED'] > 0) {
            echo "                   <td class=\"posthead\" align=\"left\">&nbsp;", format_time($user['REGISTERED']), "</td>\n";
        } else {
            echo "                   <td class=\"posthead\" align=\"left\">&nbsp;", gettext("Unknown"), "</td>\n";
        }
        if (isset($user['ID'])) {
            echo "                   <td class=\"posthead\" align=\"left\">&nbsp;<b>", gettext("Yes"), "</b></td>\n";
        } else {
            echo "                   <td class=\"posthead\" align=\"left\">&nbsp;", gettext("No"), "</td>\n";
        }
Esempio n. 22
0
                        echo "                   <td class=\"postbody\" align=\"right\" valign=\"top\" width=\"20%\"><div class=\"profile_item_overflow\" title=\"", htmlentities_array($profile_item_options_array[$user_array["ENTRY_{$key}"]]), "\">", word_filter_add_ob_tags($profile_item_options_array[$user_array["ENTRY_{$key}"]], true), "&nbsp;</div></td>\n";
                    } else {
                        echo "                   <td class=\"postbody\" align=\"right\" valign=\"top\" width=\"20%\"><div class=\"profile_item_overflow\" title=\"\">&nbsp;</div></td>\n";
                    }
                } else {
                    if ($user_array["PROFILE_ITEM_TYPE_{$key}"] == PROFILE_ITEM_HYPERLINK) {
                        $profile_item_hyper_link = str_replace("[ProfileEntry]", word_filter_add_ob_tags(urlencode($user_array["ENTRY_{$key}"])), $user_array["PROFILE_ITEM_OPTIONS_{$key}"]);
                        $profile_item_hyper_link = sprintf("<a href=\"%s\" target=\"_blank\">%s</a>", $profile_item_hyper_link, word_filter_add_ob_tags($user_array["ENTRY_{$key}"], true));
                        echo "                   <td class=\"postbody\" align=\"right\" valign=\"top\" width=\"20%\"><div class=\"profile_item_overflow\" title=\"", word_filter_add_ob_tags($user_array["ENTRY_{$key}"], true), "\">{$profile_item_hyper_link}&nbsp;</div></td>\n";
                    } else {
                        echo "                   <td class=\"postbody\" align=\"right\" valign=\"top\" width=\"20%\"><div class=\"profile_item_overflow\" title=\"", htmlentities_array($user_array["ENTRY_{$key}"]), "\">", word_filter_add_ob_tags($user_array["ENTRY_{$key}"], true), "&nbsp;</div></td>\n";
                    }
                }
            } else {
                if (isset($profile_header_array[$key]) && isset($user_array[$key])) {
                    echo "                   <td class=\"postbody\" align=\"right\" valign=\"top\" width=\"20%\"><div class=\"profile_item_overflow\" title=\"", htmlentities_array($user_array[$key]), "\">", word_filter_add_ob_tags($user_array[$key], true), "&nbsp;</div></td>\n";
                } else {
                    echo "                   <td class=\"postbody\" align=\"right\" valign=\"top\" width=\"20%\"><div class=\"profile_item_overflow\" title=\"\">&nbsp;</div></td>\n";
                }
            }
        }
        echo "                 </tr>\n";
    }
}
echo "                 <tr>\n";
echo "                   <td align=\"left\" class=\"postbody\">&nbsp;</td>\n";
echo "                 </tr>\n";
echo "               </table>\n";
echo "             </td>\n";
echo "           </tr>\n";
echo "         </table>\n";
Esempio n. 23
0
     while ($random_user = array_pop($random_users_array)) {
         $total_vote_count++;
         foreach ($poll_preview_questions_array as $question_id => $question) {
             $option = $question['OPTIONS_ARRAY'][array_rand($question['OPTIONS_ARRAY'])];
             $poll_preview_questions_array[$question_id]['OPTIONS_ARRAY'][$option['OPTION_ID']]['VOTES_ARRAY'][] = $random_user;
         }
     }
 }
 if ($poll_data['POLLTYPE'] == POLL_TABLE_GRAPH) {
     $poll_display .= "          <tr>\n";
     $poll_display .= "            <td align=\"left\" colspan=\"2\">" . poll_table_graph($poll_preview_questions_array, $poll_data, $total_vote_count) . "</td>\n";
     $poll_display .= "           </tr>\n";
 } else {
     foreach ($poll_preview_questions_array as $question_id => $poll_question) {
         $poll_display .= "          <tr>\n";
         $poll_display .= "            <td align=\"left\"><h2>" . word_filter_add_ob_tags($poll_question['QUESTION'], true) . "</h2></td>\n";
         $poll_display .= "          </tr>\n";
         $poll_display .= "          <tr>\n";
         $poll_display .= "            <td align=\"left\">\n";
         $poll_display .= "              <table width=\"100%\">\n";
         if ($poll_data['POLLTYPE'] == POLL_VERTICAL_GRAPH) {
             $poll_display .= "                <tr>\n";
             $poll_display .= "                  <td align=\"left\" colspan=\"2\">" . poll_vertical_graph($poll_question['OPTIONS_ARRAY'], $poll_data, $total_vote_count) . "</td>\n";
             $poll_display .= "                </tr>\n";
         } else {
             if ($poll_data['VOTETYPE'] == POLL_VOTE_PUBLIC) {
                 $poll_display .= "                <tr>\n";
                 $poll_display .= "                  <td align=\"left\" colspan=\"2\">" . poll_horizontal_graph($poll_question['OPTIONS_ARRAY'], $poll_data, $total_vote_count) . "</td>\n";
                 $poll_display .= "                 </tr>\n";
             } else {
                 $poll_display .= "                <tr>\n";
Esempio n. 24
0
    echo "<div class=\"post_inner\">\n";
    echo "<div class=\"post_folder\">", gettext("Select folder"), ":", light_folder_draw_dropdown($fid, "fid"), "</div>";
    echo "<div class=\"post_thread_title\">", gettext("Thread title"), ":", light_form_input_text("threadtitle", htmlentities_array($threadtitle), 30, 64), "</div>";
} else {
    if (!($reply_message = messages_get($tid, $reply_to_pid))) {
        light_html_display_error_msg(gettext("That post does not exist in this thread!"));
        light_html_draw_bottom();
        exit;
    }
    $reply_message['CONTENT'] = message_get_content($tid, $reply_to_pid);
    if ((!isset($reply_message['CONTENT']) || $reply_message['CONTENT'] == "") && $thread_data['POLL_FLAG'] != 'Y' && $reply_to_pid != 0) {
        light_html_display_error_msg(gettext("Message not found. Check that it hasn't been deleted."));
        light_html_draw_bottom();
        exit;
    } else {
        echo "<h3>", gettext("Post Reply"), ": ", word_filter_add_ob_tags(thread_get_title($tid), true), "</h3>\n";
        echo "<div class=\"post_inner\">\n";
        echo form_input_hidden("reply_to", htmlentities_array("{$tid}.{$reply_to_pid}"));
        echo form_input_hidden('return_msg', htmlentities_array($return_msg)), "\n";
    }
}
echo "<div class=\"post_to\">", gettext("To"), ":", light_form_input_text("to_logon", isset($to_logon) ? htmlentities_array($to_logon) : "", 30, null, null, gettext("Leave blank for all")), "</div>";
echo "<div class=\"post_content\">", gettext("Content"), ":", light_form_textarea("content", htmlentities_array(strip_paragraphs($content)), 10, 50, null, 'textarea'), "</div>";
echo "<div class=\"post_buttons\">";
echo light_form_submit("post", gettext("Post"));
echo light_form_submit("preview", gettext("Preview"));
if (isset($return_msg)) {
    echo "<a href=\"lmessages.php?webtag={$webtag}&amp;msg={$return_msg}\" class=\"button\" target=\"_self\"><span>", gettext("Cancel"), "</span></a>\n";
} else {
    if (isset($tid) && is_numeric($tid) && isset($reply_to_pid) && is_numeric($reply_to_pid)) {
        echo "<a href=\"lmessages.php?webtag={$webtag}&amp;msg={$tid}.{$reply_to_pid}\" class=\"button\" target=\"_self\"><span>", gettext("Cancel"), "</span></a>\n";
echo "    <tr>\n";
echo "      <td align=\"left\" colspan=\"3\">\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 (sizeof($folder_subscriptions['folder_array']) > 0) {
    echo "                <tr>\n";
    echo "                  <td align=\"center\" class=\"subhead_checkbox\" width=\"1%\">", form_checkbox("toggle_all", "toggle_all"), "</td>\n";
    echo "                  <td align=\"left\" class=\"subhead\" width=\"450\">", gettext("Folder title"), "</td>\n";
    echo "                  <td align=\"center\" class=\"subhead\" width=\"150\">", gettext("Current Interest"), "</td>\n";
    echo "                </tr>\n";
    foreach ($folder_subscriptions['folder_array'] as $folder) {
        echo "                <tr>\n";
        echo "                  <td align=\"center\" style=\"white-space: nowrap\">", form_checkbox('set_interest[]', $folder['FID'], null), "</td>\n";
        echo "                  <td align=\"left\"><a href=\"index.php?webtag={$webtag}&amp;folder={$folder['FID']}\" target=\"_blank\">", word_filter_add_ob_tags($folder['TITLE'], true), "</a></td>\n";
        if (isset($interest_level_array[$folder['INTEREST']])) {
            echo "                  <td align=\"center\">{$interest_level_array[$folder['INTEREST']]}</td>\n";
        } else {
            echo "                  <td align=\"center\">", gettext("Normal"), "</td>\n";
        }
        echo "                </tr>\n";
    }
} else {
    echo "                <tr>\n";
    echo "                  <td align=\"left\" class=\"subhead\" width=\"20\">&nbsp;</td>\n";
    echo "                  <td align=\"left\" class=\"subhead\" width=\"450\">", gettext("Folder title"), "</td>\n";
    echo "                  <td align=\"center\" class=\"subhead\" width=\"150\">", gettext("Current Interest"), "</td>\n";
    echo "                </tr>\n";
}
echo "                <tr>\n";
Esempio n. 26
0
function post_draw_to_dropdown_in_thread($tid, $default_uid, $show_all = true, $inc_blank = false, $class = 'user_in_thread_dropdown', $custom_html = "")
{
    $html = "<select name=\"t_to_uid_in_thread\" class=\"{$class}\" {$custom_html}>";
    if (!($db = db::get())) {
        return false;
    }
    if (!is_numeric($tid)) {
        return false;
    }
    if (!is_numeric($default_uid)) {
        $default_uid = 0;
    }
    if (!($table_prefix = get_table_prefix())) {
        return "";
    }
    $uid = session::get_value('UID');
    if (isset($default_uid) && $default_uid != 0) {
        $sql = "SELECT USER.LOGON, USER.NICKNAME, USER_PEER.PEER_NICKNAME ";
        $sql .= "FROM USER LEFT JOIN `{$table_prefix}USER_PEER` USER_PEER ";
        $sql .= "ON (USER_PEER.PEER_UID = USER.UID AND USER_PEER.UID = '{$uid}') ";
        $sql .= "WHERE USER.UID = '{$default_uid}' ";
        if (!($result = $db->query($sql))) {
            return false;
        }
        if ($result->num_rows > 0) {
            if ($top_user = $result->fetch_assoc()) {
                if (isset($top_user['PEER_NICKNAME'])) {
                    if (!is_null($top_user['PEER_NICKNAME']) && strlen($top_user['PEER_NICKNAME']) > 0) {
                        $top_user['NICKNAME'] = $top_user['PEER_NICKNAME'];
                    }
                }
                $fmt_username = word_filter_add_ob_tags(format_user_name($top_user['LOGON'], $top_user['NICKNAME']), true);
                $html .= "<option value=\"{$default_uid}\" selected=\"selected\">{$fmt_username}</option>";
            }
        }
    }
    if ($show_all) {
        $html .= "<option value=\"0\">" . gettext("ALL") . "</option>";
    } else {
        if ($inc_blank) {
            if (isset($default_uid) && $default_uid != 0) {
                $html .= "<option value=\"0\">&nbsp;</option>";
            } else {
                $html .= "<option value=\"0\" selected=\"selected\">&nbsp;</option>";
            }
        }
    }
    $sql = "SELECT POST.FROM_UID AS UID, USER.LOGON, USER.NICKNAME, ";
    $sql .= "USER_PEER.PEER_NICKNAME FROM `{$table_prefix}POST` POST ";
    $sql .= "LEFT JOIN USER USER ON (USER.UID = POST.FROM_UID) ";
    $sql .= "LEFT JOIN `{$table_prefix}USER_PEER` USER_PEER ";
    $sql .= "ON (USER_PEER.PEER_UID = POST.FROM_UID AND USER_PEER.UID = '{$uid}') ";
    $sql .= "WHERE POST.TID = '{$tid}' AND POST.FROM_UID <> '{$default_uid}' ";
    $sql .= "GROUP BY POST.FROM_UID LIMIT 0, 20";
    if (!($result = $db->query($sql))) {
        return false;
    }
    while ($user_data = $result->fetch_assoc()) {
        if (isset($user_data['LOGON'])) {
            if (isset($user_data['LOGON']) && isset($user_data['PEER_NICKNAME'])) {
                if (!is_null($user_data['PEER_NICKNAME']) && strlen($user_data['PEER_NICKNAME']) > 0) {
                    $user_data['NICKNAME'] = $user_data['PEER_NICKNAME'];
                }
            }
            $fmt_username = word_filter_add_ob_tags(format_user_name($user_data['LOGON'], $user_data['NICKNAME']), true);
            $html .= "<option value=\"{$user_data['UID']}\">{$fmt_username}</option>";
        }
    }
    $html .= "</select>";
    return $html;
}
Esempio n. 27
0
echo "                          <ul>\n";
if ($forum_mods_array = mods_list_get_mods(0)) {
    foreach ($forum_mods_array as $forum_mod) {
        echo "                            <li><a href=\"user_profile.php?webtag={$webtag}&amp;uid={$forum_mod['UID']}\" target=\"_blank\" class=\"popup 650x500\">";
        echo word_filter_add_ob_tags(format_user_name($forum_mod['LOGON'], $forum_mod['NICKNAME']), true), "</a></li>\n";
    }
} else {
    echo "                            <li>", gettext("No moderators found"), "</li>\n";
}
echo "                          </ul>\n";
echo "                          <h2>", gettext("Folder moderators:"), "</h2>";
echo "                          <ul>\n";
if ($folder_mods_array = mods_list_get_mods($fid)) {
    foreach ($folder_mods_array as $folder_mod) {
        echo "                            <li><a href=\"user_profile.php?webtag={$webtag}&amp;uid={$folder_mod['UID']}\" target=\"_blank\" class=\"popup 650x500\">";
        echo word_filter_add_ob_tags(format_user_name($folder_mod['LOGON'], $folder_mod['NICKNAME']), true), "</a></li>\n";
    }
} else {
    echo "                            <li>", gettext("No moderators found"), "</li>\n";
}
echo "                          </ul>\n";
echo "                        </td>\n";
echo "                      </tr>\n";
echo "                    </table>\n";
echo "                  </td>\n";
echo "                </tr>\n";
echo "                <tr>\n";
echo "                  <td align=\"left\">&nbsp;</td>\n";
echo "                </tr>\n";
echo "              </table>\n";
echo "            </td>\n";
 echo "      <td align=\"left\" class=\"posthead\">\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";
 echo "                <tr>\n";
 echo "                  <td align=\"left\" class=\"subhead\" colspan=\"2\">", gettext("Search Results"), "</td>\n";
 echo "                </tr>\n";
 echo "                <tr>\n";
 echo "                  <td align=\"center\">\n";
 echo "                    <table class=\"posthead\" width=\"95%\">\n";
 if (sizeof($user_search_array['user_array']) > 0) {
     foreach ($user_search_array['user_array'] as $user) {
         echo "                      <tr>\n";
         echo "                        <td align=\"left\" width=\"1%\">", form_checkbox("add_user[]", $user['UID']), "</td>\n";
         echo "                        <td align=\"left\"><a href=\"user_profile.php?webtag={$webtag}&amp;uid={$user['UID']}\" target=\"_blank\" class=\"popup 650x500\">", word_filter_add_ob_tags(format_user_name($user['LOGON'], $user['NICKNAME']), true), "</a></td>\n";
         echo "                      </tr>\n";
     }
 }
 echo "                      <tr>\n";
 echo "                        <td align=\"left\">&nbsp;</td>\n";
 echo "                      </tr>\n";
 echo "                    </table>\n";
 echo "                  </td>\n";
 echo "                </tr>\n";
 echo "              </table>\n";
 echo "            </td>\n";
 echo "          </tr>\n";
 echo "        </table>\n";
 echo "      </td>\n";
 echo "    </tr>\n";
Esempio n. 29
0
echo "          <tr>\n";
echo "            <td align=\"left\" class=\"posthead\">\n";
echo "              <table class=\"posthead\" width=\"100%\">\n";
echo "                <tr>\n";
echo "                  <td align=\"left\" class=\"subhead\" width=\"20\">&nbsp;</td>\n";
echo "                  <td align=\"left\" class=\"subhead\" width=\"200\">", gettext("User"), "</td>\n";
echo "                  <td align=\"center\" class=\"subhead\" width=\"120\">", gettext("Total posts"), "</td>\n";
echo "                  <td align=\"center\" class=\"subhead\" width=\"120\">", gettext("Posts"), "</td>\n";
echo "                  <td align=\"center\" class=\"subhead\" width=\"120\">", gettext("Percent"), "</td>\n";
echo "                  <td align=\"center\" class=\"subhead\" width=\"120\">", gettext("Average"), "</td>\n";
echo "                </tr>\n";
if (sizeof($user_stats_array['user_stats']) > 0) {
    foreach ($user_stats_array['user_stats'] as $user_stats) {
        echo "                <tr>\n";
        echo "                  <td align=\"left\">&nbsp;</td>\n";
        echo "                  <td align=\"left\">", word_filter_add_ob_tags(format_user_name($user_stats['LOGON'], $user_stats['NICKNAME']), true), "</td>\n";
        echo "                  <td align=\"center\">", user_get_post_count($user_stats['UID']), "</td>\n";
        echo "                  <td align=\"center\">{$user_stats['POST_COUNT']}</td>\n";
        echo "                  <td align=\"center\">", number_format(round(100 / $user_stats_array['post_count'] * $user_stats['POST_COUNT'], 2), 2, '.', ','), "%</td>\n";
        echo "                  <td align=\"center\">", number_format(round($user_stats['POST_COUNT'] / $num_days, 2), 2, '.', ','), "</td>\n";
        echo "                </tr>\n";
    }
    echo "                <tr>\n";
    echo "                  <td align=\"left\" colspan=\"6\">&nbsp;</td>\n";
    echo "                </tr>\n";
    echo "                <tr>\n";
    echo "                  <td colspan=\"6\" align=\"center\">", gettext("Total posts for this period"), ": {$user_stats_array['post_count']}</td>\n";
    echo "                </tr>\n";
} else {
    echo "                <tr>\n";
    echo "                  <td align=\"left\" colspan=\"6\">&nbsp;</td>\n";
Esempio n. 30
0
if (isset($search_results_array['results_array']) && sizeof($search_results_array['results_array']) > 0) {
    foreach ($search_results_array['results_array'] as $search_result) {
        if ($type == SEARCH_LOGON && !in_array($search_result['LOGON'], $selected_array)) {
            if ($multi === 'Y') {
                echo "                      <tr>\n";
                echo "                        <td align=\"left\">", form_checkbox("selected[]", htmlentities_array($search_result['LOGON'])), "&nbsp;<a href=\"user_profile.php?webtag={$webtag}&amp;uid={$search_result['UID']}\" target=\"_blank\" class=\"popup 650x500\">", word_filter_add_ob_tags(format_user_name($search_result['LOGON'], $search_result['NICKNAME']), true), "</a></td>\n";
                echo "                      </tr>\n";
            } else {
                echo "                      <tr>\n";
                echo "                        <td align=\"left\">", form_radio("selected", htmlentities_array($search_result['LOGON'])), "&nbsp;<a href=\"user_profile.php?webtag={$webtag}&amp;uid={$search_result['UID']}\" target=\"_blank\" class=\"popup 650x500\">", word_filter_add_ob_tags(format_user_name($search_result['LOGON'], $search_result['NICKNAME']), true), "</a></td>\n";
                echo "                      </tr>\n";
            }
        } else {
            if ($type == SEARCH_THREAD && !in_array($search_result['TID'], $selected_array)) {
                echo "                      <tr>\n";
                echo "                        <td align=\"left\">", form_radio("selected", $search_result['TID']), "&nbsp;<a href=\"messages.php?webtag={$webtag}&amp;msg={$search_result['TID']}.1\" target=\"_blank\">", word_filter_add_ob_tags($search_result['TITLE'], true), "</a></td>\n";
                echo "                      </tr>\n";
            }
        }
    }
}
if (sizeof($selected_array) > 0 || isset($search_results_array['results_array']) && sizeof($search_results_array['results_array']) > 0) {
    echo "                        <tr>\n";
    echo "                          <td class=\"postbody\">&nbsp;</td>\n";
    echo "                        </tr>\n";
    echo "                      </table>\n";
    echo "                    </div>\n";
    echo "                  </td>\n";
    echo "                </tr>\n";
    echo "              </table>\n";
    echo "            </td>\n";