langkah 1
langkah 2
langkah 3
langkah 4
langkah 5
Langkah 6
Tutup regedit dan restart windows anda, perhatikan apa yang terjadi, Run sudah kembali pada posisinya semula.
SMK Binawiyata Sragen
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
ORG 0H JMP MAIN ORG 0BH JMP TMR0 OK EQU 7FH N1 EQU 7EH N2 EQU 7DH ; BA ARZESH TARIN N21 EQU 7CH DN EQU 7BH TMP EQU 7AH DHTMP EQU 79H DLTMP EQU 78H DTMP1 EQU 77H DTMP2 EQU 76H MDTMP1 EQU 75H MDTMP2 EQU 74H STEPM EQU 73H KEYNUM EQU 72H SROTATION BIT 2FH PKEY EQU P1 ORG 30H MAIN: MOV P0,#0H MOV IE,#82H MOV TMOD,#1H MOV N1,#0 MOV N2,#0 SETB TR0 CLR SROTATION MOV STEPM,#99H M1: CALL KEY JNB SROTATION,M1 CALL BCD2DEC M2: CALL ROTAION DJNZ N21,M2 CLR SROTATION JMP M1 ;--------------------------- ROTAION ROTAION: CALL MDELAY MOV A,STEPM RR A MOV P0,A MOV STEPM,A CALL MDELAY RET ;--------------------------- TIMER 0 TMR0: MOV TMP,A MOV DHTMP,DPH MOV DLTMP,DPL MOV TH0,#0ECH MOV TL0,#077H CLR TR0 CALL DISPLAY SETB TR0 MOV DPH,DHTMP MOV DPL,DLTMP MOV A,TMP RETI ;--------------------------- DISPALY DISPLAY: MOV DN,N1 CALL NUM2SEG MOV A,DN CPL A MOV P2,A SETB P3.7 CALL DELAY CLR P3.7 MOV DN,N2 CALL NUM2SEG MOV A,DN CPL A MOV P2,A SETB P3.6 CALL DELAY CLR P3.6 RET ;---------------------------KEYBOARD KEY: MOV PKEY,#0FH MOV A,PKEY ANL A,#0FH CJNE A,#0FH,KEY2 ;KEY1 JMP KFNL KEY2: CALL MDELAY MOV A,PKEY ANL A,#0FH CJNE A,#0FH,KEY3 JMP KFNL KEY3: MOV R0,#4 KEY31: RRC A JNC KEY4 DJNZ R0,KEY31 JMP KFNL KEY4: CJNE R0,#4,KEY42 MOV DPTR,#ROW_1 JMP KEY5 KEY42: CJNE R0,#3,KEY43 MOV DPTR,#ROW_2 JMP KEY5 KEY43: CJNE R0,#2,KEY44 MOV DPTR,#ROW_3 JMP KEY5 KEY44: CJNE R0,#1,KFNL MOV DPTR,#ROW_4 JMP KEY5 ;---------- KEY5: MOV PKEY,#0FFH MOV PKEY,#0F0H NOP NOP NOP NOP MOV A,PKEY SWAP A ANL A,#0FH MOV R0,#4 KEY51: RRC A JNC KEY6 DJNZ R0,KEY51 JMP KFNL KEY6: CJNE R0,#4,KEY61 JMP KEY7 KEY61: CJNE R0,#3,KEY62 INC DPTR JMP KEY7 KEY62: CJNE R0,#2,KEY63 INC DPTR INC DPTR JMP KEY7 KEY63: CJNE R0,#1,KFNL INC DPTR INC DPTR INC DPTR JMP KEY7 ;---------- KEY7: MOV A,#0 MOVC A,@A+DPTR MOV KEYNUM,A MOV A,#N2 ADD A,R1 MOV R0,A MOV @R0,KEYNUM KEY8: MOV PKEY,#0FH MOV A,PKEY CJNE A,#0FH,KEY8 INC R1 CJNE R1,#2,KFNL MOV R1,#0 SETB SROTATION JMP KFNL KFNL: RET ;------------------------------------------------ NUM2SEG:MOV DPTR,#TABLE MOV A,DN MOVC A,@A+DPTR MOV DN,A RET ;--------------------------- DELAY DELAY: MOV DTMP1,#25 DD2: MOV DTMP2,#25 DD1: DJNZ DTMP2,DD1 DJNZ DTMP1,DD2 RET ;--------------------------- MOTOR DELAY MDELAY: MOV MDTMP1,#50 MDD2: MOV MDTMP2,#250 MDD1: DJNZ MDTMP2,MDD1 DJNZ MDTMP1,MDD2 RET ;--------------------------- DED2DEC BCD2DEC: MOV B,#10 MOV A,N2 MUL AB ADD A,N1 ADD A,#1 MOV N21,A RET ;------------------------------------------------ TABLE: DB 3FH,06H,5BH,4FH,66H,6DH,7DH,27H,7FH,6FH,00H,80H,40H ;------------------------------------------------ ROW_1: DB 1,2,3 ROW_2: DB 4,5,6 ROW_3: DB 7,8,9 ROW_4: DB '*',0,'#' END
$regfile = "m8def.dat" $crystal = 1000000 $hwstack = 64 $swstack = 64 $framesize = 64 Config Kbd = Portb , Debounce = 150 , Delay = 200 Config Portb = Input Config Portc = Output Config Portd = Output Dim A As Byte Speaker Alias Pinc.0 Main: Wait 1 Sound Speaker , 120 , 100 Sound Speaker , 120 , 80 Do A = Getkbd() A = Lookup(a , Read_key) If A < 12 Then Select Case A Case 0: Sound Speaker , 120 , 20 Goto Main0 Case 1: Sound Speaker , 120 , 20 Goto Main1 Case 2: Sound Speaker , 120 , 20 Goto Main2 Case 3: Sound Speaker , 120 , 20 Goto Main3 Case 4: Sound Speaker , 120 , 20 Goto Main4 Case 5: Sound Speaker , 120 , 20 Goto Main5 Case 6: Sound Speaker , 120 , 20 Goto Main6 Case 7: Sound Speaker , 120 , 20 Goto Main7 Case 8: Sound Speaker , 120 , 20 Goto Main8 Case 9: Sound Speaker , 120 , 20 Goto Main9 Case 11: Sound Speaker , 120 , 20 Goto Main11 Case 10: Sound Speaker , 120 , 20 Goto Main10 End Select End If Loop End '_______________________________________________________________________________ Read_key: Data 1 , 4 , 7 , 11 , 2 , 5 , 8 , 0 , 3 , 6 , 9 , 10 '_______________________________________________________________________________ Main0: A = Getkbd() A = Lookup(a , Read_key) If A < 12 Then Select Case A Case 0 To 9: Sound Speaker , 120 , 500 Case 11: Portc.5 = 1 Sound Speaker , 120 , 100 Sound Speaker , 120 , 80 Sound Speaker , 120 , 60 Goto Main Case 10: Portc.5 = 0 Sound Speaker , 120 , 60 Sound Speaker , 120 , 80 Sound Speaker , 120 , 100 Goto Main End Select End If jmp main0 Main1: A = Getkbd() A = Lookup(a , Read_key) If A < 12 Then Select Case A Case 0 To 9: Sound Speaker , 120 , 500 Case 11: Portc.4 = 1 Sound Speaker , 120 , 100 Sound Speaker , 120 , 80 Sound Speaker , 120 , 60 Goto Main Case 10: Portc.4 = 0 Sound Speaker , 120 , 60 Sound Speaker , 120 , 80 Sound Speaker , 120 , 100 Goto Main End Select End If jmp main1 Main2: A = Getkbd() A = Lookup(a , Read_key) If A < 12 Then Select Case A Case 0 To 9: Sound Speaker , 120 , 500 Case 11: Portc.3 = 1 Sound Speaker , 120 , 100 Sound Speaker , 120 , 80 Sound Speaker , 120 , 60 Goto Main Case 10: Portc.3 = 0 Sound Speaker , 120 , 60 Sound Speaker , 120 , 80 Sound Speaker , 120 , 100 Goto Main End Select End If jmp main2 Main3: A = Getkbd() A = Lookup(a , Read_key) If A < 12 Then Select Case A Case 0 To 9: Sound Speaker , 120 , 500 Case 11: Portc.2 = 1 Sound Speaker , 120 , 100 Sound Speaker , 120 , 80 Sound Speaker , 120 , 60 Goto Main Case 10: Portc.2 = 0 Sound Speaker , 120 , 60 Sound Speaker , 120 , 80 Sound Speaker , 120 , 100 Goto Main End Select End If jmp main3 Main4: A = Getkbd() A = Lookup(a , Read_key) If A < 12 Then Select Case A Case 0 To 9: Sound Speaker , 120 , 500 Case 11: Portc.1 = 1 Sound Speaker , 120 , 100 Sound Speaker , 120 , 80 Sound Speaker , 120 , 60 Goto Main Case 10: Portc.1 = 0 Sound Speaker , 120 , 60 Sound Speaker , 120 , 80 Sound Speaker , 120 , 100 Goto Main End Select End If jmp main4 Main5: A = Getkbd() A = Lookup(a , Read_key) If A < 12 Then Select Case A Case 0 To 9: Sound Speaker , 120 , 500 Case 11: Portd.0 = 1 Sound Speaker , 120 , 100 Sound Speaker , 120 , 80 Sound Speaker , 120 , 60 Goto Main Case 10: Portd.0 = 0 Sound Speaker , 120 , 60 Sound Speaker , 120 , 80 Sound Speaker , 120 , 100 Goto Main End Select End If jmp main5 'www.bargh20.com Main6: A = Getkbd() A = Lookup(a , Read_key) If A < 12 Then Select Case A Case 0 To 9: Sound Speaker , 120 , 500 Case 11: Portd.1 = 1 Sound Speaker , 120 , 100 Sound Speaker , 120 , 80 Sound Speaker , 120 , 60 Goto Main Case 10: Portd.1 = 0 Sound Speaker , 120 , 60 Sound Speaker , 120 , 80 Sound Speaker , 120 , 100 Goto Main End Select End If jmp main6 Main7: A = Getkbd() A = Lookup(a , Read_key) If A < 12 Then Select Case A Case 0 To 9: Sound Speaker , 120 , 500 Case 11: Portd.2 = 1 Sound Speaker , 120 , 100 Sound Speaker , 120 , 80 Sound Speaker , 120 , 60 Goto Main Case 10: Portd.2 = 0 Sound Speaker , 120 , 60 Sound Speaker , 120 , 80 Sound Speaker , 120 , 100 Goto Main End Select End If jmp main7 Main8: A = Getkbd() A = Lookup(a , Read_key) If A < 12 Then Select Case A Case 0 To 9: Sound Speaker , 120 , 500 Case 11: Portd.3 = 1 Sound Speaker , 120 , 100 Sound Speaker , 120 , 80 Sound Speaker , 120 , 60 Goto Main Case 10: Portd.3 = 0 Sound Speaker , 120 , 60 Sound Speaker , 120 , 80 Sound Speaker , 120 , 100 Goto Main End Select End If jmp main8 Main9: A = Getkbd() A = Lookup(a , Read_key) If A < 12 Then Select Case A Case 0 To 9: Sound Speaker , 120 , 500 Case 11: Portd.4 = 1 Sound Speaker , 120 , 100 Sound Speaker , 120 , 80 Sound Speaker , 120 , 60 Goto Main Case 10: Portd.4 = 0 Sound Speaker , 120 , 60 Sound Speaker , 120 , 80 Sound Speaker , 120 , 100 Goto Main End Select End If jmp main9 Main11: Wait 3 A = Getkbd() A = Lookup(a , Read_key) If A = 11 Then Sound Speaker , 120 , 100 Sound Speaker , 120 , 80 Sound Speaker , 120 , 60 Portc.5 = 1 Portc.4 = 1 Portc.3 = 1 Portc.2 = 1 Portc.1 = 1 Portd.0 = 1 Portd.1 = 1 Portd.2 = 1 Portd.3 = 1 Portd.4 = 1 Goto Main Else Goto Main End If Main10: Wait 3 A = Getkbd() A = Lookup(a , Read_key) If A = 10 Then Sound Speaker , 120 , 60 Sound Speaker , 120 , 80 Sound Speaker , 120 , 100 Portc.5 = 0 Portc.4 = 0 Portc.3 = 0 Portc.2 = 0 Portc.1 = 0 Portd.0 = 0 Portd.1 = 0 Portd.2 = 0 Portd.3 = 0 Portd.4 = 0 Goto Main Else Goto Main End If
<select name="pilihan"> <option value="belum milih" selected>-Silahkan Pilih makanan Kesukaan Anda-</option> <option value="sate">Sate</option> <option value="soto">Soto</option> <option value="nasi goreng">Nasi Goreng</option> <option value="nasi pecel">Nasi Pecel</option> </select>
<?php $host = "localhost"; // db host $username = "root"; // db username $password = "123456"; // db password $db = "combo"; // db name // Melakukan koneksi ke database mysql_connect($host,$username,$password) or die("Koneksi gagal"); mysql_select_db($db) or die("Database tidak bisa dibuka"); ?>Tampil anggota ke combo :
<?php include"koneksi.php"; echo "<select name='anggota'>"; $tampil=mysql_query("SELECT * FROM anggota_ludruk ORDER BY id"); echo "<option value='belum milih' selected>- Pilih Anggota Ludruk -</option>"; while($w=mysql_fetch_array($tampil)) { echo "<option value=$w[nama] selected>$w[nama]</option>"; } echo "</select>"; ?>Result :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <script language="javascript"> function validasi(form){ if (form.username.value == ""){ alert("Anda belum mengisikan Username."); form.username.focus(); return (false); } if (form.password.value == ""){ alert("Anda belum mengisikan Password."); form.password.focus(); return (false); } return (true); } </script> <meta http-equiv="content-type" content="text/html;charset=UTF-8"> <head> <title>LOGIN</title> </head> <body> <form name="login" action="cek_login.php" method="POST" onSubmit="return validasi(this)"> <br /><br /><br /><br /> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div align="center"> <table cellpadding="0" cellspacing="0"> <tr> <td height="25">Username :</td> <td> <input type="text" name="username" /></td></tr> <tr><td height="30">Password :</td> <td> <input type="password" name="password" /></td></tr> <tr><td colspan="2"><div align="right"> <input name="submit" type="submit" value="LOGIN" /></div></td> </tr> </table> </div> </td> </tr> </table> </form> </body> </html>Step 3
<?php // -- Host, Username dan Password Database $host = "localhost";//db-host $username = "root";//db-user $password = "123456";//db-password $db = "user_online";//db-name // Melakukan koneksi ke database mysql_connect($host,$username,$password) or die("Koneksi gagal"); mysql_select_db($db) or die("Database tidak bisa dibuka"); ?>Step 4
<?php include "koneksi.php"; function antiinjection($data){ $filter_sql = mysql_real_escape_string(stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)))); return $filter_sql; } $username = antiinjection($_POST[username]); $pass = antiinjection($_POST[password]); $login=mysql_query("SELECT * FROM user WHERE username='$username' AND password='$pass'"); $ketemu=mysql_num_rows($login); $r=mysql_fetch_array($login); // Apabila username dan password ditemukan if ($ketemu > 0) { session_start(); session_register("username"); session_register("password"); $_SESSION[username] = $r[username]; $_SESSION[password] = $r[password]; $jam = date("H:i:s"); $tgl = date("Y-m-d"); mysql_query("INSERT INTO log(username, tanggal, jamin, jamout, status) VALUES('$_SESSION[username]', '$tgl', '$jam', 'logged', 'online')"); header('location:home.php'); } else { echo "<center><br><br><br><br><br><br><b>LOGIN GAGAL! </b><br> Username atau Password Anda tidak benar.<br>"; echo "<br>"; echo "<input type=button value='ULANGI LAGI' onclick=location.href='index.php'></a></center>"; } ?>Step 5
<?php include "koneksi.php"; session_start(); if (empty($_SESSION[username]) AND empty($_SESSION[password])) { header('location:index.php'); } else { ?> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>HOME</title> <style> th{ color: #FFFFFF; font-size: 8pt; text-transform: uppercase; text-align: center; padding: 0.1em; border-width: 1px; border-style: solid; border-color: #969BA5; border-collapse: collapse; background-color: #265180; } </style> </head> <body> <?php echo" <center>USER ONLINE <table border=1 width='650' align=center> <tr><th>No</th><th>Username</th><th>Tanggal Login</th><th>Jam Login</th><th>Jam Logout</th><th>Status</th></tr>"; $sql = mysql_query("SELECT * FROM log ORDER BY no DESC"); $no=1; while($d=mysql_fetch_array($sql)) { echo "<tr><td align=center>$no</td> <td align=center>$d[username]</td> <td align=center>$d[tanggal]</td> <td align=center>$d[jamin]</td> <td align=center>$d[jamout]</td>"; if($d[status]=='offline') { echo"<td style='background-color:red' align=center>OFFLINE</td>"; } else { echo"<td style='background-color:00ff00' align=center>ONLINE</td>"; } echo"</tr>"; $no++; } echo "</table>"; echo "<br /><br /><input type=button value='LOGOUT' onclick=location.href='logout.php'></a></center>"; ?> </body> </html> <?php } ?>
<?php include "koneksi.php"; $jam = date("H:i:s"); session_start(); mysql_query("UPDATE log SET jamout='$jam', status='offline' WHERE username = '$_SESSION[username]' AND jamout='logged' AND status='online'"); session_destroy(); header('location:index.php'); ?>Tamat ¦..
Source Code : <?php session_register('bahasa'); include "koneksi.php"; if($_GET['lang']) { $_SESSION['bahasa']=$_GET['lang']; header('location:index.php'); } else { if(!$_SESSION['bahasa']) { $_SESSION['bahasa']='indonesia'; header('location:index.php'); } } include "".$_SESSION['bahasa'].".php"; ?>