Ejemplo n.º 1
0
Archivo: stats.php Proyecto: philum/cms
function light_live()
{
    $db = plugin_func('install', 'install_db', ses('qd'));
    if (!$db['live']) {
        return 'er';
    }
    $sql = str_replace('_live', '_live2', $db['live']);
    mysql_query($sql);
    $tim = calc_date(30);
    $day = date('Y-m-d H:i:s', $tim);
    $lastid = sql('id', 'qdv', 'v', 'time>"' . $day . '" order by id limit 1');
    if (is_numeric($lastid)) {
        msquery('insert into ' . ses('qdv2') . ' select * from ' . ses('qdv') . ' where id<' . $lastid);
        msquery('delete from ' . ses('qdv') . ' where id<"' . $lastid . '"');
        reflush('qdv');
    }
    return ses('qdv') . ' was cleaned from id ' . $lastid;
}
Ejemplo n.º 2
0
Archivo: lib.php Proyecto: philum/cms
function delete($bs, $id, $o = '')
{
    msquery('delete from ' . $_SESSION[$bs] . ' where id="' . $id . '" limit 1');
    if ($o) {
        reflush($bs, 1);
    }
}