Example #1
0
            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');
    if (($forum_rules = forum_get_setting('forum_rules_message', 'strlen', false)) !== false) {
        $forum_rules = sprintf(gettext("<p><b>Forum Rules</b></p><p>Registration to %1\$s is free! We do insist that you abide by the rules and policies detailed below. If you agree to the terms, please check the 'I agree' checkbox and press the 'Register' button below. If you would like to cancel the registration, click <a href=\"index.php?webtag=%2\$s\">here</a> to return to the forums index.</p><p>Although the administrators and moderators of %1\$s will attempt to keep all objectionable messages off this forum, it is impossible for us to review all messages. All messages express the views of the author, and neither the owners of %1\$s, nor Project Beehive Forum and its affiliates will be held responsible for the content of any message.</p><p>By agreeing to these rules, you warrant that you will not post any messages that are obscene, vulgar, sexually-orientated, hateful, threatening, or otherwise in violation of any laws.</p><p>The owners of %1\$s reserve the right to remove, edit, move or close any thread for any reason.</p>"), $forum_name, $webtag);
    }
Example #2
0
light_navigation_bar(array('back' => "lpm.php?webtag={$webtag}&mid={$mid}"));
if ($valid && isset($_POST['preview'])) {
    echo "<h3>", gettext("Message Preview"), "</h3>\n";
    light_pm_display($message_data, true);
}
echo "<form accept-charset=\"utf-8\" name=\"f_post\" action=\"lpm_edit.php\" method=\"post\" target=\"_self\">\n";
echo "  ", form_csrf_token_field(), "\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  ", form_input_hidden('mid', htmlentities_array($mid)), "\n";
echo "<div class=\"post\">\n";
echo "<h3>", gettext("Edit Message"), "</h3>\n";
echo "<div class=\"post_inner\">\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    light_html_display_error_array($error_msg_array);
}
echo "<div class=\"post_thread_title\">", gettext("Subject"), ":", light_form_input_text("t_subject", isset($t_subject) ? htmlentities_array($t_subject) : "", 30, 64), "</div>\n";
echo "<div class=\"post_to\">", gettext("To"), ":\n";
echo "<div class=\"recipients\">\n";
if (isset($message_data['RECIPIENTS']) && sizeof($message_data['RECIPIENTS']) > 0) {
    foreach ($message_data['RECIPIENTS'] as $recipient) {
        echo word_filter_add_ob_tags(format_user_name($recipient['LOGON'], $recipient['NICKNAME']), true), "\n";
    }
} else {
    echo gettext('Unknown User');
}
echo "</div>\n";
echo "</div>\n";
echo "<div class=\"post_content\">", light_form_textarea("t_content", htmlentities_array(strip_paragraphs($t_content)), 10, 50, null, 'textarea'), "</div>\n";
echo "<div class=\"post_buttons\">";
echo light_form_submit("apply", gettext("Apply"));
echo light_form_submit("preview", gettext("Preview"));
Example #3
0
function light_draw_logon_form($error_msg_array = array())
{
    $webtag = get_webtag();
    forum_check_webtag_available($webtag);
    if (isset($_GET['logout_success']) && $_GET['logout_success'] == 'true') {
        light_html_display_success_msg(gettext("You have successfully logged out."));
    } else {
        if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
            light_html_display_error_array($error_msg_array);
        }
    }
    // Get the original requested page url.
    $request_uri = get_request_uri();
    echo "<div class=\"logon\">\n";
    echo "<h3>", gettext("Logon"), "</h3>\n";
    echo "<div class=\"logon_inner\">\n";
    echo "<form accept-charset=\"utf-8\" name=\"logonform\" action=\"{$request_uri}\" method=\"post\">\n";
    echo "  ", form_csrf_token_field(), "\n";
    // Check for any post data that we need to include in the form.
    unset($_POST['user_logon'], $_POST['user_password'], $_POST['logon'], $_POST['webtag'], $_POST['register']);
    // Add any post data into the form.
    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 "  <div class=\"logon_username\"><span>", gettext("Username"), ":</span>", light_form_input_text("user_logon", null, 20, 15) . "</div>\n";
    echo "  <div class=\"logon_password\"><span>", gettext("Password"), ":</span>", light_form_input_password("user_password", null, 20, 32), "</div>\n";
    echo "  <div class=\"logon_remember\">", light_form_checkbox("user_remember", "Y", gettext("Remember me")), "</div>\n";
    echo "  <div class=\"logon_buttons\">", light_form_submit('logon', gettext("Logon")), "</div>\n";
    echo "</form>\n";
    echo "</div>\n";
    echo "</div>\n";
    echo "<p class=\"register_link\">", sprintf(gettext("Don't have an account? %s"), "<a href=\"lregister.php?webtag={$webtag}\">" . gettext("Register now") . "</a>"), "</p>\n";
}
Example #4
0
        light_html_draw_bottom();
        exit;
    }
    $reply_message['CONTENT'] = message_get_content($tid, $reply_to_pid);
    if ((!isset($reply_message['CONTENT']) || $reply_message['CONTENT'] == "") && $thread_data['POLL_FLAG'] != 'Y' && $reply_to_pid != 0) {
        light_html_display_error_msg(gettext("Message not found. Check that it hasn't been deleted."));
        light_html_draw_bottom();
        exit;
    } else {
        echo "<h3>", gettext("Post Reply"), ": ", word_filter_add_ob_tags(thread_get_title($tid), true), "</h3>\n";
        echo "<div class=\"post_inner\">\n";
        echo form_input_hidden("reply_to", htmlentities_array("{$tid}.{$reply_to_pid}"));
        echo form_input_hidden('return_msg', htmlentities_array($return_msg)), "\n";
    }
}
echo "<div class=\"post_to\">", gettext("To"), ":", light_form_input_text("to_logon", isset($to_logon) ? htmlentities_array($to_logon) : "", 30, null, null, gettext("Leave blank for all")), "</div>";
echo "<div class=\"post_content\">", gettext("Content"), ":", light_form_textarea("content", htmlentities_array(strip_paragraphs($content)), 10, 50, null, 'textarea'), "</div>";
echo "<div class=\"post_buttons\">";
echo light_form_submit("post", gettext("Post"));
echo light_form_submit("preview", gettext("Preview"));
if (isset($return_msg)) {
    echo "<a href=\"lmessages.php?webtag={$webtag}&amp;msg={$return_msg}\" class=\"button\" target=\"_self\"><span>", gettext("Cancel"), "</span></a>\n";
} else {
    if (isset($tid) && is_numeric($tid) && isset($reply_to_pid) && is_numeric($reply_to_pid)) {
        echo "<a href=\"lmessages.php?webtag={$webtag}&amp;msg={$tid}.{$reply_to_pid}\" class=\"button\" target=\"_self\"><span>", gettext("Cancel"), "</span></a>\n";
    } else {
        echo "<a href=\"lthread_list.php?webtag={$webtag}\" class=\"button\" target=\"_self\"><span>", gettext("Cancel"), "</span></a>\n";
    }
}
echo "</div>";
if (attachments_check_dir() && (session::check_perm(USER_PERM_POST_ATTACHMENTS | USER_PERM_POST_READ, $fid) || $new_thread)) {
Example #5
0
    $pm_preview_array['AID'] = $aid;
    $pm_preview_array['CONTENT'] = $t_content;
    light_pm_display($pm_preview_array, PM_FOLDER_OUTBOX, true);
}
echo "<form accept-charset=\"utf-8\" name=\"f_post\" action=\"lpm_write.php\" method=\"post\" target=\"_self\">\n";
echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "  ", form_input_hidden('folder', htmlentities_array($folder)), "\n";
echo "  ", form_input_hidden("t_dedupe", htmlentities_array($t_dedupe));
echo "<div class=\"post\">\n";
echo "<h3>", gettext("Send New PM"), "</h3>\n";
echo "<div class=\"post_inner\">\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    light_html_display_error_array($error_msg_array);
}
echo "<div class=\"post_thread_title\">", gettext("Subject"), ":", light_form_input_text("t_subject", isset($t_subject) ? htmlentities_array($t_subject) : "", 30, 64), "</div>\n";
echo "<div class=\"post_to\">", gettext("To"), ":", light_form_input_text("t_to_uid_others", isset($t_to_uid_others) ? htmlentities_array($t_to_uid_others) : "", 0, 0), "</div>\n";
echo "<div class=\"post_content\">", light_form_textarea("t_content", htmlentities_array($t_content), 10, 50, false, 'textarea editor mobile'), "</div>\n";
echo "<div class=\"post_buttons\">";
echo light_form_submit("send", gettext("Send"));
echo light_form_submit("save", gettext("Save"));
echo light_form_submit("preview", gettext("Preview"));
echo light_form_submit("cancel", gettext("Cancel"));
echo "</div>";
if (isset($t_reply_mid) && is_numeric($t_reply_mid) && $t_reply_mid > 0) {
    echo form_input_hidden("replyto", htmlentities_array($t_reply_mid)), "\n";
} else {
    if (isset($t_forward_mid) && is_numeric($t_forward_mid) && $t_forward_mid > 0) {
        echo form_input_hidden("fwdmsg", htmlentities_array($t_forward_mid)), "\n";
    } else {
        if (isset($t_edit_mid) && is_numeric($t_edit_mid) && $t_edit_mid > 0) {
            echo form_input_hidden("editmsg", htmlentities_array($t_edit_mid)), "\n";
Example #6
0
echo "<form accept-charset=\"utf-8\" name=\"f_post\" action=\"lpost.php\" method=\"post\">\n";
echo form_input_hidden('webtag', htmlentities_array($webtag));
echo form_input_hidden('t_dedupe', htmlentities_array($t_dedupe));
echo "<div class=\"post\">\n";
if (!isset($t_threadtitle)) {
    $t_threadtitle = "";
}
if (!isset($t_fid)) {
    $t_fid = 1;
}
if ($new_thread) {
    echo form_input_hidden("t_newthread", "Y");
    echo "<h3>", gettext("Create new thread"), "</h3>\n";
    echo "<div class=\"post_inner\">\n";
    echo "<div class=\"post_folder\">", gettext("Select folder"), ":", light_folder_draw_dropdown($t_fid, "t_fid"), "</div>";
    echo "<div class=\"post_thread_title\">", gettext("Thread title"), ":", light_form_input_text("t_threadtitle", htmlentities_array($t_threadtitle), 30, 64), "</div>";
} else {
    if (!($reply_message = messages_get($reply_to_tid, $reply_to_pid))) {
        light_html_display_error_msg(gettext("That post does not exist in this thread!"));
        light_html_draw_bottom();
        exit;
    }
    $reply_message['CONTENT'] = message_get_content($reply_to_tid, $reply_to_pid);
    if ((!isset($reply_message['CONTENT']) || $reply_message['CONTENT'] == "") && $thread_data['POLL_FLAG'] != 'Y' && $reply_to_pid != 0) {
        light_html_display_error_msg(gettext("Message not found. Check that it hasn't been deleted."));
        light_html_draw_bottom();
        exit;
    } else {
        echo "<h3>", gettext("Post Reply"), ": ", word_filter_add_ob_tags(thread_get_title($reply_to_tid), true), "</h3>\n";
        echo "<div class=\"post_inner\">\n";
        echo form_input_hidden("t_tid", htmlentities_array($reply_to_tid));
Example #7
0
function light_draw_logon_form($error_msg_array = array())
{
    $webtag = get_webtag();
    if (isset($_GET['logout_success']) && $_GET['logout_success'] == 'true') {
        light_html_display_success_msg(gettext("You have successfully logged out."));
    } else {
        if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
            light_html_display_error_array($error_msg_array);
        }
    }
    $username_array = array();
    $password_array = array();
    $passhash_array = array();
    echo "<div class=\"logon\">\n";
    echo "<h3>", gettext("Logon"), "</h3>\n";
    echo "<div class=\"logon_inner\">\n";
    echo "<form accept-charset=\"utf-8\" name=\"logonform\" action=\"llogon.php\" method=\"post\">\n";
    echo "  ", form_input_hidden("webtag", htmlentities_array($webtag)), "\n";
    echo "  <div class=\"logon_username\"><span>", gettext("Username"), ":</span>", light_form_input_text("user_logon", isset($username_array[0]) ? htmlentities_array($username_array[0]) : "", 20, 15, '') . "</div>\n";
    if (isset($password_array[0]) && strlen($password_array[0]) > 0) {
        if (isset($passhash_array[0]) && is_md5($passhash_array[0])) {
            echo "  <div class=\"logon_password\"><span>", gettext("Password"), ":</span>", light_form_input_password("user_password", htmlentities_array($password_array[0]), 20, 32, ''), form_input_hidden("user_passhash", htmlentities_array($passhash_array[0])), "</div>\n";
        } else {
            echo "  <div class=\"logon_password\"><span>", gettext("Password"), ":</span>", light_form_input_password("user_password", "", 20, 32, ''), form_input_hidden("user_passhash", ""), "</div>\n";
        }
    } else {
        echo "  <div class=\"logon_password\"><span>", gettext("Password"), ":</span>", light_form_input_password("user_password", "", 20, 32, ''), form_input_hidden("user_passhash", ""), "</div>\n";
    }
    echo "  <div class=\"logon_remember\">", light_form_checkbox("user_remember", "Y", gettext("Remember me"), false, ''), "</div>\n";
    echo "  <div class=\"logon_buttons\">", light_form_submit('logon', gettext("Logon")), "</div>\n";
    echo "</form>\n";
    echo "</div>\n";
    echo "</div>\n";
}
Example #8
0
            echo "", html_style_image('search'), "&nbsp;", gettext("Found"), ": 0 ", gettext("matches"), "<br /><br />\n";
        }
        light_html_draw_bottom();
        exit;
    }
}
light_html_draw_top();
light_navigation_bar();
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    light_html_display_error_array($error_msg_array);
} else {
    if (isset($search_no_matches) && $search_no_matches == true) {
        light_html_display_error_msg(gettext("Search Returned No Results"));
    }
}
echo "<form accept-charset=\"utf-8\" id=\"search_form\" method=\"post\" action=\"lsearch.php\" target=\"_self\">\n";
echo "  ", form_csrf_token_field(), "\n";
echo form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo "<div class=\"search\">\n";
echo "<h3>", gettext("Search discussions"), "</h3>\n";
echo "<div class=\"search_inner\">\n";
echo "<div class=\"search_keywords\">", gettext("Keywords"), ":", light_form_input_text("search_string", isset($search_arguments['search_string']) ? htmlentities_array($search_arguments['search_string']) : '', 30), "</div>\n";
echo "<div class=\"search_user\">", gettext("Username (optional)"), ":", light_form_input_text("username", isset($search_arguments['username']) ? htmlentities_array($search_arguments['username']) : '', 30), "</div>\n";
echo "<div class=\"search_folder\">", gettext("Folder(s)"), ":", $folder_dropdown, "</div>\n";
echo "<div class=\"search_date\">", gettext("Posted From"), ":", light_form_dropdown_array("date_from", $search_date_from_array, isset($search_arguments['date_from']) && in_array($search_arguments['date_from'], array_keys($search_date_from_array)) ? $search_arguments['date_from'] : SEARCH_FROM_ONE_MONTH_AGO), "</div>\n";
echo "<div class=\"search_date\">", gettext("Posted to"), ":", light_form_dropdown_array("date_to", $search_date_to_array, isset($search_arguments['date_to']) && in_array($search_arguments['date_to'], array_keys($search_date_from_array)) ? $search_arguments['date_to'] : SEARCH_TO_TODAY), "</div>\n";
echo "<div class=\"search_buttons\">", light_form_submit("search_submit", gettext("Find")), "</div>";
echo "</div>";
echo "</div>";
echo "</form>";
light_html_draw_bottom();
Example #9
0
}
echo "<form accept-charset=\"utf-8\" name=\"f_post\" action=\"lpm_write.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("dedupe", htmlentities_array($dedupe));
if (isset($return_msg)) {
    echo "  ", form_input_hidden('return_msg', htmlentities_array($return_msg)), "\n";
}
echo "<div class=\"post\">\n";
echo "<h3>", gettext("Send New PM"), "</h3>\n";
echo "<div class=\"post_inner\">\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    light_html_display_error_array($error_msg_array);
}
echo "<div class=\"post_thread_title\">", gettext("Subject"), ":", light_form_input_text("subject", isset($subject) ? htmlentities_array($subject) : null, 30, 64), "</div>\n";
echo "<div class=\"post_to\">", gettext("To"), ":", light_form_input_text("to_logon", isset($to_logon) ? htmlentities_array($to_logon) : null), "</div>\n";
echo "<div class=\"post_content\">", light_form_textarea("content", htmlentities_array(strip_paragraphs($content)), 10, 50, null, 'textarea'), "</div>\n";
echo "<div class=\"post_buttons\">";
echo light_form_submit("send", gettext("Send"));
echo light_form_submit("save", gettext("Save"));
echo light_form_submit("preview", gettext("Preview"));
if (isset($edit_mid) && is_numeric($edit_mid) && $edit_mid > 0) {
    echo "<a href=\"lpm.php?webtag={$webtag}&mid={$edit_mid}\" class=\"button\" target=\"_self\"><span>", gettext("Cancel"), "</span></a>\n";
} else {
    if (isset($forward_mid) && is_numeric($forward_mid) && $forward_mid > 0) {
        echo "<a href=\"lpm.php?webtag={$webtag}&mid={$forward_mid}\" class=\"button\" target=\"_self\"><span>", gettext("Cancel"), "</span></a>\n";
    } else {
        echo "<a href=\"lpm.php?webtag={$webtag}\" class=\"button\" target=\"_self\"><span>", gettext("Cancel"), "</span></a>\n";
    }
}
echo "</div>";