<?php

/* FIRESHOP: Advanced Content Market System                         */

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

/*                                                                      */

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

/* http://Firedesign.ir                                                   */

/*                                                                      */

/* This program is free software.  */

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

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

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



if(isset($_POST['view_news'])){$id=$_POST['id'];
$query = $db->sql_query("SELECT * FROM fireshop_news Where `id`='$id'  ORDER BY `time_stamp` DESC");
while ($row = $db->sql_fetchrow($query)) {$date = $row['date'];$title = $row['title'];$des = $row['des'];$id= $row['id'];
echo" <div dir='rtl' align='right' style='padding:10px;'>
<a target='_blank' href='news.php?id=$id' title='$title'>لينك مستقيم خبر</a><br/>
$title | ارسال شده در تاريخ : $date<br/>$des <br/><br/>
<form style='float:right;' action=\"admin.php?do=del_news\" method=\"post\">
<input  type='hidden' size='10' name='id'  value='$id'/>
<input  type='submit' name='del_news' value='حذف'/></form>
<form style='float:right;' action=\"admin.php?do=news\" method=\"post\">
<input  type='hidden' size='10' name='id'  value='$id'/>
<input  type='submit' name='edit_news' value='ويرايش'/></form><div class=\"clear\"></div></div>";
}}else{echo"ورودي نامعتبر است";}
?>