<?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");
$attribute_set_name = $_GET['attribute_set_name'];
$attribute_set_description = $_GET['attribute_set_description'];
if($_GET['mode']=="create")
{
if($attribute_set_name != ""){
$sql = "INSERT INTO attribute_set (attribute_set_name, attribute_set_description) VALUES ('".$attribute_set_name."','".$attribute_set_description."')";
$results = mysql_query($sql);
$smarty->assign('msg_attrib_set','Done: Created Successfully<br>');
}else{
$smarty->assign("msg_attrib_set","<span style='color:red;'>Error: Please enter set name</span><br>");
}
}
//manage
$sql = "SELECT * FROM attribute_set ORDER BY attribute_set_name";
$results = mysql_query($sql);
$total_attrib_set = mysql_num_rows($results);
$smarty->assign('total_attrib_set', $total_attrib_set);
while($row = mysql_fetch_assoc($results) )
{
$attrib_set_list[] = $row;
}
$smarty->assign('attrib_set_list', $attrib_set_list);
//end manage
$smarty->display('show_attrib_set.tpl');
?>