Viewing File: /people/testlab/www/testlab.com.pl/ankieta.php
<?
$ank_db = new DBConnect();
$ank_db2 = new DBConnect();
echo "<div id='ankiety'><div id=ankiety_header>".$languages['ankiety_tytul']."</div>";
$sql = "select * from `ankiety` where status=1 and jezyk=".$_SESSION['language']." order by id desc;";
$result = $ank_db->query($sql);
while ($ank_row=$ank_db->fetchrow())
{
$sql = "select * from `ankiety_odpowiedzi` where id_ankiety=".$ank_row['id']." order by id;";
$result = $ank_db2->query($sql);
echo "<div class=ankieta id=ankieta".$ank_row['id'].">";
echo "<div class=ankieta_pytanie>".$ank_row['nazwa']."</div>";
echo "<input type=hidden id=radio_ankieta".$ank_row['id']." value=''>";
while ($ank_row2=$ank_db2->fetchrow())
{
echo "<div class=ankieta_odpowiedz><input type=radio name=radio_ankieta".$ank_row['id']." value=radio".$ank_row2['id']." style='vertical-align:middle' onclick=\"$('radio_ankieta".$ank_row['id']."').value='".$ank_row2['id']."'\"> ".$ank_row2['tresc']."</div>";
}
echo "<div id=ankieta_wyniki><input type=button value='".$languages['ankiety_wyniki']."' onclick=wyniki_ankiety(".$ank_row['id'].")></div>";
echo "<div id=ankieta_button><input type=button value='".$languages['ankiety_glosuj']."' onclick=glosuj(".$ank_row['id'].") id=glosuj_bt".$ank_row['id']."></div>";
echo "</div>";
}
echo "</div>";
?>
Back to Directory
File Manager