/* * * Actions Add Item , Edit Item * Naren K / 15 Dec 08 */ include 'Services/ItemServices.php'; /* Internal Actions */ $action = $_REQUEST['action']; if ($action == "addNewClass") { $parentId = $_REQUEST['parentId']; $className = $_REQUEST['className']; addNewClassification($parentId, $className); } /* End - Internal Actions */ $classStr = allClassifications(); $attrStr = allAttributes(); echo "\n<SCRIPT language='javascript'>\nvar classStr=\"" . $classStr . "\";\n"; echo "attrStr = \"" . $attrStr . " \";\n "; echo "</SCRIPT>"; $rootClasses = rootClassifcations(); ?> <STYLE> .block{ border-color:#EEF1F9; margin-left:4px; margin-right:4px; margin-top:4px; margin-bottom:4px; border-style: solid;
<?php /* * Created on 07-Dec-08 Naren * All Services related to items (products) */ include 'DBServices.php'; allClassifications(); $action = $_REQUEST['action']; /* Ajax services */ if ($action == "addNewAttr") { $newAttr = $_REQUEST['addNewAttr']; $qry = "insert into attributes values (null,\"" . $newAttr . "\");"; //echo "QRY ".$qry; $res = executeQuery($qry); //echo "DONE"; echo allAttributes(); } /* Ajax services end*/ /* Submission, action and URL redirection */ $action = $_REQUEST["action"]; if ($action == "addNewItem") { var_dump($_REQUEST); addNewItem(); } if ($action == "updateItem") { var_dump($_REQUEST); updateItem(); } /* Submission, action and URL redirection - end*/ function allClassifications()