<?php 
if(!defined('IN_DEMOSOSO')) {
	exit('this is wrong page,please back to homepage');
}

 
$sql="select id,blockcan,desptext,desp  from ".TABLE_BLOCK." where  pidname='$v' and sta_visible='y' $andlangbh    order by id  desc ";
  //echo $sql;
    /*begin page roll*/
	$num_rows = get_numrows($sql);
	if($num_rows>0){
		$result = getrow($sql);
		//echo UPLOADPATH;
	   
		$desptext= web_despdecode($result['desptext']);
		$desp= web_despdecode($result['desp']);
		$despv= $desp==''?$desptext:$desp; 

		$result['desp'] = $despv;
		//$dateedit  = substr($result['dateedit'],0,10);
		//$result['dateedit'] = $dateedit;

		unset($result['desptext']); 

		//------------------
		$blockcan = $result['blockcan'];
		$bscntarr = explode('==#==',$blockcan);
		if(count($bscntarr)>1){
			foreach ($bscntarr as   $bsvalue) {
				if(strpos($bsvalue, ':##')){
				  $bsvaluearr = explode(':##',$bsvalue);
				  $bsccc = $bsvaluearr[0];
				  //$$bsccc=$bsvaluearr[1];
				  $result['arrcan'][$bsccc] =$bsvaluearr[1];
				}
			  }

			 
	   }
 
	   unset($result['blockcan']); 


	   // echo $despv;exit;
	   if($test=='y')   pre($result);
	   // pre($_SERVER['HTTP_ACCEPT']);
	   $jsonv = json_encode($result,JSON_UNESCAPED_UNICODE);
	   //echo jsonv;
		 echo api_jsonp_encode($jsonv); 
		
	}
	else {
		echo 'no data';
	}

 

		
?>