if (Validate::isLoadedObject($obj)) { $obj->copyFromPost(); $obj->update(); } if (is_array($obj->_errors) and count($obj->_errors) > 0) { $errors = $obj->_errors; } else { 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' => 'button', 'title' => '保存', 'id' => 'save-attribute-group', 'class' => 'btn-success', 'icon' => 'saved')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); ?> <script language="javascript"> $("#save-attribute-group").click(function(){ $("#attribute-group-form").submit(); }) </script> <?php $form = new UIAdminEditForm('post', 'index.php?rule=attribute_group_edit' . (isset($id) ? '&id=' . $id : ''), 'form-horizontal', 'attribute-group-form'); $attributeGroup = AttributeGroup::loadData(); $items = array(AttributeGroup::GROUP_TYPE_SELECT => '下单菜单', AttributeGroup::GROUP_TYPE_RADIO => '单选按钮', AttributeGroup::GROUP_TYPE_CHECKBOX => '复选框'); $form->items = array('name' => array('title' => '属性值', 'type' => 'text', 'value' => isset($obj) ? $obj->name : Tools::Q('name')), 'group_type' => array('title' => '类别', 'type' => 'radio', 'value' => isset($obj) ? $obj->group_type : Tools::Q('group_type'), 'items' => $items), 'saveAttributeGroup' => array('type' => 'hidden', 'value' => isset($id) ? 'edit' : 'add'));
$obj->copyFromPost(); if ($obj->update() && Tools::P('reloadImages') == 1) { $obj->reloadImages(); } } if (is_array($obj->_errors) and count($obj->_errors) > 0) { $errors = $obj->_errors; } else { UIAdminAlerts::conf('图片类型已更新'); } } if (isset($errors)) { UIAdminAlerts::MError($errors); } $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '图片类别', 'href' => 'index.php?rule=image_type')); $breadcrumb->add(array('title' => '编辑', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=image_type', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'a', 'title' => '保存', 'id' => 'save-image-type', 'href' => '#', 'class' => 'btn-success', 'icon' => 'save')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); ?> <script language="javascript"> $("#save-image-type").click(function(){ $("#image-type-form").submit(); }) </script> <?php $form = new UIAdminEditForm('post', 'index.php?rule=image_type_edit' . (isset($id) ? '&id=' . $id : ''), 'form-horizontal', 'image-type-form'); $form->items = array('name' => array('title' => '名称', 'type' => 'text', 'value' => isset($obj) ? $obj->name : Tools::Q('name')), 'height' => array('title' => '高', 'type' => 'text', 'value' => isset($obj) ? $obj->height : Tools::Q('height')), 'width' => array('title' => '宽', 'type' => 'text', 'value' => isset($obj) ? $obj->width : Tools::Q('width')), 'type' => array('title' => '应用', 'type' => 'text', 'value' => isset($obj) ? $obj->type : Tools::Q('type')), 'reloadImages' => array('title' => '重载图片', 'type' => 'bool', 'value' => '0', 'info' => '重载图片将删除以前图片按新的属性重新生成图片,这个过程可能会需要一些时间'), 'imageTypeSaveType' => array('type' => 'hidden', 'value' => isset($id) ? 'edit' : 'add')); echo UIViewBlock::area(array('col' => 'col-md-12', 'title' => '编辑', 'body' => $form->draw()), 'panel');
if (isset($_GET['id'])) { $id = (int) $_GET['id']; $obj = new Order($id); } if (Tools::isSubmit('orderStatusUpdate')) { $obj->id_order_status = (int) Tools::getRequest('id_order_status'); if (strlen(trim(Tools::getRequest('track_number'))) > 0) { $obj->track_number = Tools::getRequest('track_number'); Alert::send($obj->id_user, "Your order:#" . sprintf("%09d", intval($obj->id)) . " has been shipped."); } $obj->update(); $obj->order_status = new OrderStatus((int) $obj->id_order_status); } $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '定单 #' . sprintf("%09d", $id), 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'button', 'title' => '提交到定单系统', 'id' => 'send-to-order-system', 'class' => 'btn-success', 'icon' => 'wrench'), array('type' => 'a', 'title' => '预览', 'href' => 'index.php?rule=order_view&id=' . $obj->id, 'class' => 'btn-warning', 'icon' => 'eye-open'), array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=order', 'class' => 'btn-primary', 'icon' => 'level-up')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); ?> <div class="order_base_info"> <div style="width: 49%; float:left;"> <fieldset class="small"> <legend><img src="<?php echo $_tmconfig['ico_dir']; ?> tab-customers.gif">用户</legend> <span style="font-weight: bold; font-size: 14px;"><a href="index.php?rule=user_edit&id=<?php echo $obj->join('User', 'id_user')->id; ?>
} } elseif (Tools::isSubmit('subDelete')) { $select_cat = Tools::getRequest('categoryBox'); $feedbacks = new Feedback(); if ($feedbacks->deleteSelection($select_cat)) { echo '<div class="conf">删除对象成功</div>'; } } elseif (Tools::isSubmit('subShowProductPage')) { $select_cat = Tools::getRequest('categoryBox'); $feedbacks = new Feedback(); if ($feedbacks->statusSelection($select_cat, true)) { echo '<div class="conf">启用对象成功</div>'; } } $table = new UIAdminTable('feedback', 'Feedback', 'id_feedback'); $table->header = array(array('sort' => false, 'isCheckAll' => 'categoryBox[]'), array('name' => 'name', 'title' => 'ID', 'filter' => 'string'), array('name' => 'flag_code', 'title' => '国家', 'filter' => 'string'), array('name' => 'id_product', 'title' => '产品ID', 'filter' => 'string'), array('name' => 'rating', 'title' => '评分', 'filter' => 'string'), array('name' => 'feedback', 'title' => '内容'), array('name' => 'add_date', 'title' => '时间'), array('sort' => false, 'title' => '操作', 'class' => 'text-right', 'width' => '120px', 'isAction' => array('delete'))); $filter = $table->initFilter(); $orderBy = isset($_GET['orderby']) ? Tools::G('orderby') : 'id_feedback'; $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 = Feedback::loadData($p, $limit, $orderBy, $orderWay, $filter); require_once dirname(__FILE__) . '/../errors.php'; $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=feedback_import', 'class' => 'btn-primary', 'icon' => 'random')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); $btn_group = array(array('type' => 'button', 'title' => '批量删除', 'confirm' => '你确定要删除选中项?', 'name' => 'deleteItems', 'class' => 'btn-danger', 'icon' => 'remove'), array('type' => 'button', 'title' => '批量启用', 'name' => 'subActiveON', 'class' => 'btn-default'), array('type' => 'button', 'title' => '批量关闭', 'name' => 'subActiveOFF', 'class' => 'btn-default')); echo UIViewBlock::area(array('title' => '用户列表', 'table' => $table, 'result' => $result, 'limit' => $limit, 'btn_groups' => $btn_group), 'table');
if (Validate::isLoadedObject($obj)) { $obj->copyFromPost(); $obj->update(); } if (is_array($obj->_errors) and count($obj->_errors) > 0) { $errors = $obj->_errors; } else { UIAdminAlerts::conf('国家已更新'); } } if (isset($errors)) { UIAdminAlerts::MError($errors); } $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '省/州', 'href' => 'index.php?rule=state')); $breadcrumb->add(array('title' => '编辑', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=state', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'a', 'title' => '保存', 'id' => 'save-state-form', 'href' => '#', 'class' => 'btn-success', 'icon' => 'save')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); ?> <script language="javascript"> $("#save-state-form").click(function(){ $("#state-form").submit(); }) </script> <?php $form = new UIAdminEditForm('post', 'index.php?rule=state_edit' . (isset($id) ? '&id=' . $id : ''), 'form-horizontal', 'state-form'); $result = Country::loadData(1, 500); $countrys = array(); foreach ($result['items'] as $country) {
$obj = new CMSTag($id); } if (Tools::P('saveCMSTag') == 'edit') { if (Validate::isLoadedObject($obj)) { $obj->copyFromPost(); $obj->update(); } if (is_array($obj->_errors) and count($obj->_errors) > 0) { $errors = $obj->_errors; } else { UIAdminAlerts::conf('CMS标签已更新'); } } $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => 'CMS标签', 'href' => 'index.php?rule=cms_tag')); $breadcrumb->add(array('title' => '编辑', 'active' => true)); $bread = $breadcrumb->draw(); $btn_groups = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=cms_tag', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'button', 'title' => '保存', 'id' => 'save-cms-tag-form', 'class' => 'btn-success', 'icon' => 'save')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_groups), 'breadcrumb'); if (isset($errors)) { UIAdminAlerts::MError($errors); } ?> <script language="javascript"> $("#save-cms-tag-form").click(function(){ $("#cms-tag-form").submit(); }) </script> <?php $form = new UIAdminEditForm('post', 'index.php?rule=cms_tag_edit' . (isset($id) ? '&id=' . $id : ''), 'form-horizontal', 'cms-tag-form');
$obj->update(); } if (is_array($obj->_errors) and count($obj->_errors) > 0) { $errors = $obj->_errors; } else { UIAdminAlerts::conf('定单状态已更新'); } } /** 错误处理 */ if (isset($errors)) { UIAdminAlerts::MError($errors); } /** 导航 */ $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '定单状态', 'href' => 'index.php?rule=order_status')); $breadcrumb->add(array('title' => '编辑', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=order_status', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'button', 'title' => '保存', 'id' => 'save-ordder-status-form', 'class' => 'btn-success', 'icon' => 'save')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); ?> <script language="javascript"> $("#save-ordder-status-form").click(function(){ $("#ordder-status-form").submit(); }) </script> <link href="<?php echo _TM_JS_URL; ?> boootstrap-colorpicker/css/colorpicker.css" rel="stylesheet" type="text/css" media="all" /> <script type="text/javascript" src="<?php
$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); } //导航 $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '分类', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(); if ($id > 1) { $btn_group[] = array('type' => 'a', 'title' => '上级', 'href' => 'index.php?rule=cms_category&id=' . $category->id_parent, 'class' => 'btn-primary', 'icon' => 'level-up'); } $btn_group[] = array('type' => 'a', 'title' => '新分类', 'href' => 'index.php?rule=cms_category_edit', 'class' => 'btn-success', 'icon' => 'plus'); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); //表头导航 $catalogPath = new UIAdminBreadcrumb(); foreach ($catBar as $Bar) { if ($category->id == $Bar['id_cms_category']) { $catalogPath->add(array('title' => $category->name, 'active' => true)); } else { $catalogPath->add(array('href' => 'index.php?rule=cms_category&id=' . $Bar['id_cms_category'], 'title' => $Bar['name'])); } } $panelHead = $catalogPath->draw(); //生成表格 $btn_groups = array(array('type' => 'button', 'title' => '删除选中', 'confirm' => '确定要删除选中项?', 'name' => 'subDelete', 'btn_type' => 'submit', 'class' => 'btn-default'), array('type' => 'button', 'title' => '激活选中', 'name' => 'subActiveON', 'btn_type' => 'submit', 'class' => 'btn-default'), array('type' => 'button', 'title' => '关闭选中', 'name' => 'subActiveOFF', 'btn_type' => 'submit', 'class' => 'btn-default')); echo UIViewBlock::area(array('title' => $panelHead, 'table' => $table, 'result' => $result, 'limit' => $limit, 'btn_groups' => $btn_groups), 'table');
} if (is_array($object->_errors) and count($object->_errors) > 0) { $errors = $object->_errors; } else { echo '<div class="conf">删除对象成功</div>'; } } elseif (Tools::isSubmit('subDelete')) { $select_cat = Tools::getRequest('categoryBox'); $paylog = new Paylog(); if ($paylog->deleteSelection($select_cat)) { echo '<div class="conf">删除对象成功</div>'; } } $table = new UIAdminTable('paylog', 'Paylog', 'id_pay'); $table->header = array(array('sort' => false, 'isCheckAll' => 'itemsBox[]'), array('name' => 'id_pay', 'title' => 'ID', 'width' => '80px', 'filter' => 'string', 'edit' => false), array('name' => 'code', 'title' => '状态码', 'filter' => 'string', 'edit' => false), array('name' => 'msg', 'title' => '状态信息', 'filter' => 'string', 'edit' => false)); $filter = $table->initFilter(); $orderBy = isset($_GET['orderby']) ? Tools::G('orderby') : 'id_pay'; $orderWay = isset($_GET['orderway']) ? Tools::G('orderway') : 'desc'; $limit = $cookie->getPost('pagination') ? $cookie->getPost('pagination') : '50'; $p = Tools::G('p') ? Tools::G('p') == 0 ? 1 : Tools::G('p') : 1; $result = Paylog::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(); echo UIViewBlock::area(array('bread' => $bread), 'breadcrumb'); $btn_group = array(array('type' => 'button', 'title' => '批量删除', 'confirm' => '你确定要删除选中项?', 'class' => 'btn-danger', 'icon' => 'remove')); echo UIViewBlock::area(array('title' => '支付日志', 'table' => $table, 'result' => $result, 'limit' => $limit, 'btn_groups' => $btn_group), 'table');
} } elseif (Tools::getRequest('toggle') && intval(Tools::getRequest('id')) > 0) { $object = new OrderStatus((int) Tools::getRequest('id')); if (Validate::isLoadedObject($object)) { $object->toggle(Tools::getRequest('toggle')); } if (is_array($object->_errors) and count($object->_errors) > 0) { $errors = $object->_errors; } else { echo '<div class="conf">更新对象成功</div>'; } } $table = new UIAdminTable('order_status', 'OrderStatus', 'id_order_status'); $table->header = array(array('sort' => false, 'isCheckAll' => 'itemsBox[]'), array('name' => 'id_order_status', 'title' => 'ID', 'width' => '80px', 'filter' => 'string'), array('name' => 'name', 'title' => '状态', 'filter' => 'string', 'color' => true), array('name' => 'send_mail', 'title' => '发送邮件', 'filter' => 'bool'), array('name' => 'email_tpl', 'title' => '模板', 'filter' => 'string'), array('sort' => false, 'title' => '操作', 'class' => 'text-right', 'isAction' => array('edit', 'delete'))); $filter = $table->initFilter(); $orderBy = isset($_GET['orderby']) ? Tools::G('orderby') : 'id_order_status'; $orderWay = isset($_GET['orderway']) ? Tools::G('orderway') : 'desc'; $limit = $cookie->getPost('pagination') ? $cookie->getPost('pagination') : '50'; $p = Tools::G('p') ? Tools::G('p') == 0 ? 1 : Tools::G('p') : 1; $result = OrderStatus::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(); $btn_group = array(array('type' => 'a', 'title' => '新状态', 'href' => 'index.php?rule=order_status_edit', 'class' => 'btn-success', 'icon' => 'plus')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); $btn_group = array(array('type' => 'button', 'title' => '批量删除', 'confirm' => '你确定要删除选中项?', 'name' => 'deleteItems', 'class' => 'btn-danger', 'icon' => 'remove')); echo UIViewBlock::area(array('title' => '定单状态', 'table' => $table, 'result' => $result, 'limit' => $limit, 'btn_groups' => $btn_group), 'table');
$obj->copyFromPost(); $obj->update(); } if (is_array($obj->_errors) and count($obj->_errors) > 0) { $errors = $obj->_errors; } else { UIAdminAlerts::conf('更新对象成功'); } } $colors = Color::getEntitys(); if (isset($errors)) { UIAdminAlerts::MError($errors); } $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '颜色', 'href' => 'index.php?rule=color')); $breadcrumb->add(array('title' => '编辑', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=color', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'a', 'title' => '保存', 'id' => 'save-color', 'href' => '#', 'class' => 'btn-success', 'icon' => 'save')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); ?> <link href="<?php echo _TM_JS_URL; ?> boootstrap-colorpicker/css/colorpicker.css" rel="stylesheet" type="text/css" media="all" /> <script type="text/javascript" src="<?php echo _TM_JS_URL; ?> boootstrap-colorpicker/js/bootstrap-colorpicker.js"></script> <script> $(document).ready(function(){
$obj->copyFromPost(); $obj->update(); } if (is_array($obj->_errors) and count($obj->_errors) > 0) { $errors = $obj->_errors; } else { echo '<div class="conf">更新分类成功</div>'; } } if (isset($errors)) { UIAdminAlerts::MError($errors); } //导航 $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => 'CMS分类', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=cms_category', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'button', 'title' => '保存', 'id' => 'save-category', 'class' => 'btn-success', 'icon' => 'saved')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); ?> <script language="javascript"> $("#desc-product-save").click(function(){ $("#cms_category_form").submit(); }) </script> <div class="panel panel-default"> <div class="panel-body"> <div class="col-md-10"> <form enctype="multipart/form-data" method="post" action="index.php?rule=category_edit<?php echo isset($id) ? '&id=' . $id : ''; ?>
<?php if (isset($_GET['id'])) { $id = (int) $_GET['id']; $obj = new Cart($id); } $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '购物车', 'href' => 'index.php?rule=cart')); $breadcrumb->add(array('title' => '详情', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=cart', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'button', 'title' => '生成定单', 'id' => 'send-to-order', 'class' => 'btn-success', 'icon' => 'save')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); //echo sprintf("%09d",$id); ?> <?php if (isset($obj->user)) { ?> <div class="order_base_info"> <div style="width: 49%; float:left;"> <fieldset class="small"> <legend><img src="<?php echo $_tmconfig['ico_dir']; ?> tab-customers.gif">用户</legend> <span style="font-weight: bold; font-size: 14px;"><a href="index.php?rule=user_edit&id=<?php echo $obj->user->id; ?> "> <?php
$obj->copyFromPost(); $obj->update(); } if (is_array($obj->_errors) and count($obj->_errors) > 0) { $errors = $obj->_errors; } else { echo '<div class="conf">更新对象成功</div>'; } } /** 输出错误信息 */ if (isset($errors)) { UIAdminAlerts::MError($errors); } /** 导航 */ $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '货币', 'href' => 'index.php?rule=currency')); $breadcrumb->add(array('title' => '编辑', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=currency', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'button', 'title' => '保存', 'id' => 'save-base-form', 'class' => 'btn-success', 'icon' => 'plus')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); ?> <script language="javascript"> $("#save-currency-form").click(function(){ $("#currency-form").submit(); }) </script> <?php $form = new UIAdminEditForm('post', 'index.php?rule=currency_edit' . (isset($id) ? '&id=' . $id : ''), 'form-horizontal', 'currency-form'); $form->items = array('name' => array('title' => '货币名', 'type' => 'text', 'value' => isset($obj) ? $obj->name : Tools::Q('name')), 'iso_code' => array('title' => 'ISO代码', 'type' => 'text', 'value' => isset($obj) ? $obj->iso_code : Tools::Q('iso_code')), 'iso_code_num' => array('title' => 'ISO数字代码', 'type' => 'text', 'value' => isset($obj) ? $obj->iso_code_num : Tools::Q('iso_code_num')), 'sign' => array('title' => '货币符号', 'type' => 'text', 'value' => isset($obj) ? $obj->sign : Tools::Q('sign')), 'conversion_rate' => array('title' => '货币符号', 'type' => 'text', 'value' => isset($obj) ? $obj->conversion_rate : Tools::Q('conversion_rate'), 'info' => '默认货币的汇率为1,其它货币是相对默认货币的转换率'), 'sign' => array('title' => '货币符号', 'type' => 'text', 'value' => isset($obj) ? $obj->sign : Tools::Q('sign')), 'format' => array('title' => '货币显示格式', 'type' => 'select', 'value' => isset($obj) ? $obj->format : Tools::Q('format'), 'option' => array('1' => 'X0,000.00 (美元格式)', '2' => '0 000,00X (欧元格式)', '3' => 'X0.000,00', '4' => '0,000.00X', '5' => '0 000.00X')), 'saveCurrency' => array('type' => 'hidden', 'value' => isset($id) ? 'edit' : 'add')); echo UIViewBlock::area(array('title' => '编辑', 'body' => $form->draw()), 'panel');
} } elseif (Tools::isSubmit('delSelected')) { $select_cat = Tools::P('itemsBox'); $feature = new FeatureValue(); if ($feature->deleteMulti($select_cat)) { UIAdminAlerts::conf('商品特征值已删除'); } } /** 输出错误信息 */ if (isset($errors)) { UIAdminAlerts::MError($errors); } /** 导航 */ $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '商品特征', 'href' => 'index.php?rule=feature')); $breadcrumb->add(array('title' => '商品特征值', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=feature', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'a', 'title' => '新商品属性值', 'href' => 'index.php?rule=feature_value_edit&id_feature=' . 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('feature_value', 'FeatureValue', 'id_feature_value'); $table->addAttribte('id', 'feature_value'); $table->child = true; $table->header = array(array('sort' => false, 'isCheckAll' => 'itemsBox[]'), array('name' => 'id_feature_value', '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_feature'] = 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';
} } } if (is_array($obj->_errors) and count($obj->_errors) > 0) { $errors = $obj->_errors; } else { echo '<div class="alert alert-success" role="alert">更新产品内容成功</div>'; } } if (isset($errors)) { UIAdminAlerts::MError($errors); } //导航 $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('href' => 'index.php?rule=product', 'title' => '商品')); $breadcrumb->add(array('title' => '编辑', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(); if (isset($obj)) { $btn_group[] = array('type' => 'a', 'title' => '浏览', 'href' => $link->getPage('ProductView', $obj->id), 'class' => 'btn-warning', 'icon' => 'eye-open'); } $btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=product', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'button', 'title' => '保存', 'id' => 'desc-product-save', 'class' => 'btn-success', 'icon' => 'plus')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); ?> <script language="javascript"> $(document).ready(function(){ $("#desc-product-save").click(function(){ $("#product_form").submit(); }) currentId = $(".productTabs a.disabled").attr('id').substr(5);
if (Tools::P('saveCoupon') == 'edit') { if (Validate::isLoadedObject($obj)) { $obj->copyFromPost(); $obj->update(); } if (is_array($obj->_errors) and count($obj->_errors) > 0) { $errors = $obj->_errors; } else { UIAdminAlerts::conf('优惠码已更新'); } } if (isset($errors)) { UIAdminAlerts::MError($errors); } $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '促销码', 'href' => 'index.php?rule=coupon')); $breadcrumb->add(array('title' => '编辑', 'active' => true)); $bread = $breadcrumb->draw(); $btn_groups = array(array('type' => 'button', 'title' => '保存', 'id' => 'save-coupon-form', 'class' => 'btn-success', 'icon' => 'save'), array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=coupon', 'class' => 'btn-primary', 'icon' => 'level-up')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_groups), 'breadcrumb'); ?> <script language="javascript"> $("#save-coupon-form").click(function(){ $("#coupon-form").submit(); }) </script> <?php $form = new UIAdminEditForm('post', 'index.php?rule=coupon_edit' . (isset($id) ? '&id=' . $id : ''), 'form-horizontal', 'coupon-form'); $form->items = array('id_user' => array('title' => '用户ID', 'type' => 'text', 'value' => isset($obj) ? $obj->id_user : Tools::Q('id_user'), 'info' => '如果为0则表示任何用户都可使用该促销码'), 'code' => array('title' => '优惠码', 'type' => 'text', 'value' => isset($obj) ? $obj->code : Tools::Q('code')), 'off' => array('title' => '优惠幅度', 'type' => 'text', 'value' => isset($obj) ? $obj->off : Tools::Q('off'), 'info' => '按百分比优惠,0-100间的整数,表示优惠x%,如果为0则以优惠金额为参照'), 'amount' => array('title' => '优惠金额', 'type' => 'text', 'value' => isset($obj) ? $obj->amount : Tools::Q('amount'), 'info' => '按指定金额进行优惠,如果为0则使用优惠幅度.'), 'total_over' => array('title' => '产品金额超过', 'type' => 'text', 'value' => isset($obj) ? $obj->total_over : Tools::Q('total_over')), 'quantity_over' => array('title' => '产品数量超过', 'type' => 'text', 'value' => isset($obj) ? $obj->quantity_over : Tools::Q('quantity_over'), 'info' => '促销码使用条件,如果为0,则表示数量无条件限制.'), 'active' => array('title' => '状态', 'type' => 'bool', 'value' => isset($obj) ? $obj->active : Tools::Q('active')), 'saveCoupon' => array('type' => 'hidden', 'value' => isset($id) ? 'edit' : 'add')); echo UIViewBlock::area(array('col' => 'col-md-12', 'title' => '编辑', 'body' => $form->draw()), 'panel');
} 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(); $btn_group = array(array('type' => 'a', 'title' => '新商品特征', 'href' => 'index.php?rule=feature_edit', 'class' => 'btn-success', 'icon' => 'plus')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); $btn_group = array(array('type' => 'button', 'title' => '删除选中', 'confirm' => '确定要删除选中项?', 'name' => 'delSelected', 'btn_type' => 'submit', 'class' => 'btn-danger')); echo UIViewBlock::area(array('title' => '用户留言', 'table' => $table, 'result' => $result, 'limit' => $limit, 'btn_groups' => $btn_group), 'table');
$errors[] = '导入时验证文件失败!'; } } if (isset($errors)) { UIAdminAlerts::MError($errors); } ?> <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-body"> <div class="col-md-6"> <?php $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '批量导入产品', 'active' => true)); echo $breadcrumb->draw(); ?> </div> </div> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> 上传文件 </div> <div class="panel-body">
$obj->_errors[] = '邮箱地址已存在!'; } elseif (Validate::isLoadedObject($obj)) { $obj->copyFromPost(); $obj->update(); } if (is_array($obj->_errors) and count($obj->_errors) > 0) { $errors = $obj->_errors; } else { UIAdminAlerts::conf('管理员已更新'); } } if (isset($errors)) { UIAdminAlerts::MError($errors); } $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '管理员', 'href' => 'index.php?rule=employee')); $breadcrumb->add(array('title' => '编辑', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=employee', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'a', 'title' => '保存', 'id' => 'save-employee-form', 'href' => '#', 'class' => 'btn-success', 'icon' => 'save')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); ?> <script language="javascript"> $("#save-employee-form").click(function(){ $("#employee-form").submit(); }) </script> <?php $form = new UIAdminEditForm('post', 'index.php?rule=employee_edit' . (isset($id) ? '&id=' . $id : ''), 'form-horizontal', 'country-form'); $form->items = array('name' => array('title' => '昵称', 'type' => 'text', 'value' => isset($obj) ? $obj->name : Tools::Q('name')), 'email' => array('title' => '邮箱', 'type' => 'text', 'value' => isset($obj) ? $obj->email : Tools::Q('email')), 'passwd' => array('title' => '密码', 'type' => 'password', 'value' => ''), 'active' => array('title' => '状态', 'type' => 'bool', 'value' => isset($obj) ? $obj->active : Tools::Q('active')), 'saveEmployee' => array('type' => 'hidden', 'value' => isset($id) ? 'edit' : 'add')); echo UIViewBlock::area(array('col' => 'col-md-12', 'title' => '编辑', 'body' => $form->draw()), 'panel');
<?php if (intval(Tools::getRequest('delete')) > 0) { $object = new ImageType(intval(Tools::getRequest('delete'))); if (Validate::isLoadedObject($object)) { $object->delete(); } if (is_array($object->_errors) and count($object->_errors) > 0) { $errors = $object->_errors; } else { UIAdminAlerts::conf('图片类别已删除'); } } $table = new UIAdminTable('image_type', 'ImageType', 'id_image_type'); $table->header = array(array('sort' => false, 'isCheckAll' => 'itemrBox[]'), array('name' => 'id_image_type', 'title' => 'ID', 'filter' => 'string'), array('name' => 'name', 'title' => '名称', 'filter' => 'string'), array('name' => 'width', 'title' => '宽度'), array('name' => 'height', 'title' => '高度'), array('name' => 'type', 'title' => '所属'), array('sort' => false, 'title' => '操作', 'class' => 'text-right', 'isAction' => array('edit', 'delete'))); $filter = $table->initFilter(); $orderBy = isset($_GET['orderby']) ? Tools::G('orderby') : 'id_image_type'; $orderWay = isset($_GET['orderway']) ? Tools::G('orderway') : 'desc'; $limit = $cookie->getPost('pagination') ? $cookie->getPost('pagination') : '50'; $p = Tools::G('p') ? Tools::G('p') == 0 ? 1 : Tools::G('p') : 1; $result = ImageType::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(); $btn_group = array(array('type' => 'a', 'title' => '新类别', 'href' => 'index.php?rule=image_type_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');
if (Validate::isLoadedObject($obj)) { $obj->copyFromPost(); $obj->update(); } if (is_array($obj->_errors) and count($obj->_errors) > 0) { $errors = $obj->_errors; } else { UIAdminAlerts::conf('国家已更新'); } } if (isset($errors)) { UIAdminAlerts::MError($errors); } $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '国家', 'href' => 'index.php?rule=country')); $breadcrumb->add(array('title' => '编辑', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=country', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'a', 'title' => '保存', 'id' => 'save-country-form', 'href' => '#', 'class' => 'btn-success', 'icon' => 'save')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); ?> <script language="javascript"> $("#save-country-form").click(function(){ $("#country-form").submit(); }) </script> <?php $form = new UIAdminEditForm('post', 'index.php?rule=country_edit' . (isset($id) ? '&id=' . $id : ''), 'form-horizontal', 'country-form'); $form->items = array('name' => array('title' => '名称', 'type' => 'text', 'value' => isset($obj) ? $obj->name : Tools::Q('name')), 'need_state' => array('title' => '州/省', 'type' => 'bool', 'value' => isset($obj) ? $obj->need_state : Tools::Q('need_state')), 'iso_code' => array('title' => 'ISO代码', 'type' => 'text', 'value' => isset($obj) ? $obj->iso_code : Tools::Q('iso_code')), 'active' => array('title' => '状态', 'type' => 'bool', 'value' => isset($obj) ? $obj->active : Tools::Q('active')), 'saveCountry' => array('type' => 'hidden', 'value' => isset($id) ? 'edit' : 'add')); echo UIViewBlock::area(array('col' => 'col-md-12', 'title' => '编辑', 'body' => $form->draw()), 'panel');
if (is_array($obj->_errors) and count($obj->_errors) > 0) { $errors = $obj->_errors; } else { UIAdminAlerts::conf('商品特征值已更新'); } } if (!isset($id_feature)) { $errors[] = '商品特征未指定'; } /** 输出错误信息 */ if (isset($errors)) { UIAdminAlerts::MError($errors); } /** 导航 */ $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '商品特征', 'href' => 'index.php?rule=feature_edit&id=' . $id_feature)); $breadcrumb->add(array('title' => '编辑', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=feature_value&id=' . $id_feature, 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'button', 'title' => '保存', 'id' => 'save-feature-value-form', 'class' => 'btn-success', 'icon' => 'save')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); ?> <script language="javascript"> $("#save-feature-value-form").click(function(){ $("#feature-value-form").submit(); }) </script> <?php $form = new UIAdminEditForm('post', 'index.php?rule=feature_value_edit' . (isset($id) ? '&id=' . $id : ''), 'form-horizontal', 'feature-value-form'); $form->items = array('name' => array('title' => '特征值', 'type' => 'text', 'value' => isset($obj) ? $obj->name : Tools::Q('name')), 'id_feature' => array('type' => 'hidden', 'value' => $id_feature), 'saveFeatureValue' => array('type' => 'hidden', 'value' => isset($id) ? 'edit' : 'add')); echo UIViewBlock::area(array('title' => '编辑', 'body' => $form->draw()), 'panel');
<?php if (isset($_POST['SEOCateMetaUpdate'])) { if (isset($_POST['categoryBox']) && count($_POST['categoryBox']) > 0) { SEOHelper::updateCategoryMeta($_POST); } } /** 错误处理 */ if (isset($errors)) { UIAdminAlerts::MError($errors); } /** 导航 */ $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('href' => 'index.php?rule=seo_meta', 'title' => 'Meta管理')); $breadcrumb->add(array('title' => '编辑', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'a', 'title' => '产品Metat管理', 'href' => 'index.php?rule=seo_meta_product', 'class' => 'btn-primary', 'icon' => 'share'), array('type' => 'button', 'title' => '更新', 'id' => 'save-seo-meta-form', 'class' => 'btn-success', 'icon' => 'save')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); /** 构建表单 */ $form = new UIAdminEditForm('post', 'index.php?rule=seo_meta', 'form-horizontal', 'seo-meta-form'); $cate = array(); if (isset($_POST['categoryBox'])) { $cate = Tools::getRequest('categoryBox'); } $trads = array('Home' => '根分类', 'selected' => '选择', 'Collapse All' => '关闭', 'Expand All' => '展开', 'Check All' => '全选', 'Uncheck All' => '全不选'); $form->items = array('title' => array('title' => 'Title规则', 'type' => 'text', 'value' => Tools::Q('title'), 'info' => '可用参数:C_ID,C_NAME,{关键词1|关键词2|关键词3}'), 'keywords' => array('title' => 'Keywords规则', 'type' => 'text', 'value' => Tools::Q('keywords'), 'info' => '可用参数:C_ID,C_NAME,{关键词1|关键词2|关键词3}'), 'description' => array('title' => 'Keywords', 'type' => 'text', 'value' => Tools::Q('description'), 'info' => '可用参数:C_ID,C_NAME,{关键词1|关键词2|关键词3}'), 'rewrite' => array('title' => 'Keywords', 'type' => 'text', 'value' => Tools::Q('rewrite'), 'info' => '可用参数:C_ID,C_NAME,{关键词1|关键词2|关键词3}'), 'categoryBox' => array('title' => '应用到分类', 'type' => 'custom', 'value' => Helper::renderAdminCategorieTree($trads, $cate, 'categoryBox', false, 'Tree')), 'SEOCateMetaUpdate' => array('type' => 'submit', 'class' => 'btn-success', 'icon' => 'save', 'title' => '生成')); echo UIViewBlock::area(array('title' => '编辑', 'body' => $form->draw()), 'panel');
<link href="<?php echo BOOTSTRAP_CSS; ?> bootstrap-datetimepicker.min.css" rel="stylesheet" /> <script type="text/javascript" src="<?php echo BOOTSTRAP_JS; ?> bootstrap-datetimepicker.js"></script> <script type="text/javascript" src="<?php echo BOOTSTRAP_JS; ?> bootstrap-datetimepicker.zh-CN.js"></script> <script language="javascript"> $(document).ready(function(){ $('.datatimepicker').datetimepicker({ language: 'zh-CN', container: '.container-fluid', format: 'yyyy-mm-dd hh:ii' }); }) </script> <?php $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '产品反馈', 'href' => 'index.php?rule=feedback')); $breadcrumb->add(array('title' => '导入', 'active' => true)); $bread = $breadcrumb->draw(); echo UIViewBlock::area(array('bread' => $bread), 'breadcrumb'); $form = new UIAdminEditForm('post', 'index.php?rule=feedback_import', 'form-horizontal', 'import-form'); $form->items = array('from_date' => array('title' => '开始时间', 'type' => 'text', 'class' => 'datatimepicker', 'value' => Tools::Q('from_date'), 'info' => '评论开始的时间'), 'ali_productid' => array('title' => 'ID号', 'type' => 'text', 'value' => Tools::Q('ali_productid'), 'info' => '逗号分隔多个ID'), 'importFeedback' => array('type' => 'submit', 'class' => 'btn-success', 'icon' => 'glyphicon-save', 'title' => '导入')); echo UIViewBlock::area(array('col' => 'col-md-12', 'title' => '编辑', 'body' => $form->draw()), 'panel');
$obj->copyFromPost(); $obj->update(); } if (is_array($obj->_errors) and count($obj->_errors) > 0) { $errors = $obj->_errors; } else { UIAdminAlerts::conf('页面已更新'); } } /** 错误处理 */ if (isset($errors)) { UIAdminAlerts::MError($errors); } /** 导航 */ $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('href' => 'index.php?rule=brand', 'title' => '单面管理')); $breadcrumb->add(array('title' => '编辑', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=onepage', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'button', 'title' => '保存', 'id' => 'save-onepage-form', 'class' => 'btn-success', 'icon' => 'save')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); ?> <script language="javascript"> $("#save-onepage-form").click(function(){ $("#onepage-form").submit(); }) </script> <?php $form = new UIAdminEditForm('post', 'index.php?rule=brand_edit' . (isset($id) ? '&id=' . $id : ''), 'form-horizontal', 'brand-form'); $form->items = array('view_name' => array('title' => '示图名', 'type' => 'text', 'value' => isset($obj) ? $obj->view_name : Tools::Q('view_name')), 'meta_title' => array('title' => '标题', 'type' => 'text', 'value' => isset($obj) ? $obj->meta_title : Tools::Q('meta_title')), 'meta_keywords' => array('title' => '关键词', 'type' => 'text', 'value' => isset($obj) ? $obj->meta_keywords : Tools::Q('meta_keywords')), 'meta_description' => array('title' => 'Meta 描述', 'type' => 'text', 'value' => isset($obj) ? $obj->meta_description : Tools::Q('meta_description')), 'rewrite' => array('title' => '伪静态', 'type' => 'text', 'value' => isset($obj) ? $obj->rewrite : Tools::Q('rewrite'), 'id' => 'rewrite', 'other' => 'onkeyup="if (isArrowKey(event)) return ;copy2friendlyURL();" onchange="copy2friendlyURL();"'), 'saveOnepage' => array('type' => 'hidden', 'value' => isset($id) ? 'edit' : 'add')); echo UIViewBlock::area(array('title' => '编辑', 'body' => $form->draw()), 'panel');
if (Validate::isLoadedObject($obj)) { $obj->copyFromPost(); $obj->update(); } if (is_array($obj->_errors) and count($obj->_errors) > 0) { $errors = $obj->_errors; } else { UIAdminAlerts::conf('地址已更新'); } } if (isset($errors)) { UIAdminAlerts::MError($errors); } $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '地址', 'href' => 'index.php?rule=address')); $breadcrumb->add(array('title' => '编辑', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'a', 'title' => '返回', 'href' => 'index.php?rule=address', 'class' => 'btn-primary', 'icon' => 'level-up'), array('type' => 'a', 'title' => '保存', 'id' => 'save-address', 'href' => '#', 'class' => 'btn-success', 'icon' => 'save')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); ?> <script type="text/javascript"> $(document).ready(function(){ $('#save-address').click(function(){ $('#address-form').submit(); }) ajaxStates (); $('#id_country').change(function() { ajaxStates (); }); function ajaxStates ()
Configuration::updateValue('TM_MAIL_PASSWD', $smtp_passwd); } if ($smtp_encryption = Tools::P('TM_MAIL_SMTP_ENCRYPTION')) { Configuration::updateValue('TM_MAIL_SMTP_ENCRYPTION', $smtp_encryption); } if ($smtp_port = Tools::P('TM_MAIL_SMTP_PORT')) { Configuration::updateValue('TM_MAIL_SMTP_PORT', $smtp_port); } UIAdminAlerts::conf('配置已更新'); } if (isset($errors)) { UIAdminAlerts::MError($errors); } /** 导航 */ $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '系统设置', 'active' => true)); $breadcrumb->add(array('title' => '邮件设置', 'active' => true)); $bread = $breadcrumb->draw(); $btn_group = array(array('type' => 'button', 'title' => '保存', 'id' => 'save-email-form', 'class' => 'btn-success', 'icon' => 'save')); echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb'); ?> <script language="javascript"> $("#save-email-form").click(function(){ $("#email-form").submit(); }) </script> <?php $form = new UIAdminEditForm('post', 'index.php?rule=email', 'form-horizontal', 'base-form'); $form->items = array('TM_MAIL_METHOD' => array('title' => '网站名称', 'type' => 'radio', 'value' => Configuration::get('TM_MAIL_METHOD'), 'items' => array('1' => '使用PHP默认函数发送邮件', '2' => '设置为SMTP发送邮件')), 'TM_MAIL_DOMAIN' => array('title' => 'SMTP域名', 'type' => 'text', 'value' => Configuration::get('TM_MAIL_DOMAIN')), 'TM_MAIL_SERVER' => array('title' => 'SMTP服务器', 'type' => 'text', 'value' => Configuration::get('TM_MAIL_SERVER')), 'TM_MAIL_USER' => array('title' => 'SMTP用户名', 'type' => 'text', 'value' => Configuration::get('TM_MAIL_USER')), 'TM_MAIL_PASSWD' => array('title' => 'SMTP密码', 'type' => 'password', 'value' => ''), 'TM_MAIL_SMTP_ENCRYPTION' => array('title' => 'SMTP加密方式', 'type' => 'radio', 'value' => Configuration::get('TM_MAIL_SMTP_ENCRYPTION'), 'items' => array('tls' => 'TLS', 'ssl' => 'SSL')), 'TM_MAIL_SMTP_PORT' => array('title' => 'SMTP端口', 'type' => 'text', 'value' => Configuration::get('TM_MAIL_SMTP_PORT')), 'saveEmail' => array('type' => 'hidden', 'value' => 'update')); echo UIViewBlock::area(array('col' => 'col-md-12', 'title' => '编辑', 'body' => $form->draw()), 'panel');
UIAdminAlerts::conf('评论已删除'); } } elseif (Tools::isSubmit('subActiveON') or Tools::isSubmit('subActiveOFF')) { $select_cat = Tools::P('itemBox'); $action = Tools::isSubmit('subActiveON') ? 1 : 0; $object = new CMSComment(); if (is_array($select_cat)) { if ($object->statusSelection($select_cat, $action)) { UIAdminAlerts::conf('文章已更新'); } } } $table = new UIAdminTable('cms_comment', 'CMSComment', 'id_cms_comment'); $table->header = array(array('sort' => false, 'isCheckAll' => 'itemBox[]'), array('name' => 'id_cms_comment', 'title' => 'ID', 'edit' => false, 'filter' => 'string'), array('name' => 'name', 'title' => '访客', 'edit' => false, 'filter' => 'string'), array('name' => 'email', 'title' => '邮箱', 'edit' => false, 'filter' => 'string'), array('name' => 'active', 'title' => '状态', 'edit' => false, 'filter' => 'bool'), array('name' => 'comment', 'title' => '内容', 'edit' => false), array('name' => 'add_date', 'title' => '时间', 'edit' => false), array('sort' => false, 'title' => '操作', 'class' => 'text-right', 'isAction' => array('delete'))); $filter = $table->initFilter(); $orderBy = isset($_GET['orderby']) ? Tools::G('orderby') : 'id_cms_comment'; $orderWay = isset($_GET['orderway']) ? Tools::G('orderway') : 'desc'; $limit = $cookie->getPost('pagination') ? $cookie->getPost('pagination') : '50'; $p = Tools::G('p') ? Tools::G('p') == 0 ? 1 : Tools::G('p') : 1; $result = CMSComment::loadData($p, $limit, $orderBy, $orderWay, $filter); //导航 $breadcrumb = new UIAdminBreadcrumb(); $breadcrumb->home(); $breadcrumb->add(array('title' => '访客评论', 'active' => true)); $bread = $breadcrumb->draw(); echo UIViewBlock::area(array('bread' => $bread), 'breadcrumb'); if (isset($errors)) { UIAdminAlerts::MError($errors); } $btn_group = array(array('type' => 'button', 'title' => '删除选中', 'confirm' => '确定要删除选中项?', 'name' => 'subDelete', 'btn_type' => 'submit', 'class' => 'btn-danger'), array('type' => 'button', 'title' => '激活选中', 'name' => 'subActiveON', 'btn_type' => 'submit', 'class' => 'btn-default'), array('type' => 'button', 'title' => '关闭选中', 'name' => 'subActiveOFF', 'btn_type' => 'submit', 'class' => 'btn-default')); echo UIViewBlock::area(array('title' => '文章', 'table' => $table, 'result' => $result, 'btn_groups' => $btn_group), 'table');