Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

Ilustrasi Kerja WAP. Ilustrasi Kerja WAP WAE - Push Framework PUSH PROXY GATEWAY PUSH INITIATOR CLIENT OVER-THE-AIR PROTOCOL PUSH ACCESS PROTOCOL PPG.

Presentasi serupa


Presentasi berjudul: "Ilustrasi Kerja WAP. Ilustrasi Kerja WAP WAE - Push Framework PUSH PROXY GATEWAY PUSH INITIATOR CLIENT OVER-THE-AIR PROTOCOL PUSH ACCESS PROTOCOL PPG."— Transcript presentasi:

1

2 Ilustrasi Kerja WAP

3 WAE - Push Framework PUSH PROXY GATEWAY PUSH INITIATOR CLIENT
OVER-THE-AIR PROTOCOL PUSH ACCESS PROTOCOL PPG SERVICES PUSH MESSAGE

4 Arsitektur WAP

5 WAP Application Server

6 Arsitektur WAP

7 HTML vs WML

8 WAE - WML Card Navigation Variables Deck Input Elements <WML>
<DO TYPE=“ACCEPT”> <GO URL=“#eCard”/> </DO Welcome! </CARD> <CARD NAME=“eCard”> <GO URL=“/submit?N=$(N)&S=$(S)”/> </DO> Enter name: <INPUT KEY=“N”/> Choose speed: <SELECT KEY=“S”> <OPTION VALUE=“0”>Fast</OPTION> <OPTION VALUE=“1”>Slow</OPTION> <SELECT> </WML> Card Navigation Variables Deck Input Elements

9 WAE - WML Script WMLScript is very similar to JavaScript Functions
function currencyConvertor(currency, exchRate) { return currency*exchangeRate; } function myDay(sunShines) { var myDay; if (sunShines) { myDay = “Good”; } else { myDay = “Not so good”; }; return myDay; Variables Programming Constructs

10 MENYIAPKAN LINGKUNGAN PEMROGRAMAN WAP
10

11 KOMPONEN WAP SERVER WAP Server Komponen di WAP Server :
Web Server, dalam hal ini bisa menggunakan Apache. Database, sebagai penyimpan informasi di WEB, bisa menggunakan MySQL. PHP, sebagai bahasa script disisi server untuk pengembangan WAP. WML, sebagai interface ke HP sehingga kode-kode PHP bisa terbaca di ponsel yang terbatas kemampuannya.

12

13

14 WML (Wireless Markup Language)‏
Bahasa berbasis tag: Manajemen Layar (text, image)‏ Input Data (text, selection lists, dll.)‏ Dukungan Hyperlink & navigasi Didasarkan pada XML Berekstensi .wml

15 WML Structure

16 Prak-1.wml <?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card id="no1" title="Card 1"> <p> Hello world!</p> <card id="no2" title="Card 2"> <p> Welcome to our WAP Toturial!</p> </card> </wml>

17 Prak-2.wml <?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card id="satu" title="Card Satu"> <do type="accept" label="KeDua"> <go href="#dua"/> </do> <p>ini card yang pertama</p> </card> <card id="dua" title="Card Dua"> <do type="accept" label="KeTiga"> <go href="#tiga"/> <p>ini card yang kedua</p> <card id="tiga" title="Card Tiga"> <do type="options" label="KeSatu"> <go href="#satu"/> <p>ini card yang ketiga</p> </wml>

18 Prak-3.wml <?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <p> <big>Help topics :</big> <br/> <a href="satu.wml">Satu</a> <br/> <a href="dua.wml">Dua</a> <br/> <a href="tiga.wml">Tiga</a> <br/> <a href="empat.php">Empat</a> <br/> </p> </card> </wml>

19 Prak-4.wml <?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card id="satu" title="Card Satu"> <do type="accept" label="KeDua"> <go href="#dua"/> </do> <p>ini card yang pertama</p> </card> <card id="dua" title="Card Dua"> <do type="accept" label="KeTiga"> <go href="#tiga"/> <p>ini card yang kedua</p> <card id="tiga" title="Card Tiga"> <do type="options" label="KeSatu"> <go href="#satu"/> <p>ini card yang ketiga</p> </wml>

20 Prak-5.wml <?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card title="Input Data"> <p> <table> <tr><td>Nobp</td><td><input type=text name="nobp" size="14“ /></td></tr> <tr><td>Nama</td><td><input type=text name="nama" size="20"/></td></tr> <tr><td>Kelas</td><td><input type=text name="kelas" size="15"/></td></tr> <tr><td>Jurusan</td><td><input type=text name="jrs" size="20"/></td></tr> <tr><td><input type=submit name="simpan" value="send"></td></tr> </table> </p> </card> </wml>

21 Prak-6.wml <?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card id="satu" title="Login" newcontext="true"> <do type="accept" label="Next"> <go href="#dua"/> </do> <p> user name:<input type="text" name="name" /> password:<input type="password" name="pass" /> </p> </card> <card id="dua" title="Echo"> Nama anda : $name password : $pass </wml>

22 Prak-7.wml <?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card title="Selected List 1"> <p> <select multiple="true"> <option value="htm">HTM Toturial</option> <option value="xml">XML Toturial</option> <option value="WAP">WAP Toturial</option> <option value="PHP">PHP Toturial</option> </select> </p> </card> </wml>

23 Prak-8.wml <?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card title="Selected List 3"> <p> <select> <option value="1" onpick="#About" id="about">About</option> <option value="2" onpick="#Profile" id="profile">Profile UPI-YPTK</option> <option value="3" onpick="#Fakultas" id="fakultas">Fakultas</option> <option value="4" onpick="#Headline" id="headline">Berita Hari Ini</option> </select> </p> </card> <card title="About UPI-YPTK" id="About"> <p>Created by. Soe, Dst..</p> </card> <card title="Profile UPI-YPTK" id="Profile"> <p>[1]. Berdiri Tahun 1985, Dst..</p> <card title="Fakultas"" id="Fakultas"> <p>[1]. Fakultas Ilmu Komputer</p> <p>[2]. Fakultas Ekonomi</p> <p>[3]. Fakultas Teknologi Industri</p> <p>[4]. Fakultas Sipil & Perencanaan</p> <p>[5]. Fakultas Psikologi</p> <p>[6]. Fakultas Desain Komunikasi Visual</p> <card title="Headline"" id="Headline"> <p>Wisuda Periode II 24 April 2010, Dst..</p> </wml>

24 Prak-9.wml <?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card title="card1" title="Torial"> <do type="accept" label="Anwer"> <go href="#card2"/> </go> </do> <p> <select name="name"> <option value="HTML">HTML Toturial</option> <option value="XML">XML Toturial</option> <option value="WAP">WAP Toturial</option> <option value="PHP">PHP Toturial</option> </select> </p> </card> <card title="About UPI-YPTK" id="card2"> <p>Yang dipilh adalah : $(name) </wml>

25 Prak-10.wml <?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card title="M-Rental"> <p> <select> <option value="[1]" onpick="#About" id="Input">Input User</option> <option value="[2]" onpick="#Profile" id="profile">Tampil Pemakaian</option> <option value="[3]" onpick="#Headline" id="headline">Home</option> </select> </p> </card> <card title="About UPI-YPTK" id="About"> <p>Created by. Soe, Dst..</p> </card> <card title="Profile UPI-YPTK" id="Profile"> <p>[1]. Berdiri Tahun 1985, Dst..</p> <card title="Fakultas"" id="Fakultas"> <p>[1]. Fakultas Ilmu Komputer</p> <p>[2]. Fakultas Ekonomi</p> <p>[3]. Fakultas Teknologi Industri</p> <p>[4]. Fakultas Sipil & Perencanaan</p> <p>[5]. Fakultas Psikologi</p> <p>[6]. Fakultas Desain Komunikasi Visual</p> <card title="Headline"" id="Headline"> <p>Wisuda Periode II 24 April 2010, Dst..</p> </wml>

26 APLIKASI WAP DENGAN PHP
Pengembangan aplikasi WAP dengan PHP memungkinkan membuat aplikasi seperti database, mail server, pengiriman pesan, dll.Supaya script PHP dapat didukung oleh perangkat WAP, script ini harus menghasilkan output header WML kepada client. Karena itu, setiap dokumen WML yang berisi yang berisi kode PHP harus menyertakan baris-baris berikut yang ditempatkan pada awal deck. <?php header("Content-type: text/vnd.wap.wml"); echo "<?xml version=\"1.0\"?>"; echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; ?>

27 Mengapa PHP digunakan? Bahasa mirip C dan Java Mudah Pemakaiannya
Kode “ditanamkan” pada HTML/WML/XHTML. Kode php dimulai dan diakhiri dengan tanda (tag) <html>    <head>        <title>Example</title>    </head>    <body>        <?php        echo "Hi, I'm a PHP script!";        ?>    </body> </html>

28 Why PHP? Cross Platform Keuntungan dalam biaya
Dapat jalan hampir di semua web server pada beberapa sistem operasi Web server: Apache, Microsoft IIS, Caudium, Netscape Enterprise Server Sistem operasi: NIX (HP-UX,OpenBSD,Solaris,Linux), Mac OSX, Windows NT/98/2000/XP/2003 Database: Adabas D, dBase,Empress, FilePro (read-only), Hyperwave,IBM DB2, Informix, Ingres, InterBase, FrontBase, mSQL, Direct MS-SQL, MySQL, ODBC, Oracle (OCI7 and OCI8), Ovrimos, PostgreSQL, SQLite, Solid, Sybase, Velocis,Unix dbm Keuntungan dalam biaya PHP is free.

29 Diagram Posisi Basis Data Web
MySQL (Database) Web Browser Web Server Interpreter PHP File PHP Page yg diinginkan Web dinamis Manipulasi data

30 Komunikasi Komunikasi antara web server dengan perangkat nirkabel WAP-enabled, membutuhkan WAP Gateway

31 Three Tier Client-Server Architecture

32 Komponen Web

33 Mapping URL Sistem Web

34 Web Server vs Web Application
Menggunakan bahasa Pemprograman(misal ASP, PHP, Java, .Net, Perl atau .NET) Web Server: Melayani permintaan client dan meneruskan ke aplikasi yang sesuai selanjutnya diproses oleh aplikasi yang sesuai (misal IIS, Apache, thttpd dll.) Web Application tidak bisa jalan tanpa Web Server Web Server bisa bekerja tanpa Web Application (Tapi hanya bisa melayani web dengan content statis)

35 Web Server Web Server: apache, xitami, PWS, IIS
Biasanya diinstall bersama dengan PHP dan MySQL => ApacheTriad Aplikasi free, ukuran cukup besar Tidak perlu konfigurasi Hanya perlu user & password apache dan MySQL Bisa diinstall di Linux (XAMPP) dan Windows (WAMPP)

36

37 File konfigurasi Web Server
httpd.conf srm.conf access.conf Juga perlu setting: Virtual Host

38 Httpd.conf ServerType – berdiri sendiri / manual inetd.
ServerRoot – directory konfigurasi. PidFile – nomor proses ID ResourceConfig / AccessConfig TimeOut – batas waktu time out. KeepAlive – simultan koneksi dari satu IP. MaxKeepAliveRequest – max. keep alive. KeepAliveTimeOut

39 Httpd.conf MinSpareServers & MaxSpareServers – jumlah server untuk server farm. StartServers – server di jalankan. MaxClients – jmlh koneksi simultan di server. MaxRequestsPerChild BindAddress – IP yang di tempelkan. Port – port yang di dengar Apache. User & Group – owner dari Apache Web. ServerAdmin – admin Web server.

40 httpd.conf ServerName – nama server. ErrorLog
LogLevel – level emerg, alert, crit, errors. CustomLog – catat akses client & virtual host. ServerSignature – dikirim saat file tidak ada. UserCanonicalName HostnameLookups – catat hostname akses.

41 srm.conf DocumentRoot – directory root HTML.
UserDir – public_html, DirectoryIndex – index file. FancyIndexing AccessFileName - .htaccess Alias – alias directory khusus, cgi-bin DefaultType – Default tipe dokumen

42 access.conf <Directory /> Options FollowSymLinks
AllowOverride None </Directory> <Directory “/usr/local/apache/htdocs”> Options Indexes FollowSymLinks Allow from all

43 Virtual Host – IP based <VirtualHost 192.168.0.1>
DocumentRoot /path/to/document ServerName </VirtualHost>

44 Virtual Host – name based
NameVirtualHost <VirtualHost > DocumentRoot /path/to/document1 ServerName </VirtualHost> DocumentRoot /path/to/document2 ServerName

45 Database Kumpulan data Tersimpan dalam suatu tempat
Dapat digunakan secara bersama

46 Database Secara digital tersimpan dalam bentuk file
tersimpan dalam database server diakses secara bersama melalui jaringan komputer

47 Database keamanan data konsistensi data validitas data
Dalam sistem informasi, penerapan database tidak hanya ditinjau dari sisi ketersediaan data tetapi juga dari sisi keamanan data konsistensi data validitas data reliablilitas system Perlu menejemen data

48 Database Management System
sistem basisdata yang mamiliki kemampuan menajemen untuk menjamin ketersediaan, keamanan, reliabilitas, konsistensi dan validitas data

49 Database Management System
Bagaimana cara mengorganisasikan data dalam database? Salah satu metode yg digunakan Menggunakan metode relasi yang didasarkan pada teori himpunan matematika

50 Database Management System
Tabel A Tabel B Tabel C Tabel D Tabel E Relational Database Management System

51 Web Database Tempat penyimpanan (repositories) database atau informasi yang secara dinamis berinteraksi dengan halaman Web Sebuah metode untuk menyimpan content WWW, dalam format terstruktur atau usable, yang terhubung baik secara statis maupundinamis dengan database lain Membantu komunikasi antara Web server dan Database.dan memungkinkan pemakai menerbitkan atau mengumpulkan informasi dari manapun

52 Tujuan Menyediakan jalan / cara remote access ke database server melalui browser Menggabungkan web server (http) dan database server Menggunakan semua metodologi web design standard untuk menyediakan kemudahan pemakaian, front end GUI ke database

53 CONTOH APLIKASI WAP-PHP-MYSQL
CREATE TABLE skor_bola ( klub1 CHAR(45) NOT NULL, klub2 CHAR(45) NOT NULL, skor1 CHAR(15) NOT NULL, skor2 CHAR(15) NOT NULL, ID int PRIMARY KEY ); INSERT INTO skor_bola VALUES ('MU', 'MC', '3', '1','1'); INSERT INTO skor_bola VALUES ('FCB', 'RM', '4', '4','2'); INSERT INTO skor_bola VALUES ('LIV', 'INT', '2', '1','3'); INSERT INTO skor_bola VALUES ('INA', 'LA', '0', '1','4'); INSERT INTO skor_bola VALUES ('INA', 'MAS', '4', '0','5'); INSERT INTO skor_bola VALUES ('INA', 'QTA', '2', '1','6'); CREATE TABLE tuser ( usernm varchar(20) NOT NULL default '', passw varchar(20) default NULL, PRIMARY KEY (usernm) ) TYPE=MyISAM; INSERT INTO tuser VALUES ('Admin', 'admin'); Script – Table Bola Script – Table tuser

54 Script – menu.php <?php header('Content-type:text/vnd.wap.wml');
echo('<?xml version="1.0"?>'); echo('<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1/EN">'); ?> <wml> <card title=".:: Menu Pilihan ::." newcontext="true"> <p align="left"> <small> <br/> echo "<a href=\"addbola.php\">Add Bola</a><br/>"; echo "<a href=\"brwosebola.php\">Browse Bola</a><br/>"; echo "<a href=\"listbola.php\">List Bola</a><br/>"; echo "<a href=\"FormLogin.php\">LogOut</a><br/>"; echo "<br/>"; </small> </p> </card> </wml>

55 Script – addbola.php <wml>
<card id="baca" title="Add Bola"> <table bgcolor=#FFFF99 color=#FF0000><small><center> <? echo('<?xml version="1.0"?>'); $con=mysql_connect("localhost","root",""); $nama_db=mysql_select_db("wap"); echo "<form action='' method='GET'>"; echo "Klub1 <input type='text' height='22' width='75' name='klub1'>"; echo "Klub2 <input type='text' height='22' width='75' name='klub2'>"; echo "Skor1 <input type='text' height='22' width='75' name='skor1'>"; echo "Skor2 <input type='text' height='22' width='75' name='skor2'>"; echo "<hr>"; echo "<input type='submit' name='simpan' value='Add'> "; echo "<input type='reset' name='batal' value='Cancel'> "; echo "</form>"; if ($_REQUEST[simpan]=='Add') { $klub1=$_REQUEST[klub1];$klub2=$_REQUEST[klub2]; $skor1=$_REQUEST[skor1];$skor2=$_REQUEST[skor2]; $sqlu="insert into skor_bola values ('$klub1‘,'$klub2','$skor1','$skor2')"; $result1=mysql_query($sqlu); echo "Sukses disimpan..!!"; } ?> <a href="menu.php">Back</a> </card> </wml> Script – addbola.php

56 Script – browsebola.php
<wml> <card id="baca" title="Browse Bola"> <table bgcolor=#FFFF99 color=#FF0000><small><center> <? echo('<?xml version="1.0"?>'); $con=mysql_connect("localhost","root",""); $nama_db=mysql_select_db("wap"); $sql="select * from skor_bola"; $result=mysql_query($sql); echo "<a href='addbola.php'>Add Bola</a>"; while ($row=mysql_fetch_array($result)) { echo "<hr>"; echo "$row[klub1]-$row[klub2] : $row[skor1]-$row[skor2]"; echo "<br><a href='editbola.php?ID=$row[ID]'>Edit | </a>"; echo "<a href='deletebola.php?ID=$row[ID]'>Del</a>"; } ?> <br> <a href="menu.php">Back</a> </card> </wml>

57 Script – deletebola.php
<wml> <card id="baca" title="Deleting Bola"> <table bgcolor=#FFFF99 color=#FF0000><small><center> <? echo('<?xml version="1.0"?>'); $con=mysql_connect("localhost","root",""); $nama_db=mysql_select_db("wap"); $ID=$_REQUEST[ID]; $sql="select * from skor_bola where ID='$ID'"; $result=mysql_query($sql); $row=mysql_fetch_array($result); $klub1=$row[klub1];$klub2=$row[klub2]; $skor1=$row[skor1];$skor2=$row[skor2]; echo "<form action='' method='GET'>"; echo "ID : <b><i> $ID<br>"; echo "Klub1 <input type='text' height='22' width='75' name='klub1' value=$klub1>"; echo "Klub2 <input type='text' height='22' width='75' name='klub2' value=$klub2>"; echo "Skor1 <input type='text' height='22' width='75' name='skor1' value=$skor1>"; echo "Skor2 <input type='text' height='22' width='75' name='skor2' value=$skor2>"; echo "<hr>"; echo "<input type='submit' name='hapus' value='Delete'> "; echo "<input type='reset' name='batal' value='Cancel'> "; echo "</form>"; if ($_REQUEST[hapus]=='Delete') { //echo "$klub1-$klub2-$skor1-$skor2-$ID"; $sqlu="delete from skor_bola where ID='$ID' "; $result1=mysql_query($sqlu); echo "Sukses dihapus..!!"; } ?> <a href="browsebola.php">Back</a> </card> </wml> Script – deletebola.php

58 Script – editbola.php <wml>
<card id="baca" title="Editing Bola"> <table bgcolor=#FFFF99 color=#FF0000><small><center> <? echo('<?xml version="1.0"?>'); $con=mysql_connect("localhost","root",""); $nama_db=mysql_select_db("wap"); $ID=$_REQUEST[ID];$sql="select * from skor_bola where ID='$ID'"; $result=mysql_query($sql);$row=mysql_fetch_array($result); $klub1=$row[klub1];$klub2=$row[klub2];$skor1=$row[skor1];$skor2=$row[skor2]; echo "<form action='' method='GET'>"; echo "ID : $ID<br>"; echo "Klub1 <input type='text' height='22' width='75' name='klub1' value=$klub1>"; echo "Klub2 <input type='text' height='22' width='75' name='klub2' value=$klub2>"; echo "Skor1 <input type='text' height='22' width='75' name='skor1' value=$skor1>"; echo "Skor2 <input type='text' height='22' width='75' name='skor2' value=$skor2>"; echo "<hr>"; echo "<input type='submit' name='Edit' value='Update'> ";echo "<input type='reset' name='batal' value='Cancel'> "; echo "</form>"; if ($_REQUEST[Edit]=='Update') { $klub1=$_REQUEST[klub1];$klub2=$_REQUEST[klub2]; $skor1=$_REQUEST[skor1];$skor2=$_REQUEST[skor2]; $sqlu="update skor_bola set klub1='$klub1', klub2='$klub2', skor1='$skor1', skor2='$skor2' where ID=$ID "; $result1=mysql_query($sqlu); echo "Sukses diupdate..!!"; } ?> <a href="browsebola.php">Back</a> </card> </wml> Script – editbola.php

59 Script – listbola.php <wml>
<card id="baca" title="Skor Bola"> <table bgcolor=#FFFF99 color=#FF0000><small><center> <? echo('<?xml version="1.0"?>'); $con=mysql_connect("localhost","root",""); $nama_db=mysql_select_db("wap"); $sql="select * from skor_bola"; $result=mysql_query($sql); while ($row=mysql_fetch_array($result)) { echo "<hr>"; echo "$row[klub1]-$row[klub2] : $row[skor1]-$row[skor2]"; } ?> <hr><a href="menu.php">Back</a> </card> </wml>

60 Script – formlogin.php <?php
header('Content-type:text/vnd.wap.wml'); echo('<?xml version="1.0"?>'); echo('<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1/EN">'); ?> <wml> <card id="satu" title="Login"> <table> <font size=-2> <tr><td>Username :</td><td><input width=90 height=25 name="user"></td></tr> <tr><td>Password :</td><td><input type="password" width=90 height=25 name="pass"></td></tr> <do type="accept" label="Back"> <go href="index.php"/> </do> <anchor> <go method="post" href="proses_login.php"> <postfield name="userL" value="$(user)"/> <postfield name="passL" value="$(pass)"/> </go> Login </anchor> </p>

61 Script – proses_login.php
header('Content-type:text/vnd.wap.wml'); echo('<?xml version="1.0"?>'); echo('<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1/EN">'); ?> <wml> <card id="card1" title="Proses Login"> <p> mysql_connect("localhost","root",""); mysql_select_db("wap"); $sql="select * from tuser where usernm='".$_POST["userL"]."' and passw='".$_POST["passL"]."'"; //echo $sql; $result=mysql_query($sql); $result1=mysql_num_rows($result); if($result1>0){ echo "<a href='menu.php'>Silahkan klik disini</a>"; }else{ echo"<center><b>Login Gagal</b><br><a href='FormLogin.php'>Back</a>"; } </p> </card> </wml>

62 Script – Table mahasiswa
CREATE TABLE mhs ( NIM varchar(16) NOT NULL default '', Nama varchar(145) NOT NULL default '', TglLahir date NOT NULL default ' ', Kelas varchar(15) NOT NULL default '', Jrs char(3) NOT NULL default '', PRIMARY KEY (NIM), KEY NIM (NIM) ) TYPE=MyISAM; INSERT INTO mhs VALUES (' ', 'Pradani', ' ', 'SK-4', '262'); INSERT INTO mhs VALUES (' ', 'Atika', ' ', 'SK-4', '262'); INSERT INTO mhs VALUES (' ', 'Danny', ' ', 'SK-4', '262'); INSERT INTO mhs VALUES (' ', 'Debie', ' ', 'SK-4', '262'); INSERT INTO mhs VALUES (' ', 'Cintya', ' ', 'SK-4', '262'); INSERT INTO mhs VALUES (' ', 'Asep', ' ', 'SK-4', '262'); INSERT INTO mhs VALUES (' ', 'Joko', ' ', 'SK-4', '262'); INSERT INTO mhs VALUES (' ', 'Acong', ' ', 'SK-4', '262'); INSERT INTO mhs VALUES (' ', 'Ucok', ' ', 'SK-4', '262'); INSERT INTO mhs VALUES (' ', 'Baba', ' ', 'SK-4', '262'); INSERT INTO mhs VALUES (' ', 'Khan', ' ', 'SK-4', '262'); INSERT INTO mhs VALUES (' ', 'Nere', ' ', 'SK-4', '262'); INSERT INTO mhs VALUES (' ', 'Sania', ' ', 'SK-4', '262'); INSERT INTO mhs VALUES (' ', 'Riani', ' ', 'SK-4', '262'); INSERT INTO mhs VALUES (' ', 'Ryan', ' ', 'SK-4', '262'); INSERT INTO mhs VALUES (' ', 'Wilujeng', ' ', 'SK-4', '262'); Script – Table mahasiswa

63 BrowseMhs.php <?php header('Content-type:text/vnd.wap.wml');
echo('<?xml version="1.0"?>'); echo('<!DOCTYPE wml PUBLIC "-//WAPFORUM// DTD WML 1.1/EN">'); ?>php <wml> <card id="satu" title="Connect-Mysql"> <font size="-3" color="#FF0000"> <? $con=mysql_connect("localhost","root",""); $db=mysql_select_db("dbmhs"); $sql="Select * from mhs"; $hasil=mysql_query($sql); while ($row=mysql_fetch_array($hasil)) { echo "$row[NIM]-$row[Nama]-$row[TglLahir]- $row[Kelas]-$row[Jrs]"; echo "<a href='editmhs.php?NIM=$row[NIM]'> Edit | </a> "; echo "<a href='deletemhs.php?NIM=$row[NIM]'> Delete</a> <hr>"; } ?> </card> </wml>

64 editmhs.php <?php header('Content-type:text/vnd.wap.wml');
echo('<?xml version="1.0"?>'); echo('<!DOCTYPE wml PUBLIC "-//WAPFORUM// DTD WML 1.1/EN">'); $nim=$_REQUEST[NIM]; $con=mysql_connect("localhost","root",""); $db=mysql_select_db("dbmhs"); $sql="Select * from mhs where NIM='$nim' "; $hasil=mysql_query($sql); $row=mysql_fetch_array($hasil); $nama=$row[Nama]; $tgllahir=$row[TglLahir]; $kelas=$row[Kelas]; $jrs=$row[Jrs]; ?>

65 <wml> <card id="satu" title="Connect-Mysql"> <font size="-3" color="#FF0000"> <form action="" method="GET"> NIM <input type="text" name="NIM" value="<? echo $nim; ?> "><br> Nama <input type="text" name="Nama" value="<? echo $nama; ?> "><br> Tanggal Lahir <input type="text" name="TglLahir" value="<? echo $tgllahir; ?> "><br> Kelas <input type="text" name="Kelas" value="<? echo $kelas; ?> "><br> Jurusan <input type="text" name="Jrs" value="<? echo $jrs; ?> "><br> <input type="submit" name="simpan" value="Update"> <input type="reset" name="batal" value="Cancel"> </form>

66 <? if ($_REQUEST[simpan]=='Update') { echo "Proses Updating..!"; $nim=$_REQUEST[NIM];$nama=$_REQUEST[Nama]; $tgllahir=$_REQUEST[TglLahir];$kelas=$_REQUEST[Kelas]; $jrs=$_REQUEST[Jrs]; $sql="update mhs set NIM='$nim', Nama='$nama', TglLahir='$tgllahir', Kelas='$kelas', Jrs='$jrs' where NIM='$nim' "; $hasil=mysql_query($sql); echo "Berhasil di Update..!"; } ?> <hr><a href="ListMhs.php">Back</a> </card> </wml>

67 deletemhs.php <?php header('Content-type:text/vnd.wap.wml');
echo('<?xml version="1.0"?>'); echo('<!DOCTYPE wml PUBLIC "-//WAPFORUM// DTD WML 1.1/EN">'); $nim=$_REQUEST[NIM]; $con=mysql_connect("localhost","root",""); $db=mysql_select_db("dbmhs"); $sql="Select * from mhs where NIM='$nim' "; $hasil=mysql_query($sql); $row=mysql_fetch_array($hasil); $nama=$row[Nama]; $tgllahir=$row[TglLahir]; $kelas=$row[Kelas]; $jrs=$row[Jrs]; ?>

68 <wml> <card id="satu" title="Connect-Mysql"> <font size="-3" color="#FF0000"> <form action="" method="GET"> NIM <input type="text" name="NIM" value="<? echo $nim; ?> "><br> Nama <input type="text" name="Nama" value="<? echo $nama; ?> "><br> Tanggal Lahir <input type="text" name="TglLahir" value="<? echo $tgllahir; ?> "><br> Kelas <input type="text" name="Kelas" value="<? echo $kelas; ?> "><br> Jurusan <input type="text" name="Jrs" value="<? echo $jrs; ?> "><br> <input type="submit" name="simpan" value="Delete"> <input type="reset" name="batal" value="Cancel"> </form>

69 <? if ($_REQUEST[simpan]=='Delete') { echo "Proses Deleting..!"; $sql=" delete from mhs where NIM='$nim' "; $hasil=mysql_query($sql); echo "Berhasil di Hapus..!"; } ?> <a href="ListMhs.php">Back</a> </card> </wml>

70 menu.php <?php header('Content-type:text/vnd.wap.wml');
echo('<?xml version="1.0"?>'); echo('<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1/EN">'); ?> <wml> <card title=".:: Menu Pilihan ::." newcontext="true"> <p align="left"> <small> <br/> echo "<a href=\"addmhs.php\">Add Mhs</a><br/>"; echo "<a href=\"browsemhs.php\">Browse Mhs</a><br/>"; echo "<a href=\"Listmhs.php\">List Mhs</a><br/>"; echo "<a href=\"FormLogin.php\">Exit</a><br/>"; echo "<br/>"; </small> </p> </card> </wml>

71 addmhs.php <?php header('Content-type:text/vnd.wap.wml');
echo('<?xml version="1.0"?>'); echo('<!DOCTYPE wml PUBLIC "-//WAPFORUM// DTD WML 1.1/EN">');$con=mysql_connect("localhost","root",""); $db=mysql_select_db("dbmhs"); ?> <wml> <card id="satu" title="Connect-Mysql"> <font size="-3" color="#FF0000"> <form action="" method="GET"> NIM <input type="text" name="NIM"><br> Nama <input type="text" name="Nama"><br> Tanggal Lahir <input type="text" name="TglLahir"><br> Kelas <input type="text" name="Kelas"><br> Jurusan <input type="text" name="Jrs"><br> <input type="submit" name="simpan" value="Add"> <input type="reset" name="batal" value="Cancel"> </form> <? if ($_REQUEST[simpan]=='Add') { echo "Proses Adding..!"; $nim=$_REQUEST[NIM];$nama=$_REQUEST[Nama]; $tgllahir=$_REQUEST[TglLahir];$kelas=$_REQUEST[Kelas]; $jrs=$_REQUEST[Jrs]; $sql="Insert into mhs values ('$nim', '$nama', '$tgllahir', '$kelas', '$jrs')"; $hasil=mysql_query($sql); echo "Berhasil di Disimpan..!"; } ?> <hr><a href=“menu.php">Back</a> </card> </wml>

72 Listmhs.php <?php header('Content-type:text/vnd.wap.wml');
echo('<?xml version="1.0"?>'); echo('<!DOCTYPE wml PUBLIC "-//WAPFORUM// DTD WML 1.1/EN">'); ?> <wml> <card id="satu" title="Connect-Mysql"> <font size="-3" color="#FF0000"> <? $con=mysql_connect("localhost","root",""); $db=mysql_select_db("dbmhs"); $sql="Select * from mhs"; $hasil=mysql_query($sql); while ($row=mysql_fetch_array($hasil)) { echo "$row[NIM]-$row[Nama]-$row[TglLahir]- $row[Kelas]-$row[Jrs]<hr>"; } <a href=“menu.php”>Back</a> </card> </wml>

73 Script – Table matakuliah
CREATE TABLE mtk ( KodeMK varchar(10) NOT NULL default '', NamaMK varchar(145) NOT NULL default '', SKS int, KodeJrs char(3) NOT NULL default '', PRIMARY KEY (KodeMK), KEY KodeMK (KodeMK) ) TYPE=MyISAM; INSERT INTO mtk VALUES ('KKKI12001', 'Pancasila', '2', '263'); INSERT INTO mtk VALUES ('KKKI12002', 'Agama', '2', '263'); INSERT INTO mtk VALUES ('KKKI12003', 'Bahasa Indonesia', '2', '263'); INSERT INTO mtk VALUES ('KKKI12004', 'Kewarganegaraan', '2', '263'); INSERT INTO mtk VALUES ('KKKI12005', 'Etika Profesi', '2', '263'); Script – Table matakuliah

74 ( nim varchar(16) NOT NULL default '',
CREATE TABLE ambilmk ( nim varchar(16) NOT NULL default '', kodeMK varchar(10) NOT NULL default '', nilai char(2) defalt NULL, PRIMARY KEY (nim,kodeMK) ) TYPE=MyISAM; INSERT INTO ambilmk VALUES (' ', 'KKKI12001', 'A'); INSERT INTO ambilmk VALUES (' ', 'KKKI12002', 'A'); INSERT INTO ambilmk VALUES (' ', 'KKKI12003', 'B'); INSERT INTO ambilmk VALUES (' ', 'KKKI12004', 'A'); INSERT INTO ambilmk VALUES (' ', 'KKKI12005', 'C'); INSERT INTO ambilmk VALUES (' ', 'KKKI12002', 'A'); INSERT INTO ambilmk VALUES (' ', 'KKKI12003', 'B'); INSERT INTO ambilmk VALUES (' ', 'KKKI12005', 'A'); Script – Table ambilmk

75 <?php header('Content-type:text/vnd.wap.wml'); echo('<?xml version="1.0"?>'); echo('<!DOCTYPE wml PUBLIC "-//WAPFORUM// DTD WML 1.1/EN">'); ?>php <wml> <card id="satu" title="Connect-Mysql"> <font size="-3" color="#FF0000"> <? $con=mysql_connect("localhost","root",""); $db=mysql_select_db("dbmhs"); $sql="Select * from mtk"; $hasil=mysql_query($sql); while ($row=mysql_fetch_array($hasil)) { echo "$row[KodeMK]-$row[NamaMK]-$row[SKS]-$row[KodeJrs]"; echo "<a href='editmtk.php?KodeMK=$row[KodeMK]'> Edit | </a> "; echo "<a href='deletemtk.php?KodeMK=$row[KodeMK]'> Delete</a> <hr>"; } ?> </card> </wml>

76 M_krs.php <?php mysql_connect("localhost", "root", "");
mysql_select_db("dbmhs"); $sql="Select * from mhs"; $hasil=mysql_query($sql); ?> <wml> <card id="KRS" title="Form KRS"> <font size="" color="#FF0000"> <form method="post" action="simpan.php"> Nomor BP : <select name="nim"> <? while ($row=mysql_fetch_array($hasil)) { echo "<option value=$row[NIM]>$row[NIM]</option>"; } echo "</select><br><br>"; $query = "SELECT * FROM mtk"; $hasil = mysql_query($query); $no = 1; while ($data = mysql_fetch_array($hasil)) echo "<input type='checkbox' value='".$data['KodeMK']."' name='mk".$no."' /> ".$data['KodeMK'].' - '.$data['NamaMK']."<br />"; $no++; <br> <input type="hidden" name="jumMK" value="<?php echo $no-1; ?>" /> <input type="submit" name="submit" value="Ambil" /> </form>

77 simpan.php <?php mysql_connect("localhost", "root", "");
mysql_select_db("dbmhs"); $nim = $_REQUEST['nim']; $jumMK = $_POST['jumMK']; for($i = 1; $i <= $jumMK; $i++) { $mk = $_POST['mk'.$i]; if (!empty($mk)) $query = "INSERT INTO ambilMK VALUES('$nim', '$mk', '-')"; mysql_query($query); } echo "Terimakasih sudah memilih matakuliah"; ?>

78 FormNilai.php <?php header('Content-type:text/vnd.wap.wml');
echo('<?xml version="1.0"?>'); echo('<!DOCTYPE wml PUBLIC "-//WAPFORUM// DTD WML 1.1/EN">'); mysql_connect("localhost", "root", ""); mysql_select_db("dbmhs"); $sql="Select * from mtk"; $hasil=mysql_query($sql); ?> <card id="KRS" title="Form Nilai"> <font size="" color="#FF0000"> <form method="post" action="simpan1.php"> Nomor BP : <select name="kodemk"> <? while ($row=mysql_fetch_array($hasil)) { echo "<option value=$row[KodeMK]>$row[KodeMK]</option>"; } echo "</select><br><br>"; $query = "SELECT * FROM ambilmk, mhs, mtk where ambilmk.nim=mhs.NIM and ambilmk.kodeMK=mtk.KodeMK order by mhs.NIM"; $hasil = mysql_query($query); $no = 1; </card> </wml>

79 while ($data = mysql_fetch_array($hasil))
{ echo "<select name='nl".$no."'>"; echo "<option value='A'>A</option>"; echo "<option value='B'>B</option>"; echo "<option value='C'>C</option>"; echo "<option value='D'>D</option>"; echo "<option value='E'>E</option>"; echo "<option value='TL'>TL</option>"; echo "<input type='hidden' value='".$data['nim']."' name='nim".$no."' />"; echo "<input type='hidden' value='".$data['kodeMK']."' name='mk".$no."' /> ".$data['nim'].' - '.$data['NamaMK'].' - '.$data['kodeMK']."<br/>"; $no++; } ?> </select> <br> <input type="hidden" name="jumMK" value="<?php echo $no-1; ?>" /> <input type="submit" name="submit" value="Ambil" /> </form>

80 simpan1.php <? header('Content-type:text/vnd.wap.wml');
echo('<?xml version="1.0"?>'); echo('<!DOCTYPE wml PUBLIC "-//WAPFORUM// DTD WML 1.1/EN">'); mysql_connect("localhost", "root", ""); mysql_select_db("dbmhs"); $jumMK = $_POST['jumMK']; for($i = 1; $i <= $jumMK; $i++) { $mk = $_REQUEST['mk'.$i]; $nim = $_REQUEST['nim'.$i]; $nl = $_REQUEST['nl'.$i]; if (!empty($mk)) $query = "update ambilMK set nilai='$nl' where nim='$nim' and kodeMK='$mk'"; mysql_query($query); } echo "Terimakasih sudah memilih matakuliah"; ?>

81 ListNilai.php <? header('Content-type:text/vnd.wap.wml');
echo('<?xml version="1.0"?>'); echo('<!DOCTYPE wml PUBLIC "-//WAPFORUM// DTD WML 1.1/EN">'); ?>php <wml> <card id="KHS" title="KHS"> <br> <b><big>DAFTAR NILAI MAHASISWA $con=mysql_connect("localhost","root",""); $db=mysql_select_db("dbmhs"); $sql="SELECT mhs.NIM, Nama, mtk.KodeMK, NamaMK, SKS, nilai FROM ambilmk, mhs, mtk where ambilmk.nim=mhs.NIM and ambilmk.kodeMK=mtk.KodeMK order by mhs.NIM"; $hasil=mysql_query($sql); $nim=' '; $bb=0;$tbb=0;$tsks=0;$nu=0; echo "<font size=-5 color=#FF0000><br><hr>"; while ($row=mysql_fetch_array($hasil))

82 { $nu++; if ($nim!=$row[NIM]) if ($nu>1) echo "<b>Indek Prestasi :"; echo number_format($ip,2,',','.'); echo "<br><hr>"; $bb=0;$tbb=0;$tsks=0;$nu=0; } if ($row[nilai]=='A') $mutu=4; elseif ($row[nilai]=='B') $mutu=3; elseif ($row[nilai]=='C') $mutu=2; elseif ($row[nilai]=='D') $mutu=1; elseif ($row[nilai]=='E') $mutu=0; elseif ($row[nilai]=='TL‘) $mutu='0';

83 $bb=$mutu*$row[SKS];
$tsks=$tsks+$row[SKS]; $tbb=$tbb+$bb; if ($tbb>0) $ip=$tbb/$tsks; echo "$row[NIM]-$row[Nama]-$row[KodeMK]-$row[NamaMK]-$row[SKS]-$row[nilai]-$mutu-$bb<hr>"; $nim=$row[NIM]; } echo "<b>Indek Prestasi :"; echo number_format($ip,2,',','.'); echo "<hr>"; ?> </card> </wml>


Download ppt "Ilustrasi Kerja WAP. Ilustrasi Kerja WAP WAE - Push Framework PUSH PROXY GATEWAY PUSH INITIATOR CLIENT OVER-THE-AIR PROTOCOL PUSH ACCESS PROTOCOL PPG."

Presentasi serupa


Iklan oleh Google