Beispiel #1
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>";
}
        }
        if (forum_save_global_settings($new_forum_settings)) {
            if (isset($_POST['confirm_unread_cutoff'])) {
                forum_update_unread_data($unread_cutoff_stamp);
            }
            header_redirect("admin_default_forum_settings.php?webtag={$webtag}&updated=true", gettext("Forum settings successfully updated"));
        } else {
            $valid = false;
            $error_msg_array[] = gettext("Failed to update forum settings. Please try again later.");
        }
    }
    $forum_global_settings = array_merge($forum_global_settings, $new_forum_settings);
}
// Start Output Here
html_draw_top(sprintf('title=%s', gettext("Admin - Global Forum Settings")), 'class=window_title', "admin.js", "emoticons.js");
echo "<h1>", gettext("Admin"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />", gettext("Global Forum Settings"), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '600', 'center');
} else {
    if (isset($_GET['updated'])) {
        html_display_success_msg(gettext("Preferences were successfully updated."), '600', 'center');
    } else {
        html_display_warning_msg(gettext("<b>Note:</b> These settings affect all forums. Where the setting is duplicated on the individual Forum's settings page that will take precedence over the settings you change here."), '600', 'center');
    }
}
echo "<br />\n";
echo "<div align=\"center\">\n";
echo "<form accept-charset=\"utf-8\" name=\"prefsform\" action=\"admin_default_forum_settings.php\" method=\"post\" target=\"_self\">\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"600\">\n";
echo "    <tr>\n";
if (isset($_GET['delete_comment']) && is_numeric($_GET['delete_comment'])) {
    $comment_id = $_GET['delete_comment'];
    $comment_uid = links_get_comment_uid($comment_id);
    if ($user_perm_links_moderate || $comment_uid == $_SESSION['UID']) {
        if (links_delete_comment($comment_id)) {
            $success_msg = gettext("Comment was deleted.");
        } else {
            $error_msg_array[] = gettext("Comment could not be deleted.");
            $valid = false;
        }
    }
}
$folders = links_folders_get(!$user_perm_links_moderate);
$page_title = links_get_folder_page_title($link['FID'], $folders, $link['TITLE']);
html_draw_top(array('title' => $page_title, 'class' => 'window_title'));
echo "<h1>", links_get_folder_path_links($link['FID'], $folders, true, true), html_style_image('separator'), "<a href=\"links.php?webtag={$webtag}&amp;lid={$lid}&amp;action=go\" target=\"_blank\">", word_filter_add_ob_tags($link['TITLE'], true), "</a></h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '600', 'center');
} else {
    if (isset($success_msg) && strlen($success_msg) > 0) {
        html_display_success_msg($success_msg, '600', 'center');
    }
}
echo "<br />\n";
echo "<div align=\"center\">\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";
Beispiel #4
0
echo "    <td align=\"left\" class=\"postbody\"><hr /></td>\n";
echo "  </tr>\n";
echo "  <tr>\n";
echo "    <td align=\"left\" class=\"postbody\"><img src=\"", html_style_image('bullet.png'), "\" border=\"0\" alt=\"\" />&nbsp;<a href=\"edit_email.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", htmlentities_array(gettext("Email & Privacy")), "</a></td>\n";
echo "  </tr>\n";
echo "  <tr>\n";
echo "    <td align=\"left\" class=\"postbody\"><img src=\"", html_style_image('bullet.png'), "\" border=\"0\" alt=\"\" />&nbsp;<a href=\"forum_options.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Forum Options"), "</a></td>\n";
echo "  </tr>\n";
echo "  <tr>\n";
echo "    <td align=\"left\" class=\"postbody\"><img src=\"", html_style_image('bullet.png'), "\" border=\"0\" alt=\"\" />&nbsp;<a href=\"pm_options.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Private Message Options"), "</a></td>\n";
echo "  </tr>\n";
echo "  <tr>\n";
echo "    <td align=\"left\" class=\"postbody\"><img src=\"", html_style_image('bullet.png'), "\" border=\"0\" alt=\"\" />&nbsp;<a href=\"edit_attachments.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Attachments"), "</a></td>\n";
echo "  </tr>\n";
echo "  <tr>\n";
echo "    <td align=\"left\" class=\"postbody\"><img src=\"", html_style_image('bullet.png'), "\" border=\"0\" alt=\"\" />&nbsp;<a href=\"edit_signature.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Signature"), "</a></td>\n";
echo "  </tr>\n";
echo "  <tr>\n";
echo "    <td align=\"left\" class=\"postbody\"><img src=\"", html_style_image('bullet.png'), "\" border=\"0\" alt=\"\" />&nbsp;<a href=\"edit_relations.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Relationships"), "</a></td>\n";
echo "  </tr>\n";
echo "  <tr>\n";
echo "    <td align=\"left\" class=\"postbody\"><img src=\"", html_style_image('bullet.png'), "\" border=\"0\" alt=\"\" />&nbsp;<a href=\"edit_wordfilter.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Word Filter"), "</a></td>\n";
echo "  </tr>\n";
echo "  <tr>\n";
echo "    <td align=\"left\" class=\"postbody\"><img src=\"", html_style_image('bullet.png'), "\" border=\"0\" alt=\"\" />&nbsp;<a href=\"edit_subscriptions.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Thread Subscriptions"), "</a></td>\n";
echo "  </tr>\n";
echo "  <tr>\n";
echo "    <td align=\"left\" class=\"postbody\"><img src=\"", html_style_image('bullet.png'), "\" border=\"0\" alt=\"\" />&nbsp;<a href=\"folder_subscriptions.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Folder Subscriptions"), "</a></td>\n";
echo "  </tr>\n";
echo "</table>\n";
html_draw_bottom();
    } else {
        echo "                                    <li>", form_input_text("poll_questions[{$question_id}][options][0]", '', 45, 255), "&nbsp;", form_button_html("delete_option[{$question_id}][0]", 'submit', 'button_image delete_option', sprintf("<img src=\"%s\" alt=\"\"/>", html_style_image('delete.png')), sprintf('title="%s"', gettext("Delete option"))), "</li>\n";
        if (isset($_POST['add_option'][$question_id])) {
            echo poll_get_option_html($question_id, 1);
        }
    }
    echo "                                  </ol>\n";
    echo "                                </div>\n";
    echo "                              </div>\n";
    echo "                            ", form_button_html("add_option[{$question_id}]", 'submit', 'button_image add_option', sprintf("<img src=\"%s\" alt=\"\" />&nbsp;%s", html_style_image('add.png'), gettext("Add new option"))), "\n";
    echo "                            </fieldset>\n";
}
echo "                          </div>\n";
echo "                          <table width=\"100%\">\n";
echo "                            <tr>\n";
echo "                              <td>", form_button_html('add_question', 'submit', 'button_image add_question', sprintf("<img src=\"%s\" alt=\"\" />&nbsp;%s", html_style_image('add.png'), gettext("Add new question"))), "</td>\n";
echo "                            </tr>\n";
echo "                            <tr>\n";
echo "                              <td align=\"left\">&nbsp;</td>\n";
echo "                            </tr>\n";
echo "                          </table>\n";
echo "                          <table width=\"100%\">\n";
echo "                            <tr>\n";
echo "                              <td>\n";
echo "                                <table border=\"0\" cellspacing=\"0\" width=\"100%\">\n";
echo "                                  <tr>\n";
echo "                                    <td align=\"left\" class=\"subhead\">", gettext("Advanced Options"), "</td>\n";
if (($page_prefs & POLL_ADVANCED_DISPLAY) > 0) {
    echo "                                    <td class=\"subhead\" align=\"right\">", form_submit_image('hide.png', 'poll_advanced_toggle', 'hide', '', 'button_image toggle_button'), "&nbsp;</td>\n";
} else {
    echo "                                    <td class=\"subhead\" align=\"right\">", form_submit_image('show.png', 'poll_advanced_toggle', 'show', '', 'button_image toggle_button'), "&nbsp;</td>\n";
Beispiel #6
0
     $user['SESSION_REFERER_FULL'] = $user['SESSION_REFERER'];
     if (!($user['SESSION_REFERER'] = split_url($user['SESSION_REFERER']))) {
         if (mb_strlen($user['SESSION_REFERER_FULL']) > 25) {
             $user['SESSION_REFERER'] = mb_substr($user['SESSION_REFERER_FULL'], 0, 25);
             $user['SESSION_REFERER'] .= "&hellip;";
         }
     }
     if (referer_is_banned($user['SESSION_REFERER'])) {
         echo "                      <tr>\n";
         echo "                        <td align=\"left\" width=\"150\">", gettext("Session Referer"), "</td>\n";
         echo "                        <td align=\"left\"><a href=\"admin_banned.php?webtag={$webtag}&amp;unban_referer=", rawurlencode($user['SESSION_REFERER_FULL']), "&amp;ret=", rawurlencode(get_request_uri(true, false)), "\" title=\"{$user['SESSION_REFERER_FULL']}\">{$user['SESSION_REFERER']}</a>&nbsp;<a href=\"{$user['SESSION_REFERER_FULL']}\" target=\"_blank\"><img src=\"", html_style_image('link.png'), "\" border=\"0\" align=\"top\" alt=\"", gettext("External Link"), "\" title=\"", gettext("External Link"), "\" /></a> (", gettext("Banned"), ")</td>\n";
         echo "                      </tr>\n";
     } else {
         echo "                      <tr>\n";
         echo "                        <td align=\"left\" width=\"150\">", gettext("Session Referer"), "</td>\n";
         echo "                        <td align=\"left\"><a href=\"admin_banned.php?webtag={$webtag}&amp;ban_referer=", rawurlencode($user['SESSION_REFERER_FULL']), "&amp;ret=", rawurlencode(get_request_uri(true, false)), "\" title=\"{$user['SESSION_REFERER_FULL']}\">{$user['SESSION_REFERER']}</a>&nbsp;<a href=\"{$user['SESSION_REFERER_FULL']}\" target=\"_blank\"><img src=\"", html_style_image('link.png'), "\" border=\"0\" align=\"top\" alt=\"", gettext("External Link"), "\" title=\"", gettext("External Link"), "\" /></a></td>\n";
         echo "                      </tr>\n";
     }
 } else {
     echo "                      <tr>\n";
     echo "                        <td align=\"left\" width=\"150\">", gettext("Session Referer"), "</td>\n";
     echo "                        <td align=\"left\">", gettext("Unknown"), "</td>\n";
     echo "                      </tr>\n";
 }
 echo "                      <tr>\n";
 echo "                        <td align=\"left\" width=\"150\">", gettext("Last IP Address"), ":</td>\n";
 if (ip_is_banned($user['IPADDRESS'])) {
     echo "                        <td align=\"left\"><a href=\"admin_banned.php?webtag={$webtag}&amp;unban_ipaddress={$user['IPADDRESS']}&amp;ret=", rawurlencode(get_request_uri(true, false)), "\" target=\"_self\">{$user['IPADDRESS']}</a> (", gettext("Banned"), ")</td>\n";
 } else {
     if (strlen(trim($user['IPADDRESS'])) > 0) {
         echo "                        <td align=\"left\"><a href=\"admin_banned.php?webtag={$webtag}&amp;ban_ipaddress={$user['IPADDRESS']}&amp;ret=", rawurlencode(get_request_uri(true, false)), "\" target=\"_self\">{$user['IPADDRESS']}</a></td>\n";
    }
}
if (isset($_GET['reset']) || isset($_POST['reset'])) {
    $user_search = "";
}
if (isset($_GET['filter']) && is_numeric($_GET['filter'])) {
    $filter = $_GET['filter'];
} else {
    if (isset($_POST['filter']) && is_numeric($_POST['filter'])) {
        $filter = $_POST['filter'];
    } else {
        $filter = ADMIN_USER_FILTER_NONE;
    }
}
html_draw_top(sprintf('title=%s', gettext("Admin - Manage Users")), 'class=window_title');
echo "<h1>", gettext("Admin"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />", gettext("Manage Users"), "</h1>\n";
if (session::check_perm(USER_PERM_ADMIN_TOOLS, 0, 0)) {
    if (isset($_POST['select_action'])) {
        if (isset($_POST['action']) && is_numeric($_POST['action'])) {
            if ($_POST['action'] == ADMIN_USER_OPTION_END_SESSION) {
                $valid = true;
                if (isset($_POST['user_update']) && is_array($_POST['user_update'])) {
                    $kick_users = array_filter(array_keys($_POST['user_update']), 'is_numeric');
                    $kick_user_success_array = array();
                    foreach ($kick_users as $user_uid) {
                        if ($valid && ($user_logon = user_get_logon($user_uid))) {
                            if (!admin_session_end($user_uid)) {
                                $error_msg_array[] = sprintf(gettext("Failed to end session for user %s"), $user_logon);
                                $valid = false;
                            }
                        }
    }
}
if (isset($_POST['move_down']) && is_array($_POST['move_down'])) {
    list($fid) = array_keys($_POST['move_down']);
    if (folder_move_down($fid)) {
        header_redirect("admin_folders.php?webtag={$webtag}&page={$page}");
        exit;
    }
}
if (isset($_POST['move_up_disabled']) || isset($_POST['move_down_disabled'])) {
    header_redirect("admin_folders.php?webtag={$webtag}&page={$page}");
    exit;
}
html_draw_top(array('title' => gettext('Admin - Manage Folders'), 'class' => 'window_title', 'main_css' => 'admin.css'));
$folder_array = folder_get_all_by_page($page);
echo "<h1>", gettext("Admin"), html_style_image('separator'), gettext("Manage Folders"), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '86%', 'center');
} else {
    if (isset($_GET['added'])) {
        html_display_success_msg(gettext("Successfully added new folder"), '86%', 'center');
    } else {
        if (isset($_GET['edited'])) {
            html_display_success_msg(gettext("Successfully edited folder"), '86%', 'center');
        } else {
            if (isset($_GET['deleted'])) {
                html_display_success_msg(gettext("Successfully removed selected folders"), '86%', 'center');
            } else {
                if (sizeof($folder_array['folder_array']) < 1) {
                    html_display_warning_msg(gettext("No existing folders found. To add a folder click the 'Add New' button below."), '86%', 'center');
                } else {
Beispiel #9
0
    } else {
        echo "                                    <li>", form_input_text("poll_questions[{$question_id}][options][0]", null, 45, 255), "&nbsp;", form_button_html("delete_option[{$question_id}][0]", 'submit', 'button_image delete_option', html_style_image('delete'), sprintf('title="%s"', gettext("Delete option"))), "</li>\n";
        if (isset($_POST['add_option'][$question_id])) {
            echo poll_get_option_html($question_id, 1);
        }
    }
    echo "                                  </ol>\n";
    echo "                                </div>\n";
    echo "                              </div>\n";
    echo "                            ", form_button_html("add_option[{$question_id}]", 'submit', 'button_image add_option', html_style_image('add', gettext("Add new option")) . '&nbsp;' . gettext("Add new option")), "\n";
    echo "                            </fieldset>\n";
}
echo "                          </div>\n";
echo "                          <table width=\"100%\">\n";
echo "                            <tr>\n";
echo "                              <td>", form_button_html('add_question', 'submit', 'button_image add_question', html_style_image('add', gettext("Add new question")) . '&nbsp;' . gettext("Add new question")), "</td>\n";
echo "                            </tr>\n";
echo "                            <tr>\n";
echo "                              <td align=\"left\">&nbsp;</td>\n";
echo "                            </tr>\n";
echo "                          </table>\n";
echo "                          <table width=\"100%\">\n";
echo "                            <tr>\n";
echo "                              <td>\n";
echo "                                <table border=\"0\" cellspacing=\"0\" width=\"100%\">\n";
echo "                                  <tr>\n";
echo "                                    <td align=\"left\" class=\"subhead\">", gettext("Advanced Options"), "</td>\n";
if (($page_prefs & POLL_ADVANCED_DISPLAY) > 0) {
    echo "                                    <td class=\"subhead\" align=\"right\">", form_submit_image('hide', 'poll_advanced_toggle', 'hide', null, 'button_image toggle_button'), "&nbsp;</td>\n";
} else {
    echo "                                    <td class=\"subhead\" align=\"right\">", form_submit_image('show', 'poll_advanced_toggle', 'show', null, 'button_image toggle_button'), "&nbsp;</td>\n";
     echo "      </td>\n";
     echo "    </tr>\n";
     echo "    <tr>\n";
     echo "      <td align=\"left\">&nbsp;</td>\n";
     echo "    </tr>\n";
     echo "    <tr>\n";
     echo "      <td align=\"center\">", form_submit("editfeedsubmit", gettext("Save")), "&nbsp;", form_submit("viewitems[{$psid}]", gettext("View items")), "&nbsp;", form_submit("cancel", gettext("Back")), "</td>\n";
     echo "    </tr>\n";
     echo "  </table>\n";
     echo "  </form>\n";
     echo "</div>\n";
     html_draw_bottom();
 } else {
     html_draw_top(array('title' => gettext('Admin - Manage Profile Sections'), 'class' => 'window_title', 'main_css' => 'admin.css'));
     $profile_sections = profile_sections_get_by_page($page);
     echo "<h1>", gettext("Admin"), html_style_image('separator'), gettext("Manage Profile Sections"), "</h1>\n";
     if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
         html_display_error_array($error_msg_array, '86%', 'center');
     } else {
         if (isset($_GET['added'])) {
             html_display_success_msg(gettext("Successfully added profile section"), '86%', 'center');
         } else {
             if (isset($_GET['edited'])) {
                 html_display_success_msg(gettext("Successfully edited profile section"), '86%', 'center');
             } else {
                 if (isset($_GET['deleted'])) {
                     html_display_success_msg(gettext("Successfully removed selected profile sections"), '86%', 'center');
                 } else {
                     if (sizeof($profile_sections['profile_sections_array']) < 1) {
                         html_display_warning_msg(gettext("No existing profile sections found. To add a profile section click the 'Add New' button below."), '86%', 'center');
                     }
Beispiel #11
0
 echo "            <td align=\"left\" class=\"posthead\">\n";
 echo "              <table class=\"subhead\" width=\"100%\">\n";
 echo "                <tr>\n";
 echo "                  <td align=\"left\">", gettext("Forthcoming Birthdays"), "</td>\n";
 echo "                </tr>\n";
 echo "              </table>\n";
 echo "              <table class=\"posthead\" width=\"100%\">\n";
 echo "                <tr>\n";
 echo "                  <td align=\"center\">\n";
 echo "                    <table class=\"posthead\" width=\"100%\">\n";
 echo "                      <tr>\n";
 echo "                        <td align=\"center\">\n";
 echo "                          <table class=\"posthead\" border=\"0\" width=\"100%\" cellpadding=\"2\" cellspacing=\"0\">\n";
 foreach ($user_birthdays_array as $user_birthday) {
     echo "                            <tr>\n";
     echo "                              <td valign=\"top\" align=\"center\" style=\"white-space: nowrap\" width=\"25\"><img src=\"", html_style_image('bullet.png'), "\" alt=\"", gettext("User"), "\" title=\"", gettext("User"), "\" /></td>\n";
     echo "                              <td align=\"left\" valign=\"top\"><a href=\"user_profile.php?webtag={$webtag}&amp;uid={$user_birthday['UID']}\" target=\"_blank\" class=\"popup 650x500\">", word_filter_add_ob_tags(format_user_name($user_birthday['LOGON'], $user_birthday['NICKNAME']), true), "</a></td>\n";
     echo "                              <td align=\"right\" style=\"white-space: nowrap\" valign=\"top\"><span class=\"threadtime\">", format_birthday($user_birthday['DOB']), "&nbsp;</span></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 "                </tr>\n";
 echo "              </table>\n";
 echo "            </td>\n";
Beispiel #12
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");
Beispiel #13
0
    echo "        </table>\n";
    echo "      </td>\n";
    echo "    </tr>\n";
    echo "    <tr>\n";
    echo "      <td align=\"left\">&nbsp;</td>\n";
    echo "    </tr>\n";
    echo "    <tr>\n";
    echo "      <td align=\"center\">", form_submit("add", gettext("Add")), "&nbsp;", form_submit("cancel", gettext("Cancel")), "</td>\n";
    echo "    </tr>\n";
    echo "  </table>\n";
    echo "</form>\n";
    html_draw_bottom();
} else {
    if ($mode == LINKS_ADD_FOLDER) {
        html_draw_top(array('title' => gettext("Links - Add a New Folder"), 'class' => 'window_title'));
        echo "<h1>", gettext("Links"), html_style_image('separator'), gettext("Add a new folder"), "</h1>\n";
        echo "<p>", gettext("Adding new folder under"), ": <b>" . links_get_folder_path_links($fid, $folders, false) . "</b></p>\n";
        if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
            html_display_error_array($error_msg_array, '500', 'left');
        }
        echo "<form accept-charset=\"utf-8\" name=\"folderadd\" action=\"links_add.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("fid", htmlentities_array($fid)) . "\n";
        echo "  ", form_input_hidden("mode", LINKS_ADD_FOLDER) . "\n";
        echo "  <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"500\">\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";
Beispiel #14
0
echo "            <td align=\"left\" class=\"posthead\">\n";
echo "              <table class=\"posthead\" width=\"100%\">\n";
echo "                <tr>\n";
echo "                  <td align=\"left\" colspan=\"3\" class=\"subhead\">", gettext("Upload a file for attachment to the message"), "</td>\n";
echo "                </tr>\n";
echo "              </table>\n";
echo "              <table class=\"posthead\" width=\"100%\">\n";
echo "                <tr>\n";
echo "                  <td align=\"center\">\n";
echo "                    <table class=\"posthead\" width=\"95%\">\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\" width=\"220\" class=\"postbody\" valign=\"top\">", gettext("Enter filename(s) to upload"), " :</td>\n";
echo "                        <td align=\"left\" class=\"postbody\">\n";
echo "                          ", form_input_file("userfile[]", "", 30, 0), "\n";
echo "                          <div class=\"upload_fields\">\n";
echo "                            <img src=\"", html_style_image('attach.png'), "\" border=\"0\" alt=\"", gettext("Attachment"), "\" title=\"", gettext("Attachment"), "\" />";
echo "                            <a class=\"add_upload_field\">", gettext("Upload another attachment"), "</a>\n";
echo "                          </div>\n";
echo "                        </td>\n";
echo "                        <td align=\"left\" class=\"postbody\" valign=\"top\">", form_submit("upload", gettext("Upload")), "</td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\" width=\"220\">&nbsp;</td>\n";
echo "                        <td align=\"left\" colspan=\"2\" class=\"smalltext\"><div id=\"upload_fields_link\"></div></td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\" colspan=\"3\">&nbsp;</td>\n";
echo "                      </tr>\n";
echo "                    </table>\n";
echo "                  </td>\n";
echo "                </tr>\n";
        foreach ($_POST['remove_user'] as $uid) {
            if (perm_user_in_group($uid, $gid)) {
                perm_remove_user_from_group($uid, $gid);
                if (($user_logon = user_get_logon($uid)) && ($group_name = perm_get_group_name($gid))) {
                    admin_add_log_entry(REMOVE_USER_FROM_GROUP, array($user_logon, $group_name));
                }
            }
        }
    }
}
if (!($group = perm_get_group($gid))) {
    html_draw_error(gettext("Supplied GID is not a user group"), 'admin_user_groups.php', 'get', array('back' => gettext("Back")));
}
html_draw_top(array('title' => sprintf(gettext('Admin - Manage User Groups - %s - Add/Remove Users'), $group['GROUP_NAME']), 'class' => 'window_title', 'main_css' => 'admin.css'));
$group_users_array = perm_group_get_users($gid, $start_main);
echo "<h1>", gettext("Admin"), html_style_image('separator'), gettext("Manage User Groups"), html_style_image('separator'), "{$group['GROUP_NAME']}", html_style_image('separator'), "", gettext("Add/Remove Users"), "</h1>\n";
if (isset($_GET['added'])) {
    html_display_success_msg(gettext("Successfully added group. Add users to this group by searching for them below."), '800', 'center');
} else {
    if (sizeof($group_users_array['user_array']) < 1) {
        html_display_warning_msg(gettext("There are no users in this group. Add users to this group by searching for them below."), '800', 'center');
    }
}
echo "<br />\n";
echo "<div align=\"center\">\n";
echo "<form accept-charset=\"utf-8\" name=\"f_folders\" action=\"admin_user_groups_edit_users.php\" method=\"post\">\n";
echo "  ", form_csrf_token_field(), "\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  ", form_input_hidden('gid', htmlentities_array($gid)), "\n";
echo "  ", form_input_hidden("main_page", htmlentities_array($main_page)), "\n";
echo "  ", form_input_hidden("search_page", htmlentities_array($search_page)), "\n";
Beispiel #16
0
                if ($admin_edit === true) {
                    header_redirect("admin_user.php?webtag={$webtag}&uid={$profile_uid}&profile_updated=true");
                    exit;
                } else {
                    header_redirect("edit_profile.php?webtag={$webtag}&uid={$profile_uid}&profile_updated=true");
                    exit;
                }
            }
        }
    }
}
if (is_array($profile_items_array) && sizeof($profile_items_array) > 0) {
    if ($admin_edit === true) {
        $user = user_get($profile_uid);
        html_draw_top(array('title' => sprintf(gettext('Admin - Edit Profile - %s'), format_user_name($user['LOGON'], $user['NICKNAME'])), 'class' => 'window_title', 'js' => array('js/prefs.js')));
        echo "<h1>", gettext("Admin"), html_style_image('separator'), gettext("Manage User"), html_style_image('separator'), format_user_name($user['LOGON'], $user['NICKNAME']), "</h1>\n";
    } else {
        html_draw_top(array('title' => gettext("My Controls - Edit Profile"), 'class' => 'window_title'));
        echo "<h1>", gettext("Edit Profile"), "</h1>\n";
    }
    if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
        html_display_error_array($error_msg_array, '700', $admin_edit ? 'center' : 'left');
    } else {
        if (isset($_GET['profile_updated'])) {
            html_display_success_msg(gettext("Profile updated."), '700', $admin_edit ? 'center' : 'left');
        }
    }
    if ($admin_edit === true) {
        echo "<div align=\"center\">\n";
    }
    echo "<br />\n";
Beispiel #17
0
            echo form_input_hidden("private_key", htmlentities_array($text_captcha_private_key));
            echo form_input_hidden("public_key", htmlentities_array($text_captcha->get_public_key()));
        } else {
            if (($text_captcha_image = $text_captcha->make_image()) !== false) {
                $forum_owner_email = forum_get_setting('forum_email', 'strlen', '*****@*****.**');
                $forum_owner_link = sprintf("<a href=\"mailto:%s\">%s</a>", $forum_owner_email, gettext("forum owner"));
                echo "</div>\n";
                echo "</div>\n";
                echo "<div class=\"register\">\n";
                echo "<h3>", gettext("Confirmation"), "</h3>\n";
                echo "<div class=\"register_inner\">\n";
                //echo "  <div class=\"register_confirmation\">\n";
                echo "  <div class=\"register_confirmation\">", sprintf(gettext("To prevent automated registrations this forum requires you enter a confirmation code. The code is displayed in the image below. If you are visually impaired or cannot otherwise read the code please contact the %s."), $forum_owner_link), "</div>\n";
                echo "  <div class=\"register_confirmation_image\">\n";
                echo "    ", html_style_image('text_captcha_image', gettext("This is a captcha-picture. It is used to prevent automatic registration"), 'text_captcha_image', array('background-image' => sprintf("url('data:image/jpeg;base64,%s')", base64_encode(file_get_contents($text_captcha_image))), 'width' => "{$text_captcha->get_width()}px", 'height' => "{$text_captcha->get_height()}px")), "\n";
                echo "    ", html_style_image('text_captcha_reload reload', null, 'text_captcha_reload'), "\n";
                echo "  </div>\n";
                echo "  <div class=\"register_confirmation_input\">\n";
                echo "    ", light_form_input_text("private_key", null, 20, htmlentities_array($text_captcha->get_num_chars())), "\n";
                echo "  </div>\n";
                //echo "  <div class=\"clearer\"></div>\n";
                //echo "</div>\n";
            }
        }
    }
    echo "  <div class=\"register_buttons\">\n";
    echo "  ", light_form_submit('register', gettext("Register"));
    echo "  <a href=\"llogon.php?webtag={$webtag}\" class=\"button\" target=\"_self\"><span>", gettext("Cancel"), "</span></a>\n";
    echo "  </div>\n";
} else {
    $forum_name = forum_get_setting('forum_name', 'strlen', 'A Beehive Forum');
function message_display_navigation($tid, $pid, $first_msg, $msg_count, $posts_per_page)
{
    $webtag = get_webtag();
    echo "    <td align=\"left\" width=\"2%\" valign=\"top\">\n";
    echo "      <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n";
    echo "        <tr>\n";
    echo "          <td align=\"center\">\n";
    if ($pid > 1) {
        if ($pid - 1 < $first_msg) {
            echo "<a href=\"messages.php?webtag={$webtag}&amp;msg={$tid}.", $pid - 1, "\" target=\"_self\">";
            echo "<img src=\"", html_style_image("message_up.png"), "\" border=\"0\" alt=\"", gettext("Previous"), "\" title=\"", gettext("Previous"), "\" /></a>";
        } else {
            echo "<a href=\"#a{$tid}_", $pid - 1, "\" target=\"_self\">";
            echo "<img src=\"", html_style_image("message_up.png"), "\" border=\"0\" alt=\"", gettext("Previous"), "\" title=\"", gettext("Previous"), "\" /></a>";
        }
    }
    echo "          </td>\n";
    echo "        </tr>\n";
    echo "        <tr>\n";
    echo "          <td align=\"center\">\n";
    if ($pid < $msg_count) {
        if ($pid + 1 > $first_msg + $posts_per_page - 1) {
            echo "<a href=\"messages.php?webtag={$webtag}&amp;msg={$tid}.", $pid + 1, "\" target=\"_self\">";
            echo "<img src=\"", html_style_image("message_down.png"), "\" border=\"0\" alt=\"", gettext("Next"), "\" title=\"", gettext("Next"), "\" /></a>";
        } else {
            echo "<a href=\"#a{$tid}_", $pid + 1, "\" target=\"_self\">";
            echo "<img src=\"", html_style_image("message_down.png"), "\" border=\"0\" alt=\"", gettext("Next"), "\" title=\"", gettext("Next"), "\" /></a>";
        }
    }
    echo "          </td>\n";
    echo "        </tr>\n";
    echo "      </table>\n";
    echo "    </td>\n";
}
            echo "                    <a href=\"admin_viewlog.php?webtag={$webtag}&amp;sort_by=ACTION&amp;sort_dir=ASC&amp;group_by={$group_by}&amp;page={$page}\">", gettext("Action"), "</a>\n";
        } else {
            echo "                    <a href=\"admin_viewlog.php?webtag={$webtag}&amp;sort_by=ACTION&amp;sort_dir=DESC&amp;group_by={$group_by}&amp;page={$page}\">", gettext("Action"), "</a>\n";
        }
    }
}
echo "                  </td>\n";
if (isset($group_by) && $group_by != ADMIN_LOG_GROUP_NONE) {
    echo "                  <td class=\"subhead\" width=\"10%\" align=\"center\">\n";
    if ($sort_by == 'COUNT' && $sort_dir == 'ASC') {
        echo "                    <a href=\"admin_viewlog.php?webtag={$webtag}&amp;sort_by=COUNT&amp;group_by={$group_by}&amp;sort_dir=DESC&amp;group_by={$group_by}&amp;page={$page}\">", gettext("Count"), "</a>\n";
        echo "                     ", html_style_image('sort_asc', gettext("Sort Ascending")), "\n";
    } else {
        if ($sort_by == 'COUNT' && $sort_dir == 'DESC') {
            echo "                    <a href=\"admin_viewlog.php?webtag={$webtag}&amp;sort_by=COUNT&amp;sort_dir=ASC&amp;group_by={$group_by}&amp;page={$page}\">", gettext("Count"), "</a>\n";
            echo "                     ", html_style_image('sort_desc', gettext("Sort Descending")), "\n";
        } else {
            if ($sort_dir == 'ASC') {
                echo "                    <a href=\"admin_viewlog.php?webtag={$webtag}&amp;sort_by=COUNT&amp;sort_dir=ASC&amp;group_by={$group_by}&amp;page={$page}\">", gettext("Count"), "</a>\n";
            } else {
                echo "                    <a href=\"admin_viewlog.php?webtag={$webtag}&amp;sort_by=COUNT&amp;sort_dir=DESC&amp;group_by={$group_by}&amp;page={$page}\">", gettext("Count"), "</a>\n";
            }
        }
    }
    echo "                  </td>\n";
}
echo "                </tr>\n";
if (sizeof($admin_log_array['admin_log_array']) > 0) {
    foreach ($admin_log_array['admin_log_array'] as $admin_log_entry) {
        $auto_update = false;
        echo "                <tr>\n";
Beispiel #20
0
     } else {
         if (isset($user_array['AVATAR_AID']) && is_numeric($user_array['AVATAR_AID'])) {
             $attachment = attachments_get_by_aid($user_array['AVATAR_AID'], $user_array['UID']);
             if (($profile_picture_href = attachments_make_link($attachment, false, false, false, false)) !== false) {
                 echo "                   <td class=\"postbody\" align=\"left\" valign=\"top\">\n";
                 echo "                     ", html_style_image('profile_image profile_image_small', format_user_name($user_array['LOGON'], $user_array['NICKNAME']), null, array('background-image' => sprintf("url('%s&amp;profile_picture')", $profile_picture_href))), "\n";
                 echo "                   </td>\n";
             } else {
                 echo "                   <td align=\"left\" valign=\"top\" class=\"postbody\">", html_style_image('bullet', gettext("User")), "</td>\n";
             }
         } else {
             echo "                   <td align=\"left\" valign=\"top\" class=\"postbody\">", html_style_image('bullet', gettext("User")), "</td>\n";
         }
     }
 } else {
     echo "                   <td align=\"left\" valign=\"top\" class=\"postbody\">", html_style_image('bullet', gettext("User")), "</td>\n";
 }
 if (isset($user_array['SID']) && !is_null($user_array['SID'])) {
     echo "                   <td class=\"postbody\" align=\"left\" valign=\"top\"><a href=\"{$user_array['URL']}\" target=\"_blank\">", word_filter_add_ob_tags($user_array['NAME'], true), "</a></td>\n";
 } else {
     if ($user_array['UID'] > 0) {
         echo "                   <td class=\"postbody\" align=\"left\" valign=\"top\"><a href=\"user_profile.php?webtag={$webtag}&amp;uid={$user_array['UID']}\" target=\"_blank\" class=\"popup 650x500\">", word_filter_add_ob_tags(format_user_name($user_array['LOGON'], $user_array['NICKNAME']), true), "</a></td>\n";
     } else {
         echo "                   <td class=\"postbody\" align=\"left\" valign=\"top\">", word_filter_add_ob_tags(format_user_name($user_array['LOGON'], $user_array['NICKNAME']), true), "</td>\n";
     }
 }
 foreach ($profile_items_selected_array as $key => $profile_item_selected) {
     if (is_numeric($key) && isset($user_array["ENTRY_{$key}"])) {
         if ($user_array["PROFILE_ITEM_TYPE_{$key}"] == PROFILE_ITEM_RADIO || $user_array["PROFILE_ITEM_TYPE_{$key}"] == PROFILE_ITEM_DROPDOWN) {
             $profile_item_options_array = explode("\n", $user_array["PROFILE_ITEM_OPTIONS_{$key}"]);
             if (isset($profile_item_options_array[$user_array["ENTRY_{$key}"]])) {
Beispiel #21
0
    echo "                </tr>\n";
    if ($thread_data['POLL_FLAG'] == 'Y' && $reply_message['PID'] == 1) {
        echo "                <tr>\n";
        echo "                  <td align=\"left\"><br />", poll_display($reply_to_tid, $thread_data['LENGTH'], $reply_to_pid, $thread_data['FID'], false, false, false, $show_sigs, true), "</td>\n";
        echo "                </tr>\n";
    } else {
        echo "                <tr>\n";
        echo "                  <td align=\"left\"><br />", message_display($reply_to_tid, $reply_message, $thread_data['LENGTH'], $reply_to_pid, $thread_data['FID'], false, false, false, false, $show_sigs, true), "</td>\n";
        echo "                </tr>\n";
    }
    echo "                <tr>\n";
    echo "                  <td align=\"left\" colspan=\"2\">&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";
if (!$new_thread) {
    echo "  <br />\n";
    echo "  <table  width=\"785\">\n";
    echo "    <tr>\n";
    echo "      <td align=\"center\"><img src=\"", html_style_image('current_thread.png'), "\" border=\"0\" alt=\"\" />&nbsp;<a href=\"index.php?webtag={$webtag}&amp;msg={$thread_data['TID']}.1\" target=\"_blank\" title=\"", gettext("Review entire thread in new window"), "\">", gettext("Review Thread"), "</a></td>\n";
    echo "    </tr>\n";
    echo "  </table>\n";
}
echo "</form>\n";
html_draw_bottom();
        $search_keyword = '';
    }
}
if (isset($_POST['clear'])) {
    $search_keyword = '';
}
$uid = session::get_value('UID');
$header_text_array = array(FOLDER_IGNORED => gettext("Ignored Folders"), FOLDER_SUBSCRIBED => gettext("Subscribed Folders"));
$interest_level_array = array(FOLDER_IGNORED => gettext("Ignored"), FOLDER_SUBSCRIBED => gettext("Subscribed"));
if (isset($search_keyword) && strlen(trim($search_keyword)) > 0) {
    $folder_subscriptions = folders_search_user_subscriptions($search_keyword, $view, $page);
} else {
    $folder_subscriptions = folders_get_user_subscriptions($view, $page);
}
html_draw_top(sprintf('title=%s', sprintf(gettext("My Controls - Folder Subscriptions - %s"), $header_text_array[$view]), 'edit_subscriptions.js', 'class=window_title'));
echo "<h1>", gettext("Folder Subscriptions"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />{$header_text_array[$view]}</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '600', 'left');
} else {
    if (isset($_GET['updated'])) {
        html_display_success_msg(gettext("Folder interests updated successfully"), '600', 'left');
    } else {
        if (sizeof($folder_subscriptions['folder_array']) < 1) {
            if (isset($search_keyword) && strlen(trim($search_keyword)) > 0) {
                html_display_warning_msg(gettext("Search Returned No Results"), '600', 'left');
            } else {
                if ($view == FOLDER_IGNORED) {
                    html_display_warning_msg(gettext("You are not ignoring any folders."), '600', 'left');
                } else {
                    html_display_warning_msg(gettext("You are not subscribed to any folders."), '600', 'left');
                }
                if ($admin_edit === true) {
                    header_redirect("admin_user.php?webtag={$webtag}&uid={$uid}&profile_updated=true", gettext("Profile updated."));
                    exit;
                } else {
                    header_redirect("edit_profile.php?webtag={$webtag}&uid={$uid}&profile_updated=true", gettext("Profile updated."));
                    exit;
                }
            }
        }
    }
}
if (is_array($profile_items_array) && sizeof($profile_items_array) > 0) {
    if ($admin_edit === true) {
        $user = user_get($uid);
        html_draw_top(sprintf('title=%s', sprintf(gettext("Admin - Edit Profile - %s"), format_user_name($user['LOGON'], $user['NICKNAME']))), 'class=window_title');
        echo "<h1>", gettext("Admin"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />", gettext("Edit Profile"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />", format_user_name($user['LOGON'], $user['NICKNAME']), "</h1>\n";
    } else {
        html_draw_top(sprintf('title=%s', gettext("My Controls - Edit Profile")), 'class=window_title');
        echo "<h1>", gettext("Edit Profile"), "</h1>\n";
    }
    if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
        html_display_error_array($error_msg_array, '600', $admin_edit ? 'center' : 'left');
    } else {
        if (isset($_GET['profile_updated'])) {
            html_display_success_msg(gettext("Profile updated."), '600', $admin_edit ? 'center' : 'left');
        }
    }
    if ($admin_edit === true) {
        echo "<div align=\"center\">\n";
    }
    echo "<br />\n";
Beispiel #24
0
function form_submit_image($image, $name = "submit", $value = "Submit", $custom_html = "", $class = "button_image")
{
    $id = form_unique_id($name);
    if (strlen(trim($custom_html)) > 0) {
        $custom_html = sprintf(" %s", trim($custom_html));
    }
    $html = '<input type="image" name="%s" id="%s" class="%s"%s src="%s" value="%s" />';
    return sprintf($html, $name, $id, $class, $custom_html, html_style_image($image), $value);
}
Beispiel #25
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;
}
Beispiel #26
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\" colspan=\"2\">", gettext("Confirmation"), "</td>\n";
 echo "                </tr>\n";
 echo "              </table>\n";
 echo "              <table class=\"posthead\" width=\"100%\">\n";
 echo "                <tr>\n";
 echo "                  <td align=\"center\">\n";
 echo "                    <table class=\"posthead\" width=\"95%\">\n";
 echo "                      <tr>\n";
 echo "                        <td align=\"left\" valign=\"top\" rowspan=\"2\">", sprintf(gettext("To prevent automated registrations this forum requires you enter a confirmation code. The code is displayed in the image to the right. If you are visually impaired or cannot otherwise read the code please contact the %s."), $forum_owner_link), "</td>\n";
 echo "                        <td align=\"left\" valign=\"top\" rowspan=\"2\">&nbsp;</td>\n";
 echo "                        <td align=\"left\" valign=\"top\"><img src=\"data:image/jpeg;base64,", base64_encode(file_get_contents($text_captcha_image)), "\" alt=\"", gettext("This is a captcha-picture. It is used to prevent automatic registration"), "\" title=\"", gettext("This is a captcha-picture. It is used to prevent automatic registration"), "\" id=\"captcha_img\" /></td>\n";
 echo "                        <td align=\"left\" valign=\"top\"><img src=\"", html_style_image('reload.png'), "\" border=\"0\" alt=\"\" class=\"text_captcha_reload\" id=\"text_captcha_reload\" /></td>\n";
 echo "                      </tr>\n";
 echo "                      <tr>\n";
 echo "                        <td align=\"left\" colspan=\"2\">", form_input_text("private_key", "", 20, htmlentities_array($text_captcha->get_num_chars()), "", "text_captcha_input"), form_input_hidden("public_key", htmlentities_array($text_captcha->get_public_key())), "</td>\n";
 echo "                      </tr>\n";
 echo "                      <tr>\n";
 echo "                        <td align=\"left\" colspan=\"2\">&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";
    } else {
        $search_keyword = '';
    }
}
if (isset($_POST['clear'])) {
    $search_keyword = '';
}
$header_text_array = array(FOLDER_IGNORED => gettext("Ignored Folders"), FOLDER_SUBSCRIBED => gettext("Subscribed Folders"));
$interest_level_array = array(FOLDER_IGNORED => gettext("Ignored"), FOLDER_SUBSCRIBED => gettext("Subscribed"));
if (isset($search_keyword) && strlen(trim($search_keyword)) > 0) {
    $folder_subscriptions = folders_search_user_subscriptions($search_keyword, $view, $page);
} else {
    $folder_subscriptions = folders_get_user_subscriptions($view, $page);
}
html_draw_top(array('title' => sprintf(gettext('My Controls - Folder Subscriptions - %s'), $header_text_array[$view]), 'js' => array('js/edit_subscriptions.js', 'js/prefs.js'), 'class' => 'window_title'));
echo "<h1>", gettext("Folder Subscriptions"), html_style_image('separator'), "{$header_text_array[$view]}</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '700', 'left');
} else {
    if (isset($_GET['updated'])) {
        html_display_success_msg(gettext("Folder interests updated successfully"), '700', 'left');
    } else {
        if (sizeof($folder_subscriptions['folder_array']) < 1) {
            if (isset($search_keyword) && strlen(trim($search_keyword)) > 0) {
                html_display_warning_msg(gettext("Search Returned No Results"), '700', 'left');
            } else {
                if ($view == FOLDER_IGNORED) {
                    html_display_warning_msg(gettext("You are not ignoring any folders."), '700', 'left');
                } else {
                    html_display_warning_msg(gettext("You are not subscribed to any folders."), '700', 'left');
                }
Beispiel #28
0
function thread_list_draw_top($mode, $folder = false)
{
    $webtag = get_webtag();
    forum_check_webtag_available($webtag);
    echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
    echo "  <tr>\n";
    echo "    <td align=\"left\" class=\"postbody\">", html_style_image('post', gettext("New Discussion")), "&nbsp;<a href=\"post.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("New Discussion"), "</a></td>\n";
    echo "  </tr>\n";
    if (forum_get_setting('allow_polls', 'Y')) {
        echo "  <tr>\n";
        echo "    <td align=\"left\" class=\"postbody\">", html_style_image('poll', gettext("Create Poll")), "&nbsp;<a href=\"create_poll.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("Create Poll"), "</a></td>\n";
        echo "  </tr>\n";
    }
    echo "  <tr>\n";
    echo "    <td align=\"left\" class=\"postbody\">", html_style_image('search', gettext("Search")), "&nbsp;<a href=\"search.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Search"), "</a></td>\n";
    echo "  </tr>\n";
    echo "  <tr>\n";
    echo "    <td align=\"left\" class=\"postbody\">", html_style_image('pm_unread', gettext("Inbox")), "&nbsp;<a href=\"pm.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("Inbox"), "</a> <span class=\"pmnewcount\" id=\"pm_message_count\"></span></td>\n";
    echo "  </tr>\n";
    echo "</table>\n";
    echo "<br />\n";
    $available_views = thread_list_available_views();
    echo "<form accept-charset=\"utf-8\" name=\"f_mode\" method=\"get\" action=\"thread_list.php\">\n";
    echo "  ", form_input_hidden("webtag", htmlentities_array($webtag)), "\n";
    echo "  <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
    echo "    <tr>\n";
    echo "      <td align=\"left\" class=\"postbody\">\n";
    echo "        ", form_dropdown_array("mode", $available_views, htmlentities_array($mode)), "&nbsp;", form_submit("go", gettext("Go!")), "\n";
    if (is_numeric($folder) && in_array($folder, folder_get_available_array())) {
        echo "        ", form_input_hidden("folder", htmlentities_array($folder)), "\n";
    }
    echo "      </td>\n";
    echo "    </tr>\n";
    echo "  </table>\n";
    echo "</form>\n";
}
        }
    }
} else {
    $from_day = 1;
    $from_month = date('n');
    $from_year = date('Y');
    $to_day = date('t');
    $to_month = date('n');
    $to_year = date('Y');
    $stats_start = mktime(0, 0, 0, date('n'), 1, date('Y'));
    $stats_end = mktime(23, 59, 59, date('n'), date('t'), date('Y'));
    $num_days = ($stats_end - $stats_start) / 60 / 60 / 24;
    $user_stats_array = stats_get_post_tallys($stats_start, $stats_end);
}
html_draw_top(sprintf('title=%s', sprintf(gettext("Admin - Posting Stats For Period %s to %s"), format_date($stats_start), format_date($stats_end))), 'class=window_title');
echo "<h1>", gettext("Admin"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />", sprintf(gettext("Posting Stats For Period %s to %s"), format_date($stats_start), format_date($stats_end)), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '700', 'center');
} else {
    if (sizeof($user_stats_array['user_stats']) < 1) {
        html_display_warning_msg(gettext("No post data recorded for this period."), '700', 'center');
    }
}
echo "  <br />\n";
echo "  <div align=\"center\">\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
echo "    <tr>\n";
echo "      <td align=\"left\">\n";
echo "        <table class=\"box\" width=\"100%\">\n";
echo "          <tr>\n";
echo "            <td align=\"left\" class=\"posthead\">\n";
     echo "      </td>\n";
     echo "    </tr>\n";
     echo "    <tr>\n";
     echo "      <td align=\"left\">&nbsp;</td>\n";
     echo "    </tr>\n";
     echo "    <tr>\n";
     echo "      <td align=\"center\">", form_submit("updatelinksubmit", gettext("Save")), "&nbsp;", form_submit("delete", gettext("Delete")), "&nbsp;", form_submit("cancel", gettext("Cancel")), "</td>\n";
     echo "    </tr>\n";
     echo "  </table>\n";
     echo "  </form>\n";
     echo "</div>\n";
     html_draw_bottom();
 } else {
     html_draw_top(array('title' => gettext('Admin - Edit Forum Links'), 'class' => 'window_title', 'main_css' => 'admin.css'));
     $forum_links_array = forum_links_get_links_by_page($page);
     echo "<h1>", gettext("Admin"), html_style_image('separator'), gettext("Edit Forum Links"), "</h1>\n";
     if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
         html_display_error_array($error_msg_array, '86%', 'center');
     } else {
         if (isset($_GET['added'])) {
             html_display_success_msg(gettext("Successfully added new forum link"), '86%', 'center');
         } else {
             if (isset($_GET['edited'])) {
                 html_display_success_msg(gettext("Successfully edited forum link"), '86%', 'center');
             } else {
                 if (isset($_GET['deleted'])) {
                     html_display_success_msg(gettext("Successfully removed selected links"), '86%', 'center');
                 } else {
                     if (isset($_GET['updated'])) {
                         html_display_success_msg(gettext("Preferences were successfully updated."), '86%', 'center');
                     } else {