本文整理匯總了PHP中category::setPublished方法的典型用法代碼示例。如果您正苦於以下問題:PHP category::setPublished方法的具體用法?PHP category::setPublished怎麽用?PHP category::setPublished使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類category
的用法示例。
在下文中一共展示了category::setPublished方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: category
?>
</button>
</div>
</form>
<?php
} else {
if (isset($_POST['published'])) {
$_POST['published'] = true;
} else {
$_POST['published'] = false;
}
$category = new category();
$category->setId(intval($_GET['i']));
$category->setContent($_POST['title_1'], $_POST['description_1'], $_POST['title_2'], $_POST['description_2'], $_POST['title_3'], $_POST['description_3'], $_POST['title_4'], $_POST['description_4'], $_POST['title_5'], $_POST['description_5'], $_POST['title_6'], $_POST['description_6'], $_POST['code']);
$category->setUserId($account["name"]);
$category->setDateUpdate();
$category->setPublished($_POST['published']);
$category->setCategoryType($_POST['category_type']);
if ($category->update()) {
print 'sucess';
} else {
print 'failure';
}
}
} else {
print 'error';
}
?>
</div>
示例2: category
<button type="reset" name="cancel" class="red"><?php
echo $language['cancel'];
?>
</button>
</div>
</form>
<?php
} else {
if (isset($_REQUEST['published'])) {
$_REQUEST['published'] = true;
} else {
$_REQUEST['published'] = false;
}
$object_category = new category();
$object_category->setContent($_REQUEST['title_1'], $_REQUEST['content_1'], $_REQUEST['title_2'], $_REQUEST['content_2'], $_REQUEST['title_3'], $_REQUEST['content_3'], $_REQUEST['title_4'], $_REQUEST['content_4'], $_REQUEST['title_5'], $_REQUEST['content_5'], $_REQUEST['title_6'], $_REQUEST['content_6'], $_REQUEST['code']);
$object_category->setUserId($account["name"]);
$object_category->setDate();
$object_category->setDateUpdate();
$object_category->setPublished($_REQUEST['published']);
$object_category->setCategoryType($_REQUEST['section']);
if ($object_category->insert()) {
print 'sucess';
} else {
print 'failure';
}
}
?>
</div>