HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/seekya.com/DEAD/manage/categoryPopup_inc.php
<?php
if (empty($_SESSION["admin"])) redirect("index.php?e=1");
if (!empty($_POST["btnSave"])) {
	
	
	$category_status=1;
	if (pdbfx("category_status")=='')
		$category_status=0;
	if ($_GET["category_id"]=='') //New Category
	{

		$sql="Insert into category_master(category_name,category_status,category_description,category_display_order)";
		$sql.="values ('".pdbfx("category_name") ."',".$category_status .",'".pdbfx("category_description") ."',".pdbfx("category_display_order").")";
		
		mysql_query($sql);
		$errMsg="<font color=red><b>Category added</b></font>";
	}
	if ($_GET["category_id"]!='') //New Category
	{
		$sql="update category_master set category_name='".pdbfx("category_name") ."',category_display_order=".pdbfx("category_display_order").",category_status=".$category_status .",category_description='".pdbfx("category_description") ."' where category_id=".$_GET["category_id"];
		mysql_query($sql);
		
		
		$errMsg="<font color=red><b>Category Information Saved.</b></font>";
	}
	echo("<script language='javascript' type='text/javascript'>");
	echo("window.opener.navigate(window.opener.document.location.href);");
	echo("</script>");

}

if ($_GET["category_id"]!='') //edit Category
{
$sql = "SELECT * from category_master where category_id=".$_GET["category_id"];
$cmd = mysql_query($sql);
$rs = mysql_fetch_array($cmd);	
}


?>