File size: 1.61Kb
<?php
/************************************
Script : Adnetwork
Website : http://facebook.com/pranto007
Script is created and provided by Pranto (http://facebook.com/pranto007)
**************************************/
include 'db.php';
include 'functions.php';
headtag("$SiteName - Delete Ads");
if($userlog==1){
echo '<div class="title">Delete Ad</div>';
$site=formget("id");
$uid=dump_udata("id");
$chsite=mysql_query("SELECT * FROM advertises WHERE userid='$uid' AND id='$site'");
if(mysql_num_rows($chsite)>0){
if(isset($_POST['captcha'])){
$captcha=formpost("captcha");
if($_SESSION['captcha']!=$captcha){
echo '<div class="error">Captcha code was wrong!</div>';
}
else {
$delsite=mysql_query("DELETE FROM advertises WHERE id='$site'");
if($delsite){
echo '<div class="success">Ad deleted successfully! <a href="/advertise">Continue</a></div>';
}
else {
echo 'unk';
}
}
}
echo '<div class="form"><form method="post">Do you really want to delete this Ad? <br/><img src="/im'.md5(microtime()).'.jpg"/><br/>Input the characters showing in the image.<br/><input type="text" name="captcha"/><br/><table><tr><td><input type="submit" value="Yes"/></form></td><td><form action="/advertise" method="post"><input type="submit" value="No"/></form></td></tr></table></div>';
}
else {
echo 'As I know you dont own this.';
}
echo '<div class="ad"><img src="/home.png"/> <a href="/">Home</a> | <a href="/advertise">My Ads</a></div>';
include 'foot.php';
}
else {
header('Location:/');
}
?>