echo "</tr>\n";
    while ($data = dbarray($result)) {
        $row_color = $i % 2 == 0 ? "tbl1" : "tbl2";
        echo "<tr>\n";
        if ($data['thread_lastpost'] > $lastvisited) {
            $thread_match = $data['thread_id'] . "\\|" . $data['thread_lastpost'] . "\\|" . $data['forum_id'];
            if (iMEMBER && ($data['thread_lastuser'] == $userdata['user_id'] || preg_match("(^\\.{$thread_match}\$|\\.{$thread_match}\\.|\\.{$thread_match}\$)", $userdata['user_threads']))) {
                $boldynew = false;
            } else {
                $boldynew = true;
            }
        } else {
            $boldynew = false;
        }
        echo "<td style='margin: 0px; font-size: 7pt; white-space: normal;' class='" . $row_color . "'>" . ($boldynew ? '<b>' : '') . "<a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&amp;pid=" . $data['thread_lastpostid'] . "#post_" . $data['thread_lastpostid'] . "' title='" . $data['thread_subject'] . "'>" . trimlink(preg_replace('/([^\\s]{15})([^\\s]+)/', '$1 $2 ', $data['thread_subject']), 70) . "</a><br />\n" . $data['forum_name'] . ($boldynew ? '</b>' : '') . "</td>\n";
        $usernamestuff1 = alias2($data['thread_lastpost_alias'], trimlink(alias1($data['user_aliases']), 25), $data['thread_lastuser'], trimlink($data['user_name'], 14), $data['user_status'], TRUE);
        echo "<td class='" . $row_color . "' style='text-align:center; margin: 0px; font-size: 7pt; white-space: normal;'>" . $usernamestuff1 . "<br />\n" . showdate("<span title='%d-%m-%y'>%H:%M:%S</span>", $data['thread_lastpost']) . "</td>\n";
        echo "</tr>\n";
        $i++;
    }
    echo "</table>\n";
}
echo "<div style='clear: both;'></div>";
if (iMEMBER) {
    echo "<div class='tbl1' style='text-align:center'><a href='" . INFUSIONS . "latest_forumactivity_panel/my_threads.php'>" . $locale['global_041'] . "</a> ::\n";
    echo "<a href='" . INFUSIONS . "latest_forumactivity_panel/my_posts.php'>" . $locale['global_042'] . "</a> ::\n";
    echo "<a href='" . INFUSIONS . "latest_forumactivity_panel/new_posts.php'>" . $locale['global_043'] . "</a>";
    if ($settings['thread_notify']) {
        echo " ::\n<a href='" . INFUSIONS . "latest_forumactivity_panel/my_tracked_threads.php'>" . $locale['global_056'] . "</a>";
    }
    echo "</div>\n";
Пример #2
0
 echo "<!--sub_postreply-->";
 if ($settings['forum_last_posts_reply'] != "0") {
     $result = dbquery("SELECT p.thread_id, p.post_message, p.post_smileys, p.post_author, p.post_datestamp, p.post_hidden, p.post_alias,\n\t\t\tu.user_id, u.user_name, u.user_status, u.user_avatar, u.user_aliases\n\t\t\tFROM " . DB_POSTS . " p\n\t\t\tLEFT JOIN " . DB_USERS . " u ON p.post_author = u.user_id\n\t\t\tWHERE p.thread_id='" . $_GET['thread_id'] . "' AND p.post_hidden='0'\n\t\t\tORDER BY p.post_datestamp DESC LIMIT 0," . $settings['forum_last_posts_reply']);
     if (dbrows($result)) {
         $title = "";
         if ($settings['forum_last_posts_reply'] == "1") {
             $title = $locale['431'];
         } else {
             $title = sprintf($locale['432'], $settings['forum_last_posts_reply']);
         }
         opentable($title);
         echo "<div style='max-height:350px;overflow:auto;'>\n";
         echo "<table cellpadding='1' cellspacing='1' width='100%' class='tbl-border forum_thread_table'>\n";
         $i = $settings['forum_last_posts_reply'];
         while ($data = dbarray($result)) {
             $data['user_aliases'] = alias1($data['user_aliases']);
             $message = $data['post_message'];
             if ($data['post_smileys']) {
                 $message = parsesmileys($message);
             }
             $message = parseubb($message);
             echo "<tr>\n<td class='tbl2 forum_thread_user_name' style='width:10%'><!--forum_thread_user_name-->" . alias2($data['post_alias'], $data['user_aliases'], $data['user_id'], $data['user_name'], $data['user_status']) . "</td>\n";
             echo "<td class='tbl2 forum_thread_post_date'>\n";
             echo "<div style='float:right' class='small'>\n";
             echo $i . ($i == $settings['forum_last_posts_reply'] ? " (" . $locale['431'] . ")" : "");
             echo "</div>\n";
             echo "<div class='small'>" . $locale['426'] . showdate("forumdate", $data['post_datestamp']) . "</div>\n";
             echo "</td>\n";
             echo "</tr>\n<tr>\n<td valign='top' class='tbl2 forum_thread_user_info' style='width:10%'>\n";
             if ($data['user_avatar'] && file_exists(IMAGES . "avatars/" . $data['user_avatar']) && $data['user_status'] != 6 && $data['user_status'] != 5 && $data['post_alias'] < 0) {
                 echo "<img src='" . IMAGES . "avatars/" . $data['user_avatar'] . "' alt='" . $locale['567'] . "' /><br /><br />\n";
Пример #3
0
    }
    if ($fieldsvar) {
        $result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_message, tt.thread_subject,\n\t\t\ttf.forum_access FROM " . DB_POSTS . " tp\n\t\t\tLEFT JOIN " . DB_FORUMS . " tf ON tf.forum_id = tp.forum_id\n\t\t\tLEFT JOIN " . DB_THREADS . " tt ON tt.thread_id = tp.thread_id\t\t\t\n\t\t\tWHERE " . groupaccess('forum_access') . ($_GET['forum_id'] != 0 ? " AND tf.forum_id=" . $_GET['forum_id'] : "") . "\n\t\t\tAND " . $fieldsvar . ($_GET['datelimit'] != 0 ? " AND post_datestamp>=" . (time() - $_GET['datelimit']) : ""));
        $rows = dbrows($result);
    } else {
        $rows = 0;
    }
    if ($rows) {
        $items_count .= THEME_BULLET . "&nbsp;<a href='" . FUSION_SELF . "?stype=forums&amp;stext=" . $_GET['stext'] . "&amp;" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['f402'] : $locale['f403']) . " " . $locale['522'] . "</a><br  />\n";
        $result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_message, tp.post_datestamp, tp.post_alias, tt.thread_subject,\n\t\t\ttt.thread_sticky, tf.forum_access, tu.user_id, tu.user_name, tu.user_status, tu.user_aliases FROM " . DB_POSTS . " tp\n\t\t\tLEFT JOIN " . DB_THREADS . " tt ON tp.thread_id = tt.thread_id\n\t\t\tLEFT JOIN " . DB_FORUMS . " tf ON tp.forum_id = tf.forum_id\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON tp.post_author=tu.user_id\n\t\t\tWHERE " . groupaccess('forum_access') . ($_GET['forum_id'] != 0 ? " AND tf.forum_id=" . $_GET['forum_id'] : "") . "\n\t\t\tAND " . $fieldsvar . ($_GET['datelimit'] != 0 ? " AND post_datestamp>=" . (time() - $_GET['datelimit']) : "") . "\n\t\t\tORDER BY " . $sortby . " " . ($_GET['order'] == 1 ? "ASC" : "DESC") . ($_GET['stype'] != "all" ? " LIMIT " . $_GET['rowstart'] . ",10" : ""));
        while ($data = dbarray($result)) {
            $search_result = "";
            $text_all = search_striphtmlbbcodes($data['post_message']);
            $text_frag = search_textfrag($text_all);
            $subj_c = search_stringscount($data['thread_subject']);
            $text_c = search_stringscount($data['post_message']);
            // $text_frag = highlight_words($swords, $text_frag);
            $search_result .= ($data['thread_sticky'] == 1 ? "<strong>" . $locale['f404'] . "</strong> " : "") . "<a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&amp;highlight=" . urlencode($_GET['stext']) . "&amp;pid=" . $data['post_id'] . "#post_" . $data['post_id'] . "'>" . $data['thread_subject'] . "</a>" . "<br  /><br  />\n";
            // $search_result .= ($data['thread_sticky'] == 1 ? "<strong>".$locale['f404']."</strong> " : "")."<a href='".FORUM."viewthread.php?thread_id=".$data['thread_id']."&amp;highlight=".urlencode($_GET['stext'])."&amp;pid=".$data['post_id']."#post_".$data['post_id']."'>".highlight_words($swords, $data['thread_subject'])."</a>"."<br  /><br  />\n";
            $search_result .= "<div class='quote' style='width:auto;height:auto;overflow:auto'>" . $text_frag . "</div><br  />";
            $search_result .= "<span class='small2'>" . $locale['global_070'] . alias2($data['post_alias'], alias1($data['user_aliases']), $data['user_id'], $data['user_name'], $data['user_status']) . "\n";
            $search_result .= $locale['global_071'] . showdate("longdate", $data['post_datestamp']) . "</span><br  />\n";
            $search_result .= "<span class='small'>" . $subj_c . " " . ($subj_c == 1 ? $locale['520'] : $locale['521']) . " " . $locale['f406'] . " " . $locale['f407'] . ", ";
            $search_result .= $text_c . " " . ($text_c == 1 ? $locale['520'] : $locale['521']) . " " . $locale['f406'] . " " . $locale['f408'] . "</span><br  /><br  />\n";
            search_globalarray($search_result);
        }
    } else {
        $items_count .= THEME_BULLET . "&nbsp;0 " . $locale['f403'] . " " . $locale['522'] . "<br  />\n";
    }
    $navigation_result = search_navigation($rows);
}
Пример #4
0
    }
    $result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_author, tp.post_alias, IF(tp.post_datestamp>tp.post_edittime, tp.post_datestamp, tp.post_edittime) AS post_timestamp,\n\t\ttf.forum_name, tf.forum_access, tt.thread_subject, tu.user_id, tu.user_name, tu.user_status, tu.user_aliases\n\t\tFROM " . DB_POSTS . " tp\n\t\tLEFT JOIN " . DB_FORUMS . " tf ON tp.forum_id = tf.forum_id\n\t\tLEFT JOIN " . DB_THREADS . " tt ON tp.thread_id = tt.thread_id\n\t\tLEFT JOIN " . DB_USERS . " tu ON tp.post_author = tu.user_id\n\t\tWHERE " . groupaccess('tf.forum_access') . " AND tp.post_hidden='0' AND tt.thread_hidden='0' AND (tp.post_datestamp > '" . $lastvisited . "' OR tp.post_edittime > '" . $lastvisited . "')\n\t\tGROUP BY tp.thread_id\n\t\tORDER BY post_timestamp DESC LIMIT " . $_GET['rowstart'] . ",20");
    $i = 0;
    echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n<tr>\n";
    echo "<td width='1%' class='tbl2' style='white-space:nowrap'><strong>" . $locale['global_048'] . "</strong></td>\n";
    echo "<td class='tbl2'><strong>" . $locale['global_044'] . "</strong></td>\n";
    echo "<td width='1%' class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_050'] . "</strong></td>\n";
    echo "</tr>\n";
    $threads = dbrows($result);
    while ($data = dbarray($result)) {
        if ($i % 2 == 0) {
            $row_color = "tbl1";
        } else {
            $row_color = "tbl2";
        }
        echo "<tr>\n";
        echo "<td width='1%' class='" . $row_color . "' style='white-space:nowrap'>" . $data['forum_name'] . "</td>\n";
        echo "<td class='" . $row_color . "'><a href='" . BASEDIR . "forum/viewthread.php?thread_id=" . $data['thread_id'] . "&amp;pid=" . $data['post_id'] . "#post_" . $data['post_id'] . "'>" . $data['thread_subject'] . "</a></td>\n";
        echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . alias2($data['post_alias'], alias1($data['user_aliases']), $data['post_author'], $data['user_name'], $data['user_status']) . "<br />\n" . showdate("forumdate", $data['post_timestamp']) . "</td>\n";
        echo "</tr>\n";
        $i++;
    }
    echo "<tr>\n<td align='center' colspan='4' class='tbl1'>" . sprintf($locale['global_055'], $rows, $threads) . "</td>\n</tr>\n</table>\n";
} else {
    echo "<div style='text-align:center'><br />" . sprintf($locale['global_055'], 0, 0) . "<br /><br /></div>\n";
}
closetable();
if ($threads > 20) {
    echo "<div align='center' style='margin-top:5px;'>\n" . makepagenav($_GET['rowstart'], 20, $threads, 3) . "\n</div>\n";
}
require_once THEMES . "templates/footer.php";
Пример #5
0
}
echo "<div style='clear: both;'></div>";
/* Tilfældige emner */
$result = dbquery("SELECT tt.thread_id, tt.thread_subject, tt.thread_lastuser, tt.thread_lastpost, tt.thread_lastpost_alias,\n\ttt.thread_poll, tf.forum_id, tf.forum_name, tf.forum_access, tt.thread_lastpostid, tu.user_id, tu.user_name,\n\ttu.user_status, tu.user_aliases\n\tFROM " . DB_THREADS . " tt\n\tINNER JOIN " . DB_FORUMS . " tf ON tt.forum_id=tf.forum_id\n\tINNER JOIN " . DB_USERS . " tu ON tt.thread_lastuser=tu.user_id\n\tWHERE " . groupaccess('tf.forum_access') . " AND tt.thread_hidden='0' AND tt.forum_id != 10\n\tORDER BY RAND() DESC LIMIT 0, 5");
if (dbrows($result)) {
    $i = 0;
    echo "<table cellpadding='0' cellspacing='1' style='width: 100%; margin-top: 1%;' class='tbl-border'>\n<tr>\n";
    echo "<td style='width: 70%; margin: 0px;' class='tbl2'><strong>Tilf&aelig;ldige emner</strong></td>\n";
    echo "<td class='tbl2' style='text-align:center;white-space:nowrap; margin: 0px;'><strong>Nyeste svar</strong></td>\n";
    echo "</tr>\n";
    while ($data = dbarray($result)) {
        $row_color = $i % 2 == 0 ? "tbl1" : "tbl2";
        echo "<tr>\n";
        if ($data['thread_lastpost'] > $lastvisited) {
            $thread_match = $data['thread_id'] . "\\|" . $data['thread_lastpost'] . "\\|" . $data['forum_id'];
            if (iMEMBER && ($data['thread_lastuser'] == $userdata['user_id'] || preg_match("(^\\.{$thread_match}\$|\\.{$thread_match}\\.|\\.{$thread_match}\$)", $userdata['user_threads']))) {
                $boldynew = false;
            } else {
                $boldynew = true;
            }
        } else {
            $boldynew = false;
        }
        echo "<td style='margin: 0px; font-size: 7pt;' class='" . $row_color . "'>" . ($boldynew ? '<b>' : '') . "<a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&amp;pid=" . $data['thread_lastpostid'] . "#post_" . $data['thread_lastpostid'] . "' title='" . $data['thread_subject'] . "'>" . trimlink(preg_replace('/([^\\s]{20})([^\\s]+)/', '$1 $2 ', $data['thread_subject']), 70) . "</a><br />\n" . $data['forum_name'] . ($boldynew ? '</b>' : '') . "</td>\n";
        echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap; margin: 0px; font-size: 7pt;'>" . alias2($data['thread_lastpost_alias'], trimlink(alias1($data['user_aliases']), 14), $data['thread_lastuser'], trimlink($data['user_name'], 14), $data['user_status']) . "<br />\n" . showdate("%d-%m-%y %H:%M:%S", $data['thread_lastpost']) . "</td>\n";
        echo "</tr>\n";
        $i++;
    }
    echo "</table>\n";
}
closetable();
Пример #6
0
        }
        echo "<tr>\n";
        echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>{$fim}</td>\n";
        echo "<td class='tbl1 forum_name'><!--forum_name--><a href='viewforum.php?forum_id=" . $data['forum_id'] . "'>" . $data['forum_name'] . "</a><br />\n";
        if ($data['forum_description']) {
            echo "<span class='small'>" . nl2br(parseubb($data['forum_description']));
        }
        echo "</td>\n";
        echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $data['forum_threadcount'] . "</td>\n";
        echo "<td align='center' width='1%' class='tbl1' style='white-space:nowrap'>" . $data['forum_postcount'] . "</td>\n";
        echo "<td width='1%' class='tbl2' style='white-space:nowrap'>";
        if ($data['forum_lastpost'] == 0) {
            echo $locale['405'] . "</td>\n</tr>\n";
        } else {
            echo showdate("forumdate", $data['forum_lastpost']) . "<br />\n";
            echo "<span class='small'>" . $locale['406'] . alias2($data['forum_lastpost_alias'], alias1($data['user_aliases']), $data['forum_lastuser'], $data['user_name'], $data['user_status']) . "</span></td>\n";
            echo "</tr>\n";
        }
    }
} else {
    echo "<tr>\n<td colspan='5' class='tbl1'>" . $locale['407'] . "</td>\n</tr>\n";
}
echo "</table><!--sub_forum_idx_table-->\n<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='forum'><br />\n";
echo "<img src='" . get_image("foldernew") . "' alt='" . $locale['560'] . "' style='vertical-align:middle;' /> - " . $locale['409'] . "<br />\n";
echo "<img src='" . get_image("folder") . "' alt='" . $locale['561'] . "' style='vertical-align:middle;' /> - " . $locale['410'] . "\n";
echo "</td><td align='right' valign='bottom' class='forum'>\n";
echo "<form name='searchform' method='get' action='" . BASEDIR . "search.php?stype=forums'>\n";
echo "<input type='hidden' name='stype' value='forums' />\n";
echo "<input type='text' name='stext' class='textbox' style='width:150px' />\n";
echo "<input type='submit' name='search' value='" . $locale['550'] . "' class='button' />\n";
Пример #7
0
opentable($locale['global_056']);
$result = dbquery("SELECT tn.thread_id FROM " . DB_THREAD_NOTIFY . " tn\n\tINNER JOIN " . DB_THREADS . " tt ON tn.thread_id = tt.thread_id\n\tINNER JOIN " . DB_FORUMS . " tf ON tt.forum_id = tf.forum_id\n\tWHERE tn.notify_user=" . $userdata['user_id'] . " AND " . groupaccess('forum_access') . " AND tt.thread_hidden='0'");
$rows = dbrows($result);
if ($rows) {
    $result = dbquery("\n\t\tSELECT tf.forum_access, tn.thread_id, tn.notify_datestamp, tn.notify_user,\n\t\ttt.thread_subject, tt.forum_id, tt.thread_lastpost, tt.thread_lastuser, tt.thread_postcount, tt.thread_lastpost_alias, tt.thread_firstpost_alias,\n\t\ttu.user_id AS user_id1, tu.user_name AS user_name1, tu.user_status AS user_status1, tu.user_aliases AS user_aliases1,\n\t\ttu2.user_id AS user_id2, tu2.user_name AS user_name2, tu2.user_status AS user_status2, tu2.user_aliases AS user_aliases2\n\t\tFROM " . DB_THREAD_NOTIFY . " tn\n\t\tINNER JOIN " . DB_THREADS . " tt ON tn.thread_id = tt.thread_id\n\t\tINNER JOIN " . DB_FORUMS . " tf ON tt.forum_id = tf.forum_id\n\t\tLEFT JOIN " . DB_USERS . " tu ON tt.thread_author = tu.user_id\n\t\tLEFT JOIN " . DB_USERS . " tu2 ON tt.thread_lastuser = tu2.user_id\n\t\tINNER JOIN " . DB_POSTS . " tp ON tt.thread_id = tp.thread_id\n\t\tWHERE tn.notify_user=" . $userdata['user_id'] . " AND " . groupaccess('forum_access') . " AND tt.thread_hidden='0'\n\t\tGROUP BY tn.thread_id\n\t\tORDER BY tn.notify_datestamp DESC\n\t\tLIMIT " . $_GET['rowstart'] . ",10\n\t");
    echo "<table class='tbl-border' cellpadding='0' cellspacing='1' width='100%'>\n<tr>\n";
    echo "<td class='tbl2'><strong>" . $locale['global_044'] . "</strong></td>\n";
    echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_050'] . "</strong></td>\n";
    echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_047'] . "</strong></td>\n";
    echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_046'] . "</strong></td>\n";
    echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_057'] . "</strong></td>\n";
    echo "</tr>\n";
    $i = 0;
    while ($data = dbarray($result)) {
        $row_color = $i % 2 == 0 ? "tbl1" : "tbl2";
        echo "<tr>\n<td class='" . $row_color . "'><a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "'>" . $data['thread_subject'] . "</a></td>\n";
        echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . alias2($data['thread_firstpost_alias'], alias1($data['user_aliases1']), $data['user_id1'], $data['user_name1'], $data['user_status1']) . "</td>\n";
        echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . alias2($data['thread_lastpost_alias'], alias1($data['user_aliases2']), $data['user_id2'], $data['user_name2'], $data['user_status2']) . "<br />" . showdate("forumdate", $data['thread_lastpost']) . "</td>\n";
        echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . ($data['thread_postcount'] - 1) . "</td>\n";
        echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'><a href='" . FUSION_SELF . "?delete=" . $data['thread_id'] . "' onclick=\"return confirm('" . $locale['global_060'] . "');\">" . $locale['global_058'] . "</a></td>\n";
        echo "</tr>\n";
        $i++;
    }
    echo "</table>\n";
    closetable();
    echo "<div align='center' style='margin-top:5px;'>" . makePageNav($_GET['rowstart'], 10, $rows, 3, FUSION_SELF . "?") . "</div>\n";
} else {
    echo "<div style='text-align:center;'>" . $locale['global_059'] . "</div>\n";
    closetable();
}
require_once THEMES . "templates/footer.php";
Пример #8
0
<?php

if (!defined("IN_FUSION")) {
    die("Access Denied");
}
global $userdata;
if (!isset($GLOBALS['user_id'])) {
    $alias_uid = $userdata['user_id'];
} else {
    $alias_uid = $GLOBALS['user_id'];
}
$alias_foo1 = dbarray(dbquery('SELECT user_aliases FROM ' . DB_PREFIX . 'users WHERE user_id = ' . $alias_uid));
$user_data['user_aliases'] = alias1($alias_foo1['user_aliases']);
unset($alias_foo1);
if ($profile_method == "input") {
    echo "<tr>\n";
    echo "<td valign='top' class='tbl'>Vælg 3 aliaser - Det er tilladt at lade standart-værdien stå</td>\n";
    echo "<td class='tbl'>1: <input type='text' name='user_alias0' value='" . (isset($user_data['user_aliases']) ? $user_data['user_aliases'][0] : '') . "' /><br />2: <input type='text' name='user_alias1' value='" . (isset($user_data['user_aliases']) ? $user_data['user_aliases'][1] : '') . "' /><br />3: <input type='text' name='user_alias2' value='" . (isset($user_data['user_aliases']) ? $user_data['user_aliases'][2] : '') . "' /></td>\n";
    echo "</tr>\n";
} elseif ($profile_method == "display") {
    //Empty
} elseif ($profile_method == "validate_insert") {
    //Empty
} elseif ($profile_method == "validate_update") {
    global $user_data;
    if (!isset($_POST['user_alias0'], $_POST['user_alias1'], $_POST['user_alias2'])) {
        $this->_setError("user_aliases", 'Et eller flere af aliaserne er tomme!');
    } elseif (preg_check("/^[-0-9A-Z_@\\sæøåÆØÅ]{3,30}\$/i", $_POST['user_alias0']) && preg_check("/^[-0-9A-Z_@\\sæøåÆØÅ]{3,30}\$/i", $_POST['user_alias1']) && preg_check("/^[-0-9A-Z_@\\sæøåÆØÅ]{3,30}\$/i", $_POST['user_alias2']) && $_POST['user_alias0'] !== $_POST['user_alias1'] && $_POST['user_alias1'] !== $_POST['user_alias2'] && $_POST['user_alias2'] !== $_POST['user_alias0']) {
        $ualias1_result = dbquery('SELECT user_aliases, user_id FROM ' . DB_PREFIX . 'users WHERE user_aliases REGEXP "^.*,(' . $_POST['user_alias0'] . '|' . $_POST['user_alias1'] . '|' . $_POST['user_alias2'] . '),.*$" AND user_id != ' . $alias_uid);
        if (dbrows($ualias1_result) > 0) {
            $this->_setError("user_aliases", 'Et eller flere af aliaserne er optagede!');
Пример #9
0
            }
        }
    }
    if (!$res) {
        redirect("index.php");
    }
} elseif (isset($_GET['type']) && $_GET['type'] == "F" && (isset($_GET['thread']) && isnum($_GET['thread'])) && (isset($_GET['post']) && isnum($_GET['post'])) && (isset($_GET['nr']) && isnum($_GET['nr']))) {
    $result = dbquery("SELECT fp.post_message, fp.post_datestamp, fp.post_edittime, fp.post_author as post_author, fp.post_edituser, fp.post_alias, fp.post_replynum,\n\t\tfu.user_name AS user_name, fu.user_status AS user_status, fu.user_aliases,\n\t\tft.thread_subject, ff.forum_access\n\t\tFROM " . DB_THREADS . " ft\n\t\tINNER JOIN " . DB_POSTS . " fp ON ft.thread_id = fp.thread_id\n\t\tINNER JOIN " . DB_FORUMS . " ff ON ff.forum_id = ft.forum_id\n\t\tINNER JOIN " . DB_USERS . " fu ON fu.user_id = fp.post_author\n\t\tWHERE ft.thread_id=" . $_GET['thread'] . " AND fp.post_id = " . $_GET['post']);
    $res = false;
    if (dbrows($result)) {
        $data = dbarray($result);
        if (checkgroup($data['forum_access'])) {
            $res = true;
            echo $locale['500'] . " <strong>" . $settings['sitename'] . " :: " . $data['thread_subject'] . "</strong><hr /><br />\n";
            echo "<div style='margin-left:20px'>\n";
            echo "<div style='float:left'>" . $locale['501'] . alias2($data['post_alias'], alias1($data['user_aliases']), $data['post_author'], $data['user_name'], $data['user_status']) . $locale['502'] . showdate("forumdate", $data['post_datestamp']) . "</div><div style='float:right'>#" . $data['post_replynum'] . "</div><div style='float:none;clear:both'></div><hr />\n";
            echo nl2br(parseubb(parsesmileys($data['post_message'])));
            if ($data['edit_name'] != "") {
                echo "<div style='margin-left:20px'>\n<hr />\n";
                echo $locale['503'] . ($data['post_edituser'] == $data['post_author'] ? 'indlæggets forfatter' : 'en moderator') . $locale['502'] . showdate("forumdate", $data['post_edittime']);
                echo "</div>\n";
            }
            echo "</div>\n";
            echo "<br />\n";
        }
    }
    if (!$res) {
        redirect("index.php");
    }
} elseif (isset($_GET['type']) && $_GET['type'] == "T" && $settings['enable_terms'] == 1) {
    echo "<strong>" . $settings['sitename'] . " " . $locale['600'] . "</strong><br />\n";
Пример #10
0
                $ctr2++;
            }
            $threadsubject .= "<br />(" . $locale['455'] . trim($pages) . ")";
        }
        echo "<td width='100%' class='tbl1'>";
        if (iMOD) {
            echo "<input type='checkbox' name='check_mark[]' value='" . $tdata['thread_id'] . "' />\n";
        }
        if ($tdata['thread_sticky'] == 1) {
            echo "<img src='" . get_image("stickythread") . "' alt='" . $locale['474'] . "' style='vertical-align:middle;' />\n";
        }
        echo $threadsubject . "</td>\n";
        echo "<td width='1%' class='tbl2' style='white-space:nowrap'>" . alias2($tdata['thread_firstpost_alias'], alias1($tdata['aliases_author']), $tdata['thread_author'], $tdata['user_author'], $tdata['status_author']) . "</td>\n";
        echo "<td align='center' width='1%' class='tbl1' style='white-space:nowrap'>" . ($tdata['thread_postcount'] - 1) . "</td>\n";
        echo "<td width='1%' class='tbl2' style='white-space:nowrap'>" . showdate("forumdate", $tdata['thread_lastpost']) . "<br />\n";
        echo "<span class='small'>" . $locale['406'] . alias2($tdata['thread_lastpost_alias'], alias1($tdata['aliases_lastuser']), $tdata['thread_lastuser'], $tdata['user_lastuser'], $tdata['status_lastuser']) . "</span></td>\n";
        echo "</tr>\n";
    }
    echo "</table><!--sub_forum_table-->\n";
} else {
    if (!$rows) {
        echo "<tr>\n<td colspan='6' class='tbl1' style='text-align:center'>" . $locale['456'] . "</td>\n</tr>\n</table><!--sub_forum_table-->\n";
    } else {
        echo "</table><!--sub_forum_table-->\n";
    }
}
if (iMOD) {
    if ($rows) {
        echo "<table cellspacing='0' cellpadding='0' width='100%'>\n<tr>\n<td style='padding-top:5px'>";
        echo "<a href='#' onclick=\"javascript:setChecked('mod_form','check_mark[]',1);return false;\">" . $locale['460'] . "</a> ::\n";
        echo "<a href='#' onclick=\"javascript:setChecked('mod_form','check_mark[]',0);return false;\">" . $locale['461'] . "</a></td>\n";