<?php
session_start();
include "../sessiontest.php";
include "main_function51.php";
include "delete.php";
include "insert.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Soal 51</title>
<link rel="stylesheet" type="text/css" href="../css/accordion_glam.css" />
</head>
<Script type="text/javascript">
window.history.forward(1);
function check_input() {
with ( document.forms.input ) {
valid1 = new Array();
// valid1ation code soal 1
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5101"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5101"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5102"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5102"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5103"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5103"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5104"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5104"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5105"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5105"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5106"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5106"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5107"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5107"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5108"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5108"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5109"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5109"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5110"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5110"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5111"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5111"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5112"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5112"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5113"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5113"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5114"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5114"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5115"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5115"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5116"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5116"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5117"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5117"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5118"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5118"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5119"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5119"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5120"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5120"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5121"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5121"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5122"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5122"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5123"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5123"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5124"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5124"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5125"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5125"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5126"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5126"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5127"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5127"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5128"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5128"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5129"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5129"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5130"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5130"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5131"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5131"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5132"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5132"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5133"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5133"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5134"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5134"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5135"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5135"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5136"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5136"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5137"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5137"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5138"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5138"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5139"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5139"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5140"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5140"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5141"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5141"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5142"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5142"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5143"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5143"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5144"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5144"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5145"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5145"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5146"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5146"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5147"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5147"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5148"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5148"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5149"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5149"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5150"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5150"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
for ( i = 0; !checked && ( i < document.forms["input"]["A5151"].length ); i++ ) {
checked = checked || ( document.forms["input"]["A5151"][ i ].checked == true );
}
valid1[ valid1.length ] = checked ? "true" : "";
checked = false;
// alert results
_clonefish_message = '';
for ( i in valid1 )
if ( ( valid1[ i ] != 'true' ) )
_clonefish_message += "-" + valid1[ i ] + "\n";
if ( _clonefish_message.length) {
alert( "Ada Soal Yang Belum Dijawab Tolong di Lengkapi : ");
return false;
}
else
return true;
}
}
</Script>
<div id="header">
<div class="shell">
<img src="../images/Logo-Equity.png" align="left" height="95"/></div>
</div><br />
<div id="test-accordion" class="accordion">
<div class="accordion-content">
<form action="finish.php" method="post" name="input" onsubmit="return check_input();">
<p><?php
$i = 1;
$soal=mysql_query("select * from tb_tampung WHERE ID_user = '".$_POST['iduser']."' ORDER BY RAND()");
while ($data=mysql_fetch_array($soal))
{
echo $i.". ".$data["soal"]."<br>";
?></p>
<table width="99%" height="77" border="0">
<input type="hidden" name="iduser" value="<?php echo $_POST['iduser' ] ?>" />
<input type="hidden" name="nama" value="<?php echo $_POST['nama' ] ?>" />
<input type="hidden" name="tanggal" value="<?php echo $_POST['tanggal' ] ?>" />
<input type="hidden" name="bulan" value="<?php echo $_POST['bulan' ] ?>" />
<input type="hidden" name="tahun" value="<?php echo $_POST['tahun' ] ?>" />
<input type="hidden" name="alamat" value="<?php echo $_POST['alamat' ] ?>" />
<input type="hidden" name="jk" value="<?php echo $_POST['jk' ] ?>" />
<input type="hidden" name="email" value="<?php echo $_POST['email' ] ?>" />
<input type="hidden" name="kota" value="<?php echo $_POST['kota' ] ?>" />
<input type="hidden" name="notlpn" value="<?php echo $_POST['notlpn' ] ?>" />
<input type="hidden" name="kota" value="<?php echo $_POST['kota' ] ?>" />
<input type="hidden" name="propinsi" value="<?php echo $_POST['propinsi' ] ?>" />
<?php if($data['gambar'] != "") : ?>
<tr>
<td align="center" valign="middle"></td>
<td width="45%" align="center" valign="middle"></a><img src="EquityTes/<?php echo $data['gambar'];?>" /></td>
<?php endif; ?>
<?php if($data['gambar2'] != "") : ?>
<td width="51%" align="center" valign="middle"></a><img src="EquityTes/<?php echo $data['gambar2'];?>" /></td>
</tr>
<?php endif; ?>
//ada opsi di bawah ini yang saya mau random -->
<tr>
<td width="4%" align="center" valign="top"><input type="radio" name="A<?php echo $data["ID_soal"]; ?>" value="A" /></td>
<td colspan="2" align="left" valign="top"><?php echo $data['jwb1']; ?></td>
</tr>
<tr>
<td align="center" valign="top" ><input type="radio" name="A<?php echo $data["ID_soal"]; ?>" value="B" /></td>
<td colspan="2" align="left" valign="top" ><?php echo $data['jwb2']; ?></td>
</tr>
<?php if($data['jwb3'] != "") : ?>
<tr>
<td height="23" align="center" valign="top" ><input type="radio" name="A<?php echo $data["ID_soal"]; ?>" value="X" /></td>
<td colspan="2" align="left" valign="top" ><?php echo $data['jwb3']; ?></td>
</tr>
<?php endif; rand();?>
//<--- akhir random opsi
</table>
<br />
<?php
$i++;
}
?></p>
<table width="100%" border="0">
<tr>
<td width="90%"> </td>
<td width="10%"><input name="btnfinish" type="submit" value="Finish"/></td>
</tr>
</table>
</form>
</div></div>
</body>
</html>
<form action="link_history.php" method="post">
<input type="text"/>
<input type="submit" value="submit"/>
</form>
<?php
session_start();
?>
<script type="text/javascript">
alert("balik ke history");
window.history.back();
</script>
<html>
<head>
<script>
var idrow = 2;
function tambah(){
var x=document.getElementById('datatable').insertRow(idrow);
var td1=x.insertCell(0);
var td2=x.insertCell(1);
var td3=x.insertCell(2);
var td4=x.insertCell(3);
var td5=x.insertCell(4);
//td1.innerHTML="<input type='tex't name='idkaryawan[]'>";
td1.innerHTML="<select name='prdId[]'><option>-------</option><option>Perempuan</option></select>"; //diharapkan query php bisa di sisipkan disini
td2.innerHTML="<input type ='text' name='nama[]'>";
td3.innerHTML="<select name='sex[]'><option>Laki-laki</option><option>Perempuan</option></select>";
td4.innerHTML="<input type ='text' name='email[]'>";
td5.innerHTML="<input type ='date' name='date[]'>";
idrow++;
}
function hapus(){
if(idrow>2){
var x=document.getElementById('datatable').deleteRow(idrow-1);
idrow--;
}
}
</script></head>
<body>
<form action=prosesdatakaryawan.php method=post>
<table id=datatable border=0>
<tr bgcolor=#ababab>
<td>ID Karyawan</td>
<td>Nama</td>
<td>Jenis Kelamin</td>
<td>Email</td>
<td>Tanggal</td>
</tr>
<tr>
<td>
//query memanggil data dari database
<?php
$result = mysql_query("select * from partner");
$jsArray = "var prdName = new Array();\n";
echo '<select name="prdId[]" onchange="document.getElementById(\'prd_name\').value = prdName[this.value]">';
echo '<option>-------</option>';
while ($row = mysql_fetch_array($result)) {
echo '<option value="' . $row['id_partner'] . '">' . $row['id_partner'] . '</option>';
$jsArray .= "prdName['" . $row['id_partner'] . "'] = '" . addslashes($row['partnername']) . "';\n";
}
echo '</select>';
?>
</td>
<td><input type='text' name='nama[]' id='prd_name'/>
<script type='text/javascript'>
<?php echo $jsArray; ?>
</script></td>
<td><select name='sex[]'><option>Laki-laki</option><option>Perempuan</option></select></td>
<td><input type ='text' name='email[]'></td>
<td><input type ='date' name='date[]'></td>
</tr>
</table>
<input type=button value=tambah onclick=tambah()>
<input type=button value=delete onclick=hapus()
<br>
<input type=submit>
</form>
</body>
</html>