Product Catalog";
}
else
{
$maincat_link_start="
Product Catalog";
}
//To update category_tree.inc
//===========================
$temp=fopen('category_tree.inc','r');
$temp_content=fread($temp,filesize('category_tree.inc'));
fclose($temp);
$tree_content = "".$tree."";
$temp_content = preg_replace('/(.*)/',$maincat_link_start,$temp_content);
$temp_content = preg_replace('/(.*)/',$tree_content,$temp_content);
$fp=fopen("category_tree.inc", "w");
fwrite($fp, $temp_content);
fclose($fp);
if($type == "cat_change")
{
//To update category_change.inc
//=============================
$temp=fopen('category_change.inc','r');
$temp_content=fread($temp,filesize('category_tree.inc'));
fclose($temp);
$tree_content = "".$tree."";
$temp_content = preg_replace('/(.*)/',$tree_content,$temp_content);
$fp=fopen("category_change.inc", "w");
fwrite($fp, $temp_content);
fclose($fp);
include "category_change.php";
}
if($type == "changecat_updated")
{
if($new_root != "")
{
//To select category id
//=====================
$sel_cat = "select Category_Id from ".CATEGORY." where Id='$new_root'";
$cat_result = mysql($db, $sel_cat);
list($catid) = mysql_fetch_array($cat_result);
//To udpate product master
//=========================
$prdt_update = "update ".PRODUCT_DETAILS." set Category_Id='$catid' where Product_Id='$prdt_id'";
$prdt_result = mysql($db, $prdt_update);
//To update association table (To find the root of the selected category)
//======================================================================
$root_id = assoc($new_root);
$assoc_update = "update ".PRODUCT_ASSOCIATE." set Category_Id='$catid', Root_Id='$root_id' where Product_Id='$prdt_id'";
$assoc_result = mysql($db, $assoc_update);
echo "";
}
else
{
echo "";
}
}
//Tree menu ends here
//============================================================================================================
if($type == "Add" || $type == "add")
{
if($root == "")
$root = 0;
//To get the Max(Category_Id) from Category_Master table
//=======================================================
$catqry = "select max(Category_Id)+1 from ".CATEGORY;
$catsql = mysql($db, $catqry);
list($catid) = mysql_fetch_array($catsql);
if($catid == "" || $catid == 0)
{
$catid = 1;
}
//To insert category details into the Category_Master table
//=========================================================
if($status == "")
$status = 'N';
if($emailstatus == "")
$emailstatus = 0;
$catdesc0 = preg_replace("/\r|\n/", '', $catdesc0);
if(!get_magic_quotes_runtime()) $catdesc0 = addslashes($catdesc0);
if($cat_name != "")
{
$insert_qry = "INSERT INTO ".CATEGORY."(Category_Id, Category_Name, Description , Parent, Status,Email_Status,template_type) values ('$catid','$cat_name','$catdesc0','$root','$status','$emailstatus','$template_type')";
}
$insert_result = mysql($db, $insert_qry);
if($catimage!="" && $hidcatimage!="")
{
if(!is_file($catimage) || filesize($catimage)<=0)
{
$flag=1;
#echo "";
exit;
}
else
{
list($width,$height,$type,$attr)=getimagesize("$catimage");
if($width>650 || $height > 200)
{
$imgpath="gallery_images/cate_images";
$show_catimage_path=resize_imagefile($catimage,$hidcatimage,'650','200',$imgpath,$catid,'catimg');
}
else
{
$imgpath="gallery_images/cate_images";
$show_catimage_path=upload_files($catimage,$hidcatimage,$imgpath,$catid,'catimg');
}
$upd_cat_qry="UPDATE ".CATEGORY." SET Image ='$show_catimage_path' WHERE Category_Id ='$catid'";
mysql($db,$upd_cat_qry);
}
}
//To select id
//============
$id_sql = "select Category_Id from ".CATEGORY." where Category_Id = '$catid'";
$id_result = mysql($db, $id_sql);
list($id) = mysql_fetch_array($id_result);
//To redirect to the category modify page
//=======================================
echo "";
#echo "";
}
if($type == "Modify")
{
//This is to get the Product Description value
//==============================================
$catdesc0 = preg_replace("/\r|\n/", '', $catdesc0);
if(!get_magic_quotes_runtime()) $proddesc0 = addslashes($catdesc0);
if($status == "")
$status = 'N';
if($emailstatus == "")
$emailstatus = 0;
$template_type = $_POST['template_type'];
if($cat_name != "")
{
$update_qry = "UPDATE ".CATEGORY." SET Category_Name = '$cat_name', Description='$catdesc0',Status='$status',Email_Status='$emailstatus',template_type='$template_type' WHERE Category_Id = '$cat_id'";
}
$update_result = mysql($db, $update_qry);
if($catimage!="" && $hidcatimage!="")
{
if(!is_file($catimage) || filesize($catimage)<=0)
{
$flag=1;
#echo "";
exit;
}
else
{
list($width,$height,$type,$attr)=getimagesize("$catimage");
//Modified the condition for fixing the issue of image upload fail for the size 664 and 313
if($width==664 && $height==313)
{
$imgpath="gallery_images/cate_images";
$show_catimage_path=upload_files($catimage,$hidcatimage,$imgpath,$cat_id,'catimg');
}
else
{
$imgpath="gallery_images/cate_images";
$show_catimage_path=resize_imagefile($catimage,$hidcatimage,'664','313',$imgpath,$cat_id,'catimg');
}
$upd_cat_qry="UPDATE ".CATEGORY." SET Image ='$show_catimage_path' WHERE Category_Id ='$cat_id'";
mysql($db,$upd_cat_qry);
}
}
//For Small image start
if($catimage_small !="" && $hidcatsmallimage!="")
{
if(!is_file($catimage_small) || filesize($catimage_small)<=0)
{
$flag=1;
#echo "";
exit;
}
else
{
list($width,$height,$type,$attr)=getimagesize("$catimage_small");
if($width>650 || $height>200)
{
$imgpath="gallery_images/cate_small_images";
$show_catimage_path=resize_imagefile($catimage_small,$hidcatsmallimage,'650','200',$imgpath,$cat_id,'catimg');
}
else
{
$imgpath="gallery_images/cate_small_images";
if(($root == 1) && ($level == 0))
{
$prefix = "made";
}
else
{
$prefix = "catimg";
}
$show_catimage_path=upload_files($catimage_small,$hidcatsmallimage,$imgpath,$cat_id,$prefix);
//$show_catimage_path=upload_files($catimage_small,$hidcatsmallimage,$imgpath,$cat_id,'catimg');
}
$upd_cat_qry="UPDATE ".CATEGORY." SET Image_Small ='$show_catimage_path' WHERE Category_Id ='$cat_id'";
mysql($db,$upd_cat_qry);
}
}
// End
//To update product status in association table
//=============================================
$update_status ="UPDATE ".PRODUCT_ASSOCIATE." SET Cat_Status ='$status' WHERE Category_Id ='$cat_id'";
$update_result = mysql($db, $update_status);
//To select the Id of the Category
//=================================
$sel_id = "select Category_Id from ".CATEGORY." where Category_Id = '$cat_id'";
$id_result = mysql($db, $sel_id);
list($parent) = mysql_fetch_array($id_result);
//To check whether child available for the parent
//================================================
$sel_qry = "Select count(Category_Id) from ".CATEGORY." where Parent = '$parent'";
$sel_result = mysql($db, $sel_qry);
list($row_cnt) = mysql_fetch_array($sel_result);
if($row_cnt > 0)
{
//To update the status of siblings
//================================
update_status($parent,$status);
}
//To redirect to the category modify page
//=======================================
echo "";
#echo "";
}
if($type == "Delete")
{
if($root == "")
$root = 0;
//This is to select the parent and it's image
//============================================
$sel_qry = "SELECT Image , Parent FROM ".CATEGORY." WHERE Category_Id='$root'";
$sel_result = mysql($db, $sel_qry);
list($catimgname,$id) = mysql_fetch_array($sel_result);
//This is to remove the category Image
//=====================================
if(is_file("../gallery_images/cate_images/$catimgname"))
{
unlink ("../gallery_images/cate_images/$catimgname");
}
$del_qry = "DELETE FROM ".CATEGORY." WHERE Category_Id='$root'";
$del_result = mysql($db, $del_qry);
echo "";
# echo "";
}
if($type=="indiv_catimg")
{
if($imagetype=="cat")
{
//This is to remove the individual category Image
//================================================
$sel_indivcatimg_qry="SELECT Image FROM ".CATEGORY." WHERE Category_Id='$cat_id'";
$sel_indivcatimg_res=mysql($db,$sel_indivcatimg_qry);
$sel_indivcatimg_cnt=mysql_num_rows($sel_indivcatimg_res);
if($sel_indivcatimg_cnt>0)
{
list($indivcatimg)=mysql_fetch_array($sel_indivcatimg_res);
if(is_file("../gallery_images/cate_images/$indivcatimg"))
{
unlink("../gallery_images/cate_images/$indivcatimg");
}
}
}
else if($imagetype=="cat_small")
{
//This is to remove the individual category Image
//================================================
$sel_indivcatimg_qry="SELECT Image_Small FROM ".CATEGORY." WHERE Category_Id='$cat_id'";
$sel_indivcatimg_res=mysql($db,$sel_indivcatimg_qry);
$sel_indivcatimg_cnt=mysql_num_rows($sel_indivcatimg_res);
if($sel_indivcatimg_cnt>0)
{
list($indivcatimg)=mysql_fetch_array($sel_indivcatimg_res);
if(is_file("../gallery_images/cate_small_images/$indivcatimg"))
{
unlink("../gallery_images/cate_small_images/$indivcatimg");
}
}
}
echo "";
}
if($type == "add_prdt")
{
$dt = date("Y-m-d");
if($cart_state == "")
$cart_state = 'N';
//This is to get the Product Description value
//==============================================
$proddesc0 = preg_replace("/\r|\n/", '', $proddesc0);
if(!get_magic_quotes_runtime()) $proddesc0 = addslashes($proddesc0);
$qry_insert = "INSERT INTO ".PRODUCT_DETAILS."(Category_Id, Product_Code, Product_Name , Titlebar_Keyword , Meta_Keywords , Meta_Desc , Product_Desc , Cart_Status , Price ) VALUES ('$cat_id','$pcode','$pname','$title_key','$meta_keyword','$key_desc','$proddesc0','$cart_state' ,'$prd_price' )";
$result_insert = mysql($db, $qry_insert);
//To select the product id
//=========================
$qry_sel = "select max(Product_Id) from ".PRODUCT_DETAILS;
$qry_result = mysql($db, $qry_sel);
list($pid) = mysql_fetch_array($qry_result);
//This is to insert into the Product Image details
//=================================================
$j=1;
for($i=1;$i<=1;$i++)
{
$AltText=$_POST['alt_txt'.$i];
$Caption=$_POST['caption'.$i];
$Actual_Imgpath='img_file'.$i;
$Hid_Imgpath='hidimg_file'.$i;
$Imgdesc=$_POST['img_desc'.$i];
$file_cnt=$pid."_".$j;
$flg=0;
if(${$Actual_Imgpath}!="")
{
if(!is_file(${$Actual_Imgpath}) || filesize(${$Actual_Imgpath})<=0)
{
$flg1=1;
}
else
{
list($width,$height,$type,$attr)=getimagesize(${$Actual_Imgpath});
if($width>300 || $height > 200)
{
$storeimgpath="gallery_images/prd_images";
$insert_path=upload_files(${$Actual_Imgpath},${$Hid_Imgpath},$storeimgpath,$file_cnt,'subprdimg');
//$insert_path=resize_imagefile(${$Actual_Imgpath},${$Hid_Imgpath},'300','200',$storeimgpath,$file_cnt,'subprdimg');
}
else
{
$storeimgpath="gallery_images/prd_images";
$insert_path=upload_files(${$Actual_Imgpath},${$Hid_Imgpath},$storeimgpath,$file_cnt,'subprdimg');
}
$j+=1;
}
$small_flag=0;
//echo $hidimg_small_image_name;
if($small_image_name !="" && $hidimg_small_image_name!="")
{
list($width,$height,$type,$attr)=getimagesize("$small_image_name");
if($width>300 || $height>200)
{
$imgpath="gallery_images/prd_small_images";
$insert_path_small=upload_files($small_image_name,$hidimg_small_image_name,$imgpath,$file_cnt,'subprdimg');
//$insert_path_small=resize_imagefile($small_image_name,$hidimg_small_image_name,'650','200',$imgpath,$file_cnt,'subprdimg');
}
else
{
$imgpath="gallery_images/prd_small_images";
$insert_path_small=upload_files($small_image_name,$hidimg_small_image_name,$imgpath,$file_cnt,'subprdimg');
}
$small_flag=1;
}
if($small_flag==0 && $small_image_name =="")
{
$insert_path_small=$hidimg_small_image_name;
}
if($flg==0)
{
$ins_imgdetail_qry="INSERT INTO ".PRODUCT_IMAGE_DETAILS." SET
Product_Id='$pid',
Alt_Text ='$AltText',
Caption='$Caption',
Image_Name='$insert_path',
Image_Desc='$Imgdesc',
Small_Alt_Text='$small_image_alt',
Small_Caption='$small_image_caption',
Small_Image_Name='$insert_path_small',
Small_Image_Desc='$small_image_desc'
";
$ins_imgdetail_res=mysql($db,$ins_imgdetail_qry);
}
}
}
$qry_sel = "select max(Product_Id) from ".PRODUCT_IMAGE_DETAILS;
$qry_result = mysql($db, $qry_sel);
list($pid) = mysql_fetch_array($qry_result);
//For Small image start
// End
//To fill association table (To find the root of the selected category)
//======================================================================
$root_id = assoc($root);
//To find the status of the category
//==================================
$cat_status = cat_status($root);
if($pid != 0 && $pid != "")
{
$insert_qry = "INSERT INTO ".PRODUCT_ASSOCIATE." (Product_Id, Category_Id, Root_Id, Cat_Status) VALUES('$pid','$cat_id','$root_id','$cat_status')";
$result = mysql($db, $insert_qry);
}
$chkpdf=0;
if($prd_pdf!="" && $hidprd_pdf!="")
{
if(!is_file($prd_pdf) || filesize($prd_pdf)<=0)
{
$chkpdf=1;
}
else
{
$pdfpath="gallery_images/PDF_files";
$insert_pdfpath=upload_files($prd_pdf,$hidprd_pdf,$pdfpath,$pid,'prdpdf');
$concat_file=" Product_PDF ='$insert_pdfpath' ,";
}
}
$chkcad1=0;
if($cad1!="" && $hidcad1!="")
{
if(!is_file($cad1) || filesize($cad1)<=0)
{
$chkcad1=1;
}
else
{
$cad1path="gallery_images/CAD1_images";
$insert_cad1path=upload_files($cad1,$hidcad1,$cad1path,$pid,'cad1_');
$concat_file.=" CAD_Drawing1='$insert_cad1path', ";
}
}
$chkcad2=0;
if($cad2!="" && $hidcad2!="")
{
if(!is_file($cad2) || filesize($cad2)<=0)
{
$chkcad2=1;
}
else
{
$cad2path="gallery_images/CAD2_images";
$insert_cad2path=upload_files($cad2,$hidcad2,$cad2path,$pid,'cad2_');
$concat_file.=" CAD_Drawing2 ='$insert_cad2path', ";
}
}
$chkspec=0;
if($spec1!="" && $hidspec1!="")
{
if(!is_file($spec1)|| filesize($spec1)<=0)
{
$chkspec=1;
}
else
{
$specpath="gallery_images/spec_documents";
$insert_specpath=upload_files($spec1,$hidspec1,$specpath,$pid,'spec');
$concat_file.=" Spec_Document ='$insert_specpath' ";
}
}
if($concat_file)
{
$concat_file=eregi_replace(",$","",$concat_file);
$upd_docmts_qry=" UPDATE ".PRODUCT_DETAILS." SET $concat_file WHERE Product_Id ='$pid'";
mysql($db,$upd_docmts_qry);
}
if($chkpdf==1 || $chkcad1 == 1 || $chkcad2==1 || $chkspec==1)
{
echo "Not valid file";
#echo "";
exit;
}
#echo "";
#echo "";
#echo "";
}
if($type == "modify_prdt")
{
$value = $root;
$dt = date("Y-m-d");
if($status == "")
$status = 'N';
//This is to get the Product Description value
//==============================================
$proddesc0 = preg_replace("/\r|\n/", '', $proddesc0);
if(!get_magic_quotes_runtime()) $proddesc0 = addslashes($proddesc0);
//To update product master
//========================
$qry_update = "UPDATE ".PRODUCT_DETAILS." SET
Category_Id='$cat_id',
Product_Code='$pcode',
Product_Name='$pname' ,
Titlebar_Keyword ='$title_key',
Meta_Keywords='$meta_keyword',
Meta_Desc='$key_desc',
Product_Desc='$proddesc0',
Cart_Status='$cart_state',
Price='$prd_price'
WHERE Product_Id = '$prdt_id'";
$result_update = mysql($db, $qry_update);
//This is to delete the database entries
//=======================================
$del_prddetail_qry="DELETE FROM ".PRODUCT_IMAGE_DETAILS." WHERE Product_Id ='$prdt_id'";
$del_prddetail_res=mysql($db,$del_prddetail_qry);
//This is to insert into the Product Image details
//=================================================
$j=1;
for($i=1;$i<=1;$i++)
{
$AltText=$_POST['alt_txt'.$i];
$Caption=$_POST['caption'.$i];
$Actual_Imgpath='img_file'.$i;
$Hid_Imgpath='hidimg_file'.$i;
$Imgdesc=$_POST['img_desc'.$i];
$file_cnt=$prdt_id."_".$j;
$flg=0;
//For Small image start
$small_flag=0;
if($small_image_name !="" && $hidimg_small_image_name!="")
{
list($width,$height,$type,$attr)=getimagesize("$small_image_name");
if($width>300 || $height>200)
{
$storeimgpath="gallery_images/prd_small_images";
$insert_path_small=upload_files($small_image_name,$hidimg_small_image_name,$storeimgpath,$file_cnt,'subprdimg');
// $insert_path_small=resize_imagefile($small_image_name,$hidimg_small_image_name,'300','200',$storeimgpath,$file_cnt,'subprdimg');
}
else
{
$storeimgpath="gallery_images/prd_small_images";
$insert_path_small=upload_files($small_image_name,$hidimg_small_image_name,$storeimgpath,$file_cnt,'subprdimg');
}
// $ins_imgdetail_small_qry="INSERT INTO ".PRODUCT_IMAGE_DETAILS." SET";
//$ins_imgdetail_small_res=mysql($db,$ins_imgdetail_small_qry);
}
if($small_flag==0 && $small_image_name =="")
{
$insert_path_small=$hidimg_small_image_name;
}
// End
if(${$Actual_Imgpath}!="" && ${$Hid_Imgpath}!="")
{
if(!is_file(${$Actual_Imgpath}) || filesize(${$Actual_Imgpath})<=0)
{
$flg1=1;
}
else
{
list($width,$height,$type,$attr)=getimagesize(${$Actual_Imgpath});
if($width==664 && $height==313)
{
$storeimgpath="gallery_images/prd_images";
$insert_path=upload_files(${$Actual_Imgpath},${$Hid_Imgpath},$storeimgpath,$file_cnt,'subprdimg');
//$insert_path=resize_imagefile(${$Actual_Imgpath},${$Hid_Imgpath},'300','200',$storeimgpath,$file_cnt,'subprdimg');
}
else
{
$storeimgpath="gallery_images/prd_images";
$insert_path=resize_imagefile(${$Actual_Imgpath},${$Hid_Imgpath},'664','313',$storeimgpath,$file_cnt,'subprdimg');
}
# $insert_path=upload_files(${$Actual_Imgpath},${$Hid_Imgpath},'gallery_images/prd_images',$file_cnt,'subprdimg');
$j+=1;
}
if($flg==0)
{
$ins_imgdetail_qry="INSERT INTO ".PRODUCT_IMAGE_DETAILS." SET
Product_Id='$prdt_id',
Alt_Text ='$AltText',
Caption='$Caption',
Image_Name='$insert_path',
Image_Desc='$Imgdesc',
Small_Alt_Text='$small_image_alt',
Small_Caption='$small_image_caption',
Small_Image_Name='$insert_path_small',
Small_Image_Desc='$small_image_desc'
";
$ins_imgdetail_res=mysql($db,$ins_imgdetail_qry);
}
}
else if(${$Actual_Imgpath}=="" && ${$Hid_Imgpath}!="")
{
$copypath="gallery_images/prd_images";
$insert_path=copy_img(${$Hid_Imgpath},$copypath,$file_cnt,'subprdimg');
$ins_imgdetail_qry="INSERT INTO ".PRODUCT_IMAGE_DETAILS." SET
Product_Id='$prdt_id',
Alt_Text ='$AltText',
Caption='$Caption',
Image_Name='$insert_path',
Image_Desc='$Imgdesc',
Small_Alt_Text='$small_image_alt',
Small_Caption='$small_image_caption',
Small_Image_Name='$insert_path_small',
Small_Image_Desc='$small_image_desc'
";
$ins_imgdetail_res=mysql($db,$ins_imgdetail_qry);
$j+=1;
}
}
$chkpdf=0;
if($prd_pdf!="" && $hidprd_pdf!="")
{
if(!is_file($prd_pdf) || filesize($prd_pdf)<=0)
{
$chkpdf=1;
}
else
{
$pdfpath="gallery_images/PDF_files";
$insert_pdfpath=upload_files($prd_pdf,$hidprd_pdf,$pdfpath,$prdt_id,'prdpdf');
$concat_file=" Product_PDF ='$insert_pdfpath' ,";
}
}
$chkcad1=0;
if($cad1!="" && $hidcad1!="")
{
if(!is_file($cad1) || filesize($cad1)<=0)
{
$chkcad1=1;
}
else
{
$cad1path="gallery_images/CAD1_images";
$insert_cad1path=upload_files($cad1,$hidcad1,$cad1path,$prdt_id,'cad1_');
$concat_file.=" CAD_Drawing1='$insert_cad1path' ,";
}
}
$chkcad2=0;
if($cad2!="" && $hidcad2!="")
{
if(!is_file($cad2) || filesize($cad2)<=0)
{
$chkcad2=1;
}
else
{
$cad2path="gallery_images/CAD2_images";
$insert_cad2path=upload_files($cad2,$hidcad2,$cad2path,$prdt_id,'cad2_');
$concat_file.=" CAD_Drawing2 ='$insert_cad2path' ,";
}
}
$chkspec=0;
if($spec1!="" && $hidspec1!="")
{
if(!is_file($spec1)|| filesize($spec1)<=0)
{
$chkspec=1;
}
else
{
$specpath="gallery_images/spec_documents";
$insert_specpath=upload_files($spec1,$hidspec1,$specpath,$prdt_id,'spec');
$concat_file.=" Spec_Document ='$insert_specpath' ";
}
}
if($concat_file)
{
$concat_file=eregi_replace(",$","",$concat_file);
$upd_docmts_qry=" UPDATE ".PRODUCT_DETAILS." SET $concat_file WHERE Product_Id ='$prdt_id'";
mysql($db,$upd_docmts_qry);
}
if($chkpdf==1 || $chkcad1 == 1 || $chkcad2==1 || $chkspec==1)
{
echo "";
exit;
}
echo "";
#echo "";
}
if($type=="saveseq")
{
$len_order=count($disp_order);
for($i=0;$i<$len_order;$i++)
{
$upd_order="UPDATE ".PRODUCT_DETAILS." set Display_Order ='$disp_order[$i]' where Product_Id ='$hid_order[$i]'";
mysql($db,$upd_order);
}
# echo "";
echo "";
}
//This is to delete the individual product Image
//==============================================
if($type=="indvidual_img")
{
$sel_individualinmg_qry="SELECT Image_Name FROM ".PRODUCT_IMAGE_DETAILS." WHERE Image_Id ='$individual_id'";
$sel_individualinmg_res=mysql($db,$sel_individualinmg_qry);
$sel_individualinmg_cnt=mysql_num_rows($sel_individualinmg_res);
if($sel_individualinmg_cnt>0)
{
list($individualinmg)=mysql_fetch_array($sel_individualinmg_res);
if(is_file("../gallery_images/prd_images/$individualinmg"))
{
unlink("../gallery_images/prd_images/$individualinmg");
}
}
$del_individualinmg_qry="DELETE FROM ".PRODUCT_IMAGE_DETAILS." WHERE Image_Id ='$individual_id'";
mysql($db,$del_individualinmg_qry);
#echo "";
echo "";
}
if($type == "prddelete")
{
$prodcnt=count($chkprod);
$nd = 0;
$d = 0;
$content = '| Product Catalogue | ||||||||||||
';
$not_del = '
0) $content.= $not_del." "; $content.=" |
| include_once("./includes/ecom/category_left.inc"); ?> |
if($type == "")
{
echo "";
}
if($type=="ack_addcat" || $type=="ack_modcat" || $type=="ack_delcat" || $type=="ack_addprd" || $type=="ack_modprd" || $type=="ack_saveseq" || $type=="ack_delcatimg")
{
include_once("./includes/ecom/ack_messages.php");
}
if($type == "new")
{
$ctype="new";
include_once("./includes/ecom/category_content.inc");
}
if($type == "listfiles" && $root != "")
{
$ctype="edit";
include_once("./includes/ecom/category_content.inc");
}
if($type == "listfiles" && $root == "")
{
$ctype="add";
include_once("./includes/ecom/category_content.inc");
}
if($type == "newprdt")
{
include_once("./includes/ecom/product_content.inc");
}
if($type == "editprdt")
{
include_once("./includes/ecom/edit_product.inc");
}
if($type == "edit_continueprdt")
{
include_once("edit_product_continue_content.inc");
}
if($type == "listproducts")
{
//include "product_content.inc";
include_once("./includes/ecom/product_list.inc");
}
if($type=="prdstatusadd")
{
$prdtype="add";
include_once("./includes/ecom/showmessage_product.inc");
}
if($type=="prdstatusedit")
{
$prdtype="edit";
include_once("./includes/ecom/showmessage_product.inc");
}
if ($type == "error1")
{
echo '
|