<?php
session_start();
/*
asaancart - easy shopping cart solution
---------------------------------------
Copyright 2009 Nasir Ahmad Khan
Email: hide@address.com
This file is part of asaancart - open source easy shopping cart solution.
asaancart is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
asaancart is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with asaancart. If not, see <http://www.gnu.org/licenses/>.
*/
include("../config/config.php");
include("includes/chk_login_status_inc.php");
$smarty->assign('title','Add Product');
$category_id = $_GET['category_id'];
$attribute_id = $_GET['attribute_id'];
$set_id = $_GET['set_id'];
$product_name = $_GET['product_name'];
$product_description = $_GET['product_description'];
$product_overview = $_GET['product_overview'];
$product_price = $_GET['product_price'];
if($_GET['btn_create']=="Create")
{
$sql = "INSERT INTO products (product_name, product_description, product_overview, product_price, category_id, set_id) VALUES ('".$product_name."','".$product_description."','".$product_overview."',".$product_price.",".$category_id.", ".$set_id.")";
$results = mysql_query($sql);
$smarty->assign('msg_pro','Done: Added Successfully');
}
$smarty->display('add_product.tpl');
?>