<?
include"koneksi.inc.php";
if($_POST[editprofil])
{
$urlstr=substr("$_POST[url]",0,7);
if($_POST[nama_dpn]=="" || $_POST[email]=="" || $_POST[url]=="")
{
?>
<script>
alert('nama, email, url tidak boleh kosong');
window.location="http://abgamal.blogspot.com/?mode=editprofil";
</script>
<?
}
elseif(!ereg("^.+\..+$",$_POST[email]))
{
?>
<script>
alert("~~~ Warning!! ~~~ \n\n INVALID PENULISAN EMAIL")
window.location="http://abgamal.blogspot.com/?mode=editprofil";
</script>
<?
}
elseif($urlstr!="http://")
{
?>
<script>alert('salah penulisan url')
window.location="http://abgamal.blogspot.com/?mode=editprofil";
</script>
<?
}
else
{
$updateprofil=mysql_query("UPDATE user SET realname='$_POST[nama_dpn]',email='$_POST[email]',url='$_POST[url]' WHERE id='$_POST[id]'");
if($updateprofil)
{
header('location:http://abgamal.blogspot.com');
}
else
{
?>
<script>alert('eksekusi database gagal')
window.location="http://abgamal.blogspot.com";
</script>
<?
}
}
}
else
{
header('location:http://abgamal.blogspot.com');
}
?>
<----------Batas Copy----------->
Ganti text warna merah dengan alamat blog anda
Wednesday, April 29, 2009
Tuesday, April 21, 2009
Memberlist PHP Multi Kolom
<?
Header("content-type: application/x-javascript");
include"koneksi.inc.php";
session_start();
$numcols = 3;
$numcolsprinted = 0;
$sql=mysql_query("SELECT * FROM user order by nama ASC");
$juml=mysql_num_rows($sql);
echo"document.write('<table width=\"100%\" style=\"font-family:verdana;font-size:10px\">');";
echo"document.write('<tr><td colspan=\"3\">Total Members : $juml</td></tr>');";
$i=0;
while($hsl=mysql_fetch_array($sql))
{
$in= $hsl[1];
$i++;
if ($numcolsprinted == $numcols) {
print "document.write('</tr><tr>');";
$numcolsprinted = 0;
}
echo"document.write('<td>$i</td><td width=\"30%\"><a href=\"$hsl[url]\" target=\"_blank\" style=\"text-decoration:none\"><img src=\"http://www.blogger.com/img/b16-rounded.gif\" border=\"0\"></a> <a href=\"http://blogproject.ueuo.com/jumpmemberarea.php?id=$hsl[id]\" style=\"text-decoration:none\">$in</a></td>');";
$numcolsprinted++;
}
$colstobalance = $numcols - $numcolsprinted;
for ($i=1; $i<=$colstobalance; $i++) {
}
print "document.write('<TD></TD>');";
echo"document.write('</table>');";
?>
<-------- Batas Copy ------------>
Catatan :
Jika ingin melihat demo klik link ini demo Memberlist Multi Kolom
Header("content-type: application/x-javascript");
include"koneksi.inc.php";
session_start();
$numcols = 3;
$numcolsprinted = 0;
$sql=mysql_query("SELECT * FROM user order by nama ASC");
$juml=mysql_num_rows($sql);
echo"document.write('<table width=\"100%\" style=\"font-family:verdana;font-size:10px\">');";
echo"document.write('<tr><td colspan=\"3\">Total Members : $juml</td></tr>');";
$i=0;
while($hsl=mysql_fetch_array($sql))
{
$in= $hsl[1];
$i++;
if ($numcolsprinted == $numcols) {
print "document.write('</tr><tr>');";
$numcolsprinted = 0;
}
echo"document.write('<td>$i</td><td width=\"30%\"><a href=\"$hsl[url]\" target=\"_blank\" style=\"text-decoration:none\"><img src=\"http://www.blogger.com/img/b16-rounded.gif\" border=\"0\"></a> <a href=\"http://blogproject.ueuo.com/jumpmemberarea.php?id=$hsl[id]\" style=\"text-decoration:none\">$in</a></td>');";
$numcolsprinted++;
}
$colstobalance = $numcols - $numcolsprinted;
for ($i=1; $i<=$colstobalance; $i++) {
}
print "document.write('<TD></TD>');";
echo"document.write('</table>');";
?>
<-------- Batas Copy ------------>
Catatan :
Jika ingin melihat demo klik link ini demo Memberlist Multi Kolom
Thursday, April 16, 2009
Jump Member Area
<?
include"koneksi.inc.php";
session_start();
$sql=mysql_query("SELECT * FROM user WHERE id='$_GET[id]'");
$hsl=mysql_fetch_array($sql);
if($_GET[acc]=="hapcook")
{
setcookie("idyou","");
header('location:http://ueuodotcom.blogspot.com');
}
elseif($_GET[acc]=="konfirmasi")
{
if($_SESSION[namauser]=="$hsl[nama]")
{
setcookie("idyou","$_GET[id]");
header('location:http://ueuodotcom.blogspot.com');
}
else
{
?>
<script>
alert('Anda harus Login sebagai member');
window.location='http://ueuodotcom.blogspot.com';
</script>
<?
}
}
else
{
setcookie("idyou","$_GET[id]");
header('location:http://ueuodotcom.blogspot.com');
}
?>
<-------------Batas akhir area copy ------------ >
Ganti text warna merah dengan alamat blog anda
include"koneksi.inc.php";
session_start();
$sql=mysql_query("SELECT * FROM user WHERE id='$_GET[id]'");
$hsl=mysql_fetch_array($sql);
if($_GET[acc]=="hapcook")
{
setcookie("idyou","");
header('location:http://ueuodotcom.blogspot.com');
}
elseif($_GET[acc]=="konfirmasi")
{
if($_SESSION[namauser]=="$hsl[nama]")
{
setcookie("idyou","$_GET[id]");
header('location:http://ueuodotcom.blogspot.com');
}
else
{
?>
<script>
alert('Anda harus Login sebagai member');
window.location='http://ueuodotcom.blogspot.com';
</script>
<?
}
}
else
{
setcookie("idyou","$_GET[id]");
header('location:http://ueuodotcom.blogspot.com');
}
?>
<-------------Batas akhir area copy ------------ >
Ganti text warna merah dengan alamat blog anda
Script Member Area
<?
Header("content-type: application/x-javascript");
include"koneksi.inc.php";
session_start();
if($_COOKIE[idyou]=="")
{
echo"document.getElementById('memberarea').style.display='none';";
}
else
{
echo"document.getElementById('memberarea').style.display='block';";
echo"document.write('<div align=\"right\"><a href=\"http://blogproject.ueuo.com/jumpmemberarea.php?acc=hapcook\">[ Close ]</a></div>');";
$sql=mysql_query("SELECT * FROM user WHERE id='$_COOKIE[idyou]'");
$hsl=mysql_fetch_array($sql);
$anda="<fieldset style=\"padding: 2;width:420px;border:1px solid #bbbbbb\">";
$anda .="<legend>Profil</legend>";
$anda .="<table cellpadding=\"2\" cellspacing=\"2\" width=\"100%\" style=\"font-family:verdana;font-size:10px\">";
$anda .="<tr><td colspan=\"2\" style=\"font-family:verdana;font-size:16px\"><b>PROFIL KAWAN</b></td></tr>";
$anda .="<tr><td>Nama ID</td><td><b>$hsl[nama]</b></td></tr>";
$anda .="<tr><td>Nama Lengkap</td><td><b>$hsl[realname]</b></td></tr>";
$anda .="<tr><td>Email</td><td><b>$hsl[email]</b></td></tr>";
$anda .="<tr><td>Url</td><td><a href=\"$hsl[url]\" target=\"_blank\"><b>$hsl[url]</b></a></td></tr>";
$anda .="</table></fieldset>";
echo"document.write('$anda');";
}
?>
<----------- Batas Akhir Area Copy ------------>
Bagian yang berwarna merah ganti dengan alamat anda di ueuo.com
Header("content-type: application/x-javascript");
include"koneksi.inc.php";
session_start();
if($_COOKIE[idyou]=="")
{
echo"document.getElementById('memberarea').style.display='none';";
}
else
{
echo"document.getElementById('memberarea').style.display='block';";
echo"document.write('<div align=\"right\"><a href=\"http://blogproject.ueuo.com/jumpmemberarea.php?acc=hapcook\">[ Close ]</a></div>');";
$sql=mysql_query("SELECT * FROM user WHERE id='$_COOKIE[idyou]'");
$hsl=mysql_fetch_array($sql);
$anda="<fieldset style=\"padding: 2;width:420px;border:1px solid #bbbbbb\">";
$anda .="<legend>Profil</legend>";
$anda .="<table cellpadding=\"2\" cellspacing=\"2\" width=\"100%\" style=\"font-family:verdana;font-size:10px\">";
$anda .="<tr><td colspan=\"2\" style=\"font-family:verdana;font-size:16px\"><b>PROFIL KAWAN</b></td></tr>";
$anda .="<tr><td>Nama ID</td><td><b>$hsl[nama]</b></td></tr>";
$anda .="<tr><td>Nama Lengkap</td><td><b>$hsl[realname]</b></td></tr>";
$anda .="<tr><td>Email</td><td><b>$hsl[email]</b></td></tr>";
$anda .="<tr><td>Url</td><td><a href=\"$hsl[url]\" target=\"_blank\"><b>$hsl[url]</b></a></td></tr>";
$anda .="</table></fieldset>";
echo"document.write('$anda');";
}
?>
<----------- Batas Akhir Area Copy ------------>
Bagian yang berwarna merah ganti dengan alamat anda di ueuo.com
Tuesday, April 14, 2009
Form Mail
Form Mailnya saya sederhanakan seperti ini
<form enctype="multipart/form-data" action="http://abdgamal.ueuo.com/sendemail.php" method="post" accept-charset="UTF-8">
<br/>
<font face="Verdana" color="#000000" size="2">Your Name*</font><br/>
<input maxlength="100" value="" name="FieldData0" size="45" type="text"/><br/>
<font face="Verdana" color="#000000" size="2">Your Email Address*</font><br/>
<input maxlength="100" value="" name="FieldData1" size="45" type="text"/><br/>
<font face="Verdana" color="#000000" size="2">Website Url</font><br/>
<input maxlength="100" value="" name="FieldData2" size="45" type="text"/><br/>
<td nowrap><font face="Verdana" color="#000000" size="2">Ads Title*</font><br/>
<input maxlength="100" value="" name="FieldData3" size="45" type="text"/><br/>
<font face="Verdana" color="#000000" size="2">Your Ads*</font><br/>
<textarea rows="10" cols="34" name="FieldData5"></textarea><br/>
<input value="Send" name="submit" type="submit"/> <input value=" Clear " name="Clear" type="reset"/>
</form>
Save form ini dimana saja pada blog anda
Ganti alamat yang berwarna merah dengan alamat di ueuo.com
langkah selanjutnya adalah buat script sendemail.php di ueuo.com
scriptnya adalah
<?
if($_POST[submit])
{
$pesan=urldecode($_POST[FieldData5]);
$pesan=str_replace('\"','"',$pesan);
$pesan=str_replace("\'","'",$pesan);
$kirim="Dear $_POST[FieldData0]".","."\n";
$kirim .="Anda Mendapat Kiriman Email"."\n\n";
$kirim .="Email Pengirim".":"."$_POST[FieldData1]"."\n";
$kirim .="Url Pengirim".":"."$_POST[FieldData2]"."\n\n";
$kirim .="Ads Title".":"."$_POST[FieldData3]"."\n\n";
$kirim .="Your Ads : $pesan"."\n\n";
$sendi= mail("abdgamal16@gmail.com","PESAN BUAT ANDA","$kirim\n\n", "FROM:\"AbdGamal\"<abdgamal16@gmail.com>\n"."X-IP-Address: $_SERVER[REMOTE_ADDR]\n"."X-Referer: $_SERVER[HTTP_REFERER]\n");
if($sendi)
{
header('location:http://abgamal.blogspot.com');
}
else
{
?>
<script>
alert('gagal kirim email');
window.location="http://abgamal.blogspot.com";
</script>
<?
}
}
?>
Ganti yang biru sesuai email dan blog anda. Save as sendemail.php
semoga berhasil.
<form enctype="multipart/form-data" action="http://abdgamal.ueuo.com/sendemail.php" method="post" accept-charset="UTF-8">
<br/>
<font face="Verdana" color="#000000" size="2">Your Name*</font><br/>
<input maxlength="100" value="" name="FieldData0" size="45" type="text"/><br/>
<font face="Verdana" color="#000000" size="2">Your Email Address*</font><br/>
<input maxlength="100" value="" name="FieldData1" size="45" type="text"/><br/>
<font face="Verdana" color="#000000" size="2">Website Url</font><br/>
<input maxlength="100" value="" name="FieldData2" size="45" type="text"/><br/>
<td nowrap><font face="Verdana" color="#000000" size="2">Ads Title*</font><br/>
<input maxlength="100" value="" name="FieldData3" size="45" type="text"/><br/>
<font face="Verdana" color="#000000" size="2">Your Ads*</font><br/>
<textarea rows="10" cols="34" name="FieldData5"></textarea><br/>
<input value="Send" name="submit" type="submit"/> <input value=" Clear " name="Clear" type="reset"/>
</form>
Save form ini dimana saja pada blog anda
Ganti alamat yang berwarna merah dengan alamat di ueuo.com
langkah selanjutnya adalah buat script sendemail.php di ueuo.com
scriptnya adalah
<?
if($_POST[submit])
{
$pesan=urldecode($_POST[FieldData5]);
$pesan=str_replace('\"','"',$pesan);
$pesan=str_replace("\'","'",$pesan);
$kirim="Dear $_POST[FieldData0]".","."\n";
$kirim .="Anda Mendapat Kiriman Email"."\n\n";
$kirim .="Email Pengirim".":"."$_POST[FieldData1]"."\n";
$kirim .="Url Pengirim".":"."$_POST[FieldData2]"."\n\n";
$kirim .="Ads Title".":"."$_POST[FieldData3]"."\n\n";
$kirim .="Your Ads : $pesan"."\n\n";
$sendi= mail("abdgamal16@gmail.com","PESAN BUAT ANDA","$kirim\n\n", "FROM:\"AbdGamal\"<abdgamal16@gmail.com>\n"."X-IP-Address: $_SERVER[REMOTE_ADDR]\n"."X-Referer: $_SERVER[HTTP_REFERER]\n");
if($sendi)
{
header('location:http://abgamal.blogspot.com');
}
else
{
?>
<script>
alert('gagal kirim email');
window.location="http://abgamal.blogspot.com";
</script>
<?
}
}
?>
Ganti yang biru sesuai email dan blog anda. Save as sendemail.php
semoga berhasil.
Subscribe to:
Posts (Atom)