<?php

/* FIRESHOP: Advanced Content Market System                         */

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

/*                                                                      */

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

/* http://Firedesign.ir                                                   */

/*                                                                      */

/* This program is free software.  */

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

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

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

if(isset($_POST['add_payway'])){
if(empty($_POST['title'])
or empty($_POST['des'])){
echo"پر كردن همه ي فيل دهاي ستاره دار الزامي است";
}else{
$title=$_POST['title'];
$des=$_POST['des'];
$is_active=$_POST['is_active'];

$query = $db->sql_query("INSERT INTO fireshop_payway (`is_active`,`title`, `des`) VALUES ('$is_active','$title', '$des' )");if($query){print('<div class="contact_active">با موفقيت ايجاد شد</div>');}else{print('خطا');}
}


}else{
echo"
<div align='right' style='padding:10px' dir='rtl'>
<form action='admin.php?do=add_payway' method='POST'>
<div style='float:right;width:80px' for=\"name\">عنوان : <span style='color: red'>*</span></div>
<div style='float:right;'><input type='text' name=\"title\" size='50' style='height: 20px'/></div><div class='clear'></div><br/>

<div style='float:right;width:80px' for=\"name\">توضيحات : <span style='color: red'>*</span></div>
<div style='float:right;'><textarea name=\"des\" size='30' style='width:350px;height: 80px'></textarea></div><div class='clear'></div><br/>

وضعيت  : <span style='color: red'>*</span> فعال <input type='radio' name='is_active' checked='checked' value='1'/> غيرفعال <input type='radio' name='is_active' value='0'/><br/><br/>
<div style='margin-right:300px'><input  type='submit' name='add_payway' value='ايجاد' /></div><br/>
</form>
</div>
";


}

?>