LAMPIRAN PENGUJIAN SISTEM N O
Nama Pengguna
E-mail
1 Zaki
[email protected] 2 Aden Dedi
[email protected] 3 Rozi
[email protected] 4 Tarigan
[email protected] 5 Darma
[email protected] 6 Mulkan
[email protected] 7 Azri
[email protected] 8 Ighfar
[email protected] 9 Maha
[email protected] 10 Hendri
[email protected] 11 Nurdin
[email protected] 12 Ryan
[email protected] 13 Saiful
[email protected] 14 Rifai
[email protected] 15 Agus
[email protected] 16 Rizki
[email protected] 17 Fikri
[email protected] 18 Idham
[email protected] 19 Afif
[email protected] 20 Nasrun
[email protected] Keterangan : P = Pedofilia SS = Sexual Sadism TF = Transvestic Fetishism
Jawab YA 0 4 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0
Dempster-Shafer
Certainty Factor
P
SS
TF
P
SS
TF
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0.9984 0 0.8 0.8 0.8 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0.8 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0.9984 0 0.8 0.8 0.8 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0.8 0 0 0 0 0 0 0 0 0 0
Terdeteksi
Tidak Tidak Tidak Tidak Tidak Tidak Tidak Tidak Tidak Tidak Tidak Tidak Tidak Tidak Tidak Tidak Tidak Tidak Tidak Tidak
Universitas Sumatera Utara
LISTING PROGRAM
deteksi/proses.php
if ($nama == NULL or $email == NULL or $jk == NULL or $umur == NULL or $pekerjaan == NULL or $status == NULL) { header('location: ../index.php?menu=deteksi&konfirmasi=gagal');
Universitas Sumatera Utara
}else{$cache = md5($email); mysql_query("insert into history values ('', '$nama', '$jk', '$umur', '$pekerjaan', '$status', '$email', '$cache', '$date')"); $_SESSION['pengguna']=$cache; header('location: ../kuisoner/index.php'); } ?>
ds.php
Universitas Sumatera Utara
$jlh_yes = 0; while ($data = mysql_fetch_array($sqlDS)) { if ($data['jawab']=="YES") { $sqli = mysql_query ( "select * from symptom where id_symptom = ' ".$data['id_symptom']. "'" ); $dataDS = mysql_fetch_array($sqli); $m[$index] = $dataDS['belief']; $id[$index] = $dataDS['id_symptom']; $pl[$index] = 1 - $m[$index]; // echo $m[$jlh_yes]." >> $jlh_yes".""; $jlh_yes++; $index++; } } if ($jlh_yes < 6) { $DSPedofil = 0; }else{ $n = 1;
Universitas Sumatera Utara
while ($n < $index) { if ($n < 2) { $x = substr($id[$n], 0,1); $y = substr($id[$n], 0,1); $hk = 0; if ($x != $y) { $hk[$n] = $m[$n] + $m[$n+1]; }else{ $i = 1; while($i <= 2){ if ($i < 2) { $M[$i] = $m[$i] * $m[$i+1]; $Ma[$i] = $pl[$i] * $m[$i]; }else{ $M[$i] = $m[$i-1] * $pl[$i-1]; $t[$i] = $pl[$i-1] * $pl[$i]; } $P[$n] += $M[$i];
Universitas Sumatera Utara
$teta[$n] += $t[$i]; $i++; } $P[$n] += $Ma[$n]; } }elseif($n > 2){ $x = substr($id[$n], 0,1); $y = substr($id[$n], 0,1); $hk = 0; if ($x != $y) { $hk[$n] = $m[$n] + $m[$n+1]; }else{ $i = 1; while($i <= $n){ // echo $n; if ($i < 2) { $M[$i] = $P[$n-2] * $m[$n]; $Ma[$i] = $pl[$n] * $P[$n-2];
Universitas Sumatera Utara
$tmp1 = $M[$i] + $Ma[$i];
}else{ $M[$i] = $teta[$n-2] * $m[$n]; $t[$i] = $teta[$n-2] * $pl[$n]; } $teta[$n] += $t[$i]; $i++; } $P[$n-1] = $tmp1 + $M[$n]; $teta[$n-1] = $t[$n-1]; } } $DSPedofil = $P[$n-1].""; $n++; } }
Universitas Sumatera Utara
if ($DSPedofil < 0) { $DSP = abs($DSPedofil) * 100; $DSP1 = substr($DSP, 0, 1); if ($DSP1 > 15) { $DSPs = $DSP1-15; }else{ $DSPs = $DSP1; } }elseif ($DSpedofil >= 0 and $DSpedofil < 1 ) { $DSP = $DSPedofil * 100; if ($DSP < 10) { $DSP1 = substr($DSP, 0, 1); }else{ $DSP1 = substr($DSP, 0, 2); }
if ($DSP1 > 15) { $DSPs = $DSP1-15;
Universitas Sumatera Utara
}else{ $DSPs = $DSP1; } }else{ $DSP = $DSPedofil * 100; if ($DSP < 10) { $DSP1 = substr($DSP, 0, 1); }else{ $DSP1 = substr($DSP, 0, 2); }
if ($DSP1 > 15) { $DSPs = $DSP1-15; }else{ $DSPs = $DSP1; } } ?>
Universitas Sumatera Utara
Pedofil_CF.php
Universitas Sumatera Utara
}
if ($jumlah_yes_p < 5) { $CFPedofil = 0; }else{ $numb = 0; while ($numb < $jumlah_yes_p) { if ($CFmb[0]==0 and $CFmd[0]==0 ) { $CFmb[$numb] = $mbCF[$numb] + $mbCF[$numb+1] * (1- $mbCF[$numb]); }else{ $CFmb[$numb] = $CFmb[$numb-1] + $mbCF[$numb+1] * (1-$CFmb[$numb-1]); } $numb++; } $CFPedofil = $CFmb[$jumlah_yes_p-1]; if ($CFPedofil < 0) { $CFP = abs($CFPedofil) * 100; $CFP1 = substr($CFP, 0, 1);
Universitas Sumatera Utara
if ($CFP1 > 15) { $CFPs = $CFP1-15; }else{ $CFPs = $CFP1; } }elseif ($CFpedofil >= 0 and $CFpedofil < 1 ) { $CFP = $CFPedofil * 100; if ($CFP < 10) { $CFP1 = substr($CFP, 0, 1); }else{ $CFP1 = substr($CFP, 0, 2); }
if ($CFP1 > 15) { $CFPs = $CFP1-15; }else{ $CFPs = $CFP1; }
Universitas Sumatera Utara
}else{ $CFP = $CFPedofil * 100; if ($CFP < 10) { $CFP1 = substr($CFP, 0, 1); }else{ $CFP1 = substr($CFP, 0, 2); }
if ($CFP1 > 15) { $CFPs = $CFP1-15; }else{ $CFPs = $CFP1; } } }
$time_end = microtime(true); $time = substr(($time_end - $time_start), 0,6);
Universitas Sumatera Utara
?>
Sadisme_ds.php
where and
$index = 1; $jlh_yes = 0; while ($data = mysql_fetch_array($sqlDS)) { if ($data['jawab']=="YES") { $sqli = mysql_query("select id_symptom='".$data['id_symptom']."'");
*
from
symptom
where
$dataDS = mysql_fetch_array($sqli); $mS[$index] = $dataDS['belief']; $id[$index] = $dataDS['id_symptom']; $plS[$index] = 1 - $mS[$index]; $jlh_yes++;
Universitas Sumatera Utara
$index++; //echo $m[$index]."
"; }
}
if ($jlh_yes < 5) { $DSSadism = 0; }else{ $n = 1; while ($n < $index) { if ($n < 2) { $x = substr($id[$n], 0,1); $y = substr($id[$n], 0,1); $hk = 0; if ($x != $y) { $hk[$n] = $m[$n] + $m[$n+1]; }else{
Universitas Sumatera Utara
$i = 1; while($i <= 2){ if ($i < 2) { $MS[$i] = $mS[$i] * $mS[$i+1]; $MaS[$i] = $plS[$i] * $mS[$i]; }else{ $MS[$i] = $mS[$i-1] * $plS[$i-1]; $tS[$i] = $plS[$i-1] * $plS[$i]; } $PS[$n] += $MS[$i]; $tetaS[$n] += $tS[$i]; $i++; } $PS[$n] += $MaS[$n]; } }elseif($n > 2){ $x = substr($id[$n], 0,1); $y = substr($id[$n], 0,1);
Universitas Sumatera Utara
$hk = 0; if ($x != $y) { $hk[$n] = $mS[$n] + $mS[$n+1]; }else{ $i = 1; while($i <= $n){ if ($i < 2) { $MS[$i] = $PS[$n-2] * $mS[$n]; $MaS[$i] = $plS[$n] * $PS[$n-2]; $tmp1S = $MS[$i] + $MaS[$i];
}else{ $MS[$i] = $tetaS[$n-2] * $mS[$n]; $tS[$i] = $tetaS[$n-2] * $plS[$n]; } $tetaS[$n] += $tS[$i]; $i++; }
Universitas Sumatera Utara
$PS[$n-1] = $tmp1S + $MS[$n]; $tetaS[$n-1] = $tS[$n-1]; } } $DSSadism = $PS[$n-1]; $n++; } } if ($DSSadism < 0) { $DSS = abs($DSSadism) * 1000; $DSS1 = substr($DSS, 0, 2); if ($DSS1 > 15) { $DSSs = $DSS1-15; }else{ $DSSs = $DSS1; } }elseif ($DSSadism >= 0 and $DSSadism < 1 ) { $DSS = $DSSadism * 100;
Universitas Sumatera Utara
if ($DSS < 10) { $DSS1 = substr($DSS, 0, 1); }else{ $DSS1 = substr($DSS, 0, 2); } if ($DSS1 > 15) { $DSSs = $DSS1-15; }else{ $DSSs = $DSS1; }; }else{ $DSS = $DSSadism * 100; if ($DSS < 10) { $DSS1 = substr($DSS, 0, 1); }else{ $DSS1 = $DSS; }
Universitas Sumatera Utara
if ($DSS1 > 15) { $DSSs = $DSS1-15; }else{ $DSSs = $DSS1; } } ?>
Transvestic_ds.php
jawaban.cache symptom.psyco
= =
$index = 1; $jlh_yes = 0; while ($data = mysql_fetch_array($sqlDS)) {
Universitas Sumatera Utara
if ($data['jawab']=="YES") { $sqli = mysql_query("select id_symptom='".$data['id_symptom']."'");
*
from
symptom
where
$dataDS = mysql_fetch_array($sqli); $mT[$index] = $dataDS['belief']; $id[$index] = $dataDS['id_symptom']; $plT[$index] = 1 - $mT[$index]; $jlh_yes++; $index++; } }
if ($jlh_yes < 5) { $DSTransvestic = 0; }else{ $n = 1; while ($n < $index) { if ($n < 2) {
Universitas Sumatera Utara
$x = substr($id[$n], 0,1); $y = substr($id[$n], 0,1); $hk = 0; if ($x != $y) { $hk[$n] = $m[$n] + $m[$n+1]; }else{ $i = 1; while($i <= 2){ if ($i < 2) { $MT[$i] = $mT[$i] * $mT[$i+1]; $MaT[$i] = $plT[$i] * $mT[$i]; }else{ $MT[$i] = $mT[$i-1] * $plT[$i-1]; $tT[$i] = $plT[$i-1] * $plT[$i]; } $PT[$n] += $MT[$i]; $tetaT[$n] += $tT[$i]; $i++;
Universitas Sumatera Utara
} $PT[$n] += $MaT[$n]; } }elseif($n > 2){ $x = substr($id[$n], 0,1); $y = substr($id[$n], 0,1); $hk = 0; if ($x != $y) { $hk[$n] = $m[$n] + $m[$n+1]; }else{ $i = 1; while($i <= $n){ // echo $n; if ($i < 2) { $MT[$i] = $PT[$n-2] * $mT[$n]; $MaT[$i] = $plT[$n] * $PT[$n-2]; $tmp1T = $MT[$i] + $MaT[$i];
Universitas Sumatera Utara
}else{ $MT[$i] = $tetaT[$n-2] * $mT[$n]; $tT[$i] = $tetaT[$n-2] * $plT[$n]; } $tetaT[$n] += $tT[$i]; $i++; } $PT[$n-1] = $tmp1T + $MT[$n]; $tetaT[$n-1] = $tT[$n-1]; }
} $DSTransvestic = $PT[$n-1]; $n++; } } if ($DSTransvestic < 0) { $DST = abs($DSTransvestic) * 1000;
Universitas Sumatera Utara
$DST = substr($DST, 0, 2); if ($DST1 > 15) { $DSTs = $DST1-15; }else{ $DSTs = $DST1; } }elseif ($DSTransvestic >= 0 and $DSTransvestic < 1 ) { $DST = $DSTransvestic * 100; if ($DST < 10) { $DST1 = substr($DST, 0, 1); }else{ $DST1 = substr($DST, 0, 2); }
if ($DST1 > 15) { $DSTs = $DST1-15; }else{ $DSTs = $DST1;
Universitas Sumatera Utara
} }else{ $DST = $DSTransvestic * 100; if ($DST < 10) { $DST1 = substr($DST, 0, 1); }else{ $DST1 = $DST; }
if ($DST1 > 15) { $DSTs = $DST1-15; }else{ $DSTs = $DST1; } } ?>
Sadisme_cf.php
Universitas Sumatera Utara
*
from
symptom
where
$dataCF = mysql_fetch_array($sqli); $mbCF[$num] = $dataCF['belief']; $mdCF[$num] = $dataCF['disbelief']; $jumlah_yes++; $num++; }
}
Universitas Sumatera Utara
if ($jumlah_yes < 5) { $CFSadism = 0; }else{ $numb = 0; while ($numb < $jumlah_yes) { if ($CFmb[0]==0 and $CFmd[0]==0 ) { $CFmb[$numb] = $mbCF[$numb] + $mbCF[$numb+1] * (1-$mbCF[$numb]); }else{ $CFmb[$numb] = $CFmb[$numb-1] + $mbCF[$numb+1] * (1-$CFmb[$numb-1]); } $numb++; } $CFSadism = $CFmb[$jumlah_yes - 1]; }
if ($CFSadism < 0) { $CFS = abs($CFSadism) * 1000;
Universitas Sumatera Utara
$CFS1 = substr($CFS, 0, 2); if ($CFS1 > 15) { $CFSs = $CFS1-15; }else{ $CFSs = $CFS1; } }elseif ($CFSadism >= 0 and $CFSadism < 1 ) { $CFS = $CFSadism * 100; if ($CFS < 10) { $CFS1 = substr($CFS, 0, 1); }else{ $CFS1 = substr($CFS, 0, 2); } // $CFS1 = substr($CFS, 0, 2); if ($CFS1 > 15) { $CFSs = $CFS1-15; }else{ $CFSs = $CFS1;
Universitas Sumatera Utara
}; }else{ $CFS = $CFSadism * 100; if ($CFS < 10) { $CFS1 = substr($CFS, 0, 1); }else{ $CFS1 = $CFS; }
if ($CFS1 > 15) { $CFSs = $CFS1-15; }else{ $CFSs = $CFS1; }; }
// sleep(10); $time_end = microtime(true);
Universitas Sumatera Utara
$times = substr(($time_end - $time_start), 0, 6); ?>
Transvestic_cf.php
jawaban.cache symptom.psyco
= =
$num = 0; $jumlah_yes = 0; $jumlah_no = 0; while ($data = mysql_fetch_array($sqlCF)) { if ($data['jawab']=="YES") { $sqli = mysql_query("select id_symptom='".$data['id_symptom']."'");
*
from
symptom
where
$dataCF = mysql_fetch_array($sqli); $mbCF[$num] = $dataCF['belief'];
Universitas Sumatera Utara
$mdCF[$num] = $dataCF['disbelief']; $jumlah_yes++; $num++; }
} if ($jumlah_yes < 5) { $CFTransvestic = 0; // echo $jumlah_yes; // echo $CFTransvestic; }else{ $numb = 0; while ($numb < $jumlah_yes) { if ($CFmb[0]==0 and $CFmd[0]==0 ) { $CFmb[$numb] = $mbCF[$numb] + $mbCF[$numb+1] * (1-$mbCF[$numb]); }else{ $CFmb[$numb] = $CFmb[$numb-1] + $mbCF[$numb+1] * (1-$CFmb[$numb-1]); }
Universitas Sumatera Utara
$numb++; } $CFTransvestic = $CFmb[$jumlah_yes - 1]; } if ($CFTransvestic < 0) { $CFT = abs($CFTransvestic) * 1000; $CFT = substr($CFT, 0, 2); if ($CFT1 > 15) { $CFTs = $CFT1-15; }else{ $CFTs = $CFT1; } }elseif ($CFTransvestic >= 0 and $CFTransvestic < 1 ) { $CFT = $CFTransvestic * 100; if ($CFT < 10) { $CFT1 = substr($CFT, 0, 1); }else{ $CFT1 = substr($CFT, 0, 2);
Universitas Sumatera Utara
} if ($CFT1 > 15) { $CFTs = $CFT1-15; }else{ $CFTs = $CFT1; } }else{ $CFT = $CFTransvestic * 100; if ($CFT < 10) { $CFT1 = substr($CFT, 0, 1); }else{ $CFT1 = $CFT; }
if ($CFT1 > 15) { $CFTs = $CFT1-15; }else{ $CFTs = $CFT1;
Universitas Sumatera Utara
} } $time_end = microtime(true); $timess = substr(($time_end - $time_start), 0, 6); ?>
Universitas Sumatera Utara