Professional Documents
Culture Documents
i=1
For i = 1 To 31
Combo1.AddItem i
Next i
Dim i As Integer
Do While i < 10
i=i+1
Loop
Dim i As Integer
Do Until i >= 10
List1.AddItem i
Dim i As Integer
i=0
While i < 10
List2.AddItem i
i=i+1
Wend
Text2.Text = "Lulus"
Else
Text2.Text = "Gagal"
End If
If Text1.Text >= 85 Then
Text2.Text = "A"
Text2.Text = "B"
Text2.Text = "C"
Else
Text2.Text = "ERROR"
End If
Else
Text1.Text = "Ganjil"
Else
Text1.Text = "Genap"
End If
Dim i As Integer
i=1
For i = 1 To 10
Combo1.AddItem i
Next i
If Text1.Text = 1 Then
Text2.Text = "ganjil"
Text2.Text = "genap"
Text2.Text = "ganjil"
Text2.Text = "genap"
Text2.Text = "ganjil"
Text2.Text = "genap"
Text2.Text = "ganjil"
Text2.Text = "genap"
Text2.Text = "ganjil"
Text2.Text = "genap"
End If
Sub kosong()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Combo1.Text = ""
End Sub
Sub mati()
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Combo1.Enabled = False
End Sub
Sub hidup()
Text1.Enabled
Text2.Enabled
Text3.Enabled
Text4.Enabled
Combo1.Enabled
End Sub
Sub kondisiawal()
kosong
mati
Command1.Caption = "tambah"
Command2.Caption = "ubah"
Command3.Caption = "hapus"
Command4.Caption = "keluar"
Command1.Caption = True
Command2.Caption = True
Command3.Caption = True
End Sub
kondisiawal
End Sub
Sub simpan()
Adodc1.Recordset.Fields(0) = Text1.Text
Adodc1.Recordset.Fields(1) = Combo1.Text
Adodc1.Recordset.Fields(2) = Text2.Text
Adodc1.Recordset.Fields(3) = Text3.Text
Adodc1.Recordset.Fields(4) = Text4.Text
Adodc1.Recordset.Update
kondisiawal
End Sub
End Sub
Form2.Show
End Sub
Private Sub Login_Click()
Unload Me
Form1.Show
End Sub
Unload Me
End Sub
Unload Me
MDIForm1.Show
End Sub
End
End Sub
If KeyAscii = 13 Then
Text2.SetFocus
Else
Text1.Text = ""
Text1.SetFocus
End If
End If
End Sub
If KeyAscii = 13 Then
Command1.Enabled = True
Command1.SetFocus
Else
Text2.Text = ""
Text2.SetFocus
End If
End If
End Sub
Sub kosong()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Combo1.Text = ""
End Sub
Sub mati()
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Combo1.Enabled = False
End Sub
Sub hidup()
Text1.Enabled
Text2.Enabled
Text3.Enabled
Text4.Enabled
Combo1.Enabled
End Sub
Sub kondisiawal()
kosong
mati
Command1.Caption = "tambah"
Command2.Caption = "ubah"
Command3.Caption = "hapus"
Command4.Caption = "keluar"
Command1.Caption = True
Command2.Caption = True
Command3.Caption = True
End Sub
Private Sub Command1_Click()
comman1.Caption = "simpan"
Command2.Caption = False
Command3.Caption = False
Command4.Caption = "Batal"
kosong
hidup
Else
End If
End Sub
kondisiawal
End Sub
Sub simpan()
Adodc1.Recordset.Fields(0) = Text1.Text
Adodc1.Recordset.Fields(1) = Combo1.Text
Adodc1.Recordset.Fields(2) = Text2.Text
Adodc1.Recordset.Fields(3) = Text3.Text
Adodc1.Recordset.Fields(4) = Text4.Text
Adodc1.Recordset.Update
kondisiawal
End Sub
Sub koneksi()
Adodc1.Refresh
DataGrid1.Refresh
End Sub
Command1.Caption = "simpan"
Command2.Enabled = False
Command3.Enabled = False
Command4.Caption = "batal"
kosong
hidup
Text1.SetFocus
Else
simpan
kondisiawal
End If
End If
End Sub
Command2.Caption = "simpan"
Command3.Enabled = False
Command1.Enabled = False
Command4.Caption = "batal"
hidup
kosong
Text1.SetFocus
ubah
kondisiawal
End If
End Sub
Command1.Enabled = False
Command2.Enabled = False
Command4.Caption = "batal"
hidup
Text1.SetFocus
Else
End If
End Sub
Unload Me
Form_Activate
kondisiawal
End If
End Sub
koneksi
kosong
mati
kondisiawal
End Sub
Sub kosong()
Text1.Text = ""
Text2.Text = ""
End Sub
Sub mati()
Text1.Enabled = False
Text2.Enabled = False
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
End Sub
Sub hidup()
Text1.Enabled = True
Text2.Enabled = True
End Sub
Sub kondisiawal()
kosong
mati
Command1.Caption = "tambah"
Command2.Caption = "ubah"
Command3.Caption = "hapus"
Command4.Caption = "keluar"
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
End Sub
Sub simpan()
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields(0) = Text1.Text
Adodc1.Recordset.Fields(1) = Text2.Text
Adodc1.Recordset.Update
End Sub
Sub ubah()
Adodc1.Recordset.Fields(0) = Text1.Text
Adodc1.Recordset.Fields(1) = Text2.Text
Adodc1.Recordset.Update
End Sub
If KeyAscii = 13 Then
Adodc1.Refresh
Text1.Text = Adodc1.Recordset!Kode_Mata_Diklat
Text2.Text = Adodc1.Recordset!Nama_Mata_Diklat
kosong
Text1.SetFocus
Else
Text2.SetFocus
End If
Text1.Text = Adodc1.Recordset!Kode_Mata_Diklat
Text2.Text = Adodc1.Recordset!Nama_Mata_Diklat
Else
kosong
Text1.SetFocus
End If
Else
End If
End If
End Sub
<?php
$host="localhost";
$name="root";
$password="";
$Database="akademi";
$koneksi=mysql_connect($host,$name,$password);
$caridb=mysql_select_db("$Database");
}else{
?>
<?php
?>
<html>
<head>
</head>
<body>
<?php
include("koneksi.php");
if(isset($_POST['input'])){
$id_kajur=$_POST['id_kajur'];
$nama_kajur=$_POST['nama_kajur'];
$alamat_kajur=$_POST['alamat_kajur'];
$tlpn_kajur=$_POST['tlpn_kajur'];
if($simpan){
?>
<?php
}else{
?>
<?php
?>
<style>
table tr td{padding:5px;}
</style>
<table>
<tr> <td valign="top"> Alamat Kajur</td> <td valign="top"> :</td> <td> <textarea rows="5%"
cols="30%" name="alamat_kajur"></textarea></td> </tr>
<tr><td> No. Tlpn/Hp </td> <td>: </td> <td><input type="text" name="tlpn_kajur" size="12"></td>
</tr>
</table>
</form>
</body>
</html>