Exemple #1
0
        $object->delete();
    }
    if (is_array($object->_errors) and count($object->_errors) > 0) {
        $errors = $object->_errors;
    } else {
        UIAdminAlerts::conf('页面已删除');
    }
}
$table = new UIAdminTable('onepage', 'Onepage', 'id_onepage');
$table->header = array(array('sort' => false, 'isCheckAll' => 'itemsBox[]'), array('name' => 'id_onepage', 'title' => 'ID', 'filter' => 'string'), array('name' => 'view_name', 'title' => '示图名', 'filter' => 'string'), array('name' => 'meta_title', 'title' => 'Meta标题', 'filter' => 'string'), array('name' => 'rewrite', 'title' => 'URL', 'filter' => 'string'), 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') : 'id_onepage';
$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 = Onepage::loadData($p, $limit, $orderBy, $orderWay, $filter);
/** 错误处理 */
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' => 'a', 'title' => '新页面', 'href' => 'index.php?rule=onepage_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, 'limit' => $limit), 'table');
Exemple #2
0
    }
    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');
Exemple #3
0
}
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;
?>
">
				<?php 
echo $obj->join('User', 'id_user')->name;
Exemple #4
0
} 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');
Exemple #5
0
$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();
$breadcrumb->add(array('title' => '系统设置', 'active' => true));
$breadcrumb->add(array('title' => '基本设置', 'active' => true));
$bread = $breadcrumb->draw();
$btn_group = array(array('type' => 'a', 'title' => '新货币', 'href' => 'index.php?rule=currency_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, 'limit' => $limit), 'table');
$form = new UIAdminEditForm('post', 'index.php?rule=currency', 'form-horizontal', 'base-form');
$currencys = array();
foreach ($result['items'] as $currency) {
    $currencys[$currency['id_currency']] = $currency['name'];
}
$form->items = array('ID_CURRENCY_DEFAULT' => array('title' => '默认货币', 'type' => 'select', 'value' => Configuration::get('ID_CURRENCY_DEFAULT'), 'option' => $currencys), 'saveDefault' => array('type' => 'submit', 'class' => 'btn-success', 'icon' => 'save', 'title' => '保存'));
echo UIViewBlock::area(array('title' => '默认货币', 'body' => $form->draw()), 'panel');
Exemple #6
0
}
?>
<div class="row">
	<div class="col-md-2 sidebar">
		<div class="panel panel-default">
			<div class="panel-heading">检索分类</div>
			<div class="panel-body">
			<script type="text/javascript">
				$(document).ready(function(){
					var base_url = 'index.php?rule=cms';
					// Load category products page when category is clicked
					$(document).on('click','#categories-treeview input', function(){
						if (this.value !== "")
							location.href = base_url + '&id_cms_category=' + parseInt(this.value);
						else
							location.href = base_url;
					});
				});
			</script>
			<?php 
$trads = array('Home' => '根分类', 'selected' => '选择', 'Collapse All' => '关闭', 'Expand All' => '展开');
echo Helper::renderAdminCategorieTree($trads, array(Tools::getRequest('id_cms_category') ? Tools::getRequest('id_cms_category') : 1), 'categoryBox', true, 'CMSTree');
?>
		 </div>
		</div>
	</div>
</div>
<?php 
$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, 'class' => 'col-md-10 col-md-offset-2', 'result' => $result, 'btn_groups' => $btn_group), 'table');
Exemple #7
0
<script language="javascript">
	$("#save-user-form").click(function(){
		$("#user-form").submit();
	})
</script>
<?php 
$form = new UIAdminEditForm('post', 'index.php?rule=user_save' . (isset($id) ? '&id=' . $id : ''), 'form-horizontal', 'brand-form', 'multipart/form-data');
$form->items = array('name' => array('title' => '姓名', 'type' => 'text', 'value' => isset($obj) ? $obj->name : Tools::Q('name')), 'active' => array('title' => '状态', 'type' => 'bool', 'value' => isset($obj) ? $obj->active : Tools::Q('active')), 'email' => array('title' => '邮箱', 'type' => 'text', 'value' => isset($obj) ? $obj->email : Tools::Q('email')), 'passwd' => array('title' => '密码', 'type' => 'text', 'value' => ""), 'sveUser' => array('type' => 'hidden', 'value' => 'edit'), 'submit' => array('title' => '保存', 'type' => 'submit', 'class' => 'btn-success', 'icon' => 'save'));
echo UIViewBlock::area(array('title' => '编辑', 'class' => 'col-md-5', 'body' => $form->draw()), 'panel');
?>
<div class="row">
<?php 
if (isset($obj)) {
    $carts = $obj->getCarts();
    if ($carts) {
        $cartTable = new UIAdminTable('cart', 'User', 'id_cart');
        $cartTable->header = array(array('sort' => false, 'name' => 'id_cart', 'title' => '购物车ID'), array('sort' => false, 'name' => 'status_label', 'title' => '状态', 'color' => true), array('sort' => false, 'name' => 'add_date', 'title' => '添加时间'));
        $cartTable->data = $carts;
        echo UIViewBlock::area(array('title' => '购物车清单', 'row' => false, 'class' => 'col-md-3', 'body' => $cartTable->draw()), 'panel');
    }
    $orders = $obj->getOrders();
    if ($orders) {
        $orderTable = new UIAdminTable('order', 'User', 'id_order');
        $orderTable->header = array(array('sort' => false, 'name' => 'id_order', 'title' => '定单ID'), array('sort' => false, 'name' => 'status', 'title' => '状态', 'color' => true), array('sort' => false, 'name' => 'add_date', 'title' => '添加时间'));
        $orderTable->data = $orders;
        echo UIViewBlock::area(array('title' => '定单历史', 'row' => false, 'class' => 'col-md-3', 'body' => $orderTable->draw()), 'panel');
    }
}
?>
</div>
Exemple #8
0
$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');
Exemple #9
0
    }
    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');
Exemple #10
0
        if (count($filters_category_del)) {
            $ret = Db::getInstance()->exec('DELETE FROM tm_filter_product WHERE `id_filter` IN (SELECT `id_filter` FROM tm_filter WHERE `value` IN (' . implode(',', $filters_category_del) . ') AND `key`="id_category")');
            if ($ret) {
                Db::getInstance()->exec('DELETE FROM tm_filter WHERE `value` IN (' . implode(',', $filters_category_del) . ') AND `key`="id_category")');
            }
        }
    }
    /** 2.对filter_product表操作 **/
    Db::getInstance()->exec('DELETE FROM tm_filter_product WHERE id_filter IN (SELECT `id_filter` FROM tm_filter WHERE `key`="id_category")');
    Db::getInstance()->exec("INSERT INTO tm_filter_product (`id_filter`, `id_product`) SELECT f.id_filter,ptc.id_product FROM tm_product_to_category ptc\n    LEFT JOIN tm_filter f ON (ptc.id_category = f.value)\n    WHERE f.key = 'id_category'");
}
$breadcrumb = new UIAdminBreadcrumb();
$breadcrumb->home();
$breadcrumb->add(array('title' => '索引', 'active' => true));
$bread = $breadcrumb->draw();
echo UIViewBlock::area(array('bread' => $bread), 'breadcrumb');
?>
<div class="row">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-body">
                <a href="index.php?rule=filter&index=brand">重建品牌索引</a>
                <a href="index.php?rule=filter&index=feature">重建特征索引</a>
                <a href="index.php?rule=filter&index=attribute">重建属性索引</a>
                <a href="index.php?rule=filter&index=category">重建分类索引</a>
            </div>
        </div>
    </div>
</div>

Exemple #11
0
        echo Tools::getRequest('id_category') ? Tools::getRequest('id_category') : 1;
        ?>
&id_brand=<?php 
        echo $brand["id_brand"];
        ?>
">
								<input type="radio" class="id_brands" name="id_brands" value="<?php 
        echo $brand["id_brand"];
        ?>
" <?php 
        if (Tools::getRequest('id_brand') == $brand["id_brand"]) {
            echo "checked";
        }
        ?>
/></a> <?php 
        echo $brand["name"];
        ?>
</li>
						<?php 
    }
}
?>
			</ul>
		</div>
	</div>
</div>
<?php 
//生成表格
$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' => '产品列表', 'table' => $table, 'result' => $result, 'limit' => $limit, 'btn_groups' => $btn_groups, 'class' => 'col-md-10 col-md-offset-2'), 'table');