echo $obj->join('Address', 'id_address')->postcode . ' ' . $obj->join('Address', 'id_address')->city . ' ' . ($obj->join('Address', 'id_address')->join('Country', 'id_country')->need_state ? $obj->join('Address', 'id_address')->join('State', 'id_state')->name : ''); ?> <br/> <?php echo $obj->join('Address', 'id_address')->join('Country', 'id_country')->name; ?> <br/> <?php echo $obj->join('Address', 'id_address')->phone; ?> </fieldset> </div> <div style="width: 49%; float:right;"> <fieldset class="small"> <?php $order_stauts = OrderStatus::loadData(); ?> <legend><img src="<?php echo $_tmconfig['ico_dir']; ?> details.gif">定单状态</legend> <form action="" method="post" name="order_status"> <p><b>当前状态:</b><span style="background-color:<?php echo $obj->join('OrderStatus', 'id_order_status')->color; ?> ;color:white" class="color_field"><?php echo $obj->join('OrderStatus', 'id_order_status')->name; ?> </span></p> <p><b>更新状态为:</b> <select id="id_order_status" name="id_order_status">
} } 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');