Exemplo n.º 1
0
} 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 "              <table class=\"posthead\" width=\"100%\">\n";
echo "                <tr>\n";
Exemplo n.º 2
0
    }
    // Update USER_PREFS
    if (user_update_prefs($_SESSION['UID'], $user_prefs, $user_prefs_global)) {
        header_redirect("edit_email.php?webtag={$webtag}&updated=true");
        exit;
    } else {
        $error_msg_array[] = gettext("Some or all of your user account details could not be updated. Please try again later.");
        $valid = false;
    }
}
// Check to see if we should show the set for all forums checkboxes
$show_set_all = forums_get_available_count() > 1 ? true : false;
html_draw_top(array('title' => gettext('My Controls - Email & Privacy'), 'class' => 'window_title', 'js' => array('js/prefs.js')));
echo "<h1>", htmlentities_array(gettext("Email & Privacy")), "</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("Preferences were successfully updated."), '700', 'left');
    }
}
echo "<br />\n";
echo "<form accept-charset=\"utf-8\" name=\"prefs\" action=\"edit_email.php\" method=\"post\" target=\"_self\">\n";
echo "  ", form_csrf_token_field(), "\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
echo "    <tr>\n";
echo "      <td align=\"left\">\n";
echo "        <table class=\"box\" width=\"100%\">\n";
echo "          <tr>\n";
echo "            <td align=\"left\" class=\"posthead\">\n";
Exemplo n.º 3
0
thread_list_draw_top($mode, $folder);
// If no threads are returned, say something to that effect
if (isset($_REQUEST['mark_read_success'])) {
    html_display_success_msg(gettext("Successfully marked selected threads as read"), '100%', 'left');
} else {
    if (!is_array($thread_info)) {
        if (is_numeric($folder) && ($folder_title = folder_get_title($folder))) {
            $all_discussions_link = sprintf("<a href=\"thread_list.php?webtag={$webtag}&amp;folder={$folder}&amp;mode=0\">%s</a>", gettext("click here"));
            html_display_warning_msg(sprintf(gettext("No &quot;%s&quot; in &quot;%s&quot; folder. Please select another folder, or %s for all threads."), $available_views[$mode], $folder_title, $all_discussions_link), '100%', 'left');
        } else {
            $all_discussions_link = sprintf("<a href=\"thread_list.php?webtag={$webtag}&amp;mode=0\">%s</a>", gettext("click here"));
            html_display_warning_msg(sprintf(gettext("No &quot;%s&quot; available. Please %s for all threads."), $available_views[$mode], $all_discussions_link), '100%', 'left');
        }
    } else {
        if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
            html_display_error_array($error_msg_array, '100%', 'left');
        } else {
            if (is_numeric($folder) && ($folder_title = folder_get_title($folder))) {
                $all_folders_link = sprintf("<a href=\"thread_list.php?webtag={$webtag}&amp;mode={$mode}\">%s</a>", gettext("click here"));
                html_display_warning_msg(sprintf(gettext("Viewing &quot;%s&quot; in &quot;%s&quot; only. To view threads in all folders %s."), $available_views[$mode], $folder_title, $all_folders_link), '100%', 'left');
            } else {
                echo "<br />";
            }
        }
    }
}
if ($page > 1 && !is_numeric($folder)) {
    echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
    echo "  <tr>\n";
    echo "    <td align=\"left\" valign=\"top\" class=\"smalltext\" colspan=\"2\"><img src=\"", html_style_image('current_thread.png'), "\" alt=\"", gettext("Previous 50 threads"), "\" title=\"", gettext("Previous 50 threads"), "\" />&nbsp;<a href=\"thread_list.php?webtag={$webtag}&amp;mode={$mode}&amp;page=", $page - 1, "\" title=\"", gettext("Show previous 50 threads"), "\">", gettext("Previous 50 threads"), "</a></td>\n";
    echo "  </tr>\n";
Exemplo n.º 4
0
                }
            }
        }
    }
}
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";
    echo "<form accept-charset=\"utf-8\" name=\"f_profile\" action=\"edit_profile.php\" method=\"post\" target=\"_self\">\n";
    echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
    if ($admin_edit === true) {
        echo "  ", form_input_hidden('profileuid', htmlentities_array($uid)), "\n";
    }
    echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"600\">\n";
Exemplo n.º 5
0
        }
        $poll_delete_votes = poll_edit_check_questions($tid, $poll_questions_array) || $poll_data['POLLTYPE'] != $poll_type || $poll_data['VOTETYPE'] != $poll_vote_type;
        poll_edit($tid, $poll_questions_array, $poll_closes, $change_vote, $poll_type, $show_results, $poll_vote_type, $option_type, $allow_guests, $poll_delete_votes);
        thread_change_title($tid, $thread_title);
        post_add_edit_text($tid, 1);
        post_save_attachment_id($tid, $pid, $aid);
    }
    header_redirect("discussion.php?webtag={$webtag}&msg={$tid}.1&edit_success={$tid}.1");
}
if (!($folder_dropdown = folder_draw_dropdown($fid, "fid", "", FOLDER_ALLOW_POLL_THREAD, USER_PERM_POST_EDIT, "", "post_folder_dropdown"))) {
    html_draw_error(gettext("You cannot create new threads."));
}
html_draw_top(sprintf("title=%s", gettext("Edit Poll")), "basetarget=_blank", "resize_width=785", "post.js", "poll.js", "attachments.js", "dictionary.js", "emoticons.js", 'class=window_title');
echo "<h1>", gettext("Edit Poll"), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array(array_unique($error_msg_array), '785', 'left');
}
echo "<br />\n";
echo "<form accept-charset=\"utf-8\" name=\"f_poll\" action=\"edit_poll.php\" method=\"post\" target=\"_self\">\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  ", form_input_hidden("msg", htmlentities_array($edit_msg)), "\n";
echo "  ", form_input_hidden('dedupe', htmlentities_array($dedupe)), "\n";
echo "  <table width=\"785\" class=\"max_width\">\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";
if ($valid && (isset($_POST['preview_poll']) || isset($_POST['preview_form']))) {
    echo "              <table class=\"posthead\" width=\"100%\">\n";
    echo "                <tr>\n";