Пример #1
0
		mysql_data_seek ( $rCanon, 0 );


		$i = 0;
		$lAK = '';
		$tArtiest = '';
		while ( $canon = $sql->fetch_assoc ( $rCanon ) )
		{
			$AK = $order [ $canon['AK'] ];

			$tpl->newblock ( "canon.row" );
			$tpl->assign ( array (
				"nr" => ++$i,
				"AK" => $canon['AK'],
				"album_id" => $canon['album_id'],
				"album" => inkorten ( $canon['album'], 45 ),
				"jaar" => not_null ( $canon['jaar'] )
			) );

			if ( $lAK != $AK )
				$tpl->assign ( "pos", $AK );

			if ( $tArtiest != $canon['artiest_id'] )
			{
				$tpl->assign ( array (
					"artiest_id" => $canon['artiest_id'],
					"artiest" => $canon['artiest']
				) );
			}

			$tArtiest = $canon['artiest_id'];

		$rLijst = $sql->query ( $qLijst );

		if ( $sql->num_rows ( $rLijst ) > 0 )
		{
			$i = 0;
			while ( $lijst = $sql->fetch_assoc ( $rLijst ) )
			{
				$tpl->newblock ( "l.select.row" );

				$tpl->assign ( array (
					"nr" => $i++,

					"lijst_id" => $lijst['id'],
					"lijst" => $lijst['omschrijving'],
					"lijst_url" => empty ( $lijst['url'] ) ? NULL : "http://www.muzieklijstjes.nl/" . $lijst['url'] . ".htm",
					"jaar" => $lijst['jaar'],

					"aBron" => inkorten ( $lijst['bron'], 10 ),
					"bron" => $lijst['bron'],

					"typelijst" => $lijst['type'],
					"canon" => $lijst['canon'] == true ? "x" : NULL
				) );
			}
		}
	}

?>
			if ( $n > 0 )
			{
				$i = 0;
				$lArtiest = '';
				while ( $titel = $sql->fetch_assoc ( $rTitel ) )
				{
					$tpl->newblock ( "recensent_recensie" );

					$tpl->assign ( array (
						 "nr" => ++$i,
						 "nummer" => $titel['nummer'],
						 "jaar" => $titel['jaar'],
						 "tijdschrift_id" => $titel['tijdschrift_id'],
						 "lijsten" => not_null ( $titel['lijsten'] ),
						 "aTijdschrift" => substr ( $titel['tijdschrift'], 0, 1 ),
						 "tijdschrift" => $titel['tijdschrift'],

						"artiest_id" => $titel['artiest_id'],
						"artiest" => $lArtiest != $titel['artiest'] ? inkorten ( $titel['artiest'], 40 ) : NULL,

						"album_id" => $titel['album_id'],
						"album" => inkorten ( $titel['album'], 40 )
					) );

					$lArtiest = $titel['artiest'];
				}
			}
		}
	}
?>