Example #1
0
            $txt .= '<a href=\'./userdetails.php?id=' . $id . '\'><font color=\'#' . get_user_class_color($username[1]) . '\'><b>' . $username[0] . '</b></font></a>' . ($c - 1 == $i ? '' : ',') . "\n";
            $i++;
        }
        $txt .= '</span></td></tr>';
        $txt .= '
		  <tr class=\'table\'>
      <td class=\'text\'><span>' . $lang['index_most24'] . ' ' . $_last24record['num'] . ' ' . $lang['index_member24'] . ' : ' . get_date($_last24record['date'], 'DATE') . ' </span></td>
      </tr></table></div><br />';
    }
    return $txt;
}
last24hours();
$HTMLOUT .= las24hours_display();
//== End last24 by putyn
//== Poll
$HTMLOUT .= parse_poll();
//== 09 Cached Donation progress - MelvinMeow
$cache_funds = "./cache/funds.txt";
$cache_funds_life = 1 * 60 * 60;
// Hourly
if (file_exists($cache_funds) && is_array(unserialize(file_get_contents($cache_funds))) && time() - filemtime($cache_funds) < $cache_funds_life) {
    $row = unserialize(@file_get_contents($cache_funds));
} else {
    $funds = sql_query("SELECT sum(cash) as total_funds FROM funds") or sqlerr(__FILE__, __LINE__);
    $row = mysql_fetch_assoc($funds);
    $handle = fopen($cache_funds, "w+");
    fwrite($handle, serialize($row));
    fclose($handle);
}
$funds_so_far = $row["total_funds"];
$totalneeded = 100;
Example #2
0
<?php

/**
|--------------------------------------------------------------------------|
|   https://github.com/Bigjoos/                                |
|--------------------------------------------------------------------------|
|   Licence Info: GPL                                  |
|--------------------------------------------------------------------------|
|   Copyright (C) 2010 U-232 V5                            |
|--------------------------------------------------------------------------|
|   A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.   |
|--------------------------------------------------------------------------|
|   Project Leaders: Mindless, Autotron, whocares, Swizzles.           |
|--------------------------------------------------------------------------|
 _   _   _   _   _     _   _   _   _   _   _     _   _   _   _
/ \ / \ / \ / \ / \   / \ / \ / \ / \ / \ / \   / \ / \ / \ / \
( U | - | 2 | 3 | 2 )-( S | o | u | r | c | e )-( C | o | d | e )
\_/ \_/ \_/ \_/ \_/   \_/ \_/ \_/ \_/ \_/ \_/   \_/ \_/ \_/ \_/
*/
//==Poll
$adminbutton = '';
if ($CURUSER['class'] >= UC_STAFF) {
    $adminbutton = "<a class='btn btn-primary btn-sm navbar-btn' style='margin-top:-2px;' href='staffpanel.php?tool=polls_manager'>{$lang['index_poll_title']}</a>";
}
$HTMLOUT .= "<div class='panel panel-default'>\n    <div class='panel-heading'>\n        <label for='checkbox_4' class='text-left'>Site Poll</label>";
if ($CURUSER['class'] >= UC_STAFF) {
    $HTMLOUT .= "<span class='nav navbar-nav navbar-right'>{$adminbutton}</span>";
}
$HTMLOUT .= "</div>\n        <div class='panel-body'>" . parse_poll() . "</div></div>";
// End Class
// End File