All pastes #494171 Raw Edit

Untitled

public php v1 · immutable
·published 2007-05-18 03:13 UTC
rendered paste body
function property_view($node, $teaser = FALSE, $page = FALSE) {	$node = node_prepare($node, $teaser);		ob_start();	echo 'VIEW:';	echo '<pre>';	print_r($node);	echo '</pre>';	$pr = ob_get_contents();	ob_end_clean();		drupal_set_message($pr);		$node->content['property_data'] = array(	    '#value' => 'yes',	    '#weight' => 4	);	$node->content['offer_maker'] = array(	    '#value' => _bidding_offer_maker($node),	    '#weight' => 6	);		$node->content['all_bids'] = array(	    '#value' => _property_bid_viewer($node),	    '#weight' => 2	);		$node->content['bid_data'] = array(		'#value' => _bid_data($node),		'#weight'=> 5	);		return $node;}function _property_thing(&$node) {	return $node->tagline;}function _property_bid_viewer(&$node) {	$output = '';		$nodes = db_query('SELECT n.nid FROM {node} n, {node_bid} b WHERE b.pid=%d ORDER BY n.created DESC');			while($node = db_fetch_object($nodes)) {		$item = node_load($node);				$user = user_load(array('uid' => $node->uid));				$output .= '<div id="bid-'.$item->nid.'">';		$output .= $user->name.' made a bid of '.$item->bid_value;		$output .= '</div>';	}		if($output == '') {		$output = '<div id="bid-none"><p>No bids have been made yet.</p></div>';	}		return;}