if (isset($_POST['id'])) { $xt = new WfsCategory($_POST['id']); } else { $xt = new WfsCategory(); } $xt->setDescription($_POST['description']); $xt->setcatdescription($_POST['catdescription']); $xt->setcatfooter($_POST['catfooter']); $xt->setPid($_POST['pid']); $xt->setgroupid($_POST['groupid']); // supress notice : Undefined index: editaccess if ( isset($_POST['editaccess']) ) { $xt->seteditaccess($_POST['editaccess']); } $xt->setTitle($_POST['title']); $variable = trim($_POST['orders']); if (is_numeric($variable)) { $xt->setOrders($_POST['orders']); } else { redirect_header(xoops_getenv('PHP_SELF'),3,"Weight must be a number!"); } if (isset($_POST['indeximage'])) { $xt->setImgurl($_POST['indeximage']); }
case "save": //Error check cannot move section into same sect if ($HTTP_POST_VARS['id'] == $HTTP_POST_VARS['pid']) { redirect_header($PHP_SELF, 1, _AM_CANNOTHAVECATTHERE); } if (isset($HTTP_POST_VARS['id'])) { $xt = new WfsCategory($HTTP_POST_VARS['id']); } else { $xt = new WfsCategory(); } $xt->setDescription($HTTP_POST_VARS['description']); $xt->setcatdescription($HTTP_POST_VARS['catdescription']); $xt->setcatfooter($HTTP_POST_VARS['catfooter']); $xt->setPid($HTTP_POST_VARS['pid']); $xt->setgroupid($HTTP_POST_VARS['groupid']); $xt->seteditaccess($HTTP_POST_VARS['editaccess']); $xt->setTitle($HTTP_POST_VARS['title']); $variable = trim($HTTP_POST_VARS['orders']); if (is_numeric($variable)) { $xt->setOrders($HTTP_POST_VARS['orders']); } else { redirect_header($HTTP_SERVER_VARS['PHP_SELF'], 3, "Weight must be a number!"); } if (isset($HTTP_POST_VARS['indeximage'])) { $xt->setImgurl($HTTP_POST_VARS['indeximage']); } if (isset($HTTP_POST_VARS['displayimg'])) { $xt->setDisplayimg($HTTP_POST_VARS['displayimg']); } else { $xt->setDisplayimg(0); }