Wheatblog 1.0 > Wheatblog / Admin / Delete Post.php

Questions? Need Help? Want to share? » PHP Forum
Script Name:
Wheatblog 1.0

Download:
wheatblog-1.0.zip

Category:
Blog

Archive Content:

Wheatblog

Wheatblog > Admin

Wheatblog

Wheatblog > Css

Wheatblog > Css > Elem

Wheatblog > Css > Elem > Autumndusk

Wheatblog > Css > Elem > Autumndusk > CVS

Wheatblog > Css > Elem > Charcoal

Wheatblog > Css > Elem > Charcoal > CVS

Wheatblog > Css > Elem > CVS

Wheatblog > Css > Elem > Default

Wheatblog > Css > Elem > Default > CVS

Wheatblog > Css > Elem > Default

Wheatblog > Css > Elem > Dividedsky

Wheatblog > Css > Elem > Dividedsky > CVS

Wheatblog > Css > Elem > Dividedsky

Wheatblog > Css > Elem > Metal

Wheatblog > Css > Elem > Metal > CVS

Wheatblog > Css > Elem > Metal

Wheatblog > Css > Elem > Quanta

Wheatblog > Css > Elem > Quanta > CVS

Wheatblog > Css > Elem > Quanta

Wheatblog > Css > Elem > Sky

Wheatblog > Css > Elem > Sky > CVS

Wheatblog > Css > Elem > Sky

Wheatblog > Css > Elem > Universal

Wheatblog > Css > Elem > Universal > CVS

Wheatblog > Css > Elem > Universal

Wheatblog > Css

Wheatblog > Docs

Wheatblog > Includes

Wheatblog

Wheatblog > Language

Wheatblog

Wheatblog > Tools

Wheatblog

Delete Post.php:


<?php
//
// File:    admin/delete_post.php
// License: GNU GPL
// Purpose: Performs the post deletion from the database.
//
require('../settings.php');

if ( ! 
isAdmin() )
    
HariKari('You are not the admin.');


    
$db DB_connect($site,  $user,  $pass);
    
DB_select_db($database,  $db);
    
$id DB_Quote($_REQUEST['id']);

    
$result DB_query("delete  from $tblPosts where id = $id",  $db);

    
// Attempt to redirect back to referring page.  If we don't know what
    // that is,  go back to sane default: manage_posts.php.
    //
    
if ( isset($_SERVER['HTTP_REFERER']) )
        
header('Location: ' $_SERVER['HTTP_REFERER']);
    else
        
header("Location: $wb_admin_url/manage_posts.php");
?>



Other Blog Scripts:

WebMaster Resources Home

©RingsWorld.com