Example #1
0
    $text = preg_replace("/\\[url\\=(.*?)](.*?)\\[\\/url]/is", "<a href='\$1' title='\$2' target='_blank' class='msg_link'>\$2</a>", $text);
    return $text;
}
$ann_table = "i_ann";
$checkMsg = implode(mysql_fetch_assoc(mysql_query("SELECT COUNT(id) FROM {$ann_table}")));
if ($checkMsg == 1) {
    $msg_perm = 'Admin';
    $new_result = mysql_query("SELECT * FROM {$ann_table} WHERE msg_perm='{$msg_perm}'") or die(mysql_error());
    $new_row = mysql_fetch_array($new_result);
    $msg = $new_row['msg'];
    $msg_type = $new_row['msg_type'];
    $msg_onoff = $new_row['msg_onoff'];
    $msg_date = $new_row['msg_date'];
    if ($msg_onoff == 'enable') {
        echo '<div class="make_ann ' . $msg_type . '">';
        echo linkit($msg);
        echo ' <span class="msg_date">' . date('d.m | g:i A', $msg_date) . '</span>';
        echo '</div>';
    }
}
echo '<table class="table table-borderz shoutbox-striped table-override" id="shoutbox-table"><colgroup><col class="span2"><col class="span6"></colgroup>';
echo '<thead><tr><th class="chatter-box"><span class="ranking-title">CHATBOX <i class="icon-chevron-right"></i></span></th><th>';
echo '</th></tr></thead><tbody>';
while ($shout = mysql_fetch_assoc($result)) {
    $data_date = time() - 60 * 60 * 24 * 7;
    // 7 days ago
    $check_data = mysql_query("SELECT * FROM i_shouts_sr WHERE `datetime` < {$data_date}") or die(mysql_error());
    if (mysql_num_rows($check_data) > 0) {
        mysql_query("DELETE FROM i_shouts_sr WHERE `datetime` < {$data_date}");
    }
    $nick = $shout['username'];
Example #2
0
        $id = (int) $_GET['context'];
        if ($max_id - $id < 0) {
            $id = $max_id;
        }
        $results = irc_last_n_rows($id, $nr);
    } else {
        $id = $max_id;
        $results = irc_last_n_rows($max_id, $nr);
    }
    $rcount = count($results);
    $title = "Browse IRC Logs by time";
    if ($rcount > 0) {
        $first_id = $results[0]["id"];
        $last_id = $results[count($results) - 1]["id"];
        $next_id = $last_id + $nr - 1;
        $ircNav = linkit("&laquo; Older", "?context={$first_id}", $first_id > 0) . " | " . linkit("Current", "/irc/", $id != $max_id) . " | " . linkit("Newer &raquo;", "?context={$next_id}", $last_id < $max_id);
    }
}
if ($rcount > 0) {
    displayResultSet($results, $ircNav, $title);
} else {
    displayEmptyResultSet();
}
site_sidebar();
?>

<div class="ircsearchbox">
    <form class="clearfix" action="/irc/" method="get">
        <label class="ircsearchlabel">IRC:</label>
        <input type="search" id="ircsearch" name="search" value="<?php 
echo $search_term;