<?php 
if(!defined('IN_DEMOSOSO')) {
	exit('this is wrong page,please back to homepage');
}
$res = array();
 
$sql="select id,title,arr_can,kv   from ".TABLE_NODE." where  pid='$v' and sta_visible='y' $andlangbh    order by pos desc";
 
 //echo $sql;
    /*begin page roll*/
     $num_rows = get_numrows($sql);
     if($num_rows>0){
		 $result = getall($sql);

		 //--------------------

		 foreach( $result as  $k=>$v){
			 $res[$k]['id'] =  $v['id'];
			 $res[$k]['title'] =  $v['title'];
			 $res[$k]['kv'] =  UPLOADPATHIMAGE.$v['kv']; 

			$arr_can = $v['arr_can'];

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

						
				}
            // //---end arrcan


		 }



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

 

		
?>