/**
 * Wrapper around htmlentities to handle arrays, with the advantage that you
 * can select which fields should be handled by htmlentities
 *
 * @param array The subject array
 * @param string The fields which should be checked for, separated by spaces
 * @param int See php documentation about this
 * @param string See php documentation about this
 * @return array The array with htmlentitie'd strings
 * @author Florian Lippert <*****@*****.**>
 */
function htmlentities_array($subject, $fields = '', $quote_style = ENT_QUOTES, $charset = 'UTF-8')
{
    if (is_array($subject)) {
        if (!is_array($fields)) {
            $fields = array_trim(explode(' ', $fields));
        }
        foreach ($subject as $field => $value) {
            if (!is_array($fields) || empty($fields) || is_array($fields) && !empty($fields) && in_array($field, $fields)) {
                /**
                 * Just call ourselve to manage multi-dimensional arrays
                 */
                $subject[$field] = htmlentities_array($subject[$field], $fields, $quote_style, $charset);
            }
        }
    } else {
        $subject = htmlentities($subject, $quote_style, $charset);
    }
    return $subject;
}
示例#2
0
function styles_get_available()
{
    // Array to store our styles in.
    $available_forum_styles = array();
    // Try and open the styles directory for reading.
    if (!@($dir = opendir("styles"))) {
        return false;
    }
    // Iterate over the entries in the directory.
    while (($file = readdir($dir)) !== false) {
        // Check the entry is a directory excluding . and ..
        if (!is_dir("styles/{$file}") || $file == '.' || $file == '..') {
            continue;
        }
        // Check a style.css exists in it.
        if (!file_exists("styles/{$file}/style.css")) {
            continue;
        }
        // Look for a desc.txt to use in place of the directory name.
        if (file_exists("styles/{$file}/desc.txt") && is_readable("styles/{$file}/desc.txt")) {
            // Add the style to the list with the contents of desc.txt as the name.
            $available_forum_styles[$file] = htmlentities_array(trim(file_get_contents("styles/{$file}/desc.txt")));
        } else {
            // Add the style to the list using the directory name
            $available_forum_styles[$file] = htmlentities_array(trim($file));
        }
    }
    // Close the directory handle.
    closedir($dir);
    // Check we have something to return.
    if (sizeof($available_forum_styles) < 1) {
        return false;
    }
    // Sort the styles alphabetically.
    asort($available_forum_styles);
    // Reset the array pointer.
    reset($available_forum_styles);
    // Return the styles.
    return $available_forum_styles;
}
    echo "                </tr>\n";
} else {
    echo "                <tr>\n";
    echo "                  <td align=\"left\" colspan=\"6\">&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 "  <br />\n";
echo "  <form accept-charset=\"utf-8\" action=\"admin_post_stats.php\" method=\"post\" target=\"_self\">\n";
echo "  ", form_input_hidden("webtag", htmlentities_array($webtag)), "\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
echo "    <tr>\n";
echo "      <td align=\"left\">\n";
echo "        <table class=\"box\" width=\"100%\">\n";
echo "          <tr>\n";
echo "            <td align=\"left\" class=\"posthead\">\n";
echo "              <table class=\"posthead\" width=\"100%\">\n";
echo "                <tr>\n";
echo "                  <td align=\"left\" class=\"subhead\">", gettext("Options"), "</td>\n";
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\" width=\"100\">", gettext("Posted from"), ":</td>\n";
示例#4
0
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"450\">\n";
echo "      <tr>\n";
echo "        <td align=\"center\">\n";
echo "          <table class=\"box\" width=\"450\">\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("Forgot password"), "</td>\n";
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\">", gettext("Username"), ":</td>\n";
echo "                          <td align=\"left\">", form_input_text("logon", isset($logon) ? htmlentities_array($logon) : '', 37, 15), "</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 "                    <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";
示例#5
0
    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 "          </tr>\n";
echo "        </table>\n";
echo "      </td>\n";
echo "    </tr>\n";
echo "  </table>\n";
echo "  <br />\n";
echo "  <form accept-charset=\"utf-8\" method=\"post\" action=\"mods_list.php\" target=\"_self\">\n";
echo "    ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "    ", form_input_hidden('fid', htmlentities_array($fid)), "\n";
echo "    " . form_button('close_popup', gettext("Close")) . "\n";
echo "  </form>\n";
echo "</div>\n";
html_draw_bottom();
示例#6
0
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";
    echo "</div>\n";
}
echo "</div>";
echo "</div>";
echo "</form>\n";
light_html_draw_bottom();
echo "                        <td align=\"left\">", form_dropdown_array('attachment_thumbnail_method', $attachment_thumbnail_methods, isset($forum_global_settings['attachment_thumbnail_method']) ? $forum_global_settings['attachment_thumbnail_method'] : ATTACHMENT_THUMBNAIL_PHPGD), "</td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\" width=\"270\">", gettext("Path to Imagemagick convert binary"), ":</td>\n";
echo "                        <td align=\"left\">", form_input_text("attachment_imagemagick_path", isset($forum_global_settings['attachment_imagemagick_path']) ? htmlentities_array($forum_global_settings['attachment_imagemagick_path']) : '', 35, 255), "</td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\" width=\"270\">", gettext("Attachment space per user"), ":</td>\n";
echo "                        <td align=\"left\">", form_input_text("attachments_max_user_space", isset($forum_global_settings['attachments_max_user_space']) ? htmlentities_array($forum_global_settings['attachments_max_user_space'] / 1024 / 1024) : "1", 10, 32), "&nbsp;(MB)</td>\n";
echo "                      </tr>\n";
echo "                      <tr>\n";
echo "                        <td align=\"left\" width=\"270\">", gettext("Attachment space per post"), ":</td>\n";
echo "                        <td align=\"left\">", form_input_text("attachments_max_post_space", isset($forum_global_settings['attachments_max_post_space']) ? htmlentities_array($forum_global_settings['attachments_max_post_space'] / 1024 / 1024) : "1", 10, 32), "&nbsp;(MB)</td>\n";
echo "                      </tr>\n";
if (isset($forum_global_settings['attachments_enabled']) && $forum_global_settings['attachments_enabled'] == "Y") {
    if (!attachments_check_dir()) {
        echo "                      <tr>\n";
        echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
        echo "                      </tr>\n";
        echo "                      <tr>\n";
        echo "                        <td colspan=\"2\">\n";
        html_display_error_msg(gettext("Attachment directory and system temporary directory / php.ini 'upload_tmp_dir' must be writable by the web server / PHP process!"), '95%', 'center');
        echo "                        </td>\n";
        echo "                      </tr>\n";
    }
}
echo "                      <tr>\n";
echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
示例#8
0
         if ($admin_edit === false) {
             echo "                        <td align=\"right\" valign=\"top\">", form_checkbox("t_entry_private[{$profile_item['PIID']}]", "Y", '', isset($profile_item['PRIVACY']) && $profile_item['PRIVACY'] == PROFILE_ITEM_PRIVATE, sprintf("title=%s", gettext("Friends only?"))), "</td>\n";
         } else {
             echo "                        <td align=\"left\" valign=\"top\">&nbsp;</td>\n";
         }
     } else {
         if ($profile_item['TYPE'] == PROFILE_ITEM_MULTI_TEXT) {
             echo "                        <td align=\"left\" valign=\"top\">", form_textarea("t_entry[{$profile_item['PIID']}]", isset($t_entry_array[$profile_item['PIID']]) ? htmlentities_array($t_entry_array[$profile_item['PIID']]) : htmlentities_array($profile_item['ENTRY']), false, false, false, 'bhinputprofileitem'), "</td>\n";
             if ($admin_edit === false) {
                 echo "                        <td align=\"right\" valign=\"top\">", form_checkbox("t_entry_private[{$profile_item['PIID']}]", "Y", '', isset($profile_item['PRIVACY']) && $profile_item['PRIVACY'] == PROFILE_ITEM_PRIVATE, sprintf("title=%s", gettext("Friends only?"))), "</td>\n";
             } else {
                 echo "                        <td align=\"left\" valign=\"top\">&nbsp;</td>\n";
             }
             echo "                      </tr>\n";
         } else {
             echo "                        <td align=\"left\" valign=\"top\">", form_input_text("t_entry[{$profile_item['PIID']}]", isset($t_entry_array[$profile_item['PIID']]) ? htmlentities_array($t_entry_array[$profile_item['PIID']]) : htmlentities_array($profile_item['ENTRY']), false, false, false, 'bhinputprofileitem'), "</td>\n";
             if ($admin_edit === false) {
                 echo "                        <td align=\"right\" valign=\"top\">", form_checkbox("t_entry_private[{$profile_item['PIID']}]", "Y", '', isset($profile_item['PRIVACY']) && $profile_item['PRIVACY'] == PROFILE_ITEM_PRIVATE, sprintf("title=%s", gettext("Friends only?"))), "</td>\n";
             } else {
                 echo "                        <td align=\"left\" valign=\"top\">&nbsp;</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";
示例#9
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";
}
示例#10
0
function folder_draw_dropdown_all($default_fid, $field_name = "t_fid", $suffix = "", $custom_html = "", $class = "bhselect")
{
    if (!($db = db::get())) {
        return false;
    }
    if (!($table_prefix = get_table_prefix())) {
        return "";
    }
    $available_folders = array();
    $sql = "SELECT FID, TITLE, DESCRIPTION FROM `{$table_prefix}FOLDER` ";
    $sql .= "ORDER BY POSITION";
    if (!($result = $db->query($sql))) {
        return false;
    }
    if ($result->num_rows == 0) {
        return false;
    }
    while (($folder_data = $result->fetch_assoc()) !== null) {
        $available_folders[$folder_data['FID']] = htmlentities_array($folder_data['TITLE']);
    }
    if (sizeof($available_folders) == 0) {
        return false;
    }
    return form_dropdown_array($field_name . $suffix, $available_folders, $default_fid, $custom_html, $class);
}
示例#11
0
function form_quick_button($href, $label, $var_array = false, $target = "_self")
{
    $webtag = get_webtag();
    $html = "<form accept-charset=\"utf-8\" method=\"get\" action=\"{$href}\" target=\"{$target}\">";
    $html .= form_input_hidden("webtag", htmlentities_array($webtag));
    if (is_array($var_array)) {
        foreach ($var_array as $var_name => $var_value) {
            if (!is_array($var_value)) {
                $html .= form_input_hidden($var_name, htmlentities_array($var_value));
            }
        }
    }
    $html .= form_submit(form_unique_id('submit'), $label);
    $html .= "</form>";
    return $html;
}
示例#12
0
                     case 3:
                         $ticket['display'] = 'low';
                         break;
                     default:
                         $ticket['display'] = 'unknown';
                 }
                 $ticket['priority'] = ticket::getPriorityText($lng, $ticket['priority']);
                 if ($ticket['lastreplier'] == '1') {
                     $ticket['lastreplier'] = $lng['ticket']['staff'];
                 } else {
                     $ticket['lastreplier'] = $lng['ticket']['customer'];
                 }
                 if (strlen($ticket['subject']) > 20) {
                     $ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
                 }
                 $ticket = htmlentities_array($ticket);
                 eval("\$tickets.=\"" . getTemplate("tickets/archived_tickets") . "\";");
                 $count++;
                 $_cid = $ticket['customerid'];
             }
         }
         $i++;
     }
     eval("echo \"" . getTemplate("tickets/archivesearch") . "\";");
 } else {
     $archived = array();
     $archived = ticket::getLastArchived($db, 6, $userinfo['adminid']);
     $tickets = '';
     if ($archived !== false) {
         foreach ($archived as $id => $ticket) {
             $ticket['lastchange'] = date("d.m.y H:i", $ticket['lastchange']);
示例#13
0
function messages_interest_form($tid, $pid, $interest)
{
    $webtag = get_webtag();
    $interest_levels_array = array(THREAD_IGNORED => gettext("Ignore"), THREAD_NOINTEREST => gettext("Normal"), THREAD_INTERESTED => gettext("Interested"), THREAD_SUBSCRIBED => gettext("Subscribed"));
    echo "<table class=\"posthead\" width=\"100%\">\n";
    echo "  <tr>\n";
    echo "    <td align=\"center\">\n";
    echo "      <form accept-charset=\"utf-8\" name=\"rate_interest\" target=\"_self\" action=\"thread_options.php?webtag={$webtag}&amp;msg={$tid}.{$pid}\" method=\"post\">\n";
    echo "        ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
    echo "        ", gettext("Rate my interest"), ": ", form_radio_array("setinterest", $interest_levels_array, htmlentities_array($interest));
    echo "        ", form_input_hidden("tid", htmlentities_array($tid));
    echo "        ", form_submit("apply", gettext("Apply")), "\n";
    echo "      </form>\n";
    echo "    </td>\n";
    echo "  </tr>\n";
    echo "</table>\n";
    echo "<br />\n";
}
示例#14
0
function profile_section_dropdown($default_psid, $field_name = 't_psid')
{
    if (!($db = db::get())) {
        return '';
    }
    if (!($table_prefix = get_table_prefix())) {
        return '';
    }
    $sql = "SELECT PSID, NAME FROM `{$table_prefix}PROFILE_SECTION`";
    if (!($result = $db->query($sql))) {
        return '';
    }
    if ($result->num_rows == 0) {
        return '';
    }
    while ($profile_section_data = $result->fetch_assoc()) {
        $profile_sections_array[$profile_section_data['PSID']] = htmlentities_array($profile_section_data['NAME']);
    }
    return form_dropdown_array($field_name, $profile_sections_array, $default_psid);
}
示例#15
0
}
if ($preview_message['TO_UID'] == 0) {
    $preview_message['TLOGON'] = gettext("ALL");
    $preview_message['TNICK'] = gettext("ALL");
} else {
    $preview_tuser = user_get($preview_message['TO_UID']);
    $preview_message['TLOGON'] = $preview_tuser['LOGON'];
    $preview_message['TNICK'] = $preview_tuser['NICKNAME'];
}
$preview_tuser = user_get($preview_message['FROM_UID']);
$preview_message['FLOGON'] = $preview_tuser['LOGON'];
$preview_message['FNICK'] = $preview_tuser['NICKNAME'];
echo "<br />\n";
echo "<form accept-charset=\"utf-8\" name=\"f_delete\" action=\"close_poll.php\" method=\"post\" target=\"_self\">\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  ", form_input_hidden('msg', htmlentities_array($msg)), "\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"720\">\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("End Poll"), "</td>\n";
echo "                </tr>\n";
echo "                <tr>\n";
echo "                  <td align=\"left\"><br />";
poll_display($tid, $thread_data['LENGTH'], $pid, $thread_data['FID'], false, $thread_data['CLOSED'], false, $show_sigs, true);
echo "                  </td>\n";
echo "                </tr>\n";
示例#16
0
    echo "                      </tr>\n";
    echo "                      <tr>\n";
    echo "                        <td align=\"left\">\n";
    echo "                          <table class=\"messagefoot\" width=\"553\" cellspacing=\"0\">\n";
    echo "                            <tr>\n";
    echo "                              <td align=\"left\" class=\"subhead\">", gettext("Signature"), "</td>\n";
    if (($page_prefs & POST_SIGNATURE_DISPLAY) > 0) {
        echo "                              <td class=\"subhead\" align=\"right\">", form_submit_image('hide.png', 'sig_toggle', 'hide', '', 'button_image toggle_button'), "&nbsp;</td>\n";
    } else {
        echo "                              <td class=\"subhead\" align=\"right\">", form_submit_image('show.png', 'sig_toggle', 'show', '', 'button_image toggle_button'), "&nbsp;</td>\n";
    }
    echo "                            </tr>\n";
    echo "                            <tr>\n";
    echo "                              <td align=\"left\" colspan=\"2\">\n";
    echo "                                <div class=\"sig_toggle\" style=\"display: ", ($page_prefs & POST_SIGNATURE_DISPLAY) > 0 ? "block" : "none", "\">\n";
    echo "                                  ", form_textarea("t_sig", htmlentities_array(emoticons_apply($t_sig)), 7, 100, 'tabindex="7"', 'signature_content editor');
    echo "                                </div>\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";
echo "                <tr>\n";
echo "                  <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
echo "                </tr>\n";
echo "              </table>\n";
if (!$new_thread && $reply_to_pid > 0) {
示例#17
0
echo "    <td align=\"left\" class=\"subhead\">", gettext("Menu"), "</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_prefs.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("User Details"), "</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_profile.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Edit Profile"), "</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_password.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Change Password"), "</a></td>\n";
echo "  </tr>\n";
echo "  <tr>\n";
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 "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"800\">\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 class=\"subhead\" align=\"left\">", gettext("Search"), "</td>\n";
echo "                </tr>\n";
echo "                <tr>\n";
echo "                  <td align=\"center\">\n";
echo "                    <table class=\"posthead\" width=\"95%\">\n";
echo "                      <tr>\n";
echo "                        <td class=\"posthead\" align=\"left\">\n";
echo "                          ", gettext("Username"), ": ", form_input_text("usersearch", isset($usersearch) ? htmlentities_array($usersearch) : "", 30, 64), " ", form_submit('search', gettext("Search")), "\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";
echo "          </tr>\n";
echo "        </table>\n";
echo "      </td>\n";
echo "    </tr>\n";
echo "    <tr>\n";
示例#19
0
echo "                                      </td>\n";
echo "                                    </tr>\n";
echo "                                  </table>\n";
echo "                                </div>\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=\"left\">\n";
echo "                                ", form_submit("post", gettext("Post")), "&nbsp;", form_submit("preview_poll", gettext("Preview")), "&nbsp;", form_submit("preview_form", gettext("Preview Voting Form"));
echo "&nbsp;<a href=\"discussion.php?webtag={$webtag}\" class=\"button\" target=\"_self\"><span>", gettext("Cancel"), "</span></a>";
if (forum_get_setting('attachments_enabled', 'Y')) {
    echo "&nbsp;<a href=\"attachments.php?webtag={$webtag}&amp;aid={$aid}\" class=\"button popup 660x500\" id=\"attachments\"><span>", gettext("Attachments"), "</span></a>\n";
    echo "                                        ", form_input_hidden("aid", htmlentities_array($aid)), "\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";
echo "                <tr>\n";
echo "                  <td align=\"left\">&nbsp;</td>\n";
echo "                </tr>\n";
echo "              </table>\n";
echo "            </td>\n";
echo "          </tr>\n";
echo "  ", form_input_hidden("search_page", htmlentities_array($search_page)), "\n";
echo "  <table 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";
echo "              <table class=\"posthead\" width=\"100%\">\n";
echo "                <tr>\n";
echo "                  <td class=\"subhead\" align=\"left\">", gettext("Search For User"), "</td>\n";
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\">", gettext("Search"), ": ", form_input_text('user_search', htmlentities_array($user_search), 32, 15), "&nbsp;", form_submit('search', gettext("Search")), "&nbsp;", form_submit('clear', gettext("Clear")), "</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";
echo "    <tr>\n";
echo "      <td align=\"left\">&nbsp;</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 class=\"subhead\" align=\"left\">", gettext("Search"), "</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 class=\"posthead\" align=\"left\">\n";
echo "                          ", gettext("Folder title"), ": ", form_input_text("search_keyword", isset($search_keyword) ? htmlentities_array($search_keyword) : "", 30, 64), " ", form_submit('search', gettext("Search")), "&nbsp;", form_submit('clear', gettext("Clear")), "\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";
echo "          </tr>\n";
echo "        </table>\n";
echo "      </td>\n";
echo "    </tr>\n";
echo "  </table>\n";
示例#22
0
 echo "                </tr>\n";
 echo "                <tr>\n";
 echo "                  <td align=\"center\">\n";
 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";
示例#23
0
     $sortcode = $paging->getHtmlSortCode($lng);
     $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
     $searchcode = $paging->getHtmlSearchCode($lng);
     $pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
     $i = 0;
     $count = 0;
     $accounts = '';
     while ($row = $db->fetch_array($result)) {
         if ($paging->checkDisplay($i)) {
             if (strpos($row['homedir'], $userinfo['documentroot']) === 0) {
                 $row['documentroot'] = substr($row['homedir'], strlen($userinfo['documentroot']));
             } else {
                 $row['documentroot'] = $row['homedir'];
             }
             $row['documentroot'] = makeCorrectDir($row['documentroot']);
             $row = htmlentities_array($row);
             eval('$accounts.="' . getTemplate('ftp/accounts_account') . '";');
             ++$count;
         }
         ++$i;
     }
     $ftps_count = $db->num_rows($result);
     eval('echo "' . getTemplate('ftp/accounts') . '";');
 } elseif ($action == 'delete' && $id != 0) {
     $result = $db->query_first('SELECT `id`, `username`, `homedir`, `up_count`, `up_bytes`, `down_count`, `down_bytes` FROM `' . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int) $userinfo['customerid'] . "' AND `id`='" . (int) $id . "'");
     if (isset($result['username']) && $result['username'] != $userinfo['loginname']) {
         if (isset($_POST['send']) && $_POST['send'] == 'send') {
             $db->query('UPDATE `' . TABLE_FTP_USERS . "` SET `up_count`=`up_count`+'" . (int) $result['up_count'] . "', `up_bytes`=`up_bytes`+'" . (int) $result['up_bytes'] . "', `down_count`=`down_count`+'" . (int) $result['down_count'] . "', `down_bytes`=`down_bytes`+'" . (int) $result['down_bytes'] . "' WHERE `username`='" . $db->escape($userinfo['loginname']) . "'");
             $db->query('DELETE FROM `' . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int) $userinfo['customerid'] . "' AND `id`='" . (int) $id . "'");
             $log->logAction(USR_ACTION, LOG_INFO, "deleted ftp-account '" . $result['username'] . "'");
             $db->query('UPDATE `' . TABLE_FTP_GROUPS . "` SET `members`=REPLACE(`members`,'," . $db->escape($result['username']) . "','') WHERE `customerid`='" . (int) $userinfo['customerid'] . "'");
示例#24
0
         } else {
             if (isset($_GET['deleted'])) {
                 html_display_success_msg(gettext("Successfully removed selected feeds"), '70%', 'center');
             } else {
                 if (sizeof($rss_feeds['rss_feed_array']) < 1) {
                     html_display_warning_msg(gettext("No existing RSS Feeds found. To add a feed click the 'Add New' button below"), '70%', 'center');
                 }
             }
         }
     }
 }
 echo "<br />\n";
 echo "<div align=\"center\">\n";
 echo "<form accept-charset=\"utf-8\" name=\"rss\" action=\"admin_rss_feeds.php\" method=\"post\">\n";
 echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
 echo "  ", form_input_hidden('page', htmlentities_array($page)), "\n";
 echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"70%\">\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 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) {
示例#25
0
function forum_check_password($forum_fid)
{
    if (!is_numeric($forum_fid)) {
        return false;
    }
    $webtag = get_webtag();
    if (!($forum_passhash = forum_get_password($forum_fid))) {
        return true;
    }
    $forum_passhash_check = session::get_value("{$webtag}_PASSWORD");
    if (isset($_POST['forum_password']) && strlen($_POST['forum_password']) > 0) {
        $forum_passhash_check = md5($_POST['forum_password']);
    }
    if ($forum_passhash == $forum_passhash_check) {
        session::set_value("{$webtag}_PASSWORD", $forum_passhash_check);
        return true;
    }
    html_draw_top(sprintf("title=%s", gettext("Password Protected Forum")));
    echo "<h1>", gettext("Password Protected Forum"), "</h1>\n";
    if (session::get_value("{$webtag}_PASSWORD")) {
        html_display_error_msg(gettext("The username or password you supplied is not valid."), '550', 'center');
    }
    if ($password_protected_message = forum_get_setting('password_protected_message')) {
        echo fix_html($password_protected_message);
    } else {
        html_display_warning_msg(gettext("This forum is password protected. To gain access enter the password below."), '400', 'center');
    }
    echo "<br />\n";
    echo "<div align=\"center\">\n";
    echo "  <form accept-charset=\"utf-8\" method=\"post\" action=\"", get_request_uri(), "\" target=\"_self\" autocomplete=\"off\">\n";
    if (isset($_POST) && is_array($_POST) && sizeof($_POST) > 0) {
        echo form_input_hidden_array($_POST);
    }
    echo "    ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
    echo "    <table cellpadding=\"0\" cellspacing=\"0\" width=\"400\">\n";
    echo "      <tr>\n";
    echo "        <td align=\"left\">\n";
    echo "          <table class=\"box\" width=\"400\">\n";
    echo "            <tr>\n";
    echo "              <td class=\"posthead\" align=\"center\">\n";
    echo "                <table class=\"posthead\" width=\"100%\">\n";
    echo "                  <tr>\n";
    echo "                    <td align=\"left\" class=\"subhead\" colspan=\"2\">", gettext("Enter Password"), "</td>\n";
    echo "                  </tr>\n";
    echo "                </table>\n";
    echo "                <table class=\"posthead\" width=\"90%\">\n";
    echo "                  <tr>\n";
    echo "                    <td align=\"left\">", gettext("Password"), ":</td>\n";
    echo "                    <td align=\"left\">", form_input_password('forum_password', '', 40, false, ''), "</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 "      <tr>\n";
    echo "        <td align=\"left\">&nbsp;</td>\n";
    echo "      </tr>\n";
    echo "      <tr>\n";
    echo "        <td align=\"center\">", form_submit("logon", gettext("Logon")), "&nbsp;", form_submit("cancel", gettext("Cancel")), "</td>\n";
    echo "      </tr>\n";
    echo "    </table>\n";
    if (session::check_perm(USER_PERM_ADMIN_TOOLS, 0) || session::check_perm(USER_PERM_FORUM_TOOLS, 0)) {
        html_display_warning_msg(gettext("If you want to change some settings on your forum click the Admin link in the navigation bar above."), '400', 'center');
    }
    echo "  </form>\n";
    echo "</div>\n";
    html_draw_bottom();
    exit;
}
示例#26
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;
}
示例#27
0
 echo "                    <table class=\"posthead\" width=\"95%\">\n";
 echo "                      <tr>\n";
 echo "                        <td align=\"left\" style=\"white-space: nowrap\">", gettext("Move to"), ":</td>\n";
 echo "                        <td align=\"left\">", links_folder_dropdown($link['FID'], $folders), "</td>\n";
 echo "                      </tr>\n";
 echo "                      <tr>\n";
 echo "                        <td align=\"left\" style=\"white-space: nowrap\">", gettext("Edit name"), ":</td>\n";
 echo "                        <td align=\"left\">", form_input_text("title", htmlentities_array($link['TITLE']), 40, 64), "</td>\n";
 echo "                      </tr>\n";
 echo "                      <tr>\n";
 echo "                        <td align=\"left\" style=\"white-space: nowrap\">", gettext("Edit address"), ":</td>\n";
 echo "                        <td align=\"left\">", form_input_text("uri", htmlentities_array($link['URI']), 45, 255), "</td>\n";
 echo "                      </tr>\n";
 echo "                      <tr>\n";
 echo "                        <td align=\"left\" style=\"white-space: nowrap\">", gettext("Edit description"), ":</td>\n";
 echo "                        <td align=\"left\">", form_input_text("description", htmlentities_array($link['DESCRIPTION']), 60), "</td>\n";
 echo "                      </tr>\n";
 echo "                      <tr>\n";
 echo "                        <td align=\"left\">&nbsp;</td>\n";
 echo "                        <td align=\"left\">", form_checkbox("delete", "confirm", gettext("Delete")), "&nbsp;", form_checkbox("hide", "confirm", gettext("hide"), isset($link['VISIBLE']) && $link['VISIBLE'] == 'N'), "</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";
示例#28
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\" style=\"white-space: nowrap\">", gettext("Filter Name"), "&nbsp;</td>\n";
 echo "                  <td align=\"left\" class=\"subhead\" style=\"white-space: nowrap\">", gettext("Filter Type"), "&nbsp;</td>\n";
 echo "                  <td align=\"center\" class=\"subhead\" style=\"white-space: nowrap\" width=\"100\">", gettext("Filter Enabled"), "&nbsp;</td>\n";
 echo "                </tr>\n";
 if (sizeof($word_filter_array['word_filter_array']) > 0) {
     foreach ($word_filter_array['word_filter_array'] as $filter_id => $word_filter) {
         echo "                <tr>\n";
         echo "                  <td align=\"center\">", form_checkbox("delete_filters[{$filter_id}]", "Y", false), "</td>\n";
         echo "                  <td align=\"left\"><a href=\"edit_wordfilter.php?webtag={$webtag}&amp;filter_id={$filter_id}\">", htmlentities_array($word_filter['FILTER_NAME']), "</a></td>\n";
         echo "                  <td align=\"left\">{$word_filter_options[$word_filter['FILTER_TYPE']]}</td>\n";
         echo "                  <td align=\"center\">{$word_filter_enabled[$word_filter['FILTER_ENABLED']]}&nbsp;</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";
示例#29
0
             }
             $serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_wildcard'], '0', $_value, true, true);
             $serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_www'], '1', $_value, true, true);
             $serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_none'], '2', $_value, true, true);
             $subcanemaildomain = makeoption($lng['admin']['subcanemaildomain']['never'], '0', $result['subcanemaildomain'], true, true);
             $subcanemaildomain .= makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', $result['subcanemaildomain'], true, true);
             $subcanemaildomain .= makeoption($lng['admin']['subcanemaildomain']['choosableyes'], '2', $result['subcanemaildomain'], true, true);
             $subcanemaildomain .= makeoption($lng['admin']['subcanemaildomain']['always'], '3', $result['subcanemaildomain'], true, true);
             $speciallogfile = $result['speciallogfile'] == 1 ? $lng['panel']['yes'] : $lng['panel']['no'];
             $result['add_date'] = date('Y-m-d', $result['add_date']);
             $phpconfigs = '';
             $phpconfigs_result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
             while ($phpconfigs_row = $phpconfigs_result_stmt->fetch(PDO::FETCH_ASSOC)) {
                 $phpconfigs .= makeoption($phpconfigs_row['description'], $phpconfigs_row['id'], $result['phpsettingid'], true, true);
             }
             $result = htmlentities_array($result);
             $domain_edit_data = (include_once dirname(__FILE__) . '/lib/formfields/admin/domains/formfield.domains_edit.php');
             $domain_edit_form = htmlform::genHTMLForm($domain_edit_data);
             $title = $domain_edit_data['domain_edit']['title'];
             $image = $domain_edit_data['domain_edit']['image'];
             $speciallogwarning = sprintf($lng['admin']['speciallogwarning'], $lng['admin']['delete_statistics']);
             eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
         }
     }
 } elseif ($action == 'import') {
     if (isset($_POST['send']) && $_POST['send'] == 'send') {
         $customerid = intval($_POST['customerid']);
         $separator = validate($_POST['separator'], 'separator');
         $offset = (int) validate($_POST['offset'], 'offset', "/[0-9]/i");
         $file_name = $_FILES['file']['tmp_name'];
         $result = array();
示例#30
0
echo "  ", form_input_hidden("filter", htmlentities_array($filter)), "\n";
echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"86%\">\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 width=\"100%\">\n";
echo "                <tr>\n";
echo "                  <td class=\"subhead\" align=\"left\">", gettext("Search for a user not in list"), "</td>\n";
echo "                </tr>\n";
echo "                <tr>\n";
echo "                  <td align=\"center\">\n";
echo "                    <table class=\"posthead\" width=\"95%\">\n";
echo "                      <tr>\n";
echo "                        <td class=\"posthead\" align=\"left\">", gettext("Username"), ": ", form_input_text('user_search', htmlentities_array($user_search), 25, 64), " ", form_submit('search', gettext("Search")), " ", form_submit('reset', gettext("Clear")), "</td>\n";
echo "                      </tr>\n";
echo "                    </table>\n";
echo "                  </td>\n";
echo "                </tr>\n";
echo "                <tr>\n";
echo "                  <td align=\"left\" colspan=\"6\">&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 "</form>\n";