Пример #1
0
     $rs_rules->get('multi_from') == 1 ? $rules[$thisRulesID]['multi']['from'] = 1 : ($rules[$thisRulesID]['multi']['from'] = 2);
     $rs_rules->get('multi_intro') == 2 ? $rules[$thisRulesID]['multi']['intro'] = 1 : ($rules[$thisRulesID]['multi']['intro'] = 2);
     $rs_rules->get('enter_title') == 0 ? $rules[$thisRulesID]['format']['title'] = 1 : ($rules[$thisRulesID]['format']['title'] = 2);
     $rs_rules->get('enter_body') == 0 ? $rules[$thisRulesID]['format']['body'] = 1 : ($rules[$thisRulesID]['format']['body'] = 2);
     $rs_rules->get('enter_body_page') == 0 ? $rules[$thisRulesID]['format']['body_page'] = 1 : ($rules[$thisRulesID]['format']['body_page'] = 2);
     $rs_rules->get('enter_body_page_link') == 0 ? $rules[$thisRulesID]['format']['body_page_link'] = 1 : ($rules[$thisRulesID]['format']['body_page_link'] = 2);
     $rs_rules->get('enter_author') == 0 ? $rules[$thisRulesID]['format']['author'] = 1 : ($rules[$thisRulesID]['format']['author'] = 2);
     $rs_rules->get('enter_from') == 0 ? $rules[$thisRulesID]['format']['from'] = 1 : ($rules[$thisRulesID]['format']['from'] = 2);
     $rs_rules->get('enter_intro') == 0 ? $rules[$thisRulesID]['format']['intro'] = 1 : ($rules[$thisRulesID]['format']['intro'] = 2);
     $rules[$thisRulesID]['bodyPageType'] = $rs_rules->get('body_page_type');
     $rules[$thisRulesID]['method'] = 'GET';
     $rules[$thisRulesID]['param']['cookie'] = $rs_rules->get('cookies');
 }
 $NC = new NEAT_COLLECTOR();
 $NIA = new NEAT_IMPORT_ARTICLE($NC);
 $articleData = $NIA->getArticle($rs->get('url'), $rules[$thisRulesID]['tag'], $rules[$thisRulesID]['area'], $rules[$thisRulesID]['multi'], $rules[$thisRulesID]['format'], $rules[$thisRulesID]['method'], $rules[$thisRulesID]['param'], $rules[$thisRulesID]['bodyPageType'], $rs_rules->get('referer'), $rs_rules->get('useragent'), $rs_rules->get('replaceRNT'));
 if (!$articleData) {
     $badLinkID[] = $rs->get('id');
     continue;
 } else {
     $importTitle =& $articleData['title'];
     $importBody =& $articleData['body'];
     $importAuthor =& $articleData['author'];
     $importFrom =& $articleData['from'];
     $importIntro =& $articleData['intro'];
     $importDate = strtotime(date('Y-m-d H:i:s'));
     //					if ((trim ($importTitle) AND trim ($importBody)))
     //@todo
     if (trim($importTitle)) {
         $NBS = new NEATBulidSql(TB_DATA);
         $dataFids['id'] = '';
Пример #2
0
        $rs->get('multi_intro') == 2 ? $areaMulti['intro'] = 1 : ($areaMulti['intro'] = 2);
        $rs->get('enter_title') == 0 ? $areaFormat['title'] = 1 : ($areaFormat['title'] = 2);
        $rs->get('enter_body') == 0 ? $areaFormat['body'] = 1 : ($areaFormat['body'] = 2);
        $rs->get('enter_body_page') == 0 ? $areaFormat['body_page'] = 1 : ($areaFormat['body_page'] = 2);
        $rs->get('enter_body_page_link') == 0 ? $areaFormat['body_page_link'] = 1 : ($areaFormat['body_page_link'] = 2);
        $rs->get('enter_author') == 0 ? $areaFormat['author'] = 1 : ($areaFormat['author'] = 2);
        $rs->get('enter_from') == 0 ? $areaFormat['from'] = 1 : ($areaFormat['from'] = 2);
        $rs->get('enter_intro') == 0 ? $areaFormat['intro'] = 1 : ($areaFormat['intro'] = 2);
        $bodyPageType = $rs->get('body_page_type');
        $method = 'GET';
        $param['cookie'] = $rs->get('cookies');
        //
        $referer = $rs->get('referer');
        $useragent = $rs->get('useragent');
        $replaceRNT = $rs->get('replaceRNT');
        $NC = new NEAT_COLLECTOR();
        $NIA = new NEAT_IMPORT_ARTICLE($NC);
        $articleData = $NIA->getArticle($fullURL, $tag, $area, $areaMulti, $areaFormat, $method, $param, $bodyPageType, $referer, $useragent, $replaceRNT);
        $tp->set_templatefile('templates/import_view.html');
        $tp->assign('title', deletehtml($articleData['title']));
        $tp->assign('date', date('Y年m月d日'));
        $tp->assign('body', $articleData['body']);
        $tp->assign('author', $articleData['author']);
        $tp->assign('from', $articleData['from']);
        $tp->assign('intro', $articleData['intro']);
        $tp->assign('url', $shortURL);
        $tp->assign('fullURL', $fullURL);
        $moduleTemplate = $tp->result();
        $moduleTitle = $articleData['title'];
    }
}