LAMPIRAN 1. Listing Program Login.php session_start(); if(isset($_session['userid'])) { header('location:index.php'); $host = 'localhost'; $user = 'root'; $pass = '1234'; $dbname = 'akademik'; $konek = mysql_connect($host, $user, $pass) or die('mysql Tidak Terhubung'); mysql_select_db($dbname, $konek); <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>login</title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> <style type="text/css"> body,td,th { color: #FFF; font-size: 12px;.style11 {color: #0000FF.style12 { color: #FFF </style> </head> <body> <div id="wrapper"> <div id="logo"> <h1><em>mobile Information System </em></h1> <p align="left">for SMK Swasta Teladan Medan</p> <center> <table border="5" align="center" cellpadding="7" cellspacing="2" style="margin-top:50px; color: #FFF;"> <form action="proseslogin.php" method="post"> <tr align="center" valign="middle" bgcolor="#000000"> <td colspan="2"><h2>admin Login</h2></td> <tr bgcolor="#ffffff"> bgcolor="#000000">user ID </td> <td valign="middle" bgcolor="#000000"><input name="userid" type="text" size="20"/></td> <tr bgcolor="#ffffff">
bgcolor="#000000">password</td> <td valign="middle" bgcolor="#000000"><input name="password" type="password" size="20"/></td> <tr align="center" valign="middle" bgcolor="#000000"> <td colspan="2"><input type="submit" name="submit" value="login" /></td> <tr align="center" valign="middle" bgcolor="#000000"> <td colspan="2"><span class="style12">belum Jadi Admin?</span> <a href="register.php" class="style1">daftar</a></td> </form> </table> </center> <div id="footer-bgcontent"> <div id="footer"> <p>copyright @ 2012 departemen ilmu komputer. program studi ekstensi s1 ilmu komputer. </p> <p>universitas sumatera utara.design by APRILIA Ramadhani </p> </body> </html> 2. Listing Program Home.php <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>home</title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> <style type="text/css">.style3 {font-size: 14px body,td,th { color: #044dbc;.style9 {color: #044dbc.style11 {color: #0000FF.style13 {font-size: large.style14 { color: #000000; font-size: 22px;.style15 {font-size: large; color: #0000FF; </style> </head> <body> <div id="wrapper"> <div id="logo"> <h1><em>mobile Information System </em></h1> <p align="left">for SMK Swasta Teladan Medan</p> <hr/> <div id="header"> <div id="menu">
<li class="current_page_item"><a href="home.php" target="_parent" class="first style3"><strong>home</strong></a></li> <div id="page"> <div id="page-bgtop"> <div id="sidebar"> <ul> <h2>menu</h2> <li><ul> <li></li> <li><a href="admin.php" target="_parent">admin Account</a><a href="creator.php" target="_parent"></a></li> <li><a href="admin.php" target="_parent"></a> <a href="send.php" target="_parent">create SMS </a></li> <li><a href="create_sms.php" target="_parent"></a><a href="siswa.php" target="_parent">data Siswa </a></li> <li><a href="inbox.php" target="_parent">inbox</a></li> <li><a href="outbox.php" target="_parent">outbox </a></li> <li><a href="logout.php" target="_parent">logout</a></li> </ul></li></ul> <div id="content"> <h2 align="center" class="title style9"> </h2> <div class="entry"> <form class="style13"> <div align="justify"> <div align="justify"> <p><span class="style14">mobile Academic Information System </span><span class="style11">adalah suatu aplikasi yang berfungsi memberikan informasi kepada siswa dan orangtua/wali siswa mengenai akademik sekolah berbasis SMS. </span></p> <p><span class="style11">aplikasi ini hanya dapat digunakan oleh Admin sebagai operator dalam pengolahan data, mengirim dan menerima pesan. </span></p> </form></p> <div id="sidebar"> <ul> <h2>menu</h2> <li><ul> <li><a href="jadwal.php" target="_parent"></a></li> <li><a href="jadwal_ujian.php" target="_parent"></a> <a href="jduas.php" target="_parent"></a> <a href="jadwal_ujian.php" target="_parent"></a> <a href="info.php" target="_parent"></a> <strong><a href="absen.php" target="_parent">absensi </a></strong> <a href="jadwal.php" target="_parent"></a></li> <li><a href="jadwal.php" target="_parent">jadwal Pelajaran</a> </li> <li><a href="jduan.php" target="_parent"></a> <a href="ujian.php" target="_parent">nilai Ujian</a></li> <li><a href="nilai_ujian.php" target="_parent"></a> <a href="uas.php" target="_parent">nilai UAS</a></li> <li><a href="nilaiuas.php" target="_parent"></a> <a href="uan.php" target="_parent">nilai UAN</a></li> <li><a href="nilai_uan.php" target="_parent"></a><strong>
<a href="spp.php" target="_parent">spp</a></strong></li> </ul></li></ul> <div style="clear: both;"> <div id="footer-bgcontent"> <div id="footer"> <p>copyright @ 2012 departemen ilmu komputer. program studi ekstensi s1 ilmu komputer. </p> <p>universitas sumatera utara. Design by APRILIA Ramadhani </p> </body> </html> 3. Listing Program Data Siswa require_once('connections/dbkoneksi.php'); if (!function_exists("getsqlvaluestring")) { function GetSQLValueString($theValue, $thetype, $thedefinedvalue = "", $thenotdefinedvalue = "") { if (PHP_VERSION < 6) { $thevalue = get_magic_quotes_gpc()? stripslashes($thevalue) : $thevalue; $thevalue = function_exists("mysql_real_escape_string")? mysql_real_escape_string($thevalue) : mysql_escape_string($thevalue); switch ($thetype) { case "text": case "long": case "int": $thevalue = ($thevalue!= "")? intval($thevalue) : "NULL"; case "double": $thevalue = ($thevalue!= "")? doubleval($thevalue) : "NULL"; case "date": case "defined": $thevalue = ($thevalue!= "")? $thedefinedvalue : $thenotdefinedvalue; return $thevalue; mysql_select_db($database_dbkoneksi, $dbkoneksi); $query_dtsiswa = "SELECT * FROM siswa ORDER BY nis ASC"; $dtsiswa = mysql_query($query_dtsiswa, $dbkoneksi) or die(mysql_error()); $row_dtsiswa = mysql_fetch_assoc($dtsiswa); $totalrows_dtsiswa = mysql_num_rows($dtsiswa); <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>data Siswa</title> <meta name="keywords" content="">
<meta name="description" content=""> <link href="style.css" rel="stylesheet" type="text/css" media="screen"> <style type="text/css">.style1 { font-size: 14px; font-style: italic; body,td,th { color: #FFFFFF; font-size: 12px;.style2 { color: #000000; font-size: x-large;.style3 { color: #0000FF; font-size: 16px;.style5 { color: #FFFFFF;.style6 {color: #FFFFFF body { background-color: #FFF; background-repeat: repeat-x; #wrapper #page #page-bgtop #content.post1.entry form { color: #000; #wrapper #page #page-bgtop #content.post1.entry form { font-size: 14px; #wrapper #page #page-bgtop #content.post1.entry form { </style> </head> <body text="#ffffff"> <div id="wrapper"> <div id="logo"> <h1><em>mobile Information System </em></h1> <p class="style1">for SMK swasta teladan medan </p> <hr> <div id="page"> <div id="header"> <div id="menu"> <li class="current_page_item"><a href="home.php" target="_parent" class="first"><strong>home</strong></a></li> <div id="page-bgtop"> <div id="content"> <div class="post1"> <h2 align="center" class="title ">Data Siswa</h2> <div class="entry"> <form id="form1" method="post" action="input_siswa.php">
<label> <div align="justify"> <input type="submit" name="submit" value="tambah Data" /> </label> </form> <table width="880" align="center" border="1" bordercolor="#ffffff" bgcolor="#000000" cellpadding="6"> <tr align="center" valign="middle" bgcolor="#0166ff"> <td colspan="10"><strong>teknik Elektro</strong></td> <tr align="center" valign="middle" bgcolor="#0166ff"> <td>nis</td> <td>nama</td> <td>kelas</td> <td>gender</td> <td>tempat</td> <td>tgl Lahir</td> <td>alamat</td> <td colspan="2">aksi</td> do { <tr align="center" valign="middle"> <td> echo $row_dtsiswa['nis']; </td> <td> echo $row_dtsiswa['nama']; </td> <td> echo $row_dtsiswa['kelas']; </td> <td> echo $row_dtsiswa['gender']; </td> <td> echo $row_dtsiswa['tempat']; </td> <td> echo $row_dtsiswa['tgllahir']; </td> <td> echo $row_dtsiswa['alamat']; </td> <td><a href="edit_siswa.php?nis= echo $row_dtsiswa['nis']; "><strong>edit</strong></a></td> <td><a href="hapus_siswa.php?nis= echo $row_dtsiswa['nis']; "><strong>delete</strong></a></td> while ($row_dtsiswa = mysql_fetch_assoc($dtsiswa)); </table> <div style="clear: both;"> <div id="footer-bgcontent"> <div id="footer"> <p>copyright @ 2012 departemen ilmu komputer. program studi ekstensi s1 ilmu komputer. </p> <p>universitas sumatera utara.design by APRILIA Ramadhani </p> </body> </html> mysql_free_result($dtsiswa); 4. Listing Program Tambah Siswa require_once('connections/dbkoneksi.php'); if (!function_exists("getsqlvaluestring")) { function GetSQLValueString($theValue, $thetype, $thedefinedvalue = "", $thenotdefinedvalue = "")
{ if (PHP_VERSION < 6) { $thevalue = get_magic_quotes_gpc()? stripslashes($thevalue) : $thevalue; $thevalue = function_exists("mysql_real_escape_string")? mysql_real_escape_string($thevalue) : mysql_escape_string($thevalue); switch ($thetype) { case "text": case "long": case "int": $thevalue = ($thevalue!= "")? intval($thevalue) : "NULL"; case "double": $thevalue = ($thevalue!= "")? doubleval($thevalue) : "NULL"; case "date": case "defined": $thevalue = ($thevalue!= "")? $thedefinedvalue : $thenotdefinedvalue; return $thevalue; $editformaction = $_SERVER['PHP_SELF']; if (isset($_server['query_string'])) { $editformaction.= "?". htmlentities($_server['query_string']); if ((isset($_post["mm_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertsql = sprintf("insert INTO siswa (nis, nama, kelas, gender, tempat, tgllahir, alamat) VALUES (%s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['nis'], "text"), GetSQLValueString($_POST['nama'], "text"), GetSQLValueString($_POST['kelas'], "text"), GetSQLValueString($_POST['gender'], "text"), GetSQLValueString($_POST['tempat'], "text"), GetSQLValueString($_POST['tgllahir'], "text"), GetSQLValueString($_POST['alamat'], "text")); mysql_select_db($database_dbkoneksi, $dbkoneksi); $Result1 = mysql_query($insertsql, $dbkoneksi) or die(mysql_error()); mysql_select_db($database_dbkoneksi, $dbkoneksi); $query_dtsiswa = "SELECT * FROM siswa"; $dtsiswa = mysql_query($query_dtsiswa, $dbkoneksi) or die(mysql_error()); $row_dtsiswa = mysql_fetch_assoc($dtsiswa); $totalrows_dtsiswa = mysql_num_rows($dtsiswa); <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>input Data Siswa</title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> <style type="text/css">.style1 {
font-size: 14px; font-style: italic; body,td,th { color: #FFFFFF; font-family: Arial, Helvetica, sans-serif; font-size: 12px;.style2 { color: #000000; font-size: x-large;.style3 { color: #0000FF; font-size: 16px;.style5 { color: #FFFFFF;.style6 {color: #FFFFFF #wrapper div div h2 strong { color: #000; </style> </head> <body text="#000000"> <div id="wrapper"> <div id="logo"> <h1><em>mobile Information System </em></h1> <p class="style1">for SMK swasta teladan medan </p> <hr/> <div id="header"> <div id="menu"> <li class="current_page_item"><a href="home.php" target="_parent" class="first"><strong>home</strong></a></li> <div style="clear: both; color: #FFF; font-size: 12px; font-weight: bold;"><span style="font-size: x-large"><strong> </strong></span> <div align="center"> <h2><strong>tambah Data</strong></h2> <form method="post" name="form1" action=" echo $editformaction; "> <table border="5" align="center" cellpadding="4" cellspacing="2"> bgcolor="#000000"><strong>nis</strong></td> name="nis" value="" size="15"></td> bgcolor="#000000"><strong>nama</strong></td> name="nama" value="" size="25"></td>
bgcolor="#000000"><strong>kelas</strong></td> name="kelas" value="" size="5"></td> bgcolor="#000000"><strong>gender</strong></td> <td align="left" valign="middle" bgcolor="#000000"><select name="gender"> <option value="laki-laki" if (!(strcmp("laki-laki", ""))) {echo "SELECTED"; >Laki-laki</option> <option value="perempuan" if (!(strcmp("perempuan", ""))) {echo "SELECTED"; >Perempuan</option> </select></td> bgcolor="#000000"><strong>tempat Lahir</strong></td> name="tempat" value="" size="20"></td> bgcolor="#000000"><strong>tgl Lahir</strong></td> name="tgllahir" value="" size="10"> dd-mm-yyyy</td> bgcolor="#000000"><strong>alamat</strong></td> <td align="left" valign="middle" bgcolor="#000000"><textarea name="alamat" cols="20" rows="2"></textarea></td> <td colspan="2" align="center" valign="middle" bgcolor="#000000"><input type="submit" value="insert record"></td> </table> <input type="hidden" name="mm_insert" value="form1"> </form> <p> <p><a href="siswa.php"><span class="style3">lihat Data</span></a> <div id="footer-bgcontent"> <div id="footer"> <p>copyright @ 2012 departemen ilmu komputer. program studi ekstensi s1 ilmu komputer. </p> <p>universitas sumatera utara.design by APRILIA Ramadhani </p> </body> </html> mysql_free_result($dtsiswa);
5. Listing Program Edit Siswa require_once('connections/koneksi.php'); if (!function_exists("getsqlvaluestring")) { function GetSQLValueString($theValue, $thetype, $thedefinedvalue = "", $thenotdefinedvalue = "") { if (PHP_VERSION < 6) { $thevalue = get_magic_quotes_gpc()? stripslashes($thevalue) : $thevalue; $thevalue = function_exists("mysql_real_escape_string")? mysql_real_escape_string($thevalue) : mysql_escape_string($thevalue); switch ($thetype) { case "text": case "long": case "int": $thevalue = ($thevalue!= "")? intval($thevalue) : "NULL"; case "double": $thevalue = ($thevalue!= "")? doubleval($thevalue) : "NULL"; case "date": case "defined": $thevalue = ($thevalue!= "")? $thedefinedvalue : $thenotdefinedvalue; return $thevalue; $editformaction = $_SERVER['PHP_SELF']; if (isset($_server['query_string'])) { $editformaction.= "?". htmlentities($_server['query_string']); if ((isset($_post["mm_update"])) && ($_POST["MM_update"] == "form1")) { $updatesql = sprintf("update siswa SET nama=%s, kelas=%s, gender=%s, tempat=%s, tgllahir=%s, alamat=%s WHERE nis=%s", GetSQLValueString($_POST['nama'], "text"), GetSQLValueString($_POST['kelas'], "text"), GetSQLValueString($_POST['gender'], "text"), GetSQLValueString($_POST['tempat'], "text"), GetSQLValueString($_POST['tgllahir'], "text"), GetSQLValueString($_POST['alamat'], "text"), GetSQLValueString($_POST['nis'], "text")); mysql_select_db($database_koneksi, $koneksi); $Result1 = mysql_query($updatesql, $koneksi) or die(mysql_error()); $updategoto = "siswa.php"; if (isset($_server['query_string'])) { $updategoto.= (strpos($updategoto, '?'))? "&" : "?"; $updategoto.= $_SERVER['QUERY_STRING']; header(sprintf("location: %s", $updategoto)); $colname_dtsiswa = "-1"; if (isset($_get['nis'])) {
$colname_dtsiswa = $_GET['nis']; mysql_select_db($database_koneksi, $koneksi); $query_dtsiswa = sprintf("select * FROM siswa WHERE nis = %s", GetSQLValueString($colname_dtsiswa, "text")); $dtsiswa = mysql_query($query_dtsiswa, $koneksi) or die(mysql_error()); $row_dtsiswa = mysql_fetch_assoc($dtsiswa); $totalrows_dtsiswa = mysql_num_rows($dtsiswa); <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>edit Data Siswa</title> <meta name="keywords" content=""> <meta name="description" content=""> <link href="style.css" rel="stylesheet" type="text/css" media="screen"> <style type="text/css">.style1 { font-size: 14px; font-style: italic; body,td,th { color: #FFFFFF; font-size: 12px;.style2 { color: #000000; font-size: x-large;.style3 { color: #0000FF; font-size: 16px;.style5 { color: #FFFFFF;.style6 {color: #FFFFFF body { background-color: #FFF; </style> </head> <body text="#ffffff"> <div id="wrapper"> <div id="logo"> <h1><em>mobile Information System </em></h1> <p class="style1">for SMK swasta teladan medan </p> <hr> <div id="header"> <div id="menu"> <li class="current_page_item"><a href="home.php" target="_parent" class="first"><strong>home</strong></a></li> <div style="clear: both;"><span style="font-size: x- large"><strong> </strong></span>
<div align="center"> <h2><span class="style2">edit Siswa</span></h2> <form action=" echo $editformaction; " method="post" name="form1" id="form1"> <table border="5" align="center" cellpadding="4" cellspacing="2"> bgcolor="#000000"><strong>nis</strong></td> <td align="left" valign="middle" bgcolor="#000000"> echo $row_dtsiswa['nis']; </td> bgcolor="#000000"><strong>nama</strong></td> name="nama" value=" echo htmlentities($row_dtsiswa['nama'], ENT_COMPAT, 'utf-8'); " size="20" /></td> bgcolor="#000000"><strong>kelas</strong></td> name="kelas" value=" echo htmlentities($row_dtsiswa['kelas'], ENT_COMPAT, 'utf-8'); " size="5" /></td> bgcolor="#000000"><strong>gender</strong></td> <td align="left" valign="middle" bgcolor="#000000"><select name="gender"> <option value="laki-laki" if (!(strcmp("laki-laki", htmlentities($row_dtsiswa['gender'], ENT_COMPAT, 'utf-8')))) {echo "SELECTED"; >Laki-laki</option> <option value="perempuan" if (!(strcmp("perempuan", htmlentities($row_dtsiswa['gender'], ENT_COMPAT, 'utf-8')))) {echo "SELECTED"; >Perempuan</option> </select></td> bgcolor="#000000"><strong>tempat Lahir</strong></td> name="tempat" value=" echo htmlentities($row_dtsiswa['tempat'], ENT_COMPAT, 'utf-8'); " size="15" /></td> bgcolor="#000000"><strong>tanggal Lahir</strong></td> name="tgllahir" value=" echo htmlentities($row_dtsiswa['tgllahir'], ENT_COMPAT, 'utf-8'); " size="10" /> dd-mm-yyyy</td> bgcolor="#000000"><strong>alamat</strong></td> <td align="left" valign="middle" bgcolor="#000000"><textarea name="alamat" cols="20" rows="2"> echo htmlentities($row_dtsiswa['alamat'], ENT_COMPAT, 'utf-8'); </textarea></td>
<td colspan="2" align="center" valign="middle" bgcolor="#000000"><input type="submit" value="update record" /></td> </table> <input type="hidden" name="mm_update" value="form1" /> <input type="hidden" name="nis" value=" echo $row_dtsiswa['nis']; " /> </form> <div id="footer-bgcontent"> <div id="footer"> <p>copyright @ 2012 departemen ilmu komputer. program studi ekstensi s1 ilmu komputer. </p> <p>universitas sumatera utara. Design by APRILIA Ramadhani </p> </body> </html> mysql_free_result($dtsiswa); 6. Listing Program Hapus Siswa <title>hapus Data Siswa</title> require_once('connections/koneksi.php'); if (!function_exists("getsqlvaluestring")) { function GetSQLValueString($theValue, $thetype, $thedefinedvalue = "", $thenotdefinedvalue = "") { if (PHP_VERSION < 6) { $thevalue = get_magic_quotes_gpc()? stripslashes($thevalue) : $thevalue; $thevalue = function_exists("mysql_real_escape_string")? mysql_real_escape_string($thevalue) : mysql_escape_string($thevalue); switch ($thetype) { case "text": case "long": case "int": $thevalue = ($thevalue!= "")? intval($thevalue) : "NULL"; case "double": $thevalue = ($thevalue!= "")? doubleval($thevalue) : "NULL"; case "date": case "defined": $thevalue = ($thevalue!= "")? $thedefinedvalue : $thenotdefinedvalue;
return $thevalue; if ((isset($_get['nis'])) && ($_GET['nis']!= "")) { $deletesql = sprintf("delete FROM siswa WHERE nis=%s", GetSQLValueString($_GET['nis'], "text")); mysql_select_db($database_koneksi, $koneksi); $Result1 = mysql_query($deletesql, $koneksi) or die(mysql_error()); $deletegoto = "siswa.php"; if (isset($_server['query_string'])) { $deletegoto.= (strpos($deletegoto, '?'))? "&" : "?"; $deletegoto.= $_SERVER['QUERY_STRING']; header(sprintf("location: %s", $deletegoto)); 7. Listing Program Logout session_start(); unset($_session['userid']); <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>logout</title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> <style type="text/css">.style3 {font-size: 14px body,td,th { color: #044dbc;.style9 {color: #044dbc.style10 {color: #000000 body { background-color: #044dbc; </style> </head> <body> <div id="wrapper"> <div id="logo"> <h1><em>mobile Information System </em></h1> <p align="left">for SMK Swasta Teladan Medan</p> <hr/> <div id="header"> <div id="menu"> <div id="page"> <div id="page-bgtop"> <center> <h2>anda telah berhasil logout..</h2> Silahkan klik <a href="login.php"><b>disini</b></a> untuk login kembali <p>
if ($_POST['submit']) { // menjalankan command menghentikan service Gammu passthru("gammu-smsd -k"); else { // form berisi tombol untuk menghentikan service Gammu echo "<form method='post' action=".$_server['php_self'].">"; echo "<input type='submit' name='submit' value='hentikan SMS Service'>"; echo "</form>"; </p> </center> <div id="footer-bgcontent"> <div id="footer"> <p>copyright @ 2012 departemen ilmu komputer. program studi ekstensi s1 ilmu komputer. </p> <p>universitas sumatera utara.design by APRILIA Ramadhani </p> </body> </html>