72
Lampiran
Tampilan Utama Web Server
Index.php
<?php
if (!isset($_SESSION)) { session_start(); }
?> <body>
<div align="center"><tr>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#0099FF">
<tr>
<td align="center"><table width="70%" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="#0099FF">
<td width="26%"> </td> <td width="32%"> </td> <td width="42%"> </td> </tr>
<tr bgcolor="#000099">
<td colspan="3"><p><img src="images/top.png" width="900" height="100"></p> </td> </tr>
<tr bgcolor="#00FFFF">
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>
<td width="26%" height="23"><div align="center"><a href="index.php" class="style2">Home</a></div></td>
<td width="32%"><div align="center"><a href="smsmanager.php" class="style2">Sms Manager</a> </div></td>
<td width="30%"><div align="center"><a href="usermanager.php" class="style2">User Manager</a> </div> <div align="center"><a href="report.php" class="style2"></a></div></td>
<td>
73
<td bgcolor="#CCFFFF"> </td><td bgcolor="#CCFFFF"><div align="right"></div> <table width="100%" border="0">
<tr>
<td width="73%"><div align="right">@2009</div></td> <td width="27%"><DIV id=waktu>
</tr> </table></td> </tr>
<tr bgcolor="#99FFFF">
<td height="375" align="center" valign="top"><table width="80%" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#EBE9ED">
<tr>
<td><div align="center"><span class="style2">Menu</span></div></td> </tr>
74
Tampilan loginLogin.php
<title>Login Form</title> <style type="text/css"> <!--
.style1 {
font-family: "Comic Sans MS"; font-weight: bold;
}
.style3 {font-family: "Bauhaus 93"} -->
</style>
<table width="200" border="0" align="center" bgcolor="#0099FF"> <tr>
<td><div align="center">
<form name="form1" method="post" action="login-exec.php"> <table width="100%" border="0">
<tr>
<td colspan="3"><div align="center" class="style1">Form Login </div></td> </tr>
<tr>
<td width="35%"> </td> <td width="30%"> </td> <td width="35%"> </td> </tr>
<tr>
<td><span class="style3">User</span></td> <td colspan="2"><label>
<input name="user1" type="text" id="user" size="15"> </label></td>
</tr> <tr>
<td><span class="style3">Password</span></td> <td colspan="2"><label>
<input name="password1" type="password" id="password" size="15"> </label></td>
</tr> <tr>
<td> </td> <td> </td> <td> </td> </tr>
75
<td><label></label></td>
<td><input type="reset" name="Submit2" value="batal"></td> <td><label>
font-family: "Comic Sans MS"; font-weight: bold;
}
.style3 {font-family: "Bauhaus 93"} -->
<td><span class="style3">Password</span></td> <td colspan="2"><label>
<input name="password1" type="password" id="password" size="15"> </label></td>
76
Tampilan PenolakanNot.php
<!--
.style1 {font-family: "Bauhaus 93"} -->
</style> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title>
</head> <body>
<h2 align="center" class="style1">MAAF ANDA TIDAK BERHAK MENGAKSES SITUS INI</h2>
<h2 align="center" class="style1">Terimakasih Atas Perhatiannya </h2> </body>
77
Tampilan User ManagerSms manager
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <head>
<title>ELEKTRO SMS Gateway</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css">
<!-- body {
margin-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 0px; }
.style1 {font-family: "Comic Sans MS"} .style2 {font-family: "Bauhaus 93"} -->
</style></head> <body>
<div align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#0099FF"> <tr>
<td align="center"><table width="70%" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="#0099FF">
<td width="26%"> </td> <td width="32%"> </td> <td width="42%"> </td> </tr>
<tr bgcolor="#000099">
<td colspan="3"><p><img src="images/top.png" width="900" height="100"></p> </td> </tr>
<tr bgcolor="#00FFFF">
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>
<td width="26%" height="23"><div align="center" class="style2"><a href="index.php" class="style2">Home</a></div></td>
78
<td width="30%"><div align="center" class="style2"><a href="usermanager.php" class="style2">User Manager</a> </div></td>
<td width="0%"><div align="center" class="style2"><a href="report.php" class="style2"></a></div></td>
<td width="0%"><span class="style2"></span></td> <td width="8%"><div align="right" class="style2"> <?php
if (!empty($commonuser)) {
//echo "hello ,"; //echo ($commonuser); echo (" ");
echo ('<a href=logoff.php>Logoff</a>'); }
else {
echo("<a href=login.php>Login</a>"); echo($commonuser);
} ?> </div></td>
<td width="4%"> </td> </tr>
</table></td> </tr> </table></td> </tr>
79
Tampilan New SMSNewsms.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <head>
<title>ELEKTRO SMS Gateway</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css">
<!-- body {
margin-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 0px; }
.style2 {font-family: "Bauhaus 93"; } -->
</style></head> <?php
if (!empty($commonuser)) {
//echo "hello ,"; //echo ($commonuser); echo (" ");
echo ('<a href=logoff.php>Logoff</a>'); }
else {
echo("<a href=login.php>Login</a>"); echo($commonuser);
} ?> </div> </div></td>
<td width="2%"> </td> </tr>
</table></td> </tr>
80
<td bgcolor="#CCFFFF"> </td>
<td bgcolor="#CCFFFF"><div align="right"></div> <table width="100%" border="0">
<tr>
<td width="73%"><div align="right">@2009</div></td> <td width="27%"><DIV id=waktu>
<div align="right"><SCRIPT language=javascript> function jam() {
var d = new Date();
document.getElementById("waktu").innerHTML = d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds() ;
setTimeout("jam()", 1000);
<td height="375" align="center" valign="top" > <table width="80%" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#EBE9ED"> <tr>
<td><div align="center"><span class="style2">Menu</span></div></td> </tr>
<tr>
<td class="style1"><a href="newsms.php" class="style2">New SMS </a></td> </tr>
<tr>
<td class="style1"><a href="inbox.php" class="style2">Inbox</a></td> </tr>
<tr>
<td class="style1"><a href="outbox.php" class="style2">Outbox</a></td> </tr>
<tr>
<td class="style1"><a href="phonebook.php" class="style2">PhoneBook</a></td> </tr>
<tr bgcolor="#000099">
<td colspan="3"><div align="center">Nana @ 2009 </div></td> </tr>
.style1 {font-family: "Bauhaus 93"} -->
</style>
<span class="style1">No. HP Tujuan :</span> <input type="text" name="nohp">
81
<br>
<input type="submit" name="submit" value="Kirim SMS"> </form>
Send.php
<?php
mysql_connect("localhost", "root", ""); mysql_select_db("smsd");
$noTujuan = $_POST['nohp']; $message = $_POST['msg']; //echo ($noTujuan); //echo ($message);
if ($hasil) echo "SMS berhasil dikirim "; else echo "SMS gagal dikirim"; echo( $query);
82
Tampilan InboxInbox.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <head>
<title>ELEKTRO SMS Gateway</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css">
<!-- body {
margin-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 0px; }
.style2 {font-family: "Bauhaus 93"} -->
</style></head> </table></td> </tr>
<tr bgcolor="#99FFFF">
<td align="center" valign="top" height="375"> <table width="80%" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#EBE9ED"> <tr>
<td><div align="center"><span class="style2">Menu</span></div></td> </tr>
<tr>
<td class="style1"><a href="newsms.php" class="style2">New SMS </a></td> </tr>
<tr>
<td class="style1"><a href="inbox.php" class="style2">Inbox</a></td> </tr>
<tr>
<td class="style1"><a href="outbox.php" class="style2">Outbox</a></td> </tr>
<tr>
<td class="style1"><a href="phonebook.php" class="style2">PhoneBook</a></td> </tr>
83
</table></td>
<tr bgcolor="#000099">
<td colspan="3"><div align="center">Nana @ 2009 </div></td> </tr>
<meta http-equiv="refresh" content="10"> <html>
<head>
body {background-color: #CCCCFF} h1 {background-color: #FF8000} h1 {color: #000066}
body
{font-size: 10px} </style>
</head> <body> <?php
function mysql_timestamp_to_human($dt) //mysql timestamp to human readable {
return date("d M Y H:i", mktime ($hr,$mi,0,$mo,$da,$yr)).""; //format of displayed date and time
} ?> <?PHP
mysql_connect("localhost", "root", "") or die(mysql_error()); //connect to mysql mysql_select_db("smsd") or die(mysql_error()); //select database
echo "<table border=1>"; //begin creation of table
echo "<tr> <th>Date </th><th>Tel. Number</th> <th>Message</th> <th>Reply</th> <th>Deleted</></tr>"; //header of the table
84
echo "<tr><td>"; //begin of row and cell
$d= $row['ReceivingDateTime']; //create variable for function at begin //echo mysql_timestamp_to_human($d); //paste normal date
echo ($d);
echo "</td><td>";// end and begin of cell
echo $row['SenderNumber']; //show sender number echo "</td><td>"; //end and begin of cell
echo $row['TextDecoded']; //show text of the message echo "</td>"; //end and begin of cell
if($row['send']!='V'){ ?>
<td align="center"><a href="sendinbox.php?no=<?php echo($row['ID']); ?> & send=<?php echo($row['send']); ?>"><font face="Bauhaus 93">X</ font></a> <?php }else{ ?>
<td align="center"><a href="sendinbox.php?no=<?php echo($row['ID']); ?> & send=<?php echo($row['send']); ?>"><font face="Bauhaus 93">V</ font></a>
echo "</tr></table>"; //end of table ?>
<font face="Bauhaus 93">Send SMS to selected phone number : <br /> </font><br />
<textarea cols="50" rows="4" wrap="VIRTUAL" name="msg"> </textarea>
<input type="submit" value="Proses" /> </form>
<br><br><br> </body> </html> Hapuslagi.php <?php
// konek ke database
// sesuaikan dengan konfigurasi database Anda
mysql_connect("localhost", "root", "") or die(mysql_error()); //connect to mysql mysql_select_db("smsd") or die(mysql_error()); //select database
{
$id=$row['ID'];
if ($row['send']=="V") {
$noTujuan = $row['SenderNumber']; $message = $_POST['msg']; }
mysql_query("UPDATE inbox SET send='X' WHERE ID =$id"); if ($row['Hapus']=="V") {
$qry = "DELETE FROM inbox WHERE ID='$id'" ; mysql_query($qry);
} }
}
85
Sendinbox.php// konek ke database
// sesuaikan dengan konfigurasi database Anda
mysql_connect("localhost", "root", "") or die(mysql_error()); //connect to mysql mysql_select_db("smsd") or die(mysql_error()); //select database
if($send=='V'){
$qry = "UPDATE inbox SET send='X' WHERE ID='$id'" ; mysql_query($qry);
}else{
$qry = "UPDATE inbox SET send='V' WHERE ID='$id'" ; mysql_query($qry);
} ?>
Hapusinbox.php // konek ke database
// sesuaikan dengan konfigurasi database Anda
mysql_connect("localhost", "root", "") or die(mysql_error()); //connect to mysql mysql_select_db("smsd") or die(mysql_error()); //select database
if($send=='V'){
$qry = "UPDATE inbox SET Hapus='X' WHERE ID='$id'" ; mysql_query($qry);
}else{
$qry = "UPDATE inbox SET Hapus='V' WHERE ID='$id'" ; mysql_query($qry);
86
Tampilan OutboxOutbox.php <?php
if (!isset($_SESSION)) { session_start(); }
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <head>
<title>ELEKTRO SMS Gateway</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css">
<!--
<?php
if (!empty($commonuser)) {
//echo "hello ,"; //echo ($commonuser); echo (" ");
echo ('<a href=logoff.php>Logoff</a>'); }
else {
echo("<a href=login.php>Login</a>"); echo($commonuser);
} ?> </div> </div></td>
<td width="2%"> </td> </tr>
</table></td> </tr>
<tr bgcolor="#99FF99"> <td bgcolor="#CCFFFF"></td> <td bgcolor="#CCFFFF"> </td>
<td bgcolor="#CCFFFF"><div align="right"></div> <table width="100%" border="0">
<tr>
87
</tr> </table></td> </tr>
<tr bgcolor="#99FFFF">
<td height="375" align="center" valign="top"> <table width="80%" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#EBE9ED"> <tr>
<td><div align="center"><span class="style1">Menu</span></div></td> </tr>
<tr>
<td class="style1"><a href="newsms.php" class="style2">New SMS </a></td> </tr>
<tr>
<td class="style1"><a href="inbox.php" class="style2">Inbox</a></td> </tr>
<tr>
<td class="style1"><a href="outbox.php" class="style2">Outbox</a></td> </tr>
<tr>
<td class="style1"><a href="phonebook.php" class="style2">PhoneBook</a></td> </tr>
</tr>
<tr bgcolor="#000099">
<td colspan="3"><div align="center">Nana @ 2009 </div></td> </tr>
<meta http-equiv="refresh" content="5"> <html>
<head>
body {background-color: #CCCCFF} h1 {background-color: #FF8000} h1 {color: #000066}
body
88
return date("d M Y H:i", mktime ($hr,$mi,0,$mo,$da,$yr)).""; //format of displayed date and time
}
mysql_connect("localhost", "root", "") or die(mysql_error()); //connect to mysql mysql_select_db("smsd") or die(mysql_error()); //select database
echo "<table border=1>"; //begin creation of table
echo "<tr> <th>Date </th><th>Tel. Number</th> <th>Message</th> <th>Status</th> <th>Delete</th></tr>"; //header of the table
while($row = mysql_fetch_array( $result )) { //create variable row // Print out the contents of each row into a table
echo "<tr><font size='-4'><td>"; //begin of row and cell
$d= $row['SendingDateTime']; //create variable for function at begin //echo mysql_timestamp_to_human($d); //paste normal date echo ($d);
echo "</td><td>";// end and begin of cell
echo $row['DestinationNumber']; //show sender number echo "</td><td>"; //end and begin of cell
echo $row['TextDecoded']; //show text of the message echo "</td><td>"; //end and begin of cell
echo $row['Status']; //show text of the message echo "</td>";
$c = $row['ID'];
if($row['dihapus']!='V'){ ?>
<td align="center"><a href="pilihdelete.php?no=<?php echo($row['ID']); ?> & send=<?php echo($row['dihapus']); ?>"><font face="Bauhaus 93">X</font ></a></td>
<?php }else{ ?>
<td align="center"><a href="pilihdelete.php?no=<?php echo($row['ID']); ?> & send=<?php echo($row['dihapus']); ?>"><font face="Bauhaus 93">V</font ></a></td>
<?PHP }}
echo "</tr></table>"; //end of table ?>
<input type="submit" value="Proses" /> </form>
// konek ke database
// sesuaikan dengan konfigurasi database Anda
mysql_connect("localhost", "root", "") or die(mysql_error()); //connect to mysql mysql_select_db("smsd") or die(mysql_error()); //select database
{
if ($row['dihapus']=="V") {
$qry = "DELETE FROM sentitems WHERE ID='$id'" ; mysql_query($qry);
89
Pilihdelete.php<?php
$send = $_GET['send']; $id = $_GET['no']; // konek ke database
// sesuaikan dengan konfigurasi database Anda
mysql_connect("localhost", "root", "") or die(mysql_error()); //connect to mysql mysql_select_db("smsd") or die(mysql_error()); //select database
if($send=='V'){
$qry = "UPDATE sentitems SET dihapus='X' WHERE ID='$id'" ; mysql_query($qry);
}else{
$qry = "UPDATE sentitems SET dihapus='V' WHERE ID='$id'" ; mysql_query($qry);
}
90
Phonebook.php<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <head>
<title>ELEKTRO SMS Gateway</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css">
<!-- </tr> </table></td> </tr>
<tr bgcolor="#99FFFF">
<td align="center" valign="top" height="375"> <table width="80%" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#EBE9ED"> <tr>
<td><div align="center"><span class="style1">Menu</span></div></td> </tr>
<tr>
<td class="style1"><a href="newsms.php" class="style2 style1">New SMS </a></td> </tr>
<tr>
<td class="style1"><a href="inbox.php" class="style2 style1">Inbox</a></td> </tr>
<tr>
<td class="style1"><a href="outbox.php" class="style2 style1">Outbox</a></td> </tr>
<tr>
<td class="style1"><a href="phonebook.php" class="style2 style1">PhoneBook</a></td> </tr>
<tr bgcolor="#000099">
<td colspan="3"><div align="center">Nana @ 2009 </div></td> </tr>
<tr bgcolor="#0099FF"> <td> </td> <td> </td> <td> </td> </tr>
</table></td> </tr>
91
// konek ke database// sesuaikan dengan konfigurasi database Anda
mysql_connect("localhost", "root", "") or die(mysql_error()); //connect to mysql mysql_select_db("smsd") or die(mysql_error()); //select database
<td align="center"> <input type="hidden" name="id" value=""> </td>
<td align="center"><input type="text" name="namabaru"></td> <td align="center"><input type="text" name="nomorbaru"></td> <td align="center"><input type="submit" value="Add Contact" /></td> <td align="center"><input type="hidden" name="id"
value="<?php echo($row[no]); ?>"></td>
<td align="center"><input type="text" name="namabaru" value="<?php echo($row[nama]); ?>"></td>
<td align="center"><input type="text" name="nomorbaru" value="<?php echo($row[telp]); ?>"></td>
<td align="center"><input type="submit" value="Update" /></td> <?php
} ?> </tr> </form>
<form action="sendpb.php" method="POST"> <tr>
<?php if($row['send']!='V'){ ?>
<td align="center"><a href="sendpbid.php?no=<?php echo($row['no']); ?> & send=<?php echo($row['send']); ?>"><font face="Bauhaus 93">X</font></a></td>
<td align="center"><?php echo($row['nama']); ?></td> <td align="center"><?php echo($row['telp']); ?></td> <td align="center">
</tr>
<font face="Bauhaus 93">Send SMS to selected phone number : <br /> </font><br />
<textarea cols="50" rows="4" wrap="VIRTUAL" name="msg"> Your message here . . .</textarea>
<input type="submit" value="Send" /> </form>
92
Update.php// konek ke database
// sesuaikan dengan konfigurasi database Anda
mysql_connect("localhost", "root", "") or die(mysql_error()); //connect to mysql mysql_select_db("smsd") or die(mysql_error()); //select database
if($id==""){
$qry = "INSERT INTO phoneb (no, nama, telp) VALUES ('', '$namabaru', '$nomorbaru')" ; mysql_query($qry);
} } ?>
Sendpb.php <?php
// konek ke database
// sesuaikan dengan konfigurasi database Anda
mysql_connect("localhost", "root", "") or die(mysql_error()); //connect to mysql mysql_select_db("smsd") or die(mysql_error()); //select database
{
if ($row['send']=="V") {
$noTujuan = $row['telp']; $message = $_POST['msg']; $query = "insert into
outbox(InsertIntoDB,SendingDateTime,DestinationNumber,Coding,TextDecoded) values(NOW(),'TIME: Auto NOW()','$noTujuan','Default_No_Compression','$message')";
$hasil = mysql_query($query); }
mysql_query("UPDATE phoneb SET send='X' WHERE no=$id"); }
?>
Sendpbid.php
// konek ke database
// sesuaikan dengan konfigurasi database Anda
mysql_connect("localhost", "root", "") or die(mysql_error()); //connect to mysql mysql_select_db("smsd") or die(mysql_error()); //select database
if($send=='V'){
$qry = "UPDATE phoneb SET send='X' WHERE no='$id'" ; mysql_query($qry);
}else{
$qry = "UPDATE phoneb SET send='V' WHERE no='$id'" ; mysql_query($qry);
93
Tampilan UserManagerUsermanager.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <head>
<title>ELEKTRO SMS Gateway</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css">
<!-- body {
margin-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 0px; }
.style1 {font-family: "Bauhaus 93"} -->
</style></head> </tr> </table></td> </tr>
<tr bgcolor="#99FFFF">
<td height="375" align="center" valign="top"> <table width="80%" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#EBE9ED"> <tr>
<td><div align="center"><span class="style1">User Manager </span></div></td> </tr>
<tr>
<td> </td> </tr>
<tr>
<td> </td> </tr>
<tr>
<td> </td> </tr>
<tr>
<td> </td> </tr>
94
<td colspan="3"><div align="center">Nana @ 2009 </div></td> </tr>
.style1 {font-family: "Bauhaus 93"} -->
</style> </head> <body>
// konek ke database
// sesuaikan dengan konfigurasi database Anda
mysql_connect("localhost", "root", "") or die(mysql_error()); //connect to mysql mysql_select_db("smsd") or die(mysql_error()); //select database
// menampilkan data phonebook dalam bentuk table <table border="1">
<tr>
<td align="center" width="30px"><span class="style1">No.</span></td>
<td align="center" width="100px"><span class="style1">Nama User </span></td> <td align="center" width="100px"><span class="style1">Password</span></td> <td align="center" width="100px"><span class="style1">Status</span></td> <td align="center" width="100px"><span class="style1">Edit/Delete</span></td> </tr>
<td align="center"><input type="hidden" name="id" value=""></td> <td align="center"><input name="user" type="text" size="15"></td> <td align="center"><input type="text" name="password" size="15"></td>
<td align="center"><input type="text" name="status" size="15"></td> <td align="center"><input type="submit" value="Add Contact" size="15"></td> <td align="center"><input type="hidden" name="id"
value="<?php echo($row[id]); ?>"></td>
<td align="center"><input type="text" name="user" value="<?php echo($row[user]); ?>" size="15"></td> <td align="center"><input type="password" name="password" value="<?php echo($row[password]); ?>" size="15"></td> <td align="center"><input type="text" name="status" value="<?php echo($row[status]); ?>" size="15"></td>
<td align="center"><input type="submit" value="Update" /></td> <?php
} <?php
// Ambil data phonebook dari database //$sql = "SELECT * FROM phoneb"; //$qry = mysql_query($sql);
$result = mysql_query("SELECT * FROM user"); while($row = mysql_fetch_array( $result )) {
95
if($row['id']!=$id){ ?>
</table> </body> </html>
Updateau.php
// konek ke database
// sesuaikan dengan konfigurasi database Anda
mysql_connect("localhost", "root", "") or die(mysql_error()); //connect to mysql mysql_select_db("smsd") or die(mysql_error()); //select database
if($id==""){
$qry = "INSERT INTO user (id, user, password, status) VALUES ('', '$user', '$password','$status')" ;
mysql_query($qry); } else {
$qry = "UPDATE user SET user='$user', password='$password' , status='$status' WHERE id='$id'" ;
mysql_query($qry); }
?>
96
Konfigurasi Modem
GSM Modem Kekuatan Besar(Heavy Duty) WAVECOM FASTRACK SUPREME WAVECOM FASTRACK Supreme GSM 900/1800 GPRS/GPS Class 10,AT Command Support.
Connectivity stack. 7x24 ontime,Tahan tanpa dimatikan. Cocok untuk SMS Gateway, Fax Modem, GPRS/GPS, BROADCAST, Poling SMS, Content Provider, system ATM Bank, Alert System, SMS REminder Quiz Interactive TV, System Pulsa/Voucher Elektronik dll. Efisiensi perusahaan. WAVECOM FASTRACK Supreme Package:
GSM 900/1800 & GPRS Class 10 -SIRIM & IDA Approved Power Supply with 4 pin connector - PS-003
Modem Serial cable with RJ11 plug - WMSER-2 GSM Dual Band antenna - ANT-HTGM-02 With optional IP Connectivity stack AT Command Support
Applications : oAppliance oSMS Gateway o Alert System
oElectronic Voucher GSM & CDMA oAutorefill System
oGPRS or GPS oATM Terminals oAutomotive oData Collections oGas Pumps
oIndustrial and Medical Remote monitoring system oRemote Diagnosis
oRemote Metering oSecurity System
97
oOther devices requiring wireless connectivity oEtc.
GSM Modem berkekuatan tinggi dan Telah terbukti Handal untuk keperluan : System Pulsa/VoucherElektronik, ATM (jaringan ATM diIndonesia), SMS Gateway, GPRS/GPS, SMSBroadcast,SMS Alert, ATM Network, SMS Poling, Quiz, BTS, Alert System dll.Full Package Conten :
GSM 900/1800 & GPRS - M1306B - SIRIM & IDA Approved Power Supply with 4 pin connector - PS-003
Modem Serial cable with RJ11 plug - WMSER-2 GSM Dual Band antenna - ANT-HTGM-02. With optional IP Connectivity stack AT Command Support
GSM Modem berkekuatan tinggi untuk keperluan SMS Gateway/Gatekeeper, Pulsa / Voucher Elektronik, SMS Center, Autorefill System, GPRS/GPS, SMS Broadcast, SMS Alert System, ATM Network Bank, SMS Poling, Quiz Yang membutuhkan Jutaan SMS per Jamnya, kinerja tinggi, Industrial Konsep, Tahan Panas, M2M (Mechine to Mechine), Realtime & Ontime terus hingga berbulan-bulan bahkan tahunan tanpa harus dimatikan
Konfigurasi file smsdrc untuk koneksi ke database dan file
gammmurc untuk koneksi ke modem.Smsdrc
# This section contains general settings # PIN - PIN for SIM card
# logfile - logfile for info about smsd actions
# CommTimeout - (time in seconds) after each read/write loop smsd waits so # many seconds to make it again. Default: 1
# SendTimeout - shows how many seconds smsd should wait for network answer # during sending sms. If nothing happen during this time,
# sms will be resent. Default: 10
# receivefrequency - the number of seconds between testing for received SMSes, when the phone # is busy sending SMSes. Normally a test for received SMSes is done every commtimeout # seconds and after each sent SMS. Default: 0 (not used)
# resetfrequency - the number of seconds between performing a preventive soft reset in order # to minimize the cases of hanging phones e.g. Nokia 5110 will sometimes
# freeze to a state when only after unmounting the battery the phone will be functional again.
# Default: 0 (not used)
# deliveryreport - should delivery reports be used no/log/sms. # log: one line log entry,
98
# phoneid - string with info about phone used for sending/receiving [smsd]
PIN = 1234 logfile = smsdlog commtimeout = 1 sendtimeout = 10 #receivefrequency = 1 #resetfrequency = 0 deliveryreport = sms #phoneid = MyPhone1
# --- SETTINGS FOR --smsd MYSQL --- user = root
password = pc = localhost database = smsd
# when you send sms from some SMSC, you can have Delivery/Failed Delivery # Reports from other SMSC number. You can set here number of this "buggy" # SMSC used by you and Gammu will not check it's number during assigning # reports to sent sms
#skipsmscnumber = +48602123456
# ---
# --- SETTINGS FOR --smsd FILES --- # The following paths must be written with trailing '/' or '\' depending on OS. # inboxpath - where the received SMSes are stored, default current directory # outboxpath - where SMSes to be sent should be placed, default current # directory
# sentsmspath - where the transmitted SMSes are placed, default outboxpath # (= deleted)
# errorsmspath - where SMSes with error in transmission is placed, default # sentsmspath
# inboxformat - the format in which the SMS will be stored: 'detail', 'unicode', 'standard'. # The 'detail' format is the format used for backup. See below.
# 'standard' is in the standard character set. # Default: unicode.
# transmitformat - the format for transmitting the SMS: 'auto', 'unicode', '7bit'. Default: auto #inboxpath = /var/spool/sms/inbox/
#outboxpath = /var/spool/sms/outbox/ #sentsmspath = /var/spool/sms/sent/ #errorsmspath = /var/spool/sms/error/ #inboxformat = unicode
#transmitformat = auto
# ---
# IN<date>_<time>_<serialno>_<phone number>_<sequence>.txt #
# eg. IN20021130_021531_00_+45409000931640979_00.txt # where
# <date> is yyyymmdd # <time> is hhmmss
# <serialno> is nn (in case of more SMSes sent at the same time to the phone) # <sequence> is nn (for multi-SMSes)
#
99
#
# Transmitting
# --- # The filename should be one of the following formats
#
# OUT<phone number>.txt<options>
# OUT<priority>_<phone number>_<serialno>.txt<options>
# OUT<priority><date>_<time>_<serialno>_<phone number>_<anything>.txt<options> # where
# <priority> is an alphabetic character (A-Z) A = highest priority # File extension convention:
# OUTxxxxx.txt : normal text SMS
# Options appended to the extension applying to this SMS only: # d: delivery report requested
# f: flash SMS
# b: WAP bookmark as name,URL
# e.g. OUTG20040620_193810_123_+4512345678_xpq.txtdf # is a flash text SMS requesting delivery reports
# Other fields as above.
# SMSes will be transmitted sequentially based on the file name #
# The contents of the file is the SMS to be transmitted (in Unicode or standard # character set)
#
# Example of the 'detail' inbox format
# --- # [SMSBackup000]
# #ABCDEFGHIJKLMNOPQRSTUVWXYZ # #
SMSC = "+62855000000"
# SMSCUnicode = 002B0034003500340030003500390030003000300030 # Sent = 20021201T025023
# State = UnRead
# Number = "+4522706947"
# NumberUnicode = 002B0034003500320032003700300036003900340037 # Name = "" # RejectDuplicates = True # ReplaceMessage = 0 # MessageReference = 0
Koneksi gammu pada gammurc
; In Win32 copy it into directory with Gammu.exe and name gammurc ; More about parameters later
; Anything behind ; or # is comment.
; --- [gammu]