本文整理汇总了PHP中category::setContent方法的典型用法代码示例。如果您正苦于以下问题:PHP category::setContent方法的具体用法?PHP category::setContent怎么用?PHP category::setContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类category
的用法示例。
在下文中一共展示了category::setContent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: category
echo $language['cancel'];
?>
</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>