<?php
/*
	欢迎使用DM企业建站系统，本系统由www.demososo.com开发。
*/
if(!defined('IN_DEMOSOSO')) {
	exit('this is wrong page,please back to homepage');
}

?>
<?php
global $searchkey;
 global $searchkeytj;

?>
 
<!--
	<div class="content_header dn"><h3>< ?  php echo SEARCH_RESULT?>：</h3></div>
	-->

	<?php
	block('prog_searchinput');

	if($searchkeytj<>'') block('prog_searchkeylist');
	?>
	<div class="content_def">


	 <div class="c searcharea">
		<div class="searchresult">
		<?php


			if($searchkey=='') echo '<p class="nokey">'.SEARCH_ALERTKEYWORDS.'!</p>';
			else{

				//La télévisionTéléphones portablesLes ordinateurs
 
  //$searchkey = "'aa TABLE_'";
	//	$searchkey=str_replace("'","''",$searchkey);

 $searchkey=str_replace("zzz_","z_",$searchkey); //防止修改表格
 $searchkey=str_replace("TABLE_","TA_",$searchkey);

 $searchkey2=gpc_add($searchkey);
		

	 // $sqlsearch = "SELECT * from ".TABLE_NODE."  where   sta_search='y' and sta_noaccess='n' and  title  Like '%{$searchkey2}%'     $andlangbh order by id desc limit 100";

$where = "  modtype='node' and sta_visible='y'  and sta_noaccess='n' and title  like '%{$searchkey2}%'  ";

  $sqlarr = array( 
                'excerpt'=>50,
                'start'=>0,
                'maxline'=>100,
                'order'=>'','where'=>$where
                );
               //pre($sqlarr);
              $result = getarr_node('search',$sqlarr);

              //pre($result);
 
	  
	  if($result['datares']=='yes'){
        	    
		//pre($result);

		  echo '<p class="key">'.SEARCH_KEYWORDS.'：<span style="color:#666;font-size:18px"> '.$searchkey.'</span></p>';



		     $reqfile = SYSBLOCKROOT.'other/search.php';
			if(checkfile($reqfile)) require($reqfile);


		}
		else{
		 echo '<p class="noresult">'.SEARCH_NORESULT.'： <span style="color:#666;font-size:20px">'.$searchkey.'</span></p>';
		}//对不起，没有找到相关内容

	}
	?>
	</div>
</div>
</div>
