本文整理汇总了PHP中CMSCategory::statusSelection方法的典型用法代码示例。如果您正苦于以下问题:PHP CMSCategory::statusSelection方法的具体用法?PHP CMSCategory::statusSelection怎么用?PHP CMSCategory::statusSelection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMSCategory
的用法示例。
在下文中一共展示了CMSCategory::statusSelection方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
} elseif (Tools::isSubmit('subDelete')) {
$select_cat = Tools::P('categoryBox');
if (Validate::isLoadedObject($category) and is_array($select_cat)) {
$category->deleteSelection($select_cat);
}
if (is_array($category->_errors) and count($category->_errors) > 0) {
$errors = $category->_errors;
} else {
echo '<div class="conf">删除分类成功</div>';
}
} elseif (Tools::isSubmit('subActiveON') or Tools::isSubmit('subActiveOFF')) {
$select_cat = Tools::getRequest('categoryBox');
$action = Tools::isSubmit('subActiveON') ? 1 : 0;
$object = new CMSCategory();
if (is_array($select_cat)) {
if ($object->statusSelection($select_cat, $action)) {
UIAdminAlerts::conf('分类已更新');
}
}
}
echo UIAdminDndTable::loadHead();
$table = new UIAdminDndTable('cms_category', 'CMSCategory', 'id_cms_category');
$table->addAttribte('id', 'cms_category');
$table->parent = 'id_parent';
$table->child = true;
$table->header = array(array('sort' => false, 'isCheckAll' => 'categoryBox[]'), array('name' => 'id_cms_category', 'title' => 'ID', 'filter' => 'string'), array('name' => 'name', 'title' => '名称', 'filter' => 'string'), array('name' => 'active', 'title' => '状态', 'filter' => 'bool'), array('name' => 'position', 'title' => '排序'), array('name' => 'add_date', 'title' => '添加时间'), array('sort' => false, 'title' => '操作', 'class' => 'text-right', 'isAction' => array('edit', 'view', 'delete')));
$filter = $table->initFilter();
$orderBy = isset($_GET['orderby']) ? Tools::G('orderby') : 'position';
$orderWay = isset($_GET['orderway']) ? Tools::G('orderway') : 'asc';
$limit = $cookie->getPost('pagination') ? $cookie->getPost('pagination') : '50';
$p = Tools::G('p') ? Tools::G('p') == 0 ? 1 : Tools::G('p') : 1;