Просмотр файла action.php

Размер файла: 1.95Kb
<?
/*
	#=====================================================#
	#              (c) 2006  Banner Rotate v.1            #
	#=====================================================#
	#            WAP site http://mega-wap.com.ru          #
    #            WEB site http://art-tech.net.ru          #
	#=====================================================#
	#                 Programmed By Demonaz               #
	#                    [email protected]                  #
	#=====================================================#
*/

require "./header.php";

include "./config.php";

if (empty($cmd)){$cmd = false;}

if ($enter == 0){print "<b>&#1053;&#1077;&#1074;&#1077;&#1088;&#1085;&#1099;&#1081; &#1051;&#1086;&#1075;&#1080;&#1085; &#1080;&#1083;&#1080; &#1055;&#1072;&#1088;&#1086;&#1083;&#1100;</b>";}else{


if ($cmd == "add_banner"){

$all = ($money/$cena)*$kol;

$site_url = htmlspecialchars(stripslashes(trim($site_url)));
$pict_url = htmlspecialchars(stripslashes(trim($pict_url)));
$alt = htmlspecialchars(stripslashes(trim($alt)));

$aa = explode(".", $all);
$alll = $aa[0];
print "&#1041;&#1072;&#1085;&#1085;&#1077;&#1088; &#1076;&#1083;&#1103; &#1089;&#1072;&#1081;&#1090;&#1072; <b>$site_url</b> &#1073;&#1091;&#1076;&#1077;&#1090; &#1087;&#1086;&#1082;&#1072;&#1079;&#1072;&#1085; <b>$alll</b> &#1088;&#1072;&#1079;";

$add_query = "INSERT INTO `user` VALUES ('$site_url', '$pict_url', '$alt', '$alll', '0', '".time()."')";

@mysql_query("$add_query");
}





///////////////////////////////////////////////////////////////
///////////////////////  Удаление Баннера  ////////////////////
///////////////////////////////////////////////////////////////


if ($cmd == "del_banner"){

$delete_query = "DELETE FROM user WHERE time=$id LIMIT 1";
@mysql_query("$delete_query");

print "&#1041;&#1072;&#1085;&#1085;&#1077;&#1088; &#1091;&#1076;&#1072;&#1083;&#1105;&#1085;!";
}



}


require "./footer.php";
?>