<?php	
include_once XOOPS_ROOT_PATH.'/modules/neothemesadmin/language/'.$xoopsConfig['language'].'/blocks.php';


//允許傳送變數
$allowvar =array("of_sortid","sortid","productid","typesid","centerid");
//接收變數區
foreach($_REQUEST as $var=> $value){	
if(in_array($var,$allowvar)){
 $$var=sqlinjectionfound($val=trim(isset($value)?$value:""));
} 
}
$sortid=!empty($of_sortid) ? $of_sortid : $sortid; // get TRUE

switch($xoops_dirname){
  case "tadnews":
$nsn=(empty($_REQUEST['nsn']))?"":$_REQUEST['nsn'];  
!empty($nsn) ? tad_newsmate($nsn) : '';  
  break;

  case "tinyd0":
$tinydid=(empty($_REQUEST['id']))?"":$_REQUEST['id']; 
!empty($tinydid) ? tinyd0mate($tinydid) : '';  
  break;
  
  case "neilhonorlist":
$itemid=(empty($_REQUEST['itemid']))?"":$_REQUEST['itemid'];  
$honor_id=(empty($_REQUEST['honor_id']))?"":$_REQUEST['honor_id'];  
$hc_id=(empty($_REQUEST['hc_id']))?"":$_REQUEST['hc_id']; 
!empty($hc_id) ? neilhonorlistmate($hc_id) : '';  
if(!empty($honor_id) || !empty($itemid) ) neilhonorlistsortmate($honor_id,$itemid);
  break;
 
 /* case "neilshop":
$productid=(empty($_REQUEST['productid']))?"":$_REQUEST['productid']; 
!empty($productid) ? neilshopmate($productid) : '';  
$sortid=(empty($_REQUEST['sortid']))?"":$_REQUEST['sortid']; 
!empty($sortid) ? neilshopsortmate($sortid) : '';  
  break; 
*/
  
  case "neilproduct":
!empty($sortid) ? neilproductsortmate($sortid) : '';  
!empty($productid) && !empty($sortid) ? neilproductmate($productid) : '';  
  break;   
  

  case "neilofficebriefing":
$officeid=(empty($_REQUEST['officeid']))?"":$_REQUEST['officeid']; 
!empty($officeid) ? officebriefingcontentmate($officeid) : '';  		
$sortid=(empty($_REQUEST['sortid']))?"":$_REQUEST['sortid']; 
!empty($sortid) ? officebriefingmate($sortid) : ''; 		
 
  break;   
  

  case "neilonlinevideo":
$of_sortid=(empty($_REQUEST['of_sortid']))?"":$_REQUEST['of_sortid']; 
$sortid=(empty($_REQUEST['sortid']))?"":$_REQUEST['sortid']; 

$sortid=!empty($of_sortid) ? $of_sortid : $sortid; // get TRUE

$itemid=(empty($_REQUEST['itemid']))?"":$_REQUEST['itemid']; 

!empty($sortid) ? neilonlinevideosortmate($sortid,$itemid) : ''; 	
	
$centerid=(empty($_REQUEST['centerid']))?"":$_REQUEST['centerid']; 

!empty($centerid) && !empty($sortid)? neilonlinevideomate($centerid) : '';  

  break;   
  
  
  case "neilwenchuang":
$sortid=(empty($_REQUEST['sortid']))?"":$_REQUEST['sortid']; 
!empty($sortid) ? neilwenchuangsortmate($sortid) : ''; 
$wenchuangid=(empty($_REQUEST['wenchuangid']))?"":$_REQUEST['wenchuangid']; 
!empty($wenchuangid) ? wenchuangidmate($wenchuangid) : '';  

  break;  
 
 
  case "neilalbum":
$of_sortid=(empty($_REQUEST['of_sortid']))?"":$_REQUEST['of_sortid']; 
$sortid=(empty($_REQUEST['sortid']))?"":$_REQUEST['sortid']; 
$itemid=(empty($_REQUEST['itemid']))?"":$_REQUEST['itemid']; 
$sortid=!empty($of_sortid) ? $of_sortid : $sortid; // get TRUE
if(!empty($sortid) || !empty($itemid) ) neilalbumsortmate($sortid,$itemid);
$centerid=(empty($_REQUEST['centerid']))?"":$_REQUEST['centerid']; 
!empty($centerid) && !empty($sortid)? neilalbummate($centerid) : '';  
  break;    
 
  case "neilmfdcms":
//$of_sortid=(empty($_REQUEST['of_sortid']))?"":$_REQUEST['of_sortid']; 
//$sortid=(empty($_REQUEST['sortid']))?"":$_REQUEST['sortid']; 
//$typesid=(empty($_REQUEST['typesid']))?"":$_REQUEST['typesid']; 
$sortid=!empty($of_sortid) ? $of_sortid : $sortid; // get TRUE

!empty($sortid) ? neilmfdcmssortmate($sortid,$typesid) : '';  

//$centerid=(empty($_REQUEST['centerid']))?"":$_REQUEST['centerid']; 

!empty($centerid) && !empty($sortid) ? neilmfdcmscentermate($centerid,$typesid) : ''; 
  break;   
  
  
  
  
   case "neilfilefolder":
$of_sortid=(empty($_REQUEST['of_sortid']))?"":$_REQUEST['of_sortid']; 
$sortid=(empty($_REQUEST['sortid']))?"":$_REQUEST['sortid']; 
$sortid=!empty($of_sortid) ? $of_sortid : $sortid; // get TRUE
$itemid=(empty($_REQUEST['itemid']))?"":$_REQUEST['itemid']; 
!empty($sortid)? neilfilefoldersortmate($sortid,$itemid) : ''; 	  
$centerid=(empty($_REQUEST['centerid']))?"":$_REQUEST['centerid']; 
!empty($centerid) && !empty($sortid)? neilfilefoldercentermate($centerid) : '';  
  break;    
  
  
   case "neilsignedup_c":
$of_sortid=(empty($_REQUEST['of_sortid']))?"":$_REQUEST['of_sortid']; 
$sortid=(empty($_REQUEST['sortid']))?"":$_REQUEST['sortid']; 
$sortid=!empty($of_sortid) ? $of_sortid : $sortid; // get TRUE
!empty($sortid)? neilsignedup_csortmate($sortid) : ''; 	  
$centerid=(empty($_REQUEST['centerid']))?"":$_REQUEST['centerid']; 
!empty($centerid) && !empty($sortid)? neilsignedup_ccentermate($centerid) : '';  
  break;  
  
  
   case "neilsignedup_a":
$of_sortid=(empty($_REQUEST['of_sortid']))?"":$_REQUEST['of_sortid']; 
$sortid=(empty($_REQUEST['sortid']))?"":$_REQUEST['sortid']; 
$sortid=!empty($of_sortid) ? $of_sortid : $sortid; // get TRUE
!empty($sortid)? neilsignedup_asortmate($sortid) : ''; 	  
$centerid=(empty($_REQUEST['centerid']))?"":$_REQUEST['centerid']; 
!empty($centerid) && !empty($sortid)? neilsignedup_acentermate($centerid) : '';  
  break;  
    
case "neilperiodical":
$contentid=(empty($_REQUEST['contentid']))?"":$_REQUEST['contentid']; 
!empty($contentid)? neilperiodical_centermate($contentid) : '';  
  break;  
    
  
  default:

}



//neilperiodical模組mate強化設定
function neilperiodical_centermate($contentid=""){ 
global $xoopsModule;  	

//引入模組DB函數-初始化設定
$dbneme="neilperiodical_content";
$where=" where `contentid` = ".$contentid." &&  `enable` = 1 &&  `checks` = 1";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$description= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($moduledb['content']) : phpstrip_tags($notags=$moduledb['content'],$type="1"); // get TRUE

//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 

//代表圖
if($moduledb['typesof']=='1' || $moduledb['typesof']=='2')
$image=XOOPS_URL."/uploads/".$xoopsModule->getVar("dirname")."/".$moduledb['periodid']."file/project/".$moduledb['projectid']."file/image/s_".$moduledb['img'].".png?state=".date("H:i:s")."";


keywordsfunction($description,$image,$title=$moduledb['title']);
return true; 
}









//neilsignedup_a模組mate強化設定
function neilsignedup_acentermate($centerid="",$typesid=""){ 
global $xoopsModule;  	


//引入模組DB函數-初始化設定
$dbneme="neilsignedup_a_center";
$where=" where `centerid` = ".$centerid." &&  `enable` = 1";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$description= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($moduledb['description']) : phpstrip_tags($notags=$moduledb['description'],$type="1"); // get TRUE

//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 


//代表圖
$image=neilsignedup_a_representimgfunction($Arr=$moduledb,$key="",$type="1",$sortid=$moduledb['sortid']);

keywordsfunction($description,$image,$title="");
return true; 
}



function neilsignedup_asortmate($sortid="",$typesid=""){ 
global $xoopsModule;  	

//引入模組DB函數-初始化設定
$dbneme="neilsignedup_a_sort";  //資料表名稱
$where=" where `sortid` = '".$sortid."'  &&  `enable` = 1";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$description= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($moduledb['sorttext']) : phpstrip_tags($notags=$moduledb['sorttext'],$type="1"); // get TRUE

//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 


//輸入meta函數
$dbneme="neilsignedup_a_center";  //資料表名稱
$where="  where `sortid` = '".$moduledb['sortid']."' &&  `enable` = 1   order by RAND()";  //where數值	
$moduledb2=moduledb($dbneme,$where);
//代表圖
$image=neilsignedup_a_representimgfunction($Arr=$moduledb2,$key="",$type="1",$sortid=$moduledb2['sortid']);

if(!empty($moduledb['sorttitle']))keywordsfunction($description,$image,$moduledb['sorttitle']);
return true; 
}



//neilsignedup_c模組mate強化設定
function neilsignedup_ccentermate($centerid="",$typesid=""){ 
global $xoopsModule;  	


//引入模組DB函數-初始化設定
$dbneme="neilsignedup_c_center";
$where=" where `centerid` = ".$centerid." &&  `enable` = 1";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$description= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($moduledb['description']) : phpstrip_tags($notags=$moduledb['description'],$type="1"); // get TRUE

//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 
//代表圖
$image=neilsignedup_c_representimgfunction($Arr=$moduledb,$key="",$type="1",$sortid=$moduledb['sortid']);

keywordsfunction($description,$image,$title="");
return true; 
}



function neilsignedup_csortmate($sortid="",$typesid=""){ 
global $xoopsModule;  	

//引入模組DB函數-初始化設定
$dbneme="neilsignedup_c_sort";  //資料表名稱
$where=" where `sortid` = '".$sortid."'  &&  `enable` = 1";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$description= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($moduledb['sorttext']) : phpstrip_tags($notags=$moduledb['sorttext'],$type="1"); // get TRUE

//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 
//輸入meta函數
$dbneme="neilsignedup_c_center";  //資料表名稱
$where="  where `sortid` = '".$moduledb['sortid']."' &&  `enable` = 1   order by RAND()";  //where數值	
$moduledb2=moduledb($dbneme,$where);
//代表圖
$image=neilsignedup_c_representimgfunction($Arr=$moduledb2,$key="",$type="1",$sortid=$moduledb2['sortid']);

if(!empty($moduledb['sorttitle'])) keywordsfunction($description,$image,$moduledb['sorttitle']);
return true; 
}






//neilfilefolder模組mate強化設定
function neilfilefoldercentermate($centerid=""){ 
global $xoopsModule;  	




//引入模組DB函數-初始化設定
$dbneme="neilfilefoldercenter";
$where=" where `centerid` = ".$centerid." && `enable` = '1' && `reviewtype` = '1'";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$descriptionmate= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($notags=$moduledb['description']) : phpstrip_tags($notags=$moduledb['description'],$type="1"); // get TRUE
//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 


keywordsfunction($descriptionmate,$image="",$title="");
return true; 
}






function neilfilefoldersortmate($sortid="",$itemid=""){ 
global $xoopsModule;  	



//引入模組DB函數-初始化設定
$dbneme="neilfilefoldersort";  //資料表名稱
$where=" where `sortid` = '".$sortid."' && `enable` = '1'";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$descriptionmate= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($moduledb['sorttext']) : phpstrip_tags($notags=$moduledb['sorttext'],$type="1"); // get TRUE

$itemList=moduledb($dbneme="neillibrary_dateitem",$where=" where   itemid='".$itemid."' ");
if(!empty($itemid)){
$itemList['itemtext']=$itemList['itemtext']; 
} 
if(!empty($sortid) && !empty($itemid)) $interval="-";
//限制字串輸出長度
$descriptionmate=mb_substr(xlanguagePlugin($descriptionmate),0,325,'utf8'); 
//輸入meta函數

if(!empty($moduledb['sorttitle']) ||  !empty($itemList['itemtext'])) keywordsfunction($description,$image,$moduledb['sorttitle'].$interval.$itemList['itemtext']);
return true; 
}




//neilmfdcms模組mate強化設定
function neilmfdcmscentermate($centerid="",$typesid=""){ 
global $xoopsModule;  	


//引入模組DB函數-初始化設定
$dbneme="neilmfdcmscenter";
$where=" where `centerid` = ".$centerid." &&  `typesid` = ".$typesid."";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$description= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($moduledb['description']) : phpstrip_tags($notags=$moduledb['description'],$type="1"); // get TRUE

//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 

//代表圖
if(empty($moduledb['imgstate'])){
//上傳代表圖	
$image=neilmfdcms_representimgfunction($Arr=$moduledb,$key="",$type="1",$typesid,$sortid=$moduledb['sortid']);
}else{
//分類代表圖
$image=neilmfdcms_sortrepresentimg($modulesid="neilmfdcms",$typesid=$moduledb['typesid'],$sortid=$moduledb['sortid']); 
}

keywordsfunction($description,$image,$title="");
return true; 
}



function neilmfdcmssortmate($sortid="",$typesid=""){ 
global $xoopsModule;  	

//引入模組DB函數-初始化設定
$dbneme="neilmfdcmssort";  //資料表名稱
$where=" where `sortid` = '".$sortid."'  &&  `typesid` = ".$typesid."";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$description= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($moduledb['sorttext']) : phpstrip_tags($notags=$moduledb['sorttext'],$type="1"); // get TRUE

//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 
//輸入meta函數
$dbneme="neilmfdcmscenter";  //資料表名稱
$where="  where `sortid` = '".$moduledb['sortid']."' &&  `typesid` = ".$typesid."   order by RAND()";  //where數值	
$moduledb2=moduledb($dbneme,$where);

//代表圖
if(empty($moduledb2['imgstate'])){
//上傳代表圖	
$image=neilmfdcms_representimgfunction($Arr=$moduledb2,$key="",$type="1",$typesid,$sortid=$moduledb2['sortid']);
}else{
//分類代表圖
$image=neilmfdcms_sortrepresentimg($modulesid="neilmfdcms",$typesid=$moduledb2['typesid'],$sortid=$moduledb2['sortid']); 
}

$dbneme="neilmfdcmstypes";  //資料表名稱
$where="  where  `typesid` = ".$typesid."  ";  //where數值	
$moduledb3=moduledb($dbneme,$where);

$moduledb['sorttitle']=$moduledb3['title'].'-'.$moduledb['sorttitle'];



if(!empty($moduledb['sorttitle']))keywordsfunction($description,$image,$moduledb['sorttitle']);
return true; 
}	










//neilalbum模組mate強化設定
function neilalbummate($centerid=""){ 
global $xoopsModule;  	


//引入模組DB函數-初始化設定
$dbneme="neilalbumcenter";
$where=" where `centerid` = ".$centerid." && `enable` = '1'";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$description= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($notags=$moduledb['description']) : phpstrip_tags($notags=$moduledb['description'],$type="1"); // get TRUE
//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 

$image=XOOPS_URL."/uploads/neilalbum/".$moduledb['sortid']."file/image/.thumbs/".neilalbum_representimgfunction($neilalbumArr=$moduledb,$key="",$type="1").".jpg?state=".date("H:i:s")."";



keywordsfunction($description,$image,$title="");
return true; 
}


function neilalbumsortmate($sortid="",$itemid=""){ 
global $xoopsModule;  	



//引入模組DB函數-初始化設定
$dbneme="neilalbumsort";  //資料表名稱
$where=" where `sortid` = '".$sortid."'  &&   `enable` = '1'";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$description= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($moduledb['sorttext']) : phpstrip_tags($notags=$moduledb['sorttext'],$type="1"); // get TRUE


$itemList=moduledb($dbneme="neillibrary_dateitem",$where=" where   itemid='".$itemid."' ");
if(!empty($itemid)){
$itemList['itemtext']=$itemList['itemtext']; 
} 

if(!empty($sortid) && !empty($itemid)) $interval="-";

//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 
//輸入meta函數
$dbneme="neilalbumcenter";  //資料表名稱
$where="  where `sortid` = '".$moduledb['sortid']."'   order by RAND()";  //where數值	
$moduledb2=moduledb($dbneme,$where);

$image=XOOPS_URL."/uploads/neilalbum/".$moduledb['sortid']."file/image/.thumbs/".neilalbum_representimgfunction($neilalbumArr=$moduledb2,$key="",$type="1").".jpg?state=".date("H:i:s")."";


if(!empty($moduledb['sorttitle']) ||  !empty($itemList['itemtext'])) keywordsfunction($description,$image,$moduledb['sorttitle'].$interval.$itemList['itemtext']);
return true; 
}






//neilonlinevideo模組mate強化設定
function neilonlinevideomate($centerid=""){ 
global $xoopsModule,$xoopsConfig;  	

//引入模組DB函數-初始化設定
$dbneme="neilonlinevideocenter";
$where=" where `centerid` = ".$centerid." && `enable` = '1'";
$moduledb=moduledb($dbneme,$where);


//去除段行處理
$description= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($moduledb['description']) : phpstrip_tags($notags=$moduledb['description'],$type="1"); // get TRUE


//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 

if(!empty($moduledb['tmburl'])) $image=$moduledb['tmburl'];

keywordsfunction($description,$image,$title="");
return true; 
}


function neilonlinevideosortmate($sortid="",$itemid){ 
global $xoopsModule;  	

//引入模組DB函數-初始化設定
$dbneme="neilonlinevideosort";  //資料表名稱
$where=" where `sortid` = '".$sortid."' && `enable` = '1'";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$description= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($moduledb['sorttext']) : phpstrip_tags($notags=$moduledb['sorttext'],$type="1"); // get TRUE

$itemList=moduledb($dbneme="neillibrary_dateitem",$where=" where   itemid='".$itemid."' ");
if(!empty($itemid)){
$itemList['itemtext']=$itemList['itemtext']; 
} 

if(!empty($sortid) && !empty($itemid)) $interval="-";


//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 
//輸入meta函數
$dbneme="neilonlinevideocenter";  //資料表名稱
$where="  where `sortid` = '".$moduledb['sortid']."'   order by RAND()";  //where數值	
$moduledb2=moduledb($dbneme,$where);

$image=$moduledb2['tmburl'];

//if(!empty($description))keywordsfunction($description,$image,$moduledb['sorttitle']);
if(!empty($moduledb['sorttitle']) ||  !empty($itemList['itemtext'])) keywordsfunction($description,$image,$moduledb['sorttitle'].$interval.$itemList['itemtext']);
return true; 
}




//neilofficebriefing模組mate強化設定


function officebriefingmate($sortid=""){
global $xoopsModule;  	

//引入模組DB函數-初始化設定
$dbneme="officebriefingsort";  //資料表名稱
$where=" where `sortid` = '".$sortid."'";
$moduledb=moduledb($dbneme,$where);


//去除段行處理
$description=phpstrip_tags($moduledb['sorttext']);
//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 
//輸入meta函數

if(!empty($moduledb['sorttitle']))keywordsfunction($description,$image,$moduledb['sorttitle']);
return true; 

}





function  officebriefingcontentmate($officeid=""){
global $xoopsModule;  	

//引入模組DB函數-初始化設定
$dbneme="officebriefingcontent";
$where=" where `officeid` = ".$officeid."";
$moduledb=moduledb($dbneme,$where);

if(!empty($moduledb['synchronize'])){
$where=" where `officeid` = '".$moduledb['synchronize']."'";
$moduledb=moduledb($dbneme,$where);
}
/*
$briefdescription3=empty($moduledb['experience']) ? mb_substr(strip_tags($moduledb['education']),0,124,'utf8'): mb_substr(strip_tags($moduledb['experience']),0,124,'utf8'); // get TRUE		
$briefdescription2=empty($moduledb['office']) ? mb_substr(strip_tags($moduledb['experience']),0,124,'utf8'): mb_substr(strip_tags($moduledb['office']),0,124,'utf8'); // get TRUE	
$briefdescription1=empty($moduledb['teachingconcept']) ? mb_substr(strip_tags($moduledb['office']),0,124,'utf8'): mb_substr(strip_tags($moduledb['teachingconcept']),0,124,'utf8'); // get TRUE
*/



//教學理念 工作職掌   學歷說明 經歷說明 
foreach(array("teachingconcept","office","education","experience","introduction") as $i=> $val){
if(!empty($moduledb[$val]) ){
$briefdescription=preg_replace('#<img[^>]*>#i', '', mb_substr(xlanguagePlugin($moduledb[$val]),0,325,'utf8'));
break;
}
}
//去除段行處理
$description=phpstrip_tags($briefdescription);
//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 
//輸入meta函數

$blockimgList=moduledb($dbneme="officebriefingimg",$where="  where `officeid` = '".$moduledb['officeid']."'   order by RAND()");	
if(file_exists(XOOPS_ROOT_PATH.'/uploads/'.$xoopsModule->getVar("dirname").'/image/.thumbs/'.$blockimgList['pimgfile'].'.jpg')){
    $image=XOOPS_URL.'/uploads/'.$xoopsModule->getVar("dirname").'/image/.thumbs/'.$blockimgList['pimgfile'].'.jpg';
}

keywordsfunction($description,$image,$moduledb['names']);
return true; 
}




//tadnews模組mate強化設定
function tad_newsmate($nsn=""){    	
//引入模組DB函數-初始化設定

$dbneme="tad_news";
$where=" where `nsn` = ".$nsn."";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
//去除段行處理
$news_content= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($notags=$moduledb['news_content']) : phpstrip_tags($notags=$moduledb['news_content'],$type="1"); // get TRUE

//限制字串輸出長度
$news_content=mb_substr(xlanguagePlugin($news_content),0,325,'utf8'); 
//輸入meta函數

keywordsfunction($news_content);

return true; 
 }


//tinyd0模組mate強化設定
function tinyd0mate($tinydid=""){ 
//引入模組DB函數-初始化設定
$dbneme="tinycontent0";
$where=" where `storyid` = ".$tinydid."";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$text=phpstrip_tags($moduledb['text']);
//限制字串輸出長度
$text=mb_substr(xlanguagePlugin($text),0,325,'utf8'); 
//輸入meta函數
keywordsfunction($text);
return true; 
}


//neilhonorlist模組mate強化設定
function neilhonorlistmate($hc_id=""){ 
global $xoopsModule;  	
//引入模組DB函數-初始化設定
$moduledb=moduledb($dbneme="neilhonorcontent",$where=" where `hc_id` = ".$hc_id."");
//讀取榮譽事項
$matters=moduledb($dbneme="neilhonorarymatters",$where=" where `honor_id` = '".$moduledb['honor_id']."'");
//限制字串輸出長度
$honor_content=mb_substr(xlanguagePlugin(phpstrip_tags($moduledb['honor_content'])),0,325,'utf8'); 
//輸入meta函數
if(file_exists(XOOPS_ROOT_PATH.'/uploads/'.$xoopsModule->getVar("dirname").'/cover/'.$moduledb['hc_id'].'.png')){
    $image=XOOPS_URL.'/uploads/'.$xoopsModule->getVar("dirname").'/cover/'.$moduledb['hc_id'].'.png?id='.date("H:i:s").'';
}
keywordsfunction($honor_content,$image,$matters['honor_idsort'].':'.$moduledb['honortitle']);
return true; 
}


function neilhonorlistsortmate($honor_id="",$itemid=""){ 
global $xoopsModule;  	
//引入模組DB函數-初始化設定
$itemList=moduledb($dbneme="neillibrary_dateitem",$where=" where   itemid='".$itemid."' ");
if(!empty($itemList['itemtext'])) keywordsfunction($description,$image,$itemList['itemtext']);
return true; 
}






//neilshop模組mate強化設定
/*function neilshopmate($productid=""){ 
global $xoopsModule;  	

//引入模組DB函數-初始化設定
$dbneme="neilshopproductcontent";
$where=" where `productid` = ".$productid."";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$description=phpstrip_tags($moduledb['description']);
//限制字串輸出長度
$description=mb_substr($description,0,325,'utf8'); 
//輸入meta函數
if(file_exists(XOOPS_ROOT_PATH.'/uploads/'.$xoopsModule->getVar("dirname").'/image/.thumbs/'.$moduledb['blockimg'].'.jpg')){
    $image=XOOPS_URL.'/uploads/'.$xoopsModule->getVar("dirname").'/image/.thumbs/'.$moduledb['blockimg'].'.jpg';
}
keywordsfunction($description,$image,$moduledb['productidtitle']);
return true; 
}
	
function neilshopsortmate($sortid=""){ 
global $xoopsModule;  	

//引入模組DB函數-初始化設定
$dbneme="neilshopsort";  //資料表名稱
$where=" where `sortid` = '".$sortid."'";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$description=phpstrip_tags($moduledb['sorttext']);
//限制字串輸出長度
$description=mb_substr($description,0,325,'utf8'); 
//輸入meta函數

if(!empty($moduledb['sorttitle']))keywordsfunction($description,$image,$moduledb['sorttitle']);
return true; 
}	*/







//neilproduct模組mate強化設定
function neilproductmate($productid=""){ 
global $xoopsModule;  
//引入模組DB函數-初始化設定
$moduledb=moduledb($dbneme="productcontent",$where=" where `productid` = ".$productid."");
$itemtext=phpconversion($conversion=$moduledb['itemtext'],$type="unserialize");

if(is_array($itemtext)){
$item_reset=reset($itemtext); //取出第一個陣列
//去除空值createcontent陣列
$itemtext = array_filter($itemtext, function($val) {
return !empty($val['createcontent']);
});
$itemtext = array_values($itemtext);
$Arr = empty($item_reset['createcontent']) ? $itemtext[array_rand($itemtext)] : $item_reset;	
}

//去除段行處理
$description= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($Arr['createcontent']) : phpstrip_tags($notags=$Arr['createcontent'],$type="1"); // get TRUE
//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 
if(!empty(neilproduct_representimgfunction($moduledb))) $image=XOOPS_URL."/uploads/".$xoopsModule->getVar("dirname")."/".$moduledb['sortid']."file/image/.thumbs/small_".neilproduct_representimgfunction($moduledb).".png?state=".date("H:i:s")."";
keywordsfunction($description,$image,$title="");
return true; 
}



function neilproductsortmate($sortid=""){ 
global $xoopsModule;  	
//引入模組DB函數-初始化設定
$listvar=moduledb($dbneme="productsort",$where=" where `sortid` = '".$sortid."'");
//去除段行處理
$description= $GLOBALS['xoopsConfig']['language']=='tchinese_utf8' ? phpstrip_tags($listvar['sorttext']) : phpstrip_tags($notags=$listvar['sorttext'],$type="1"); // get TRUE
//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 
$content=moduledb($dbneme="productcontent",$where=" where `sortid` = '".$listvar['sortid']."'  order by RAND()");
if(!empty(neilproduct_representimgfunction($content))) $image=XOOPS_URL."/uploads/".$xoopsModule->getVar("dirname")."/".$content['sortid']."file/image/.thumbs/small_".neilproduct_representimgfunction($content).".png?state=".date("H:i:s")."";
if(!empty($listvar['sorttitle'])) keywordsfunction($description,$image,$listvar['sorttitle']);
return true; 
}	







//neilwenchuang模組mate強化設定
function wenchuangidmate($wenchuangid=""){ 
global $xoopsModule;  	

//引入模組DB函數-初始化設定
$dbneme="neilwenchuangfunction";
$where=" where `wenchuangid` = ".$wenchuangid."";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$description=phpstrip_tags($moduledb['description']);
//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 
//輸入meta函數

if(file_exists(XOOPS_ROOT_PATH.'/uploads/'.$xoopsModule->getVar("dirname").'/image/.thumbs/'.$moduledb['img'].'.jpg')){
    $image=XOOPS_URL.'/uploads/'.$xoopsModule->getVar("dirname").'/image/.thumbs/'.$moduledb['img'].'.jpg';
}
keywordsfunction($description,$image,$moduledb['title']);
return true; 
}


function neilwenchuangsortmate($sortid=""){ 
global $xoopsModule;  	

//引入模組DB函數-初始化設定
$dbneme="neilwenchuangsort";  //資料表名稱
$where=" where `sortid` = '".$sortid."'";
$moduledb=moduledb($dbneme,$where);
//去除段行處理
$description=phpstrip_tags($moduledb['sorttext']);
//限制字串輸出長度
$description=mb_substr(xlanguagePlugin($description),0,325,'utf8'); 
//輸入meta函數

if(!empty($moduledb['sorttitle']))keywordsfunction($description,$image,$moduledb['sorttitle']);
return true; 
}
	
	
	?>