Viewing File: /people/testlab/www/testlab.com.pl/script/akordeon.php

<?
$db = new DBConnect();
$db2 = new DBConnect();
$sql="select * from pages where id='".$_GET['page']."'";
$db->query($sql);
$row=$db->fetchrow(); 
$nazwa_strony=$row['nazwa'];
$opis_strony=$row['tresc'];
echo "<div id='tresc_glowna' >".$opis_strony."</div>";

$sql = "select * from `aktualnosci` where skrypt_id=".$_GET['page']." order by pozycja,id;";
$result = $db->query($sql);

echo "<div id='accordion'>";

while ($row=$db->fetchrow())
{
	echo "<h3 class='toggler atStart'>".$row['nazwa']."</h3>";
	echo "<div class='element atStart'>
		<p>".$row['tresc']."</p>
	
		</div>";
}

echo "</div>";
?>
<script language=javascript> 
var accordion = new Accordion('h3.atStart', 'div.atStart', {
	opacity: false,
	onActive: function(toggler, element){
		toggler.setStyle('font-weight', 'bold');
	},
 
	onBackground: function(toggler, element){
		toggler.setStyle('font-weight', 'normal');
	}
}, $('accordion'));
</script>
Back to Directory File Manager