Location: PHPKode > projects > Multi-lingual E-Commerce System > admin/inc/submit_Category.inc
<?php
require_once('/home/httpd/html/gwenshop/classes/Category.class');
if (isset($_POST['Category']))
{
	$obj = new Category();
	$obj->Category_ID = $_POST['Category'];
	if (isset($_POST['delete']) && $_POST['delete'] !='' )
	{
		$obj->delete();
	}

	else {
		$obj->Cat_Category_ID = $_POST['Cat_Category_ID'];
		$obj->Category_Icon = $_POST['Category_Icon'];
		$obj->store();
		$obj->deleteDescriptions();
		$obj->deleteFamily();

		while (list($key,$value) = each($_POST))
                {
                if (substr($key,0,4) =='Name')
        	        {
	                        $language_code = substr($key,5,2);
        	                $obj->storeDescription($language_code,$value);
                        }
                elseif (substr($key,0,4) =='Pare')
                        {
                	        list($null,$parent_ID) = explode("_",$key);
                        	$obj->setFamily('Parent',$parent_ID);
			}

                } # end while


} # end else

} # end if

?>


Return current item: Multi-lingual E-Commerce System