Ejemplo n.º 1
0
 function printdata1($node1){	
	
	$qry = "SELECT count(*) FROM {comments} where pid=$node1";
	$num = db_result(db_query(db_rewrite_sql($qry)));
	//print $node1.'--'.$num.'--';
	
	
	$result = db_query("SELECT * FROM {comments} where pid=%d",$node1);
	while($row = db_fetch_array($result)){
		$node=$row['cid']; $nodepid=$row['pid'];
		
		
		 $result = db_query("SELECT * FROM {comments} where pid=%d",$node1);
	while($row = db_fetch_array($result)){
		$node22=$row['cid']; $nodepid=$row['pid'];
		 $viewName = 'user_scholar_comments';
		//print $node22.'**--';
		$qry = "SELECT count(*) FROM {comments} where pid=$node22";
	$num = db_result(db_query(db_rewrite_sql($qry)));
//print '-------------------------------------------------**'.$num.'--------------->>';

		
		
		 print views_embed_view($viewName , $display_id = 'default',$node22);
		  
		  
		$subitem11 = db_query("SELECT * FROM {comments} where pid=%d",$node22);
		while($row = db_fetch_array($subitem11)){
		
		 $node1122=$row['cid'];
		 
		 print views_embed_view($viewName , $display_id = 'default', $node1122);
		  if($node1122!=" "){
			printdata1($node1122);
		}
		  
		  
		  }
		  }
		//  print "-----------".$nodepid."-----------";
		$subitem = db_query("SELECT * FROM {comments} where pid=%d",$node);
		while($row = db_fetch_array($subitem)){
		
		 $node11=$row['cid']; //printdata($node11);
	//print $node11."ooooooooooooooooo";
		}
		if($node11!=" "){
		//	printdata_cmt($node);
		}
		
	}
 }
 //print_r($row);
$node1=$row['cid']; 
		
		 
		 
	 		$result=db_query("SELECT * FROM {comments} where pid=%d",$node1);
while ($row = db_fetch_array($result)) {

$node=$row['cid']; 
		 
		
		 $viewName = 'user_scholar_comments';
		    //print "yyy";
					 print views_embed_view($viewName , $display_id = 'default',$node);
			 
			print printdata1($node); 
			}
			
			}


/*$result=db_query("SELECT * FROM {comments} where pid=%d and nid=%d ORDER BY cid ASC ",$cid,$com_nodid);
while ($row = db_fetch_array($result)) {

$node=$row['cid']; 
		 
		
		 $viewName = 'user_scholar_comments';
				 print views_embed_view($viewName , $display_id = 'default',$node);