Soal.php Perancangan Aplikasi Simulasi Psikotest Berbasis Web

26. Soal.php

?php error_reportingE_ALL E_NOTICE; ? ?php session_start; ? ?php include ..koneksi.php; id=_SESSION[sesiidpeserta]; ? div class=col-md-12 ?php qry=mysql_queryselect from tblpretesthasil where idpeserta=id and st=1; jlh=mysql_num_rowsqry; if jlh=1{ jabatan=db-tampilrecordtblpretesthasil, idpeserta=id and st=1, jabatan; ? -- -- p style=font-family:Lucida Sans Cambria, Hoefler Text, Liberation Serif, Times, Times New Roman, serif; font- size:16px; color:B30002; font-weight:bold; text- transform:uppercase align=centerJABATAN : ?php echo strtoupperjabatan; ?p p align=center div style=width:280px; margin-left:auto; margin-right:auto ?php waktu=db-tampilrecordtblpretesthasil, idpeserta=id and st=1, waktu; if waktu== waktu=0; Universitas Sumatera Utara if waktu=0{ echo script document.location.href=index.php?page=hasiljabatan=jabatan; script; } ? div class=alert alert-warning role=alert style=text- align:center smallWaktusmall h1 align=center?php echo waktu; ?h1 div div p -- -- ?php qry=mysql_queryselect from tblpretest where idpeserta=id and jabatan=jabatan and jwb=0 order by idpretest asc; jlhsoal=mysql_num_rowsqry; if jlhsoal=1{ data=mysql_fetch_arrayqry; soal=db-tampilrecordtblsoal, idsoal=data[idsoal], soal; jwba=db-tampilrecordtblsoal, idsoal=data[idsoal], jwb_a; jwbb=db-tampilrecordtblsoal, idsoal=data[idsoal], jwb_b; jwbc=db-tampilrecordtblsoal, idsoal=data[idsoal], jwb_c; Universitas Sumatera Utara jwbd=db-tampilrecordtblsoal, idsoal=data[idsoal], jwb_d; kelompok=db-tampilrecordtblsoal, idsoal=data[idsoal], kategori; ? h3 style=margin-top:5px; align=centerSOAL ?php echo strtoupperkelompok; ?h3 div style=width:100; border-bottom:solid 2px 477E00;div table width=100 border=0 cellspacing=0 cellpadding=0 class=table style=font-size:16px; font-weight:bold; tbody tr td colspan=2div style=font-size:14px; color:01118F; font-weight:bold;No Soal : ?php echo _SESSION[nosoal]; ?divtd tr tr td colspan=2?php echo soal; ?input type=hidden name=txtidsoal id=txtidsoal value=?php echo data[idsoal]; ? input type=hidden name=txtidpeserta id=txtidpeserta value=?php echo id;? input name=txtidujian type=hidden id=txtidujian value=?php echo idujian; ?td tr tr td width=3input type=button name=a id=a value=A class=btn btn-primary cmdoktd td width=97?php echo jwba; ?td tr tr Universitas Sumatera Utara tdinput type=button name=b id=b value=B class=btn btn-primary cmdoktd td?php echo jwbb; ?td tr tr tdinput type=button name=c id=c value=C class=btn btn-primary cmdoktd td?php echo jwbc; ?td tr tr tdinput type=button name=d id=d value=D class=btn btn-primary cmdoktd td?php echo jwbd; ?td tr tbody table ?php } ? p div style=font-size:16px; margin-bottom:5px; margin-top:10px; border-top:solid 1px B0B0B0;No Soaldiv ul class=pagination style=margin:0 ?php no=0; qry=mysql_queryselect from tblpretest where idpeserta=id and jabatan=jabatan order by idsoal asc; while data=mysql_fetch_arrayqry{ no++; ? Universitas Sumatera Utara lia href= class=cmdpilih id=?php echo data[idpretest]; ??php echo no; ?a li ?php } ? ul br a href=index.php?page=zindex class=btn btn-default btn- smKembalia p ?php } else{ jabatan=_SESSION[sesijabatan]; echo div class=alert alert-danger role=alert h3Petunjuk Soal:h3 p Soal terdiri dari 3 kategori.br Anda dapat beralih ke soal berikutnya secara otomatis ketika menjawab pertanyaan. br Apabila soal sudah terjawab semua, anda dapat memperbaiki jawaban anda sesuai nomor urutannya, nomor urutannya berada pada sisi bawah. p p a href=hitung.php?jabatan=.jabatan. class=btn btn-primary btn-smLihat Hasila a href=index.php?page=ulang class=btn btn-warning btn- smUlangia a href=..logout.php class=btn btn-danger btn-smLogouta div; Universitas Sumatera Utara } ? div script document.readyfunctione { .cmdok.clickfunctione { var nilai=this.attrid; .postsimpan.php, { idujian:txtidujian.val, idsoal:txtidsoal.val, idpeserta:txtidpeserta.val, nilai:nilai }, function data, status{ if data=={ } else{ .alert{content:data}; } }; }; .cmdpilih.clickfunctione { var nilai=this.attrid; .postpilih.php, { nilai:nilai }, function data, status{ Universitas Sumatera Utara if data=={ } else{ .alert{content:data}; } }; }; }; script

27. Tampilhasil.php