<?php
class ld_co_manage extends controllerBase
{
function __construct(){
		parent::__construct();
		
	}
	function index(){			
	$this->co_note = syDB("co_note")->findAll();     
    	$this->display("co_main.htm");   		
	}
	
	//设置采集的类型
	function set_note_type(){
		
		$this->display("co_add_set_step.htm");
	}	
	
	
	function add_co_article_note(){
		$channelid = $_POST['channelid'];
		$this->channelid = $channelid;
	if($_REQUEST['d']=="add"){
		
		$co_note = array();
		$co_note['channelid'] = $_POST['channelid'];
		$co_note['notename']= $_POST['notename'];
		$co_note['sourcelang'] = $_POST['sourcelang'];
		$co_note['uptime'] = time();
		$co_note['cotime'] = '0';
		$co_note['isok'] = '0';
		$co_note['usermore'] = '0';
		$co_note['listconfig'] = '0';
		syDB("co_note")->create($co_note);
		$this->display("co_add_step2.htm");
		
		/*
        require_once 'collection_config.php';
		$collection_config = new collection_config();
		$collection_config->sourcetype = $_POST['sourcetype'];					
		$collection_config->addurls = $_POST['addurls'];
		$collection_config->addv = $_POST['addv'];
		$collection_config->areaend = $_POST['areaend'];
		$collection_config->areastart = $_POST['areastart'];
		$collection_config->cosort = $_POST['cosort'];
		$collection_config->endid = $_POST['endid'];
		$collection_config->exptime = $_POST['exptime'];
		$collection_config->isref = $_POST['isref'];
		$collection_config->listpic = $_POST['listpic'];
		$collection_config->macthtype = $_POST['macthtype'];
		$collection_config->musthas = $_POST['musthas'];		
		$collection_config->nothas = $_POST['nothas'];
		$collection_config->refurl = $_POST['refurl'];
		$collection_config->regxurl = $_POST['regxurl'];
		$collection_config->startid = $_POST['startid'];
		$collection_config->usemore = $_POST['usemore'];
		*/	
			
	}else{	
		$this->display("co_add_step1.htm");
	}
	
	}
}