<?php

/* FIRESHOP: Advanced Content Market System                         */

/* ============================================                         */

/*                                                                      */

/* Copyright (c) 2012 by Mohamad Porhaji                                */

/* http://Firedesign.ir                                                   */

/*                                                                      */

/* This program is free software.  */

/************************************************************************/

/* $Id: static_page_del.php,v 1.0.0.1 2012/02/18 By Mohamad Porhaji $ */

if (stristr(htmlentities($_SERVER["PHP_SELF"]), "static_page_del.php")) {
    Header("Location: index.php");
    die();
}


if(isset($_POST['static_del'])){$id=$_POST['id'];$datasql = $db->sql_query("SELECT * FROM fireshop_static where `id`='$id' Limit 1");
$mydata = $db->sql_fetchrow($datasql); $id = $mydata['id'];$title = $mydata['title'];echo"<div align=\"center\">
آيا از حذف اين صفحه ($title) مطمئن هستيد؟<br/><br/><form action=\"admin.php?do=static_page_del\" method=\"post\">
<input  type='hidden' size='50' name='id'  value='$id'/><input  type='submit' name='static_delete' value='بله'/> | 
<input  type='submit' name='' onclick='javascript:history.go(-1)' value='خير'/></form></div>";}else{}
if(isset($_POST['static_delete'])){$id=$_POST['id'];
$query = $db->sql_query("DELETE FROM `fireshop_static` WHERE `id` ='$id' LIMIT 1");
if($query){print('<div class="contact_active"> صفحه با موفقيت حذف گرديد</div>');}else{
print('<div class="failed"><div class="MsgBody">خطا</div></div>');}}
?>