コード例 #1
0
ファイル: banned.php プロジェクト: BGmot/kitchen
<h3>Banned users</h3>
<table border="1">
<tr>
<th>Username</th>
<th>Reason</th>
<th>Moderator</th>
<th>Ban ends</th>
</tr>
<?php 
while ($row = mysql_fetch_assoc($result)) {
    $username = htmlentities($row['username'], HTML_ENTITIES, 'UTF-8');
    $translit_done = false;
    $reason = translit($row['ban_reason'], $translit_done);
    $reason = htmlentities($reason, HTML_ENTITIES, 'UTF-8');
    $reason = before_bbcode($reason);
    $reason = do_bbcode($reason);
    $reason = nl2br($reason);
    $reason = after_bbcode($reason);
    $banned_by = htmlentities($row['banned_by'], HTML_ENTITIES, 'UTF-8');
    $ban_ends = $row['ban_end'];
    print '<tr><td>' . $username . '</td><td>' . $reason . '</td><td>' . $banned_by . '</td><td>' . $ban_ends . '</td></tr>';
}
?>
</table>
</BODY>
</HTML>
<?php 
require 'tail_inc.php';
?>

コード例 #2
0
ファイル: bbcode.php プロジェクト: BGmot/kitchen
/**
 * Renderers
 */
function render_for_display($msgbody)
{
    $msgbody = htmlentities($msgbody, HTML_ENTITIES, 'UTF-8');
    $msgbody = before_bbcode($msgbody);
    $msgbody = do_bbcode($msgbody);
    $msgbody = nl2br($msgbody);
    $msgbody = after_bbcode($msgbody);
    return $msgbody;
}
コード例 #3
0
ファイル: testbb.php プロジェクト: BGmot/kitchen
    die("Specify message ID");
}
// 1 retrieve and print as is
$query = 'SELECT * from confa_posts where id = ' . $msg_id;
// $query = "alter table confa_users add last_pm_check_time timestamp default '0000-00-00 00:00:00'";
// $query = "update confa_users set last_pm_check_time = CURRENT_TIMEstamp";
$result = mysql_query($query);
if (!$result) {
    mysql_log(__FILE__, 'Query page count failed: ' . mysql_error() . ' QUERY: ' . $query);
    die('Query failed.' . mysql_error() . ' QUERY: ' . $query);
}
while ($row = mysql_fetch_assoc($result)) {
    $body = $row['body'];
    print "Original:<br/>" . $body;
    $body = before_bbcode($body);
    print "<br/><b>before_bbcode:</b><br/>" . $body;
    $body = do_bbcode($body);
    print "<br/><b>do_bbcode:</b><br/>" . $body;
    $body = nl2br($body);
    print "<br/><b>nl2br:</b><br/>" . $body;
    $body = after_bbcode($body);
    print "<br/><b>after_bbcode:</b><br/>" . $body;
    // bbcode, print
    // after bbcode, print
}
print "<br/>The end";
require_once 'tail_inc.php';
?>


コード例 #4
0
ファイル: m_post.php プロジェクト: BGmot/kitchen
<?php 
    } else {
        if (!is_null($preview)) {
            $author = $user;
            $subject = $subj;
            $created = $time = strftime('%Y-%m-%d %H:%M:%S');
            $translit_done = false;
            $msgbody = translit($new_body, $translit_done);
            if (!is_null($msgbody) && strlen($msgbody) > 0 && !is_null($prefix) && strlen($prefix) > 0) {
                $msgbody = $prefix . ' ' . str_replace("\n", "\n" . $prefix . ' ', $msgbody);
            }
            $msgbody = htmlentities($msgbody, HTML_ENTITIES, 'UTF-8');
            $msgbody = before_bbcode($msgbody);
            $msgbody = do_bbcode($msgbody);
            $msgbody = nl2br($msgbody);
            $msgbody = after_bbcode($msgbody);
            $trans_body = $msgbody;
            if ($translit_done === true) {
                $trans_body .= '<BR><BR>[Message was transliterated]';
            }
        }
    }
} else {
    // validation error
    print $err;
    http_response_code(400);
}
require_once 'tail_inc.php';
?>

コード例 #5
0
ファイル: m_get_mess.php プロジェクト: BGmot/kitchen
        if ($row2['status'] == 3) {
            print '<font color="red">Censor (Мат)</font>';
        } elseif ($row2['status'] == 4) {
            print '<font color="red">Censor (Хамство)</font>';
        } elseif ($row2['status'] == 5) {
            print '<font color="red">Censor (Наезд)</font>';
        } elseif ($row2['status'] == 2) {
            print '<font color="red">Delete message</font>';
        } else {
            $translit_done = false;
            $s_mess = trim($row2['body']);
            $s_mess = str_replace($n_ff, "", $s_mess);
            $s_mess = translit($s_mess, $translit_done);
            if (!is_null($s_mess) && strlen($s_mess) > 0 && !is_null($prefix) && strlen($prefix) > 0) {
                $s_mess = $prefix . ' ' . str_replace("\n", "\n" . $prefix . ' ', $s_mess);
            }
            $s_mess = htmlentities($s_mess, HTML_ENTITIES, 'UTF-8');
            $s_mess = before_bbcode($s_mess);
            $s_mess = do_bbcode($s_mess);
            $s_mess = nl2br($s_mess);
            $s_mess = after_bbcode($s_mess);
            echo trim($s_mess);
        }
    }
    $query = 'UPDATE confa_posts SET views=views + 1 where id=' . $mess_id;
    $result = mysql_query($query);
}
require_once 'tail_inc.php';
?>