hasPriv("admin")) util_show_error_page_and_exit(); $oCat = new Category($aClean['iCatId']); if($aClean['sSubmit']) { $oCat->update($aClean['sName'],$aClean['sDescription'],$aClean['iParentId']); util_redirect_and_exit(apidb_fullurl("appbrowse.php?iCatId=".$oCat->iCatId)); } else { apidb_header("Add Category"); $sQuery = "SELECT catId, catName FROM appCategory WHERE catId!='?'"; $hResult = query_parameters($sQuery, $aClean['iCatId']); while($oRow = mysql_fetch_object($hResult)) { $aCatsIds[]=$oRow->catId; $aCatsNames[]=$oRow->catName; } echo "
iCatId."\" />
Category name sName."\" />
Description sDescription."\" />
Parent ".html_select("parentId",$aCatsIds,$oCat->iParentId,$aCatsNames)."
"; } apidb_footer(); ?>