示例#1
0
    } elseif (Tools::P('email') != $obj->email && Employee::employeeExists(Tools::getRequest('email'))) {
        $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'));
示例#2
0
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    $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>
示例#3
0
$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');
示例#4
0
}
if (Tools::P('saveState') == '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=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);
示例#5
0
}
if (Tools::Q('saveAttributeGroup') == '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=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();
示例#6
0
    if (Validate::isLoadedObject($obj)) {
        $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'));
示例#7
0
    }
    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'));
示例#8
0
<?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');
示例#9
0
    } else {
        UIAdminAlerts::conf('商品特征值已删除');
    }
} 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';
示例#10
0
文件: import.php 项目: yiuked/tmcart
        $import->start();
    } else {
        $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">
        上传文件
示例#11
0
    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=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;
?>
示例#12
0
        $obj->_errors[] = '父分类不能为当前分类!';
    } elseif (Validate::isLoadedObject($obj)) {
        $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 
示例#13
0
<?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 
示例#14
0
}
if (Tools::P('saveCountry') == '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=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');
示例#15
0
<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');
示例#16
0
<?php

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 
示例#17
0
}
if (isset($_POST['sveAddress']) && Tools::getRequest('sveAddress') == '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=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 ();
示例#18
0
    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('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'));
示例#19
0
            if (!$obj->updateCategories($_POST['categoryBox']) or !$obj->addToTags($_POST['tags']) or !$obj->updateAttribute($_POST['attribute_items']) or !$obj->updateFeature(Tools::P('id_feature_value'))) {
                $obj->_errors = '更新产品内容时发生了一个错误';
            }
        }
    }
    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();
示例#20
0
文件: email.php 项目: yiuked/tmcart
    if ($smtp_passwd = Tools::P('TM_MAIL_PASSWD')) {
        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'));
示例#21
0
<?php

$result = 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'));
echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb');
?>
<div class="row">
	<div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				关联
			</div>
			<div class="panel-body">
				<table class="table_grid" name="list_table" width="100%">
					<tr>
						<td>
							<table class="table" width="100%" cellpadding="0" cellspacing="0" id="order">
								<thead>
								<tr>
									<th width="10%">颜色</th>
									<th>产品</th>
								</tr>
								</thead>