コード例 #1
0
ファイル: category.php プロジェクト: severnaya99/Sg-2010
			$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']);
    		} 
			
			if (isset($_POST['displayimg'])) {
				$xt->setDisplayimg($_POST['displayimg']);
			} else {
				$xt->setDisplayimg(0);
			}
			
			$xt->store();
コード例 #2
0
ファイル: category.php プロジェクト: severnaya99/Sg-2010
 }
 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);
 }
 $xt->store();
 redirect_header("category.php?op=topicsmanager", 1, _AM_DBUPDATED);
 exit;
 break;