Beispiel #1
0
function lib_GetMyTagT(&$refObj, $typeid, $tagname, $tablename)
{
    global $dsql;
    if ($tagname == '') {
        return '';
    }
    if (trim($typeid) == '') {
        $typeid = 0;
    }
    if (!empty($refObj->Fields['typeid']) && $typeid == 0) {
        $typeid = $refObj->Fields['typeid'];
    }
    $typesql = $row = '';
    if ($typeid > 0) {
        $typesql = " And typeid in(0," . GetTopids($typeid) . ") ";
    }
    $row = $dsql->GetOne(" Select * From {$tablename} where tagname like '{$tagname}' {$typesql} order by typeid desc ");
    if (!is_array($row)) {
        return '';
    }
    $nowtime = time();
    if ($row['timeset'] == 1 && ($nowtime < $row['starttime'] || $nowtime > $row['endtime'])) {
        $body = $row['expbody'];
    } else {
        $body = $row['normbody'];
    }
    return $body;
}
Beispiel #2
0
function lib_GetMyTagT(&$refObj, $typeid, $tagname, $tablename)
{
    global $dsql;
    if ($tagname == '') {
        return '';
    }
    if (trim($typeid) == '') {
        $typeid = 0;
    }
    if (!empty($refObj->Fields['typeid']) && $typeid == 0) {
        $typeid = $refObj->Fields['typeid'];
    }
    $typesql = $row = '';
    if ($typeid > 0) {
        $typesql = " And typeid IN(0," . GetTopids($typeid) . ") ";
    }
    $row = $dsql->GetOne(" SELECT * FROM {$tablename} WHERE tagname LIKE '{$tagname}' {$typesql} ORDER BY typeid DESC ");
    if (!is_array($row)) {
        return '';
    }
    $nowtime = time();
    if ($row['timeset'] == 1 && ($nowtime < $row['starttime'] || $nowtime > $row['endtime'])) {
        $body = $row['expbody'];
    } else {
        $body = $row['normbody'];
    }
    return $body;
}
Beispiel #3
0
    } else {
        $jumpurl = GetNextUrl();
        ShowMsg("完成主页更新! 现在跳转到其它更新任务...", $jumpurl, 0, 500);
        exit;
    }
} else {
    if ($dopost == 'makeparenttype') {
        require_once DEDEDATA . "/cache/inc_catalog_base.inc";
        require_once DEDEINC . '/arc.listview.class.php';
        $notallowArr = array('dopost', 'f', 'del', 'curpage', 'morejob');
        $jumpurl = GetNextUrl($notallowArr);
        if (empty($typeid)) {
            ShowMsg("<b>完成栏目更新任务!完成所有更新任务!</b>", "close::tgtable");
            exit;
        }
        $topids = explode(',', GetTopids($typeid));
        if (empty($curpage)) {
            $curpage = 0;
        }
        $tid = $topids[$curpage];
        if (isset($cfg_Cs[$tid]) && $cfg_Cs[$tid][1] > 0) {
            require_once DEDEINC . "/arc.listview.class.php";
            $lv = new ListView($tid);
            $lv->MakeHtml();
            $lv->Close();
        } else {
            require_once DEDEINC . "/arc.sglistview.class.php";
            $lv = new SgListView($tid);
            $lv->MakeHtml();
            $lv->Close();
        }