Exemplo n.º 1
0
            $demo = DT_ROOT . '/' . $MOD['moduledir'] . '/' . listurl($CAT, '{DEMO}');
            $fid = $page;
            if ($fid >= 1 && $fid <= $totalpage && $DT_TIME - @filemtime(str_replace('{DEMO}', $fid, $demo)) > $task_list) {
                tohtml('list', $module);
            }
            $fid = $page + 1;
            if ($fid >= 1 && $fid <= $totalpage && $DT_TIME - @filemtime(str_replace('{DEMO}', $fid, $demo)) > $task_list) {
                tohtml('list', $module);
            }
            $fid = $totalpage + 1 - $page;
            if ($fid >= 1 && $fid <= $totalpage && $DT_TIME - @filemtime(str_replace('{DEMO}', $fid, $demo)) > $task_list) {
                tohtml('list', $module);
            }
        }
    } else {
        if ($html == 'index') {
            if ($DT['cache_hits']) {
                $file = DT_CACHE . '/hits-' . $moduleid;
                if ($DT_TIME - @filemtime($file . '.dat') > $DT['cache_hits'] || @filesize($file . '.php') > 102400) {
                    update_hits($moduleid, $table);
                }
            }
            if ($MOD['index_html']) {
                $file = DT_ROOT . '/' . $MOD['moduledir'] . '/' . $DT['index'] . '.' . $DT['file_ext'];
                if ($DT_TIME - @filemtime($file) > $task_index) {
                    tohtml('index', $module);
                }
            }
        }
    }
}
Exemplo n.º 2
0
            setcookie("down_{$rsdb['aid']}", mymd5("{$ti}\t{$rsdb['aid']}"), $timestamp + 3600);
        }
    }
} elseif (!$web_admin && $lfjuid !== $rsdb[uid] && $rsdb[money] > 0) {
    if ($Aid != $rsdb[aid] || $TI != $ti) {
        if (get_money($lfjuid) < $rsdb[money]) {
            showerr("你的{$webdb[MoneyName]}不足{$rsdb[money]}{$webdb[MoneyDW]}", 1);
        } else {
            add_user($lfjuid, -$rsdb[money], '观看视频扣分');
            //1小时内不重复扣积分
            setcookie("down_{$rsdb['aid']}", mymd5("{$ti}\t{$rsdb['aid']}"), $timestamp + 3600);
        }
    }
}
//更新点击量
update_hits($mid, $midDB[keywords], $id, $rid, $rsdb[hits_time]);
$true_url = tempdir($url);
require_once html("player");
//下载与播放视频更新点击率
function update_hits($mid, $keyword, $aid, $rid, $time)
{
    global $lfjid, $db, $pre, $timestamp;
    if ($keyword == 'download' || $keyword == 'mv') {
        if (date("W", $time) != date("W", $timestamp)) {
            $SQL .= ",week_hits=1";
        } else {
            $SQL .= ",week_hits=week_hits+1";
        }
        if (date("md", $time) != date("md", $timestamp)) {
            $SQL .= ",day_hits=1";
        } else {