本文整理汇总了PHP中html_get_frame_name函数的典型用法代码示例。如果您正苦于以下问题:PHP html_get_frame_name函数的具体用法?PHP html_get_frame_name怎么用?PHP html_get_frame_name使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了html_get_frame_name函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: post_add_edit_text
post_add_edit_text($tid, 1);
admin_add_log_entry(DELETE_USER_THREAD_POSTS, array($tid, $thread_data['TITLE'], $user_logon));
} else {
$error_msg_array[] = sprintf(gettext("Failed to delete posts by selected user"), $user_logon);
$valid = false;
}
}
}
if (isset($_POST['delete_thread']) && in_array($_POST['delete_thread'], $thread_delete_valid_types)) {
if (isset($_POST['delete_thread_confirm']) && $_POST['delete_thread_confirm'] == "Y") {
$delete_thread = $_POST['delete_thread'];
if (thread_delete($tid, $delete_thread)) {
post_add_edit_text($tid, 1);
admin_add_log_entry(DELETE_THREAD, array($tid, $thread_data['TITLE']));
html_draw_top(sprintf('title=%s', gettext("Delete Thread")), 'class=window_title');
html_display_msg(gettext("Delete Thread"), gettext("Thread was successfully deleted"), 'discussion.php', 'get', array('continue' => gettext("Continue")), false, html_get_frame_name('main'), 'center');
html_draw_bottom();
exit;
} else {
$error_msg_array[] = gettext("Failed to delete thread.");
$valid = false;
}
}
}
if (isset($_POST['undelete_thread']) && $_POST['undelete_thread'] == "Y") {
if (isset($_POST['undelete_thread_confirm']) && $_POST['undelete_thread_confirm'] == "Y") {
if (thread_undelete($tid)) {
post_add_edit_text($tid, 1);
admin_add_log_entry(UNDELETE_THREAD, array($tid, $thread_data['TITLE']));
html_draw_top(sprintf('title=%s', gettext("Undelete Thread")), 'class=window_title');
html_display_msg(gettext("Undelete Thread"), gettext("Thread was successfully undeleted"), 'thread_options.php', 'get', array('back' => gettext("Back")), array('msg' => $msg), '_self', 'center');
示例2: gettext
echo " <br />\n";
echo " <table width=\"90%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"foldername\">", gettext("Search"), ":</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\">", form_input_text("search_string", null, 24), " ", form_submit('search', gettext("Find")), "</td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <br />\n";
echo " <table width=\"90%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\">\n";
echo " <tr>\n";
echo " <td align=\"left\">\n";
echo " <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"foldername\">", html_style_image('post', gettext("Send New PM")), " <a href=\"pm_write.php?webtag={$webtag}\" title=\"", gettext("Send New PM"), "\" target=\"", html_get_frame_name('main'), "\">", gettext("Send New PM"), "</a></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <table width=\"90%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\">\n";
echo " <tr>\n";
echo " <td align=\"left\">\n";
echo " <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"foldername\">", html_style_image('options', gettext("Private Message Options")), " <a href=\"pm_options.php?webtag={$webtag}\" title=\"", gettext("Private Message Options"), "\">", gettext("Private Message Options"), "</a></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
示例3: html_style_image
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=\"\" /> <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=\"\" /> <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=\"\" /> <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=\"\" /> <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=\"\" /> <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=\"\" /> <a href=\"edit_relations.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Relationships"), "</a></td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"postbody\"><img src=\"", html_style_image('bullet.png'), "\" border=\"0\" alt=\"\" /> <a href=\"edit_wordfilter.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Word Filter"), "</a></td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"postbody\"><img src=\"", html_style_image('bullet.png'), "\" border=\"0\" alt=\"\" /> <a href=\"edit_subscriptions.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Thread Subscriptions"), "</a></td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"postbody\"><img src=\"", html_style_image('bullet.png'), "\" border=\"0\" alt=\"\" /> <a href=\"folder_subscriptions.php?webtag={$webtag}\" target=\"", html_get_frame_name('right'), "\">", gettext("Folder Subscriptions"), "</a></td>\n";
echo " </tr>\n";
echo "</table>\n";
html_draw_bottom();
示例4: stats_get_html
/**
* @return string
*/
function stats_get_html()
{
// Get webtag
$webtag = get_webtag();
// Validate the webtag
forum_check_webtag_available($webtag);
// 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&uid=%s" target="_blank" class="popup 650x500"><span class="%s" title="%s">%s</span></a>';
// Newest user Profile link
$new_user_profile_link = '<a href="user_profile.php?webtag=%s&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>';
$html = "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" class=\"posthead\">\n";
$html .= " <tr>\n";
$html .= " <td rowspan=\"19\" width=\"35\"> </td>\n";
$html .= " <td> </td>\n";
$html .= " <td rowspan=\"19\" width=\"35\"> </td>\n";
$html .= " </tr>\n";
// Output the HTML.
if (($user_stats = stats_get_active_user_list()) !== false) {
$user_list_array = array();
$html .= " <tr>\n";
$html .= " <td>";
if (forum_get_setting('guest_show_recent', 'Y') && user_guest_enabled()) {
if ($user_stats['GUESTS'] != 1) {
$user_list_array[] = sprintf(gettext("<b>%s</b> guests"), format_number($user_stats['GUESTS']));
} else {
$user_list_array[] = gettext("<b>1</b> guest");
}
}
if ($user_stats['USER_COUNT'] != 1) {
$user_list_array[] = sprintf(gettext("<b>%s</b> members"), format_number($user_stats['USER_COUNT']));
} else {
$user_list_array[] = gettext("<b>1</b> member");
}
if ($user_stats['ANON_USERS'] != 1) {
$user_list_array[] = sprintf(gettext("<b>%s</b> anonymous members"), format_number($user_stats['ANON_USERS']));
} else {
$user_list_array[] = gettext("<b>1</b> anonymous member");
}
$user_list = implode(", ", $user_list_array);
$user_time = format_time_display(ini_get('session.gc_maxlifetime'), false);
$html .= sprintf(gettext("%s active in the past %s."), $user_list, $user_time);
$html .= " <a href=\"start.php?webtag={$webtag}&show=visitors\" target=\"" . html_get_frame_name('main') . "\">" . gettext("View More Visitors") . "</a>\n";
$html .= " </td>\n";
$html .= " </tr>\n";
if (sizeof($user_stats['USERS']) > 0) {
$users_array = array();
foreach ($user_stats['USERS'] as $user) {
$user_avatar = '';
if (isset($user['BOT_NAME']) && isset($user['BOT_URL'])) {
$user_display = word_filter_add_ob_tags($user['BOT_NAME'], true);
$user_display = sprintf($search_engine_bot_link, $user['BOT_URL'], $user_display);
$users_array[] = $user_display;
} else {
$user_logon = format_user_name($user['LOGON'], $user['NICKNAME']);
$user_display = str_replace(" ", " ", word_filter_add_ob_tags($user_logon, true));
if ($user['UID'] == $_SESSION['UID']) {
if (isset($user['ANON_LOGON']) && $user['ANON_LOGON'] > USER_ANON_DISABLED) {
$user_title = gettext("You (Invisible)");
$user_class = 'user_stats_curuser';
} else {
$user_title = gettext("You");
$user_class = 'user_stats_curuser';
}
} else {
if (($user['RELATIONSHIP'] & USER_FRIEND) > 0) {
$user_title = gettext("Friend");
$user_class = 'user_stats_friend';
} else {
$user_class = 'user_stats_normal';
$user_title = '';
}
}
if (isset($user['AVATAR_URL']) && filter_var($user['AVATAR_URL'], FILTER_VALIDATE_URL)) {
$user_avatar = html_style_image('profile_image profile_image_small', htmlentities_array($user_title), null, array('background-image' => sprintf("url('%s')", $user['AVATAR_URL'])));
} else {
if (isset($user['AVATAR_AID']) && is_numeric($user['AVATAR_AID'])) {
$attachment = attachments_get_by_aid($user['AVATAR_AID']);
if (($user_avatar_picture = attachments_make_link($attachment, false, false, false, false)) !== false) {
$user_avatar = html_style_image('profile_image profile_image_small', htmlentities_array($user_title), null, array('background-image' => sprintf("url('%s&profile_picture')", $user_avatar_picture)));
}
}
}
$users_array[] = sprintf($user_profile_link, $user_avatar, $webtag, $user['UID'], $user_class, $user_title, $user_display);
}
}
$html .= " <tr>";
$html .= " <td class=\"activeusers\">\n";
$html .= " " . implode(", ", $users_array) . "\n";
$html .= " </td>\n";
//.........这里部分代码省略.........
示例5: gettext
echo " <table class=\"subhead\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"left\">", gettext("Navigate"), "</td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <table class=\"posthead\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"center\">\n";
echo " <table class=\"posthead\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"center\">\n";
echo " <table class=\"posthead\" border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo " <tr>\n";
echo " <td valign=\"top\" align=\"center\" style=\"white-space: nowrap\" width=\"25\"> </td>\n";
echo " <td align=\"left\">\n";
echo " <form accept-charset=\"utf-8\" name=\"f_nav\" method=\"get\" action=\"discussion.php\" target=\"", html_get_frame_name('main'), "\">\n";
echo " ", form_input_hidden("webtag", htmlentities_array($webtag)), "\n";
echo " ", form_input_text('msg', '1.1', 10), "\n";
echo " ", form_submit("go", gettext("Go!")), "\n";
echo " </form>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\"> </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
示例6: thread_list_draw_top
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")), " <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")), " <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")), " <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")), " <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)), " ", 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";
}
示例7: html_get_frame_name
echo "<span class=\"nav_messages\"><a href=\"discussion.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("Messages"), "</a></span> | \n";
if (forum_get_setting('ajax_chat_enabled', 'Y')) {
if ($ajax_chat_online_user_count = ajax_chat_online_user_count()) {
echo "<span class=\"nav_chat\"><a href=\"chat/index.php\" target=\"_blank\">", gettext("Chat"), " (", $ajax_chat_online_user_count, ")</a></span> | \n";
} else {
echo "<span class=\"nav_chat\"><a href=\"chat/index.php\" target=\"_blank\">", gettext("Chat"), " (0)</a></span> | \n";
}
}
if (forum_get_setting('show_links', 'Y')) {
echo "<span class=\"nav_links\"><a href=\"links.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("Links"), "</a></span> | \n";
}
if (forum_get_setting('show_pms', 'Y')) {
echo " <span class=\"nav_inbox\"><a href=\"pm.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("Inbox"), "</a></span> | \n";
}
if (forum_check_webtag_available($webtag)) {
echo "<span class=\"nav_mycontrols\"><a href=\"user.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("My Controls"), "</a></span> | \n";
}
if (forums_get_available_count() > 1 || !forum_get_default()) {
echo "<span class=\"nav_myforums\"><a href=\"forums.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("My Forums"), "</a></span> | \n";
}
if (session::check_perm(USER_PERM_FORUM_TOOLS, 0) || session::check_perm(USER_PERM_ADMIN_TOOLS, 0) || session::get_folders_by_perm(USER_PERM_FOLDER_MODERATE)) {
echo "<span class=\"nav_admin\"><a href=\"admin.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("Admin"), "</a></span> | \n";
}
echo "<span class=\"nav_logout\"><a href=\"logout.php?webtag={$webtag}\" target=\"", html_get_top_frame_name(), "\">", gettext("Logout"), " : ", $_SESSION['LOGON'], "</span></a>\n";
}
echo "</div>\n";
echo "<div class=\"navright\">\n";
echo forum_links_draw_dropdown('openForumLink');
echo "</div>\n";
echo "<div style=\"clear: both\"></div>\n";
html_draw_bottom();
示例8: cache_disable
// Don't cache this page - fixes problems with Opera.
cache_disable();
// Check we're logged in correctly
if (!session::logged_in()) {
html_guest_error();
}
// Get the user's saved left frame width.
if (isset($_SESSION['LEFT_FRAME_WIDTH']) && is_numeric($_SESSION['LEFT_FRAME_WIDTH'])) {
$left_frame_width = max(100, $_SESSION['LEFT_FRAME_WIDTH']);
} else {
$left_frame_width = 280;
}
// Output starts here
html_draw_top(array('frame_set_html' => true, 'pm_popup_disabled' => true));
$frameset = new html_frameset_cols('user', "{$left_frame_width},*");
if (isset($_GET['page']) && strlen(trim($_GET['page'])) > 0) {
$requested_page = trim($_GET['page']);
$available_pages_preg = implode("|^", array_map('preg_quote_callback', get_available_user_files()));
if (preg_match("/^{$available_pages_preg}/u", basename($requested_page)) > 0) {
$requested_page = href_cleanup_query_keys($requested_page);
$frameset->html_frame("user_menu.php?webtag={$webtag}", html_get_frame_name('left'));
$frameset->html_frame($requested_page, html_get_frame_name('right'));
$frameset->output_html();
html_draw_bottom(true);
exit;
}
}
$frameset->html_frame("user_menu.php?webtag={$webtag}", html_get_frame_name('left'));
$frameset->html_frame("edit_prefs.php?webtag={$webtag}", html_get_frame_name('right'));
$frameset->output_html();
html_draw_bottom(true);
示例9: html_get_frame_name
echo "<span class=\"nav_chat\"><a href=\"chat/index.php\" target=\"", html_get_frame_name('main'), "\">", gettext("Chat"), " (0)</a></span> | \n";
}
}
if (forum_get_setting('show_links', 'Y')) {
echo "<span class=\"nav_links\"><a href=\"links.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("Links"), "</a></span> | \n";
}
}
if (forum_get_setting('show_pms', 'Y')) {
echo "<span class=\"nav_inbox\"><a href=\"pm.php\" target=\"", html_get_frame_name('main'), "\">", gettext("Inbox"), "</a></span> | \n";
}
if (forum_check_webtag_available($webtag)) {
echo "<span class=\"nav_mycontrols\"><a href=\"user.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("My Controls"), "</a></span> | \n";
}
if (forums_get_available_count() > 1 || !forum_get_default()) {
echo "<span class=\"nav_myforums\"><a href=\"forums.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("My Forums"), "</a></span> | \n";
}
if (session::check_perm(USER_PERM_FORUM_TOOLS, 0) || session::check_perm(USER_PERM_ADMIN_TOOLS, 0) || session::get_folders_by_perm(USER_PERM_FOLDER_MODERATE)) {
echo "<span class=\"nav_admin\"><a href=\"admin.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("Admin"), "</a></span> | \n";
}
if (!session::logged_in()) {
echo "<span class=\"nav_login\"><a href=\"index.php?webtag={$webtag}&final_uri=logon.php%3Fwebtag%3D{$webtag}\" target=\"", html_get_top_frame_name(), "\">", gettext("Login"), "</a></span> | \n";
echo "<span class=\"nav_register\"><a href=\"register.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("Register"), "</a></span>\n";
} else {
echo "<span class=\"nav_logout\"><a href=\"logout.php?webtag={$webtag}\" target=\"", html_get_top_frame_name(), "\">", gettext("Logout"), " : ", $_SESSION['LOGON'], "</a></span>\n";
}
echo "</div>\n";
echo "<div class=\"navright\">\n";
echo forum_links_draw_dropdown();
echo "</div>\n";
echo "<div style=\"clear: both\"></div>\n";
html_draw_bottom();
示例10: html_get_frame_name
echo "<a href=\"chat/index.php\" target=\"", html_get_frame_name('main'), "\">", gettext("Chat"), " (0)</a> | \n";
}
}
if (forum_get_setting('show_links', 'Y')) {
echo "<a href=\"links.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("Links"), "</a> | \n";
}
}
if (forum_get_setting('show_pms', 'Y')) {
echo "<a href=\"pm.php\" target=\"", html_get_frame_name('main'), "\">", gettext("Inbox"), "</a> | \n";
}
if (forum_check_webtag_available($webtag)) {
echo "<a href=\"user.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("My Controls"), "</a> | \n";
}
if (forums_get_available_count() > 1 || !forum_get_default()) {
echo "<a href=\"forums.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("My Forums"), "</a> | \n";
}
if (session::check_perm(USER_PERM_FORUM_TOOLS, 0) || session::check_perm(USER_PERM_ADMIN_TOOLS, 0) || session::get_folders_by_perm(USER_PERM_FOLDER_MODERATE)) {
echo "<a href=\"admin.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("Admin"), "</a> | \n";
}
if (!session::logged_in()) {
echo "<a href=\"index.php?webtag={$webtag}&final_uri=logon.php%3Fwebtag%3D{$webtag}\" target=\"", html_get_top_frame_name(), "\">", gettext("Login"), "</a> | \n";
echo "<a href=\"register.php?webtag={$webtag}\" target=\"", html_get_frame_name('main'), "\">", gettext("Register"), "</a>\n";
} else {
echo "<a href=\"logout.php?webtag={$webtag}\" target=\"", html_get_top_frame_name(), "\">", gettext("Logout"), " : ", $_SESSION['LOGON'], "</a>\n";
}
echo "</div>\n";
echo "<div class=\"navright\">\n";
echo forum_links_draw_dropdown();
echo "</div>\n";
echo "<div style=\"clear: both\"></div>\n";
html_draw_bottom();
示例11: message_apply_formatting
function message_apply_formatting($message, $ignore_sig = false)
{
$webtag = get_webtag();
forum_check_webtag_available($webtag);
$message_parts = preg_split('/(<[^>]+>)/u', $message, -1, PREG_SPLIT_DELIM_CAPTURE);
$signature_parts = array();
if (($signature_offset = array_search("<div class=\"sig\">", $message_parts)) !== false) {
$signature_parts = array_splice($message_parts, $signature_offset);
}
$signature = implode('', $signature_parts);
$message = implode('', $message_parts);
$enable_wiki_words = forum_get_setting('enable_wiki_integration', 'Y') && isset($_SESSION['ENABLE_WIKI_WORDS']) && $_SESSION['ENABLE_WIKI_WORDS'] == 'Y';
$enable_wiki_links = forum_get_setting('enable_wiki_quick_links', 'Y') && isset($_SESSION['ENABLE_WIKI_QUICK_LINKS']) && $_SESSION['ENABLE_WIKI_QUICK_LINKS'] == 'Y';
$enable_tags = forum_get_setting('enable_tags', 'Y') && isset($_SESSION['ENABLE_TAGS']) && $_SESSION['ENABLE_TAGS'] == 'Y';
if (($wiki_location = forum_get_setting('wiki_integration_uri')) !== false) {
$wiki_location = str_replace("[WikiWord]", "\\1", $wiki_location);
}
if ($enable_wiki_words || $enable_wiki_links) {
$message_parts = preg_split('/([<|>])/u', $message, -1, PREG_SPLIT_DELIM_CAPTURE);
for ($i = 0; $i < sizeof($message_parts); $i++) {
if (!($i % 4) && (!isset($message_parts[$i - 2]) || !strstr($message_parts[$i - 2], "href"))) {
if ($enable_wiki_words && $wiki_location) {
$message_parts[$i] = preg_replace('/\\b(([A-Z][a-z]+){2,})\\b/u', "<a href=\"{$wiki_location}\" class=\"wikiword\">\\1</a>", $message_parts[$i]);
}
if ($enable_wiki_links) {
if (defined('BEEHIVEMODE_LIGHT')) {
$message_parts[$i] = preg_replace('/\\b(msg:([0-9]{1,}\\.[0-9]{1,}))\\b/iu', "<a href=\"lmessages.php?webtag={$webtag}&msg=\\2\" class=\"wikiword\">\\1</a>", $message_parts[$i]);
} else {
$message_parts[$i] = preg_replace('/\\b(msg:([0-9]{1,}\\.[0-9]{1,}))\\b/iu', "<a href=\"index.php?webtag={$webtag}&msg=\\2\" target=\"_blank\" class=\"wikiword\">\\1</a>", $message_parts[$i]);
$message_parts[$i] = preg_replace('/\\b(user:([a-z0-9_-]{2,15}))\\b/iu', "<a href=\"user_profile.php?webtag={$webtag}&logon=\\2\" target=\"_blank\" class=\"wikiword popup 650x500\">\\1</a>", $message_parts[$i]);
}
}
}
}
$message = implode('', $message_parts);
}
if ($enable_tags) {
$message_parts = preg_split('/([<|>])/u', $message, -1, PREG_SPLIT_DELIM_CAPTURE);
for ($i = 0; $i < sizeof($message_parts); $i++) {
if (!($i % 4) && (!isset($message_parts[$i - 2]) || !strstr($message_parts[$i - 2], "href"))) {
$message_parts[$i] = preg_replace('/(^|\\s)#([A-Z0-9]{1,255})/iu', "\$1<a href=\"search.php?webtag={$webtag}&tag=\$2\" class=\"tag\" target=\"" . html_get_frame_name('right') . "\">#\$2</a>", $message_parts[$i]);
}
}
$message = implode('', $message_parts);
}
$message = emoticons_apply($message);
if (!$ignore_sig) {
$message .= emoticons_apply($signature);
}
return $message;
}
示例12: admin_check_credentials
function admin_check_credentials()
{
$webtag = get_webtag();
forum_check_webtag_available($webtag);
if (isset($_SESSION['ADMIN_TIMEOUT']) && is_numeric($_SESSION['ADMIN_TIMEOUT']) && $_SESSION['ADMIN_TIMEOUT'] > time()) {
$_SESSION['ADMIN_TIMEOUT'] = time() + HOUR_IN_SECONDS;
return true;
}
if (isset($_POST['admin_logon']) && isset($_POST['admin_password'])) {
$admin_logon = $_POST['admin_logon'];
$admin_password = $_POST['admin_password'];
if (($admin_uid = user_logon($admin_logon, $admin_password)) && $admin_uid == $_SESSION['UID']) {
$_SESSION['ADMIN_TIMEOUT'] = time() + HOUR_IN_SECONDS;
return true;
} else {
html_display_error_msg(gettext("The username or password you supplied are not valid."), '500', 'center');
}
}
html_draw_top(array('main_css' => 'admin.css'));
if (isset($_POST) && is_array($_POST) && sizeof($_POST) > 0) {
html_display_warning_msg(gettext('To save any changes you must re-authenticate yourself'), '500', 'center');
} else {
html_display_warning_msg(gettext('To access the Admin area you must re-authenticate yourself'), '500', 'center');
}
echo "<div align=\"center\">\n";
echo " <form accept-charset=\"utf-8\" name=\"logonform\" method=\"post\" action=\"", get_request_uri(), "\" target=\"", html_get_frame_name('main'), "\" autocomplete=\"off\">\n";
echo " ", form_csrf_token_field(), "\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 " <br />\n";
echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"325\">\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("Please enter your password"), "</td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <table class=\"posthead\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"center\">\n";
echo " <table class=\"posthead\" width=\"95%\">\n";
echo " <tr>\n";
echo " <td align=\"right\" width=\"90\">", gettext("Username"), ":</td>\n";
echo " <td align=\"left\">", form_input_text('admin_logon', null, 24, 32, null, 'bhinputlogon'), "</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"right\" width=\"90\">", gettext("Password"), ":</td>\n";
echo " <td align=\"left\">", form_input_password('admin_password', null, 24, 32, null, 'bhinputlogon'), "</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\"> </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\"> </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"center\" colspan=\"2\">", form_submit('logon', gettext("Logon")), "</td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </form>\n";
echo "</div>\n";
html_draw_bottom();
exit;
}
示例13: forum_get_setting
$user_emoticons = $_SESSION['EMOTICONS'];
} else {
$user_emoticons = forum_get_setting('default_emoticons', 'strlen', 'default');
}
// Get the user's saved left frame width.
if (isset($_SESSION['LEFT_FRAME_WIDTH']) && is_numeric($_SESSION['LEFT_FRAME_WIDTH'])) {
$left_frame_width = max(100, $_SESSION['LEFT_FRAME_WIDTH']);
} else {
$left_frame_width = 280;
}
// Get the attachment max file size (default: 2MB)
if (($attachment_size_limit = forum_get_setting('attachment_size_limit', 'is_numeric', false)) === false) {
$attachment_size_limit = convert_shorthand_filesize(ini_get('upload_max_filesize'));
}
// Construct the Javascript / JSON array
$json_data = array('webtag' => $webtag, 'uid' => $_SESSION['UID'], 'lang' => array('loadingdotdotdot' => gettext("Loading..."), 'imageresized' => gettext("This image has been resized (original size %dx%d). To view the full-size image click here."), 'deleteattachmentconfirmation' => gettext("Are you sure you want to delete the selected attachments?"), 'deletemessagesconfirmation' => gettext("Are you sure you want to delete all of the selected messages?"), 'unquote' => gettext("Unquote"), 'quote' => gettext("Quote"), 'searchsuccessfullycompleted' => gettext("Search successfully completed."), 'confirmmarkasread' => gettext("Are you sure you want to mark the selected threads as read?"), 'waitdotdotdot' => gettext("Wait..."), 'more' => gettext("More"), 'pollquestion' => gettext("Poll Question"), 'deletequestion' => gettext("Delete question"), 'allowmultipleoptions' => gettext("Allow multiple options to be selected"), 'addnewoption' => gettext("Add new option"), 'deleteoption' => gettext("Delete option"), 'code' => gettext('Code'), 'retry' => gettext('Retry'), 'cancel' => gettext('Cancel'), 'delete' => gettext('Delete'), 'upload' => gettext('Upload'), 'preferencesnotsaved' => gettext('Your preferences have not been saved')), 'font_size' => $font_size, 'user_style' => $user_style, 'emoticons' => $user_emoticons, 'top_frame' => html_get_top_page(), 'left_frame_width' => max(100, $left_frame_width), 'forum_path' => server_get_forum_path(), 'use_mover_spoiler' => isset($_SESSION['USE_MOVER_SPOILER']) && $_SESSION['USE_MOVER_SPOILER'] == 'Y' ? 'Y' : 'N', 'show_share_links' => isset($_SESSION['SHOW_SHARE_LINKS']) && $_SESSION['SHOW_SHARE_LINKS'] == 'Y' ? 'Y' : 'N', 'auto_scroll_messages' => isset($_SESSION['AUTO_SCROLL_MESSAGES']) && $_SESSION['AUTO_SCROLL_MESSAGES'] == 'Y' ? 'Y' : 'N', 'attachment_size_limit' => $attachment_size_limit, 'frames' => array('index' => html_get_frame_name('index'), 'admin' => html_get_frame_name('admin'), 'start' => html_get_frame_name('start'), 'discussion' => html_get_frame_name('discussion'), 'user' => html_get_frame_name('user'), 'pm' => html_get_frame_name('pm'), 'main' => html_get_frame_name('main'), 'ftop' => html_get_frame_name('ftop'), 'fnav' => html_get_frame_name('fnav'), 'left' => html_get_frame_name('left'), 'right' => html_get_frame_name('right'), 'pm_folders' => html_get_frame_name('pm_folders'), 'pm_messages' => html_get_frame_name('pm_messages')));
// Decide on the correct Content-Type and encoding
// of the content. This allows Beehive to reload the
// JSON data via the same script, either for use
// in a <script> tag or via AJAX.
if (isset($_GET['json'])) {
$content_type = 'application/json';
$content = json_encode($json_data);
} else {
$content_type = 'text/javascript';
$content = sprintf('top.window.beehive = $.extend({}, top.window.beehive, %s);
$(document).ready(function() {
$(top.window.beehive).trigger("init");
});', json_encode($json_data));
}
// Send correct Content-Type header
示例14: html_get_frame_name
$frameset->html_frame("pm_messages.php?webtag={$webtag}&mid={$mid}&folder={$current_folder}&message_sent=true#message", html_get_frame_name('pm_messages'), 0);
} else {
if (isset($_GET['message_saved'])) {
$frameset->html_frame("pm_folders.php?webtag={$webtag}&mid={$mid}&folder={$current_folder}", html_get_frame_name('pm_folders'), 0);
$frameset->html_frame("pm_messages.php?webtag={$webtag}&mid={$mid}&folder={$current_folder}&message_saved=true#message", html_get_frame_name('pm_messages'), 0);
} else {
$frameset->html_frame("pm_folders.php?webtag={$webtag}&mid={$mid}&folder={$current_folder}", html_get_frame_name('pm_folders'), 0);
$frameset->html_frame("pm_messages.php?webtag={$webtag}&mid={$mid}&folder={$current_folder}#message", html_get_frame_name('pm_messages'), 0);
}
}
} else {
if (isset($_GET['folder']) && is_numeric($_GET['folder'])) {
$current_folder = in_array($_GET['folder'], $available_folders) ? $_GET['folder'] : PM_FOLDER_INBOX;
if (isset($_GET['message_sent'])) {
$frameset->html_frame("pm_folders.php?webtag={$webtag}&folder={$current_folder}", html_get_frame_name('pm_folders'), 0);
$frameset->html_frame("pm_messages.php?webtag={$webtag}&folder={$current_folder}&message_sent=true", html_get_frame_name('pm_messages'), 0);
} else {
$frameset->html_frame("pm_folders.php?webtag={$webtag}&folder={$current_folder}", html_get_frame_name('pm_folders'), 0);
$frameset->html_frame("pm_messages.php?webtag={$webtag}&folder={$current_folder}", html_get_frame_name('pm_messages'), 0);
}
}
}
if (isset($_GET['message_sent'])) {
$frameset->html_frame("pm_folders.php?webtag={$webtag}", html_get_frame_name('pm_folders'), 0);
$frameset->html_frame("pm_messages.php?webtag={$webtag}&message_sent=true", html_get_frame_name('pm_messages'), 0);
} else {
$frameset->html_frame("pm_folders.php?webtag={$webtag}", html_get_frame_name('pm_folders'), 0);
$frameset->html_frame("pm_messages.php?webtag={$webtag}", html_get_frame_name('pm_messages'), 0);
}
$frameset->output_html();
html_draw_bottom(true);
示例15: pm_display
//.........这里部分代码省略.........
echo " <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofromlabel\">", word_filter_add_ob_tags(format_user_name($pm_message_array['TLOGON'], $pm_message_array['TNICK']), true), "</span></td>\n";
} else {
echo " <td width=\"1%\" align=\"right\" style=\"white-space: nowrap\"><span class=\"posttofromlabel\"> ", gettext("To"), ": </span></td>\n";
echo " <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofromlabel\"><a href=\"user_profile.php?webtag={$webtag}&uid={$pm_message_array['TO_UID']}\" target=\"_blank\" class=\"popup 650x500\">", word_filter_add_ob_tags(format_user_name($pm_message_array['TLOGON'], $pm_message_array['TNICK']), true), "</a></span></td>\n";
}
} else {
echo " <td width=\"1%\" align=\"right\" style=\"white-space: nowrap\"><span class=\"posttofromlabel\"> ", gettext("To"), ": </span></td>\n";
echo " <td align=\"left\" class=\"postbody\"><i>", gettext("No Recipients"), "</i></td>\n";
}
}
}
}
// Add emoticons/wikilinks and word filter tags
$pm_message_array['CONTENT'] = message_apply_formatting($pm_message_array['CONTENT']);
$pm_message_array['CONTENT'] = word_filter_add_ob_tags($pm_message_array['CONTENT']);
echo " </tr>\n";
echo " <tr>\n";
echo " <td width=\"1%\" align=\"right\" style=\"white-space: nowrap\"><span class=\"posttofromlabel\"> ", gettext("Subject"), ": </span></td>\n";
if (strlen(trim($pm_message_array['SUBJECT'])) > 0) {
echo " <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\">", word_filter_add_ob_tags($pm_message_array['SUBJECT'], true), "</span></td>\n";
} else {
echo " <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\"><i>", gettext("No Subject"), "</i></span></td>\n";
}
if (isset($pm_message_array['TYPE']) && ($pm_message_array['TYPE'] & PM_SAVED_DRAFT) > 0) {
echo " <td align=\"right\" style=\"white-space: nowrap\"><span class=\"postinfo\"><i>", gettext("Not Sent"), "</i> </span></td>\n";
} else {
echo " <td align=\"right\" style=\"white-space: nowrap\"><span class=\"postinfo\">", format_time($pm_message_array['CREATED']), " </span></td>\n";
}
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\">\n";
echo " <table width=\"100%\">\n";
echo " <tr>\n";
echo " <td colspan=\"3\" align=\"left\"> </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td class=\"postbody\" align=\"left\">{$pm_message_array['CONTENT']}</td>\n";
echo " </tr>\n";
if (isset($pm_message_array['AID'])) {
$aid = $pm_message_array['AID'];
$attachments_array = array();
$image_attachments_array = array();
if (attachments_get($pm_message_array['FROM_UID'], $aid, $attachments_array, $image_attachments_array)) {
// Draw the attachment header at the bottom of the post
echo " <tr>\n";
echo " <td class=\"postbody\" align=\"left\">\n";
if (is_array($attachments_array) && sizeof($attachments_array) > 0) {
echo " <p><b>", gettext("Attachments"), ":</b><br />\n";
foreach ($attachments_array as $attachment) {
echo " ", attachments_make_link($attachment, true, false, $export_html), "<br />\n";
}
echo " </p>\n";
}
if (is_array($image_attachments_array) && sizeof($image_attachments_array) > 0) {
echo " <p><b>", gettext("Image Attachments"), ":</b><br />\n";
foreach ($image_attachments_array as $attachment) {
echo " ", attachments_make_link($attachment, true, false, $export_html), "\n";
}
echo " </p>\n";
}
echo " </td>\n";
echo " </tr>\n";
}
}
echo " </table>\n";
echo " <table width=\"100%\" class=\"postresponse\" cellspacing=\"1\" cellpadding=\"0\">\n";
echo " <tr>\n";
if ($preview === false) {
if ($folder == PM_FOLDER_INBOX) {
echo " <td align=\"center\"><img src=\"", html_style_image('post.png'), "\" border=\"0\" alt=\"", gettext("Reply"), "\" title=\"", gettext("Reply"), "\" /> <a href=\"pm_write.php?webtag={$webtag}&replyto={$pm_message_array['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Reply"), "</a> <img src=\"", html_style_image('forward.png'), "\" border=\"0\" alt=\"", gettext("Forward"), "\" title=\"", gettext("Forward"), "\" /> <a href=\"pm_write.php?webtag={$webtag}&fwdmsg={$pm_message_array['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Forward"), "</a></td>\n";
} else {
if ($folder == PM_FOLDER_OUTBOX) {
echo " <td align=\"center\"><img src=\"", html_style_image('post.png'), "\" border=\"0\" alt=\"", gettext("Edit"), "\" title=\"", gettext("Edit"), "\" /> <a href=\"pm_edit.php?webtag={$webtag}&mid={$pm_message_array['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Edit"), "</a> <img src=\"", html_style_image('forward.png'), "\" border=\"0\" alt=\"", gettext("Forward"), "\" title=\"", gettext("Forward"), "\" /> <a href=\"pm_write.php?webtag={$webtag}&fwdmsg={$pm_message_array['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Forward"), "</a></td>\n";
} else {
if ($folder == PM_FOLDER_DRAFTS) {
echo " <td align=\"center\"><img src=\"", html_style_image('edit.png'), "\" border=\"0\" alt=\"", gettext("Edit"), "\" title=\"", gettext("Edit"), "\" /> <a href=\"pm_write.php?webtag={$webtag}&editmsg={$pm_message_array['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Edit"), "</a></td>\n";
} else {
echo " <td align=\"center\"><img src=\"", html_style_image('forward.png'), "\" border=\"0\" alt=\"", gettext("Forward"), "\" title=\"", gettext("Forward"), "\" /> <a href=\"pm_write.php?webtag={$webtag}&fwdmsg={$pm_message_array['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Forward"), "</a></td>\n";
}
}
}
} else {
echo " <td align=\"center\"> </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";
echo "</div>\n";
}