Praktikum ASP 5, FORM

Pada praktikum ASP ke 5 ini, kita akan membuat sebuah form dengan asp.net
buat file baru bernama formasp5.aspx, berikut contoh scriptnya,

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title> Form ASP 5</title>
    <style type="text/css">
        .A {
            border-color: black;
            border-collapse:collapse;
            
        }
        .input {
            background-color: aqua;
        }
        .submit{
            color:blue;
            
        }
        
        
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table border="1" class="A">
            <tr>
                <td rowspan="8"><asp:Image ID="Image" runat="server" Height="111px" Width="207px" /></td>
                <td colspan="3" class="input"><b>INPUTAN BIODATA</b></td>
                
            </tr>
            <tr>
                <td>Nama Lengkap</td>
                <td>:</td>
                <td><asp:TextBox ID="txtNama" runat="server"></asp:TextBox></td>
                
            </tr>
            <tr>
                <td>Jenis Kelamin</td>
                <td>:</td>
                <td><asp:RadioButton ID="rdbGenderL" runat="server" Text="L" GroupName="Gender" />
                    <asp:RadioButton ID="rdbGenderP" runat="server" Text="P" GroupName="Gender" />
                </td>
                
            </tr>
            <tr>
                <td>Email</td>
                <td>:</td>
                <td><asp:TextBox ID="txtEmail" runat="server"></asp:TextBox></td>
                
            </tr>
            <tr>
                <td>Password</td>
                <td>:</td>
                <td><asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox></td>
                
            </tr>
            <tr>
                <td>Alamat</td>
                <td>:</td>
                <td><asp:TextBox ID="txtAlamat" runat="server" Width="150" Height="80"></asp:TextBox></td>
                
            </tr>
            <tr>
                <td>Cita-cita</td>
                <td>:</td>
                <td><asp:RadioButton ID="rdbPresiden" runat="server" Text="Presiden" GroupName="Cita" />
                    <br />
                    <asp:RadioButton ID="rdbMenteri" runat="server" Text="Menteri" GroupName="Cita" />
                    <br />
                    <asp:RadioButton ID="rdbLainnya" runat="server" Text="Lainnya" GroupName="Cita" />
                    <br />

                    <asp:Panel ID="pnllain" visible="true" runat="server">
                        <asp:Label ID="lblOther" Text="Lainnya:" AssociatedControlID="txtOther" runat="server" />
                        <asp:TextBox ID="txtOther" runat="server" />
                    </asp:Panel>
                </td>
                
            </tr>
            <tr>
                <td></td>
                <td>:</td>
                <td class="submit"> <asp:Button ID="btnSubmit" runat="server" Text="SUBMIT" OnClick="btnSubmit_Click" BackColor="#FF99FF" BorderStyle="Outset" ForeColor="#0066FF" /></td>
                
            </tr>

        </table>
        <hr />
        <asp:Label ID="lblNama" runat="server" CssClass="labelStyle"></asp:Label><br />
        <asp:Label ID="lblGender" runat="server" CssClass="labelStyle"></asp:Label><br />
        <asp:Label ID="lblEmail" runat="server" CssClass="labelStyle"></asp:Label><br />
        <asp:Label ID="lblPassword" runat="server" CssClass="labelStyle"></asp:Label><br />
        <asp:Label ID="lblAlamat" runat="server" CssClass="labelStyle"></asp:Label><br />
        <asp:Label ID="lblCita" runat="server" CssClass="labelStyle"></asp:Label><br />
    </div>
    </form>
</body>
</html>

Kemudian klik kanan pada worksheet dan pilih view code, berikut contoh scriptnya,

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Bab2
{
    public partial class FormASP5 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {

            Image.ImageUrl = "/~logotelkom.jpg";
            lblNama.Text = txtNama.Text;
            lblEmail.Text = txtEmail.Text;
            lblPassword.Text = txtPassword.Text;
            lblAlamat.Text = txtAlamat.Text;

            if (rdbGenderL.Checked)
            {
                lblGender.Text = rdbGenderL.Text;
            }
            else if (rdbGenderP.Checked)
            {
                lblGender.Text = rdbGenderP.Text;
            }

           

            if (rdbMenteri.Checked)
            {
                lblCita.Text = rdbMenteri.Text;
            }
            else if (rdbPresiden.Checked)
            {
                lblCita.Text = rdbPresiden.Text;
            }
            else 
            {
            lblCita.Text = txtOther.Text;
            }
            
        }
    }
}

Berikut ini hasilnya,



Praktikum PHP 6, Validation Form dengan PHP

Pada Praktikum ke 6 ini kita akan membuat VALIDASI FORM DENGAN PHP, langsung saja tanpa basa basi berikut contoh scriptnya, buat file baru bernama form.php,
<?php
    session_start();
    if(isset($_SESSION['error'])){
 $error = $_SESSION['error'];
    $true = $_SESSION['true'];
 $_POST = $_SESSION['post'];
 unset ($_SESSION['error']);
    unset ($_SESSION['true']);
 unset ($_SESSION['post']);
    }
 if (empty($nama) || empty($gender) || empty($email) || empty($alamat) || empty($tempat) || empty($email) || empty($pwd) || empty($agama) || empty($noHP) || empty($captcha) || empty($hari) ||empty($bualan) ||empty($bulan) ){
?>
<!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" />
<link rel="stylesheet" type="text/css" href="anu.css" />
<title>Formulir</title>
</head>
<body style="background-image:url(blue.jpg); background-repeat:repeat;">
<p>&nbsp;</p>
<p>&nbsp;</p>
<form action="action.php" name="form1" method="post">
<table  cellspacing="0" cellpadding="4" bgcolor="#FFFF99" border="1" width="700" height="420" Style='border-radius:20px;border-color:white;
box-shadow: 0 0 5px 5px #FC6; position:fixed;left:350px;top:55px; border:#Fc3; border-top-left-radius:25px;'>
 <tr style="border-top-left-radius:25px;">
     <td rowspan="10" width="230" style=" border:none;background:#FF9; font-family:Verdana, Geneva, sans-serif;"><center><img  src="logo.png" width="200" 0height="200" /></center></td>
        <td colspan="3" Style=' font-family:Verdana, Geneva, sans-serif; border-top-right-radius:20px;border:none;background:#Ff9; font-family:Verdana, Geneva, sans-serif; color:#000;"'>
         <center><strong><font color="#000000" face="sans-serif">INPUTAN BIODATA</font></strong></center>
        </td>       
    </tr>
    <tr style="border: none">
     <td style=" border:none;background:#FC6; font-family:Verdana, Geneva, sans-serif;"> Nama Lengkap</td>
        <td width="1" style=" border:none;background:#FF9; font-family:Verdana, Geneva, sans-serif;"><center>:</center></td>
        <td style=" border:none;background:#FC6; font-family:Verdana, Geneva, sans-serif;"><input  type='text' name="nama" size="40" placeholder="Nama Lengkap" value="<?php echo isset($_POST['nama']) ? $_POST['nama'] : ''; ?>" />
   <font size="-1" color="red"><?php echo isset($error['nama']) ? $error['nama'] : '';?></font>
        <font ><?php echo isset ($true['nama'])? $true['nama'] : '';?></font>
        </td>
    </tr>
    <tr>
     <td style=" border:none;background:#FF9; font-family:Verdana, Geneva, sans-serif;"> Jenis Kelamin</td>
        <td style=" background:#FC6;border:none;font-family:Verdana, Geneva, sans-serif;"><center>:</center></td>
        <td style=" border:none;background:#FF9; font-family:Verdana, Geneva, sans-serif;">
        &nbsp;Laki-Laki<input type="radio" name="gender" value="<?php echo isset($_POST['gender']) ? $_POST['gender'] : ''; ?>Laki - Laki <?php echo isset($_POST['gender']) ? ' checked' : ''; ?>"/>    
            &nbsp;Perempuan<input type="radio"  name=gender value="<?php echo isset($_POST['gender']) ? $_POST['gender'] : ''; ?> Perempuan <?php echo isset($_POST['gender']) ? ' checked' : ''; ?>" />
            <font size="-1" color="red"><?php echo isset($error['gender']) ? $error['gender'] : '';?></font>
     <?php echo isset ($true['gender'])? $true['gender'] : '';?>      
        </td>
    </tr>
   
    <tr>
     <td style=" background:#FC6;border:none;font-family:Verdana, Geneva, sans-serif;">TTL</td>
        <td style=" border:none;background:#FF9; font-family:Verdana, Geneva, sans-serif;"><center>:</center></td>
        <td style=" border:none;background:#FC6; font-family:Verdana, Geneva, sans-serif;">
    <input type='text' placeholder="Tempat" name="tempat" size="4" value="<?php echo isset($_POST['tempat']) ? $_POST['tempat'] : ''; ?>" />
        <font size="-1"  color="red"><?php echo isset($error['tempat']) ? $error['tempat'] : '';?></font>
  <font ><?php echo isset ($true['tempat'])? $true['tempat'] : '';?></font>
<?php
$bulan=array("Januari" ,"Februari", " Maret" ,"April", "Mei", "Juni",
"Juli", "Agustus", "September", "Oktober", "November", "Desember");
echo '<select name="hari" >';
echo "<option value=hari>Hari</option>";
$hari=1;
$haripilih = isset($_POST['hari']) ? $_POST['hari'] : "hari";

while($hari<=31) {
echo "<option value=$hari";
echo  $hari == $haripilih ? " selected" : "";
echo '>'.$hari.'</option>';
$hari++;
}
echo '</select>';
echo '<select name="bulan">';
echo "<option value=bulan>Bulan</option>";
$jumlah=count($bulan);
$bulanpilih = isset($_POST['bulan']) ? $_POST['bulan'] : "bulan";
for($i=0; $i<$jumlah ; $i++){
 echo "<option value=$bulan[$i]";
 echo $bulan[$i] == $bulanpilih ? " selected" : "";
 echo '>'.$bulan[$i].'</option>';
}
echo '</select>';
echo '<select name="tahun">';
echo "<option value=tahun>Tahun</option>";
$tahunpilih = isset($_POST['tahun']) ? $_POST['tahun'] : "tahun";
for($tahun=1995; $tahun<2010; $tahun++){
echo "<option value='$tahun'";
echo $tahun == $tahunpilih? " selected" : "";
 echo '>'.$tahun.'</option>';
}
echo '</option>';

?>
        </td>
    </tr>
    <tr>
     <td style=" border:none;background:#FF9; font-family:Verdana, Geneva, sans-serif;">Alamat</td>
        <td style=" background:#FC6;border:none;font-family:Verdana, Geneva, sans-serif;"><center>:</center></td>
        <td style=" border:none;background:#FF9; font-family:Verdana, Geneva, sans-serif;"><input type='text' placeholder="Alamat" name="alamat" size="40" value="<?php echo isset($_POST['alamat']) ? $_POST['alamat'] : ''; ?>" />
        <font size="-1" color="red"><?php echo isset($error['alamat']) ? $error['alamat'] : '';?></font>
        <font ><?php echo isset ($true['alamat'])? $true['alamat'] : '';?></font>
        </td>
    </tr> 
    <tr>
     <td style=" background:#FC6;border:none;font-family:Verdana, Geneva, sans-serif;">E-mail</td>
        <td style=" border:none;background:#FF9; font-family:Verdana, Geneva, sans-serif;"><center>:</center></td>
        <td style=" border:none;background:#FC6; font-family:Verdana, Geneva, sans-serif;"><input type='text' name="email" placeholder="E-mail" size="40" value="<?php echo isset($_POST['email']) ? $_POST['email'] : ''; ?>" />
        <font size="-1" color="red"><?php echo isset($error['email']) ? $error['email'] : '';?></font>
        <font ><?php echo isset ($true['email'])? $true['email'] : '';?></font>
        </td>
    </tr>
        <tr>
     <td style=" border:none;background:#FF9; font-family:Verdana, Geneva, sans-serif;">Password</td>
        <td style=" background:#FC6;border:none;font-family:Verdana, Geneva, sans-serif;"><center>:</center></td>
        <td style=" border:none;background:#FF9; font-family:Verdana, Geneva, sans-serif;"><input type='password' placeholder="Password" name="pwd" size="40" value="<?php echo isset($_POST['pwd']) ? $_POST['pwd'] : ''; ?>" />
        <font size="-1" color="red"><?php echo isset($error['pwd']) ? $error['pwd'] : '';?></font>
        <font ><?php echo isset ($true['pwd'])? $true['pwd'] : '';?></font>
        </td>
    </tr>  
    <tr>
     <td style=" background:#FC6;border:none;font-family:Verdana, Geneva, sans-serif;">No. HP</td>
        <td style=" border:none;background:#FF9; font-family:Verdana, Geneva, sans-serif;"><center>:</center></td>
        <td style=" border:none;background:#FC6; font-family:Verdana, Geneva, sans-serif;"><input type='text' placeholder="No.HP" name="HP" size="40" value="<?php echo isset($_POST['HP']) ? $_POST['HP'] : ''; ?>" />
        <font size="-1" color="red"><?php echo isset($error['HP']) ? $error['HP'] : '';?></font>
        <font ><?php echo isset ($true['HP'])? $true['HP'] : '';?></font>
        </td>
    </tr>
     <tr>
     <td style=" border:none;background:#FF9; font-family:Verdana, Geneva, sans-serif;">Captcha  <img height="30" style="vertical-align:middle;" src="captcha.php?data=<?php echo date('YmdHis');?> alt="securiy image" /></td>
        <td style=" background:#FC6;border:none;font-family:Verdana, Geneva, sans-serif;"><center>:</center></td>
        <td style=" border:none;background:#FF9; font-family:Verdana, Geneva, sans-serif;">       
         <input name="pin" placeholder="Captcha" type="text"  value="<?php echo isset($_POST['captcha']) ? $_POST['captcha'] : ''; ?>" />          
        <font size="-1" color="red"><?php echo isset($error['pin']) ? $error['pin'] : '';?></font>
        <font ><?php echo isset ($true['pin'])? $true['pin'] : '';?></font>  
        </td>
    </tr>
    <tr>
     <td colspan="3" style=" border:none;background:#FC6; font-family:Verdana, Geneva, sans-serif;"><center><button type="reset" value="Refresh" ONCLICK="history.go(0)">&nbsp;Reset&nbsp;</button>&nbsp;
  <button type="submit" name="submit">&nbsp;Kirim&nbsp;</button></center>
  </td>       
    </tr>
</table>
</form>
<?php } ?>
</body>
</html>
Setelah itu buat file baru bernama action.php, berikut contoh scriptnya,
<link rel="stylesheet" type="text/css" href="button.css" />
  <title>Hasil</title>

    <body style="background-image:url(blue.jpg); background-repeat:repeat;">
<?php
session_start();
if($_POST){
$nama=$_POST['nama'];
$gender=isset($_POST['gender'])? $_POST['gender']:"";
$tempat=$_POST['tempat'];
$hari=$_POST['hari'];
$bulan=$_POST['bulan'];
$tahun=$_POST['tahun'];
$alamat=$_POST['alamat'];
$email=$_POST['email'];
$pwd=$_POST['pwd'];
$noHP=$_POST['HP'];

$CAPTCHA=$_POST['pin'];
$emailpattern = '/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/';

$imgTrue ='<img src="benar.png" style="vertical-align:middle"/><br>';
$imgEmp ='<img src="salah.png" style="vertical-align:middle"/><br>';
$imgErr ='<img src="salah.png" style="vertical-align:middle"/><br>';


$error = array();
    if(empty ($nama)){
        $error['nama'] = $imgEmp.'Nama tidak boleh kosong';
    } else if(preg_match('/[^a-zA-Z ]/', $nama))           {
        $error['nama'] = $imgErr.'Nama hanya mengandung huruf saja';
    } else{
        $true['nama'] = $imgTrue;
    }

    if(empty ($email)){
        $error['email'] = $imgEmp.'Email tidak boleh kosong';
    } elseif (!preg_match($emailpattern, $email)){
        $error['email'] = $imgErr.'Email salah tulis (xxxxxxx@xxxxx.xxx)';
    } else{
        $true['email'] = $imgTrue;
    }

 if(empty ($alamat)){
        $error['alamat'] = $imgEmp.'Alamat tidak boleh kosong';

    } else{
        $true['alamat'] = $imgTrue;
    }

 if(empty ($pwd)){
        $error['pwd'] = $imgEmp.'Password tidak boleh kosong';

    } else{
        $true['pwd'] = $imgTrue;
    }

 if (empty($gender)){
  $error['gender'] = $imgEmp.'Anda tidak berjenis kelamin';
 } else{
  $true['gender'] = $imgTrue;
 }

 if(empty ($tempat)){
        $error['tempat'] = $imgEmp.'TTL tidak boleh kosong';

    } else{
        $true['tempat'] = $imgTrue;
    }

 if(empty ($noHP)){
        $error['HP'] = $imgEmp.'No HP tidak boleh kosong';

    }  else if(preg_match('/[^0-9 ]/', $noHP))           {
        $error['HP'] = $imgErr.'Nama hanya mengandung angka aja';
 }
 else{
        $true['HP'] = $imgTrue;
    }

 if(empty ($CAPTCHA)){
        $error['pin'] = $imgEmp.'Captcha tidak boleh kosong';

    } elseif (md5($_POST['pin']) <> $_SESSION['image_random_value']){
  $error['pin'] = $imgErr.'Anda bukan manusia';
   
    } else {
      $true['pin'] = $imgTrue;
 }

if(empty($error)){

 if($gender=='Laki - Laki'){
  echo'<h2><center>Selamat Datang Saudari, '.$nama.'<br>Berikut Biodatamu</center></h2>';
  }
 else{
  echo'<h2><center>Selamat Datang Saudara, '.$nama.'<br>Berikut Biodatamu</center></h2>';
  }
print("
<table  cellspacing='0' cellpadding='4' bgcolor='#FFFFFF' border='1' width='650' height='300' Style='border-radius:20px;border-color:white; position:fixed;left:360px;top:110px;box-shadow: 0 0 5px 5px black; '>
 <tr>
    
        <td colspan='4'>
         <center><strong><font color='white'><div class='Da'>DATA DIRI</div></font></strong></center>
        </td>         
    </tr>
    <tr>
     <td> Nama Lengkap </td>
        <td width='1'><center>:</center></td>
        <td> $nama</td>
</tr>
    <tr>
     <td> Jenis Kelamin</td>
        <td><center>:</center></td>
        <td> $gender </td>
    </tr> 
    <tr>
     <td>TTL</td>
        <td><center>:</center></td>
        <td>$tempat, $hari - $bulan - $tahun</td>
    </tr>
    <tr>
     <td>Alamat</td>
        <td><center>:</center></td>
        <td> $alamat</td>
    </tr>
 
    <tr>
     <td>E-mail</td>
        <td><center>:</center></td>
        <td>$email</td>
    </tr>
    <tr>
     <td>No. HP</td>
        <td><center>:</center></td>
        <td>$noHP</td>
    </tr>
   <tr>
</table>
");
 }
else{
 $_SESSION['error']=$error;
    $_SESSION['true'] =$true;
 $_SESSION['post'] =$_POST;
 header("location:form.php");
}
}
?>
Setelah itu buat file baru bernama Captcha.php, berikut contoh scriptnya,
<?php

session_start();
$alphaNumeric = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$random = substr(str_shuffle($alphaNumeric),0,5);
$image = imagecreatefromjpeg("bg_captcha.jpg");
$textcolor = imagecolorallocate ($image, 0, 0, 0); //hitam
imagestring ($image, 5, 5, 8, $random, $textcolor);
$_SESSION['image_random_value']=md5($random);
//header("Expires: MOn, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s"). " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header('Content-type: image/jpeg');
imagejpeg($image);
imagedestroy($image);
?>
Dan untuk finishing kita hias dengan css, buat file css, bernama anu.css, berikut contoh scriptnya,
/* CSS Document */
td:hover{
                background:#666;
                color:#fff;
}
TEXTAREA, INPUT[type="text"]{
                font-family:Tahoma, Geneva, sans-serif;
                font-size:14px;
                color:#808080;
                padding:3px;
                background:#FF9;
                border-left:solid 1px #c1c1c1;
                border-top:solid 1px #cfcfcf;
                border-right:solid 1px #cfcfcf;
                border-bottom:solid 1px #6f6f6f;
}
INPUT[type="text"]:focus, INPUT[type="text"]:active{
                border-color:#646464;
                background-color:#0FF;
                font:Verdana, Geneva, sans-serif;
                font:#000;

}

Dan Berikut ini hasilnya,



Praktikum PHP 5, MODULARISASI

Pada praktikum kali ini kita akan mempelajari Modularisasi, apa itu modularisasi ?
  Modularisasi dalam pemrograman umum dilakukan dan sangat diperlukan
     untuk mempermudah debugging dan pengembangan program.
  Modularisasi berarti melakukan pembuatan program berdasarkan modulmodul .
  Setiap modul dikembangkan untuk tujuan atau fungsi khusus. Modul dibuat
     secara general (umum). Modul dapat berupa fungsi atau prosedur.
  Statement Require digunakan untuk membaca nilai variable dan fungsifungsi dari file lain.
  Cara penulisan statement Require adalah: require(namafile);
  Teknik ini cocok untuk membuat template (pola) yang memudahkan proses
     pengembangan aplikasi dengan menggunakan pola tampilan.
     Misal dalam membuat design web yang dilakukan dengan kerja tim, pola dan
     gambar-gambar yang dibutuhkan dapat dibuat dengan teknik ini.
Dan berikut contoh implementasinya,
buat file php baru bernama header, berikut contoh scriptnya,

<!DOCTYPE HTML>
<html lang="en-US">
<head>
    <meta charset="UTF-8">
    <title>Basic Horizontal Menu CSS : DEMO</title>
    <style type="text/css">
                h1{margin:5px}
                .demo-container{margin:0px;color:#fff000;background-color:#3CF;border-radius:5px}
                .horizon-menu{list-style-type:none;padding:0;margin:0;                              background:#fff000;padding:10px;border-radius:5px;    box-shadow:inset 0 0 5px 2px #f4f4f4}
                .horizon-menu a{text-decoration:none; color:#111;font-weight:bold}
                .horizon-menu li{display:inline;margin:5px 0}
                .horizon-menu li:before{content:' | ';color:rgba(0,0,0,.1)}
                .horizon-menu li:first-child:before{content:' '}
                .horizon-menu li a{margin-right:5px; margin-left:5px;padding:5px;border-radius:5px;
    -webkit-transition:background-color 500ms ease-in-out;
    -moz-transition:background-color 500ms ease-in-out;
                }
                .horizon-menu li a:hover{background-color:#3CF}
    </style>
</head>
<body>
    <div class="demo-container">
        <h1><font face="Ayosmonika">JULIAN AKBAR RENLADI.COM</font></h1>
        <ul class="horizon-menu">
            <li><a href="#" class="">Home</a></li>
            <li><a href="#" class="lang">About</a></li>
            <li><a href="#" class="lang">Work</a></li>
            <li><a href="#" class="lang">Portfolio</a></li>
            <li><a href="#" class="lang">Contact</a></li>
        </ul>
    </div>
</body>
</html>
Kemudian buat file baru bernama body.php, berukut contoh scriptnya,
<html>
<head>
<style type="text/css">
.body{background-color:#FC0;color:#000;border-radius:5px; height:80%; width:70%; }
</style>
</head>
<body background="../abstract-wallpaper.jpg">
<center>
<div class="body">
<table width="100%" height="100%">
<tr >
<td width="100%" height="100%">
<img src="../abstract-colorful-wallpaper-5.jpg" width="100%" />
</td>
</tr>
</table>
</div>
</center>
</body>
</html>
Kemudian buat file footer.php, berikut contoh scriptnya,
<html>
<head>
<style type="text/css">
.footer{border-radius:5px;background-color:#0CF;text-align:center;}
</style>
</head>
<body>
<div class="footer">
<table>
<tr>
<td>
@CopyRight Julian Akbar Renaldi 2013
</td>
</tr>
</table>
</div>
</body>
</html>
Dan terakhir yang merupakan implementasi Modularisasi, buat file baru, contoh praktik5.php, berikut contoh scriptnya,
<?php
require ("header.php");
require ("body.php");
require ("footer.php");
?>
<body bgcolor="#000000">

</body>
Berikut hasilnya,

7 unexpected features in iOS 7

iOS 7 (Credit:Screenshot by Jason Parker/CNET)
My review of Apple’s iOS 7 went up Wednesday morning, but since then I’ve been writing posts about what I think are the seven best and seven worst things about the new mobile OS.
Here is the third and final part of this series, covering some unexpected or hidden features in iOS 7.
There are certainly a ton of things that people are finding as they use iOS 7, so this is just a list of things that caught my attention over the past couple of days. If you have other hidden gems, please let me know in the comments.
Also, check back in the coming weeks as I explore iOS 7 on iPhone and
iPad, or if you have any questions, hit me up on Twitter at @jparkerCNET.
iOS 7
It’s not a complete change, but it does give your iPhone a new feel when you change the background.
Changing your ‘theme’
Okay, you can’t actually change the theme of the new design, but it’s surprising how much you can change the feel of your iOS 7 device just by changing the background. What happens is, the background changes the look of the lock screen, the dial pad when making a call, and the passcode screen by letting the background colors show through. Try a few different backgrounds to see what I mean. Another related trick, for those who find the new icons too bright, is to choose the darkest still background in the settings. I found it brings the colors down a notch.
Daily quick view in Calendar
When I wrote my review of iOS 7, I was thoroughly let down when I thought the daily overview had been removed from the app. Fortunately, I found out later that the daily list to view your appointments and meetings at a glance was indeed still there; it’s just that it’s kind of hidden away.
Now, to bring up the day’s events at a glance, you need to hit the search magnifying glass at the top of the screen. It’s not exactly intuitive, but I’m relieved it’s still there.
Hiding Newsstand
Newsstand is useful for finding magazines and other reading materials, and you can set up subscriptions so you get new issues of periodicals such as The Economist every week. But in previous versions of iOS, people who were not interested in reading magazines on their iPhone couldn’t put Apple’s Newsstand app in a folder to save home screen space. The concept behind it was that Newsstand already was a folder of items itself and you couldn’t put a folder into another folder. Last year CNET Blog Network author Jason Cipriani even wrote a how-to late last year with a work-around to hide Newsstand.
iOS 7
You can now use three fingers to quit three apps at a time by swiping upward.
(Credit: Screenshot by Jason Parker/CNET)
Fortunately, in iOS 7, you no longer need to deal with work-arounds. Newsstand finally can be placed in a folder. It’s even useful for those who use Newsstand all the time because you can drop it into a more general news folder to have a central location for all your news sources.
Quitting multiple apps
Sometimes you have to quit apps and the old method of double-tapping the home button and long-pressing the app to go into jiggle mode was kind of a tedious process. In iOS 7, you now can double-tap the home screen and flick the app preview thumbnail upward to quit. It’s a bit faster, but in playing with my iPhone during the review I made another discovery.
Not only can you flick to quit an app, you also can use three fingers to quit three apps at a time with the same swiping motion. This will let you make sure apps aren’t running processes in the background when you want the full power of your iOS device and it’s a much faster method.
Infinite folders
In
iOS 6 and earlier versions, you could only have up to 16 apps in a folder. This might be OK if you don’t download a lot of apps, but if you’re like me, you were forced to make folders like “Games 1″ and “Games 2″ if you wanted to organize your home screen.
Now, in iOS 7, you can put an infinite number of apps (or until you have no more storage space on your device) into a folder so you can truly organize your home screen. iOS 7 organizes your apps into groups of nine, and you can swipe to move on to each page. This should help limit the number of home screen pages you have to navigate and make for a more organized layout.
iOS 7
With a couple of changes to the Accessibility settings, fonts are much easier to read.
(Credit: Screenshot by Jason Parker/CNET)
Make iOS 7 more readable
One thing I’ve been hearing since the update is that people with less-than-perfect eyesight have some trouble reading the thin fonts in the new design, especially when they’re in front of bright backgrounds (Calendar app, I’m looking at you). Fortunately, there’s a fix.
If you have trouble reading the fonts in iOS 7, go to Settings > General > Accessibility, then touch the switch for Bold Text and also the Increase Contrast switch right below it. It will require a restart of your iPhone, but now reading should be a lot easier — even in the Calendar app.
Using the compass as a level
The compass app is a neat tool to have on your iOS device to help you get your bearings when you’re outdoors, sailing, or doing any number of other activities. But a new feature of the compass app in iOS 7 will help those who work on things around the house with a feature that acts as a level.
To keep your household handywork from coming out crooked, you can now swipe to the left on the compass, and you get a digital level tool. With this page open, you can set your iPhone on a table you might be making or even on its edge when hanging a picture, and you’ll be able to tell if it’s truly level.
Source Article from http://feedproxy.google.com/~r/cnet/JZkn/~3/Mp4Hq6heqog/

KELEMAHAN WANITA



INILAH KELEMAHAN WANITA YANG SANGAT FATAL

Kaum 'feminis' bilang susah jadi wanita, lihat saja peraturan dibawah ini:

1. Wanita auratnya lebih susah dijaga (lebih banyak) dibanding lelaki.
2. Wanita perlu meminta izin dari suaminya apabila mau keluar rumah tetapi tidak sebaliknya.
3. Wanita saksinya (apabila menjadi saksi) kurang berbanding lelaki.
4. Wanita menerima warisan lebih sedikit daripada lelaki.
5. Wanita perlu menghadapi kesusahan mengandung dan melahirkan anak.
6. Wanita wajib taat kepada suaminya, sementara suami tak perlu taat pada isterinya.
7. Talak terletak di tangan suami dan bukan isteri.
8. Wanita kurang dalam beribadat karena adanya masalah haid dan nifas yang tak Ada pada lelaki.

Itu sebabnya mereka tidak henti-hentinya berpromosi untuk "MEMERDEKAKAN WANITA".

Pernahkah Kita lihat sebaliknya (kenyataannya) ?

1. Benda yang Mahal harganya akan dijaga dan dibelai serta disimpan ditempat yang teraman dan terbaik. Sudah pasti intan permata tidak akan dibiar terserak bukan? Itulah bandingannya dengan seorang wanita.

2.Wanita perlu taat kepada suami, tetapi tahukah lelaki wajib taat kepada ibunya 3 kali lebih utama daripada kepada bapaknya?

3. Wanita menerima warisan lebih sedikit daripada lelaki, tetapi tahukah harta itu menjadi milik pribadinya dan tidak perlu diserahkan kepada suaminya, sementara apabila lelaki menerima warisan, Ia perlu/wajib juga menggunakan hartanya untuk isteri dan anak-anak.

4. Wanita perlu bersusah payah mengandung dan melahirkan anak,tetapi tahukah bahwa setiap saat dia didoakan oleh segala makhluk, malaikat dan seluruh makhluk ALLAH di muka bumi ini, dan tahukah jika ia meninggal dunia karena melahirkan adalah syahid dan surga menantinya.

5. Di akhirat kelak, seorang lelaki akan dipertanggung- jawabkan terhadap! 4 wanita, yaitu: Isterinya, ibunya, anak perempuannya dan saudara perempuannya. Artinya, bagi seorang wanita tanggung jawab terhadapnya ditanggung oleh 4 orang lelaki,yaitu : suaminya, ayahnya, anak lelakinya dan saudara lelakinya.

6. Seorang wanita boleh memasuki pintu syurga melalui pintu surga yang mana saja yang disukainya, cukup dengan 4 syarat saja, yaitu: shalat 5 waktu, puasa di bulan Ramadhan, taat kepada suaminya dan menjaga kehormatannya.

7. Seorang lelaki wajib berjihad fisabilillah, sementara bagi wanita jika taat akan suaminya, serta menunaikan tanggung-jawabnya kepada ALLAH, maka ia akan turut menerima pahala setara seperti pahala orang pergi berjihad fisabilillah tanpa perlu mengangkat senjata.

Masya ALLAH ! Demikian sayangnya ALLAH pada wanita!!

KELEMAHAN WANITA ITU ADALAH:
"Wanita selalu lupa betapa berharga dirinya"
Copyright © 2013 Laptop Corner and Blogger Templates - Anime OST.