Exemplo n.º 1
0
        $feature->delete();
    }
    if (is_array($feature->_errors) and count($feature->_errors) > 0) {
        $errors = $feature->_errors;
    } else {
        UIAdminAlerts::conf('商品特征已删除');
    }
} elseif (Tools::isSubmit('delSelected')) {
    $select_cat = Tools::P('itemsBox');
    $feature = new Feature();
    if ($feature->deleteMulti($select_cat)) {
        UIAdminAlerts::conf('商品特征已删除');
    }
}
echo UIAdminDndTable::loadHead();
$table = new UIAdminDndTable('feature', 'Feature', 'id_feature');
$table->addAttribte('id', 'feature');
$table->header = array(array('sort' => false, 'isCheckAll' => 'itemsBox[]'), array('name' => 'id_feature', 'title' => 'ID', 'filter' => 'string', 'rule' => 'feature_value'), array('name' => 'name', 'title' => '名称', 'filter' => 'string', 'rule' => 'feature_value'), array('name' => 'position', 'title' => '排序'), array('sort' => false, 'title' => '操作', 'width' => '120px', 'class' => 'text-right', 'isAction' => array('edit', '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;
$result = Feature::loadData($p, $limit, $orderBy, $orderWay, $filter);
if (isset($errors)) {
    UIAdminAlerts::MError($errors);
}
$breadcrumb = new UIAdminBreadcrumb();
$breadcrumb->home();
$breadcrumb->add(array('title' => '商品特征', 'active' => true));
$bread = $breadcrumb->draw();
Exemplo n.º 2
0
        $object->delete();
    }
    if (is_array($object->_errors) and count($object->_errors) > 0) {
        $errors = $object->_errors;
    } else {
        UIAdminAlerts::conf('货币已删除');
    }
}
if (Tools::isSubmit('saveDefault')) {
    if ($id_currency_default = Tools::P('ID_CURRENCY_DEFAULT')) {
        Configuration::updateValue('ID_CURRENCY_DEFAULT', $id_currency_default);
        UIAdminAlerts::conf('默认货币已更新');
    }
}
echo UIAdminDndTable::loadHead();
$table = new UIAdminDndTable('currency', 'Currency', 'id_currency');
$table->addAttribte('id', 'currency');
$table->header = array(array('sort' => false, 'isCheckAll' => 'itemsBox[]'), array('name' => 'id_currency', 'title' => 'ID', 'filter' => 'string'), array('name' => 'name', 'title' => '名称', 'filter' => 'string'), array('name' => 'conversion_rate', 'title' => '汇率', 'filter' => 'string'), array('name' => 'iso_code', 'title' => 'ISO代码', 'filter' => 'string'), array('name' => 'sign', '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', '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;
$result = Currency::loadData($p, $limit, $orderBy, $orderWay, $filter);
/** 输出错误信息 */
if (isset($errors)) {
    UIAdminAlerts::MError($errors);
}
/** 导航 */
$breadcrumb = new UIAdminBreadcrumb();
$breadcrumb->home();
Exemplo n.º 3
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;
$result = $category->getSubCMSCategories($limit, $p, $orderBy, $orderWay, $filter);
$catBar = $category->getCatBar($category->id);
krsort($catBar);
if (isset($errors)) {
    UIAdminAlerts::MError($errors);
}
Exemplo n.º 4
0
    if ($attribute->deleteMulti($select_cat)) {
        UIAdminAlerts::conf('商品特征值已删除');
    }
}
/** 输出错误信息 */
if (isset($errors)) {
    UIAdminAlerts::MError($errors);
}
/** 导航 */
$breadcrumb = new UIAdminBreadcrumb();
$breadcrumb->home();
$breadcrumb->add(array('title' => '属性组', 'href' => 'index.php?rule=attribute_group'));
$breadcrumb->add(array('title' => '属性值', 'active' => true));
$bread = $breadcrumb->draw();
$btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=attribute_group', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'a', 'title' => '新属性值', 'href' => 'index.php?rule=attribute_edit&id_attribute_group=' . Tools::G('id'), 'class' => 'btn-success', 'icon' => 'plus'));
echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb');
/** 属性值 */
echo UIAdminDndTable::loadHead();
$table = new UIAdminDndTable('attribute', 'Attribute', 'id_attribute');
$table->addAttribte('id', 'attribute');
$table->child = true;
$table->header = array(array('sort' => false, 'isCheckAll' => 'itemsBox[]'), array('name' => 'id_attribute', 'title' => 'ID', 'filter' => 'string'), array('name' => 'name', 'title' => '名称', 'filter' => 'string'), array('name' => 'position', 'title' => '排序'), array('sort' => false, 'title' => '操作', 'width' => '120px', 'class' => 'text-right', 'isAction' => array('edit', 'delete')));
$filter = $table->initFilter();
$filter['id_attribute_group'] = Tools::G('id');
$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;
$result = Attribute::loadData($p, $limit, $orderBy, $orderWay, $filter);
$btn_group = array(array('type' => 'button', 'title' => '删除选中', 'confirm' => '确定要删除选中项?', 'name' => 'subDelete', 'btn_type' => 'submit', 'class' => 'btn-danger'));
echo UIViewBlock::area(array('title' => '商品特征值', 'table' => $table, 'result' => $result, 'limit' => $limit, 'btn_groups' => $btn_group), 'table');
Exemplo n.º 5
0
        $object->delete();
    }
    if (is_array($object->_errors) and count($object->_errors) > 0) {
        $errors = $object->_errors;
    } else {
        UIAdminAlerts::conf('颜色已删除');
    }
} elseif (Tools::isSubmit('subDelete')) {
    $select_cat = Tools::P('itemsBox');
    $color = new Color();
    if ($color->deleteSelection($select_cat)) {
        UIAdminAlerts::conf('颜色已删除');
    }
}
echo UIAdminDndTable::loadHead();
$table = new UIAdminDndTable('color', 'Color', 'id_color');
$table->addAttribte('id', 'color-table');
$table->header = array(array('sort' => false, 'isCheckAll' => 'itemsBox[]'), array('name' => 'id_color', 'title' => 'ID'), array('name' => 'name', 'title' => '名称'), array('name' => 'code', 'title' => '颜色', 'color' => true), array('name' => 'position', 'title' => '排序'), array('sort' => false, 'title' => '操作', 'class' => 'text-right', 'isAction' => array('edit', 'delete')));
$orderBy = isset($_GET['orderby']) ? Tools::G('orderby') : 'position';
$orderWay = isset($_GET['orderway']) ? Tools::G('orderway') : 'asc';
$result = Color::loadData($orderBy, $orderWay);
if (isset($errors)) {
    UIAdminAlerts::MError($errors);
}
$breadcrumb = new UIAdminBreadcrumb();
$breadcrumb->home();
$breadcrumb->add(array('title' => '颜色', 'active' => true));
$bread = $breadcrumb->draw();
$btn_group = array(array('type' => 'a', 'title' => '取消关联', 'href' => 'index.php?rule=color_cannel_product', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'a', 'title' => '产品关联', 'href' => 'index.php?rule=color_product', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'a', 'title' => '新颜色', 'href' => 'index.php?rule=color_edit', 'class' => 'btn-success', 'icon' => 'plus'));
echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb');
echo UIViewBlock::area(array('title' => '颜色', 'table' => $table, 'result' => $result), 'table');
Exemplo n.º 6
0
    $country = new Country();
    if ($country->deleteSelection($select_cat)) {
        UIAdminAlerts::conf('国家已删除');
    }
} elseif (Tools::isSubmit('subActiveON') or Tools::isSubmit('subActiveOFF')) {
    $select_cat = Tools::getRequest('categoryBox');
    $action = Tools::isSubmit('subActiveON') ? 1 : 0;
    $object = new Country();
    if (is_array($select_cat)) {
        if ($object->statusSelection($select_cat, $action)) {
            UIAdminAlerts::conf('国家已更新');
        }
    }
}
echo UIAdminDndTable::loadHead();
$table = new UIAdminDndTable('country', 'Country', 'id_country');
$table->addAttribte('id', 'country');
$table->header = array(array('sort' => false, 'isCheckAll' => 'itemsBox[]', 'name' => 'id_country'), array('name' => 'id_country', 'title' => 'ID', 'filter' => 'string'), array('name' => 'name', 'title' => '国家', 'filter' => 'string'), array('name' => 'need_state', 'title' => '省/州', 'filter' => 'bool'), array('name' => 'active', 'title' => '状态', 'filter' => 'bool'), array('name' => 'position', 'title' => '排序'), array('sort' => false, 'title' => '操作', 'class' => 'text-right', 'isAction' => array('edit', '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;
$result = Country::loadData($p, $limit, $orderBy, $orderWay, $filter);
if (isset($errors)) {
    UIAdminAlerts::MError($errors);
}
$breadcrumb = new UIAdminBreadcrumb();
$breadcrumb->home();
$breadcrumb->add(array('title' => '国家', 'active' => true));
$bread = $breadcrumb->draw();