예제 #1
0
 function name($id) {
 	$name = '';
 	$attr1 = settings::getInstance()->getrow(array('tag'=>'table-archive'));
 	if ($attr1['value'])
         self::$var = @unserialize($attr1['value']);
     else
         self::$var = array();
     preg_match_all('/\(([\d\w]+)\)(\S+)/is',self::$var['attr1'],$result,PREG_SET_ORDER);
     $id_arr = explode(',',$id);
     foreach($result as $v){
    	    foreach($id_arr as $t_v){
    	    	if(in_array($t_v,$v))
    	    	   $name .= $v[2].' / ';
    	    }
     }
     return $name;
 }
예제 #2
0
 function list_action() {
 	chkpw('union_list');
     $set1=settings::getInstance();
     $sets1=$set1->getrow(array('tag'=>'table-'.$this->table));
     $setsdata1=unserialize($sets1['value']);
     $this->view->settings=$setsdata1;
     $where=null;
     $ordre='`userid` DESC';
     $limit=((front::get('page') -1) * $this->_pagesize).','.$this->_pagesize;
     $this->_view_table=$this->_table->getrows($where,$limit,$ordre,$this->_table->getcols('manage'));
     $this->view->record_count=$this->_table->record_count;
     $this->_view_user = new user;
     foreach($this->_view_table as $key=>$val) {
         $userunion = $this->_view_user->getrow(array('userid'=>$val['userid']));
         $val['point'] = $userunion['point'];
         $this->_view_table[$key] = $val;
     }
 }
예제 #3
0
 static function getTags() {
 	$data=array();
 	$data[0] = '请选择';
 	$otag = new tag();
 	$row = $otag->getrows('',0,'tagid ASC');
 	if(is_array($row)){
 		foreach ($row as $arr){
 			$data[$arr['tagname']] = $arr['tagname'];
 		}
 	}
 	//return $data;
 	$sets=settings::getInstance()->getrow(array('tag'=>'table-hottag'));
 	if (!is_array($sets)){
 		return $data;
 	}
 	$data1=unserialize($sets['value']);
 	preg_match_all('%\(([\d\w\/\.-]+)\)(\S+)%m',$data1['hottag'],$result,PREG_SET_ORDER);
 	foreach ($result as $res)
 		$data[$res[2]]=$res[2];
 	
 	return $data;
 }
예제 #4
0
 function gettypes() {
     $sets=settings::getInstance()->getrow(array('tag'=>'table-friendlink'));
     if (!is_array($sets))
         return;
     $data=unserialize($sets['value']);
     preg_match_all('%\(([\d\w\/\.-]+)\)(\S+)%m',$data['types'],$result,PREG_SET_ORDER);
     $data=array();
     foreach ($result as $res) $data[$res[1]]=$res[2];
     return $data;
 }
예제 #5
0
 function setting_action() {
     $this->_view_table=false;
     $set=settings::getInstance();
     $sets=$set->getrow(array('tag'=>'table-'.$this->table));
     $data=unserialize($sets['value']);
     if (front::post('submit')) {
         $var=front::$post;
         unset($var['submit']);
         $set->rec_replace(array('value'=>serialize($var),'tag'=>'table-'.$this->table,'array'=>var_export($var,true)));
         front::flash("{$this->tname}配置成功!");
     }
     $this->view->settings=$data;
 }
예제 #6
0
    function esearch_action() {
    	front::check_type(front::get('keyword'), 'safe');
    	$this->view->keyword = trim(front::get('keyword'));
    	if($this->view->keyword){
	    	$path = ROOT . '/data/hotsearch/' . urlencode($this->view->keyword) . '.txt';
	    	$mtime = @filemtime($path);
	    	$time = intval(config::get('search_time'))?intval(config::get('search_time')):30;
	        if(time() - $mtime < $time && !front::get('page')){
	        	alertinfo($time.'秒内不能重复搜索','index.php?t='.front::get('t'));
	        }
	    	$keywordcount = @file_get_contents($path);
	    	$keywordcount = $keywordcount + 1;
	    	file_put_contents($path, $keywordcount);
	    	$type = $this->view->category;
	    	$condition = "";
	    	if (front::get('catid')) {
	    		$condition .= "catid = '" . front::get('catid') . "' AND ";
	    	}
	    	$condition .= "(title like '%" . $this->view->keyword . "%'";
	    	$sets = settings::getInstance()->getrow(array('tag' => 'table-fieldset'));
	    	$arr = unserialize($sets['value']);
	    	if (is_array($arr['archive']) && !empty($arr['archive'])) {
	    		foreach ($arr['archive'] as $v) {
	    			if ($v['issearch'] == '1' && front::get($v['name'])) {
	    				if($v['selecttype']){
	    					$condition .= " AND {$v['name']} = '".front::get($v['name'])."'";
	    				}else{
	    					$condition .= " AND {$v['name']} like '%".front::get($v['name'])."%'";
	    				}
	    			}
	    		}
	    	}
	    	$condition .= ")";
	    	$order = "`listorder`,1 DESC";
	    	$limit = (($this->view->page - 1) * $this->pagesize) . ',' . $this->pagesize;
	    	$articles = $this->archive->getrows($condition, $limit, $order);
	    	foreach ($articles as $order => $arc) {
	    		$articles[$order]['url'] = archive::url($arc);
	    		$articles[$order]['catname'] = category::name($arc['catid']);
	    		$articles[$order]['caturl'] = category::url($arc['catid']);
	    		$articles[$order]['adddate'] = sdate($arc['adddate']);
	    		$articles[$order]['stitle'] = strip_tags($arc['title']);
	    	}
	    	$this->view->articles = $articles;
	    	$this->view->archives = $articles;
	    	$this->view->record_count = $this->archive->record_count;
    	}
    	$this->view->field = $this->archive->getFields();
    }
예제 #7
0
 function setting_action() {
 	if($this->table == 'archive'){
 		chkpw('archive_setting');
 	}
 	if($this->table == 'friendlink'){
 		chkpw('seo_friendlink_setting');
 	}
     $this->_view_table=false;
     $set=settings::getInstance();
     $sets=$set->getrow(array('tag'=>'table-'.$this->table));
     $data=unserialize($sets['value']);
     if (front::post('submit')) {
         $var=front::$post;
         unset($var['submit']);
         $set->rec_replace(array('value'=>mysql_escape_string(serialize($var)),'tag'=>'table-'.$this->table,'array'=>mysql_escape_string(var_export($var,true))));
         event::log("修改{$this->tname}配置",'成功');
         front::flash("配置成功!");
     }
     $this->view->settings=$data;
 }
예제 #8
0
 function search_action() {
     if(front::get('keyword') &&!front::post('keyword'))
         front::$post['keyword']=front::get('keyword');
     front::check_type(front::post('keyword'),'safe');
     if(front::post('keyword')) {
         $this->view->keyword=trim(front::post('keyword'));
         session::set('keyword',$this->view->keyword);
     }
     else {
         session::set('keyword',null);
         $this->view->keyword=session::get('keyword');
     }
     $type = $this->view->type;
     $condition = "";
     if(front::post('catid')) {
         $condition .= "catid = '".front::post('catid')."' AND ";
     }
     $condition .= "(title like '%".$this->view->keyword."%'";
     $sets=settings::getInstance()->getrow(array('tag'=>'table-fieldset'));
     $arr = unserialize($sets['value']);
     if(is_array($arr['archive']) &&!empty($arr['archive'])) {
         foreach ($arr['archive'] as $v) {
             if($v['issearch'] == '1') {
                 $condition .= " OR {$v['name']} like '%{$this->view->keyword}%'";
             }
         }
     }
     $condition .= ")";
     $order = "`listorder` desc,1 DESC";
     $limit=(($this->view->page-1)*$this->pagesize).','.$this->pagesize;
     $articles=$this->archive->getrows($condition,$limit,$order);
     foreach($articles as $order=>$arc) {
         $articles[$order]['url']=archive::url($arc);
         $articles[$order]['catname']=category::name($arc['catid']);
         $articles[$order]['caturl']=category::url($arc['catid']);
         $articles[$order]['adddate']= sdate($arc['adddate']);
         $articles[$order]['stitle']= strip_tags($arc['title']);
     }
     $this->view->articles=$articles;
     $this->view->archives=$articles;
     $this->view->record_count=$this->archive->record_count;
 }
예제 #9
0
 function getattrs($att_order=1) {
     $attr='attr'.$att_order;
     $sets=settings::getInstance()->getrow(array('tag'=>'table-archive'));
     if (!is_array($sets)) return;
     $data=unserialize($sets['value']);
     preg_match_all('%\(([\d\w\/\.-]+)\)(\S+)%m',$data[$attr],$result,PREG_SET_ORDER);
     $data=array();
     foreach ($result as $res)
         $data[$res[1]]=$res[2];
     return $data;
 }
예제 #10
0
 function init() {
 }
 
 function getcnzz_action(){
예제 #11
0
    function phpwebinsert_action(){
    	chkpw('func_data_phpweb');
        //插入数据库的总条目数
        $total_num = 0;
        $set=settings::getInstance();
        $set->name = $set->prefix.'user';
        //目标表前缀
        $d_prefix = $set->prefix;
        $user_info = $set->rec_select_one("`username`='{$_COOKIE['login_username']}'","*","`userid`");
               
        if(!empty(front::$post['submit'])){    	       	
            //判断是否填写原表前缀
         	if(!empty(front::$post['phpweb_prefix'])){
         		$s_prefix = front::$post['phpweb_prefix'].'_';
         	}else{
       		    front::flash('请填写原表前缀');
       		    return ;
          	}
          	//判断上传的数据库文件是否存在
          	$filename = ROOT.'/'.front::$post['data'];
          	if(!file_exists(ROOT.'/'.front::$post['data'])){
          		front::flash('请检查是否正确上传数据库文件');
          		return ;
          	}
            //记录前面插入的category的id
    	    $cat_id = array();
            $sql_file = fopen($filename,'r');
            while ($row = fgets($sql_file)){
               //如果这一行不是INSERT语句就略过
               if(!strstr($row,'INSERT')) continue; 
           
               $tmp = strstr($row,'(');
               $tmp = trim($tmp,"\n\t\r\0\x0B(); ");
               $tmp_arr = explode('),(',$tmp);
            
               //如果是feedback_info表,则选择对应数据插入guestbook中
               if(strstr($row,$s_prefix.'feedback_info')){
           	       foreach($tmp_arr as $v){
           	            $arr = super_explode($v);
           	            $arr_data = array(
           	                      'username'  =>$arr[4],
           	                      'adddate'   =>date('Y-m-d H:i:s',$arr[26]),
           	                      'state'     =>$arr[29],
           	                      'guesttel'  =>$arr[6],
           	                      'guestemail'=>$arr[8],           	                 
           	                      'guestqq'   =>$arr[10],
           	                      'title'     =>$arr[2],
           	                      'content'   =>$arr[3],
           	            );
           	           $id = put_into_db($d_prefix.'guestbook',$arr_data);
           	           if($id) $total_num++;
           	       
           	       }
                   continue;
               }
          
               //如果是advs_link表,则选择对应数据插入linkword中
               if(strstr($row,$s_prefix.'advs_link')){
           	       foreach($tmp_arr as $v){
           	            $arr = super_explode($v);
           	            $arr_data = array(
           	                      'linkword'  =>$arr[2],
           	                      'linkurl'   =>$arr[3],
           	                      'linktimes' =>mktime(),
           	            );
           	            $id = put_into_db($d_prefix.'linkword',$arr_data);
           	            if($id) $total_num++;
           	       }
                   continue;
               }
           
               //如果是pollindex表,则选择对应数据插入ballot中
               if(strstr($row,$s_prefix.'tools_pollindex')){
           	       foreach($tmp_arr as $v){
           	           $arr = super_explode($v);
           	            $arr_data = array(
           	                      'id'    =>$arr[0],
           	                      'title' =>$arr[1],
           	                          'type'  =>'radio',
           	            );
               	       $id = put_into_db($d_prefix.'ballot',$arr_data);
               	       if($id) $total_num++;
           	   }
                   continue;
               }
           
               //如果是tools_polldata表,则选择对应数据插入option中
               if(strstr($row,$s_prefix.'tools_polldata')){
               	   foreach($tmp_arr as $v){
               	        $arr = super_explode($v);
               	        $arr_data = array(
              	                  'bid'  =>$arr[1],
               	                  'name' =>$arr[3],
               	                  'num'  =>$arr[5],
               	                  'order'=>$arr[2],
               	                );
               	       $id = put_into_db($d_prefix.'option',$arr_data);
               	       if($id) $total_num++;
               	   }
                   continue;
               }
           
               //如果是product_cat表,则选择对应数据插入b_category中
               if(strstr($row,$s_prefix.'product_cat')){
               	   foreach($tmp_arr as $v){
               	        $arr = super_explode($v);
               	        $arr_data = array(
               	                  'parentid'          =>3,
           	                      'catname'           =>$arr[2],
           	                      'listorder'         => $arr[3],
           	                      'htmldir'           =>pinyin::get($arr[2]),
           	                      'showtemplate'      =>0,
           	                      'template'          =>'archive/list_pic.html',           	                   	        
               	                  'listtemplate'      =>'archive/list_pic.html',
               	                  'showtemplate'      =>'archive/show_products.html',
               	                  'includecatarchives'=>1,
           	                      'ispages'           =>1,
           	                      'ishtml'            =>0,      
           	                      'includecatarchives'=>1,     	                 
           	                      'thumb_width'       =>0,
           	                      'thumb_height'      =>0,
               	                  'isnav'             =>0, //是否在导航栏显示字段
               	                );
               	       $id = put_into_db($d_prefix.'b_category',$arr_data);
           	           $cat_id['product_cat'][$arr[0]] = $id;
           	           if($id) $total_num++;
           	       }
                   continue;
               }
           
               //如果是product_con表,则选择对应数据插入archive中
               if(strstr($row,$s_prefix.'product_con')){
               	   foreach($tmp_arr as $v){
           	            $arr = super_explode($v);
           	            $arr_data = array(
           	                      'catid'        =>isset($cat_id['product_cat'][$arr[1]]) ? $cat_id['product_cat'][$arr[1]] : -1,
           	                      'title'        =>$arr[5],
           	                      'username'     =>$user_info['username'],
               	                  'userid'       =>$user_info['userid'],
               	                  'view'         =>7,//确认首页是以图片的版面来显示
               	                  'spid'         =>0,
           	                      'tag'          =>$arr[43], 
           	                      'keyword'      =>$arr[43],           	                  
           	                      'listorder'    =>0,
           	                      'adddate'      =>date('Y-m-d H:i:s',$arr[16]),
           	                      'author'       =>$arr[17],
               	                  'thumb'        =>$arr[15],//列表显示的图片
               	                  'state'        =>1,           	                 
               	                  'checked'      =>1,
           	                      'introduce'    =>$arr[22],
           	                      'introduce_len'=>200,
           	                      'content'      =>$arr[6],
           	                      'template'     =>'archive/show_products.html',
           	                      'ishtml'       =>0,
               	                  'attr2'        =>9,//产品金额
               	                  'pics'         =>'a:1:{i:0;s:0:"";}',//内容多图
               	                  'city_id'      =>0,
               	                  'section_id'   =>0,
           	                    );
           	            $id = put_into_db($d_prefix.'archive',$arr_data);
           	            if($id) $total_num++;
               	   }
                   continue;
               }

               //如果是news_cat表,则选择对应数据插入b_category中
               if(strstr($row,$s_prefix.'news_cat')){
           	       foreach($tmp_arr as $v){
           	            $arr = super_explode($v);
           	            $arr_data = array(
           	                      'parentid'          =>2,
           	                      'catname'           =>$arr[2],
           	                      'listorder'         =>$arr[3],
           	                      'htmldir'           =>pinyin::get($arr[2]),          	                  
           	                      'template'          =>'archive/list_text.html',             	                         	                   	        
           	                      'listtemplate'      =>'archive/list_text.html',
           	                      'showtemplate'      =>0,
           	                      'includecatarchives'=>1,
           	                      'ispages'           =>1,
           	                      'ishtml'            =>0,    
           	                      'includecatarchives'=>1,       	                 
           	                      'thumb_width'       =>0,
           	                      'thumb_height'      =>0,
           	                      'isnav'             =>0, //是否在导航栏显示字段
           	                    );
           	           $id = put_into_db($d_prefix.'b_category',$arr_data);
           	           $cat_id['news_cat'][$arr[0]] = $id;
           	           if($id) $total_num++;
           	       }
                   continue;
               }
           
               //如果是news_con表,则选择对应数据插入archive中
               if(strstr($row,$s_prefix.'news_con')){
           	       foreach($tmp_arr as $v){
           	            $arr = super_explode($v);
           	            $arr_data = array(
           	                      'catid'        =>isset($cat_id['news_cat'][$arr[1]]) ? $cat_id['news_cat'][$arr[1]] : -1 ,
           	                      'title'        =>$arr[5],
           	                      'tag'          =>$arr[46], 
           	                      'username'     =>$user_info['username'],
           	                      'userid'       =>$user_info['userid'],
           	                      'view'         =>0,//确认首页是以文本版面显示
           	                      'spid'         =>0,
           	                      'keyword'      =>$arr[46],       	                  
           	                      'listorder'    =>0,
           	                      'adddate'      =>date('Y-m-d H:i:s',$arr[16]),
           	                      'author'       =>$arr[17],
           	                      'thumb'        =>'',//列表显示的图片
           	                      'state'        =>1,           	                 
           	                      'checked'      =>1,
           	                      'introduce'    =>$arr[22],
           	                      'introduce_len'=>200,
           	                      'content'      =>$arr[6],
           	                      'template'     =>0,
           	                      'ishtml'       =>0,
           	                      'attr2'        =>'',//产品金额
           	                      'pics'         =>'a:0:{}',
           	                      'city_id'      =>0,
           	                      'section_id'   =>0,
           	                    );
           	            $id = put_into_db($d_prefix.'archive',$arr_data);
           	            if($id) $total_num++;
           	       }
                   continue;
               }
           
               //如果是down_cat表,则选择对应数据插入b_category中
               if(strstr($row,$s_prefix.'down_cat')){
           	       foreach($tmp_arr as $v){
           	            $arr = super_explode($v);
           	            $arr_data = array(
           	                      'parentid'          =>6,
           	                      'catname'           =>$arr[2],
           	                      'listorder'         =>$arr[3],
           	                      'htmldir'           =>pinyin::get($arr[2]),          	                  
           	                      'template'          =>'archive/list_down.html',             	                         	                   	        
           	                      'listtemplate'      =>'archive/list_down.html',
           	                      'showtemplate'      =>0,
           	                      'includecatarchives'=>1,
           	                      'ispages'           =>1,
           	                      'ishtml'            =>0,    
           	                      'includecatarchives'=>1,       	                 
           	                      'thumb_width'       =>0,
           	                      'thumb_height'      =>0,
           	                      'isnav'             =>0, //是否在导航栏显示字段
           	                    );
           	           $id = put_into_db($d_prefix.'b_category',$arr_data);
           	           $cat_id['down_cat'][$arr[0]] = $id;
           	           if($id) $total_num++;
           	       }
                   continue;
               }
           
               //如果是down_con表,则选择对应数据插入archive中
               if(strstr($row,$s_prefix.'down_con')){
           	       foreach($tmp_arr as $v){
           	            $arr = super_explode($v);
           	            $arr_data = array(
           	                      'catid'        =>isset($cat_id['down_cat'][$arr[1]]) ? $cat_id['down_cat'][$arr[1]] : -1 ,
           	                      'title'        =>$arr[5],
           	                      'tag'          =>$arr[45], 
           	                      'username'     =>$user_info['username'],
           	                      'userid'       =>$user_info['userid'],
           	                      'view'         =>0,//确认首页是以文本版面显示
           	                      'spid'         =>0,
           	                      'keyword'      =>$arr[45],       	                  
           	                      'listorder'    =>0,
           	                      'adddate'      =>date('Y-m-d H:i:s',$arr[16]),
           	                      'author'       =>$arr[17],
           	                      'thumb'        =>'',//列表显示的图片
           	                      'state'        =>1,           	                 
           	                      'checked'      =>1,
           	                      'introduce'    =>$arr[22],
           	                      'introduce_len'=>200,
           	                      'content'      =>$arr[6],
           	                      'template'     =>0,
           	                      'ishtml'       =>0,
           	                      'linkto'       =>$arr[43],
           	                      'attr1'        =>$arr[44],//存放文件被下载的次数
           	                      'pics'         =>'a:1:{i:0;s:0:"";}',
           	                      'city_id'      =>0,
           	                      'section_id'   =>0,
           	                    );
           	            $id = put_into_db($d_prefix.'archive',$arr_data);
           	            if($id) $total_num++;
           	       }
                   continue;
               }
           
               //如果是photo_cat表,则选择对应数据插入b_category中
               if(strstr($row,$s_prefix.'photo_cat')){
           	       foreach($tmp_arr as $v){
           	            $arr = super_explode($v);
           	            $arr_data = array(
           	                      'parentid'          =>2,
               	                  'catname'           =>$arr[2],
               	                  'listorder'         => $arr[3],
               	                  'htmldir'           =>pinyin::get($arr[2]),          	                  
           	                      'template'          =>'archive/list_text.html',             	                         	                   	        
           	                      'listtemplate'      =>'archive/list_text.html',
           	                      'showtemplate'      =>0,
           	                      'includecatarchives'=>1,
           	                      'ispages'           =>1,
               	                  'ishtml'            =>0,    
               	                  'includecatarchives'=>1,       	                 
               	                  'thumb_width'       =>0,
           	                      'thumb_height'      =>0,
           	                      'isnav'             =>0, //是否在导航栏显示字段
           	                    );
           	           $id = put_into_db($d_prefix.'b_category',$arr_data);
           	           $cat_id['photo_cat'][$arr[0]] = $id;
           	           if($id) $total_num++;
           	       }
                   continue;
               }
           
               //如果是photo_con表,则选择对应数据插入archive中
               if(strstr($row,$s_prefix.'photo_con')){
               	   foreach($tmp_arr as $v){
           	            $arr = super_explode($v);
           	            $arr_data = array(
               	                  'catid'        =>isset($cat_id['photo_cat'][$arr[1]]) ? $cat_id['photo_cat'][$arr[1]] : -1 ,
               	                  'title'        =>$arr[5],
               	                  'tag'          =>$arr[22], 
           	                      'username'     =>$user_info['username'],
           	                      'userid'       =>$user_info['userid'],
           	                      'view'         =>0,//确认首页是以文本版面显示
           	                      'spid'         =>0,
           	                      'keyword'      =>$arr[22],       	                  
               	                  'listorder'    =>0,
               	                  'adddate'      =>date('Y-m-d H:i:s',$arr[16]),
               	                  'author'       =>$arr[17],
           	                      'image'        =>$arr[15],//列表显示的图片
           	                      'state'        =>1,           	                 
           	                      'checked'      =>1,
           	                      'introduce'    =>$arr[22],
           	                      'introduce_len'=>200,
           	                      'content'      =>$arr[6],
           	                      'template'     =>0,
           	                      'ishtml'       =>0,
           	                      'attr2'        =>'',//产品金额
           	                      'pics'         =>'a:0:{}',
           	                      'city_id'      =>0,
           	                      'section_id'   =>0,
           	                    );
           	            $id = put_into_db($d_prefix.'archive',$arr_data);
           	            if($id) $total_num++;
           	       }
                   continue;
               } 
             }
             front::flash('已共插入'.$total_num.'条数据');
         }
    }
        echo '<td width="19%" align="right">调用置顶内容<td width="1%">&nbsp;</td><td width="70%">';
        echo form::select('istop', $tag_config['istop'],
                array(
			'1'=>'是',
            '0'=>'否',
        ));
         echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
        echo '<td width="19%" align="right">调用记录条数<td width="1%">&nbsp;</td><td width="70%">';
        echo form::input('limit', $tag_config['limit'], 'class="input_c"');
         echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
        echo '<td width="19%" align="right">缩略图<td width="1%">&nbsp;</td><td width="70%">';
		if($tag_config['thumb'] == 'on') $checked = 'checked';
        echo '<input type="checkbox" name="thumb" id="thumb" '.$checked.' />';
         echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
        echo '<td width="19%" align="right">推荐位<td width="1%">&nbsp;</td><td width="70%">';
		$set=settings::getInstance();
        $sets=$set->getrow(array('tag'=>'table-archive'));
        $ds=unserialize($sets['value']);
		preg_match_all('%\(([\d\w\/\.-]+)\)(\S+)%s',$ds['attr1'],$result,PREG_SET_ORDER);
        $sdata=array();
        foreach ($result as $res) $sdata[$res[1]]=$res[2];
        echo form::select('attr1', $tag_config['attr1'], $sdata);
        echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
        echo '<td width="19%" align="right">标签模板<td width="1%">&nbsp;</td><td width="70%">';
        echo form::select('tagtemplate', $tag_config['tagtemplate'], $tplarray);
        echo '<span class="hotspot" onmouseover="tooltip.show(\'标签模板文件存放在&nbsp;template/当前使用模板目录/tpltag/tag_content_*.html!\');" onmouseout="tooltip.hide();"><img src="images/remind.gif" alt="" width="14" height="20"  style="margin-left:10px; margin-right:5px;"></span><br/><div style="display:none">';

        //echo form::getform('tagcontent',$form,$field,$data);
        echo form::textarea('tagcontent', 'null', 'cols="70" rows="20"');
		echo '</td></tr>';