function AllInflowProject()
{
    global $db;
    $keyword = be("get", "keyword");
    //	$from= be("get","playfrom");
    //	$project = be("get","cj_vod_projects");
    $where = " status=1 ";
    if (!isN($keyword)) {
        $keyword = trim($keyword);
        $where .= " AND (package_name like '%" . $keyword . "%' or  app_name like '%" . $keyword . "%') ";
    }
    $status = be("all", "status");
    if (!isNum($status)) {
        $status = 0;
    } else {
        $status = intval($status);
    }
    if ($status != 0) {
        $where .= " and status=" . $status;
    }
    $state = be("all", "state");
    if (!isNum($state)) {
        $state = 0;
    } else {
        $state = intval($state);
    }
    if ($state != 0) {
        $where .= " and state=" . $state;
    }
    //var_dump($where);
    $count = $db->getOne("Select count(id) as cc from apk_master_temp where " . $where);
    $sql = "select * from apk_master_temp where " . $where;
    MovieInflow($sql, $count);
}
示例#2
0
function noInflow()
{
    global $db;
    $count = $db->getOne("Select count(m_id) as cc from {pre}cj_art where m_zt=0 and m_typeid>0");
    $sql = "select * from {pre}cj_art where m_zt=0 and m_typeid>0";
    MovieInflow($sql, $count);
}
function collect($crontab)
{
    writetofile("crawler_collect.sql", 'collect start.');
    global $db;
    $time = date("Y-m-d");
    $count = $db->getOne("SELECT count(*) FROM mac_cj_zhuiju  where status=0 and crontab_desc like'%" . $crontab . "%'  ");
    $sql = "select a.* from {pre}cj_vod as a , mac_cj_zhuiju as b where a.m_id= b.m_id and b.crontab_desc like'%" . $crontab . "%' and a.m_typeid>0 and a.m_name IS NOT NULL AND a.m_addtime like'%" . $time . "%' and a.m_name != '' and a.m_playfrom not in ('tudou','kankan','cntv','wasu')";
    MovieInflow($sql, $count, true);
    writetofile("crawler_collect.sql", 'collect stop.');
}
示例#4
0
function noInflowProject()
{
    global $db;
    $keyword = be("get", "keyword");
    $from = be("get", "playfrom");
    $project = be("get", "cj_vod_projects");
    $where = "  and m_playfrom not in ('tudou','kankan','cntv','wasu')  ";
    if ($keyword != "") {
        $where = $where . " and m_name like '%" . $keyword . "%' ";
    }
    if ($project != "") {
        $where = $where . " and m_pid = " . $project;
    }
    if ($from != "") {
        $where = $where . " and m_playfrom ='" . $from . "' ";
    }
    $count = $db->getOne("Select count(m_id) as cc from {pre}cj_vod where m_zt=0 and m_typeid>0 and m_name IS NOT NULL AND m_name != ''   " . $where);
    $sql = "select * from {pre}cj_vod where m_zt=0 and m_typeid>0  and m_name IS NOT NULL AND m_name != ''  " . $where;
    //var_dump($count); var_dump($sql);
    MovieInflow($sql, $count, false);
}